Store Certification issues regarding SharpDX.MediaFoundation

The SharpDX I’m using is from here:

What else options do I have? :frowning:

It isn’t that there are options… it is that you might have made a mistake if you manually setup your code base.

If you used the MonoGame SDK installer or used Git to checkout the code and update submodules then things should be working as normal.

If you downloaded the code via zip or manually copied the SharpDX assemblies from that repo… it is very possible you made a mistake and copied the wrong ones.

You can see here…

That the right ones for UWP are the ones from the SharpDX/Windows UAP folder. If those are not the ones in your project then you might have the wrong ones.

I used the UWP project template from the MG SDK installer to setup my project, and the MG source and dependencies referenced in my project are checked out using GIT. There is no problem with building and running the game. In fact I only updated a few lines from the previously released version (in-game logic bug fix, nothing to do with SharpDX) and didn’t update MG source and dependencies library. When I submitted that update, it started to fail the certification again and again (even after I pulled all the changes in MG source and dependencies from GIT). I just want to know if I am the only one having this issue…

I’m also having the same problem that @greyp encountered.
I installed the Monogame 3.5 SDK using the installer only.

I tried to publish an app to the Windows Store yesterday and got the exact same problem.

1 Like

I bypassed this error by clearing out both the SharpDX.MediaFoundation.dll and SharpDX.MediaFoundation.xml. This makes all classes used by Microsoft.Xna.Framework.Media unusable, but now the app passed certification.

How I did it:

  1. Navigate to Monogame install location (C:\Program Files (x86)\MonoGame)
  2. Choose your version and open assemblies and desired project type (WindowsUniversal)
  3. Find the SharpDX.MediaFoundation.dll and SharpDX.MediaFoundation.xml and open the in notepad. Clear out everything from SharpDX.MediaFoundation.dll and leave <?xml version="1.0"?> in the xml.
  4. Remove all usage of Microsoft.Xna.Framework.Media.
  5. Publish again.

Note that trying to use any of the classes in Microsoft.Xna.Framework.Media will result in an exception. Instead of using Song use SoundEffectInstance etc. These were the only changes I made and it didn’t affect the user experience in any way.


I haven’t tried out this solution, and I’m not sure if it works with the MG source… Not sure if this is something easy to fix properly (I’m not a MG developer…) >_<

I tried @Olander fix and it worked. The app passed certification.
It was easy because my app didn’t use anything from SharpDX.MediaFoundation.

1 Like

My app doesn’t reference SharpDX.MediaFoundation either. It is the MG source that referenced it. If I mess with SharpDX.MediaFoundation, MG simply won’t build…

Hi @Tom, should we submit a ticket on GitHub regarding this issue? It seems to be a blocker for UWP developers using MG…

Yeah… lets move this to GitHub.

I guess MS changed something in the certification process and now SharpDX.MediaFoundation is illegal to use in a UWP app.

I will have to do some research to figure out what exactly is going on and how to correctly work around it.

Hmm… weird, my project did not have any references to SharpDX.Mediafoundation except those that I myself added. Where does the compiler throw an error? Make sure that you do not delete either of the files, just clear their contents.

@Olander fix has worked for me, thank you so much. :slightly_smiling:

Updating, the fix has not worked just five minutes ago MS Store has marked the app as Non compliant with same error :frowning:

API MFCreateAggregateSource in mf.dll is not supported for this application type. SharpDX.MediaFoundation.dll calls this API.
API MFGetService in mf.dll is not supported for this application type. SharpDX.MediaFoundation.dll calls this API.

Hi @Olander can you explain what do you mean by “Clear out everything from SharpDX.MediaFoundation.dll”, I have followed you instructions but not passed the certification process, what i do was open the SharpDX.MediaFoundation.dll in notepad++ select all and delete and the save the file, same for XML except “xml version” line, and check that i don’t have any refs to “Microsoft.Xna.Framework.Media”, is that what you made to pass the certification? if so, do you have any changes made to monogame to remove the references or are using the repository ones?

Thanks in advance.

Okay let’s see. The SharpDX.MediaFoundation files:

  1. Make sure that you edit these files in the correct MonoGame version as well as project type. You might have edited the files in the UAP folder, not the UWP folder.
  2. The .dll should be completely empty. Like you did.
  3. The .xml should look like this: <?xml version="1.0"?> <0doc> <0/doc>. Sorry that the doc tags did not show last time, this forum automatically treats them as html elements and hides them, which I didn’t realize. Make sure that you remove the 0s from the tags (couldn’t get them to show otherwise).

Making sure that it did really work:

  1. Navigate to the .appxupload directory.(C:…\Game\AppPackages)
  2. Open or extract the .appxupload. I used 7zip.
  3. Open or extract the .appxbundle.
  4. Open or extract any of the .appx files. I extracted the x64.appx.
  5. Search for SharpDX.MediaFoundation.dll, if it doesn’t exist you have successfully bypassed the error. The packages that previously failed the certification should have the SharpDX.MediaFoundation.dll included.

The trick lies in making sure that you choose the correct MonoGame version as well as the correct project type.

We’ve got someone at Microsoft asking the relevant people about this issue.

Thank you so much @Olander tomorrow i’m going to test and let you know if works. :slight_smile: because after opening an issue in the MS Developer Support, they have answered me just today, the response has been so deplorable that I doubt even they have read the email, If some one is interested they only sent a link to: /library/windows/apps/hh464945.aspx

Brian Peek from Microsoft responds that

this is a known issue with the Store submission process right now. If you work with the submission folks, they will grant you an exception until the issue is properly fixed. No need to change your code/MonoGame/anything else. Hope that helps. :slight_smile:


Hope it doesn’t take long to get fixed!

I can confirm that following @Olander fix I get my app published to the store, hope they fix soon.

1 Like