I tried to update my UWP app a few days ago, and the update kept failing the certification because of an error:
Error Found: The supported APIs test detected the following errors:
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.
And it seems I'm not the only one experiencing this issue, as discussed in this thread.
So the weird thing is that @greyp game was already in the store and passed cert. It wasn't until he tried to update it that he ran into this certification error with SharpDX.MediaFoundation.dll.
@greyp - I am assuming here you didn't just add Song/VideoPlayer support in your update right? It was there in your previous submission to cert correct?
So we don't know if something in MonoGame changed to break this or if the UWP certification process changed and this API is no longer allowed... or if this was broken all along and we didn't hear about it until now.
I don't see any usage of MFCreateAggregateSource, but I do see usage of MFGetService:
https://github.com/mono/MonoGame/blob/develop/MonoGame.Framework/Media/VideoPlayer.WMS.cs#L212
However that is in the Windows Media Service implementation which is not used with UWP. UWP uses the Windows Media Engine which is the newer API that is supported on Windows Store and UWP.
Still maybe there are some random MF calls in SharpDX.MediaFoundation.dll that although are not used... still exist in there and can be removed?
Any ideas @BrianPeek ?
Hi @tomspilman , in the new update of my game I only changed a few lines and those were all in-game logic tweaks. I didn't add anything new into this update.
Edit: I didn't even update the MG source when building that update. After it failed certification twice, I pulled the latest changes from GitHub, rebuilt that update, and it still had that error and couldn't pass certification.
This all sounds like a change in the certification tools and/or rules that happened to affect us.
I forgot to mention that the update of my app has passed the local certification test by the Windows App Certification Kit 10.0. So it does seem that MS changed something in the store certification...
Interesting.... thanks @greyp !
Just to confirm the issue as @greyp said, my app also passes the test with Windows App Certification kit but no the Windows Store certification process, and I am very confident that is something regarding MS Store changes because my app passes the certification last week with exactly the same code and compiled against exact same version of monogame that I have now, the only thing i changed in beetween was add some icon tiles to the bundle.
Me too, I can confirm the above described (Windows® Store) certification failure:
Certification was OK two weeks ago and the local WACK still succeeds in certifying.
I reported this issue to Microsoft® already and will post their reply as soon as I know more.
Thanks @AdrianWenz !
If it wasn't a mistake and indeed those calls need to be removed it might take a little effort to get SharpDX fixed... but I think it should be doable.
Emails out to the right folks...will reply when I have some more info...
Thanks @BrianPeek !
Question from Microsoft®: "In the interim, I would like to know if the most recent app package was created on the most recent version of Visual Studio 2015 v.3?"
This is true for me (14.0.25422.01), what about the others facing this problem? Could you please confirm?
Thanks.
Same here. I'm using the most recent version of Visual Studio 2015 Community.
Other version here :)
Visual Studio Professional 2015
Version 14.0.25123.00 Update 2
OK, I've posted the reported version information to Microsoft®. Thanks for your participation.
At least we should get a temporary exception to the submission rules unless this issue is fixed.
I'll keep you informed.
Hey all, 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. :)
Thanks Brian.
Hey all, this is a known issue with the Store submission process right now.
Ahh... so basically anyone running into this should be able to get it waived now.
Thanks @BrianPeek !
Unfortunately, I cannot confirm that the Store submission process has yet been modified to allow for this exception. As requested, I've resubmitted the app package with a reference to the service incident number given to me by Microsoft® (under 'Notes for certification') but it was rejected again for the same reason.
I will request more help and insist on a soon resolution to this annoying issue.
More emails out...
Yes, we are stuck on this too.
@tomspilman Negotiating with Microsoft® might result in having to fix the 'SharpDX' issue within MonoGame in order to get the apps certified again. Currently, they even don't realize that the submission process seems to use another (newer?) WACK than the one developers use.
I'm still trying to get a temporarily exception for the MonoGame developers but, just in case, what would we have to do to get rid of the references to 'SharpDX.MediaFoundation.dll' inside our apps?
Thanks!
we have to do to get rid of the references to 'SharpDX.MediaFoundation.dll' inside our apps?
Not use any Song or Video features... but that is silly as those APIs have been allowed in UWP apps for a year now.
We need to figure out what actually changed in the last few weeks to break this. Did they ban some APIs that were previously allowed? Was WACK broken and these APIs were banned all along?
There is some information here that is missing.
Known bug...it will be fixed, I just don't have an ETA. :(
Known bug...it will be fixed, I just don't have an ETA. :(
Thanks Brian for steering this back on track. :)
@AdrianWenz - Note Brian works at MS and has confirmed this a bug in the cert/WACK that will be fixed.
So to be clear MonoGame or SharpDX does not need any fix here. This is a MS issue to fix in cert/WACK.
If you cannot get cert to give you an exception then removing references to Song and Video should allow you to work around the issue.
@tomspilman OK didn't know about this. I will stop further investigation with Microsoft®.
@BrianPeek Is there any time schedule for this fix? Thanks.
Is there any time schedule for this fix? Thanks.
@AdrianWenz - As Brain said above there is no ETA on a fix yet.
According to Microsoft®, no exceptions to the certification process are possible due to 'technical' reasons:
"_Our apologies, an exception will not be allowable. This is a manual automated process within the certification process verifying the API's. It will fail submission almost instantly and there is no way to bypass the pre-processing part that performs this part of certification. Until a fix is created and released into the certification environment it will fail on any unsupported API's_."
This is a bad message because the issue occurs even if no audio/video references are contained in the application code; no way for a work around at the moment.
This is a bad message because the issue occurs even if no audio/video references are contained in the application code;
What if you make sure SharpDX.MediaFoundation.dll is not included in your packaged app assemblies? It can't get called or scanned by the cert process if the assembly isn't there.
@tomspilman Thanks for your help. Do you mean by hacking the 'SharpDX.MediaFoundation.dll' and 'SharpDX.MediaFoundation.xml' manually i.e. by emptying those files at '...MonoGame\v3.0\Assemblies\WindowsUniversal'? Or is there another way to remove that file from the package app assemblies?
i.e. by emptying those files
No... I wouldn't do that.
Just delete them from the MonoGame\v3.0\Assemblies\WindowsUniversal folder or rename them something else so it can't be referenced.
That should let you identify who/what is pulling them in and remove them.
Tom, I renamed 'SharpDX.MediaFoundation.dll' and 'SharpDX.MediaFoundation.xml' and rebuilt the app package bundle (x64, x86, ARM)... Successful, it builds without any problem and has the same size as before.
Hi Adrian,
Did this solution work for you, were there any problems in getting your app to work afterwards? What APIs are not available for use without those DLLS?
@jakepoz I haven't re-submitted the app yet because Tom's and my expectation was that it would not rebuild successfully after renaming the 'SharpDX.MediaFoundation.*' files. But it did... (my app does not use any audio/video functions). Therefore, my guess is, that there is a bug in the WACK software used in the submission process, triggered by 'certain' code related to the MonoGame framework. No possibility for a work-around at the moment.
Currently, I'm waiting for Microsoft® to confirm that the bug is fixed.
Hope, this answers your question.
Aye, we are also waiting on MS for a fix on this one :) Sounds like we are in the same place then.
@AdrianWenz Can you try to resubmit your original update? We just had a package go through for us, but we had to delete the submission and re-enter the details.
@jakepoz Thank you for the hint, Jake. I've just re-submitted it and am waiting for the outcome.
More news in some hours...
@jakepoz Nope, my application still fails for the same reason; even with re-creating the submission.
No promises on my part (I don't work on that team...I'm only the middle-man :)) but there will likely be a fix in place next week. Try submission again on 8/2 or later.
@BrianPeek Thanks Brian. Will let you know.
@tomspilman @BrianPeek After upgrading to Windows® 10 OS Build 14393.10, Windows® SDK 10.0.14393.0, Visual Studio® 2015 Update 3 (14.0.25425.01) and after a full rebuild (targeting build 14393.0/min build 10586.0), I can confirm that my application now passed certification successfully.
I have the same problem now (6 month after you guys talked about this). Can anyone confirm that he is still able to publish his app to the store (and use the mediafoundation-dll)?
Hello,
I'm too having this error trying to publish a game for UWP/Xbox. I used the same versions as @AdrianWenz but this didn't fix the problem.
Any news on the issue?
I followed the instructions at http://community.monogame.net/t/store-certification-issues-regarding-sharpdx-mediafoundation/7862/11 and the game works, but without music.
I'm trying to move the Song to SoundEffect right now, but the issue has been there for 15 months and Microsoft seems unwilling to fix this.
There's an obvious problem which I hadn't thought of. My 5mb MP3 is converted to a 45Mb wav file, making all the projects hitting this problem excessively large. Is there any update on the issue, @BrianPeek ?
Thanks.
@KakCAT I don't work in this area any longer, but I have sent an email to the folks I talked to last time letting them know.
Hi,
this should be automatically fixed once MonoGame moves into SharpDX 4.1.0
@Jjagg - Any reason why we couldn't move to SharpDX 4.1.0 now?
I think it's not released yet (not as stable at least), I decided to crosspost just in case somebody was looking at the issue.
Any reason why we couldn't move to SharpDX 4.1.0 now?
Not that I know of, but like @KakCAT mentioned it's not released yet. I'd wait for the stable release.
I am attempting to get my game certified and listed in the Windows 10 Store and am running into the same problem.
Under the Supported API test section of the Certification report:
At first I got these errors by running the certification tests on my local computer. After researching the forums here some, I installed SharpDX.MediaFoundation 4.1.0-ci217 through Nuget. (You have to check the Include preleases option to see it, this took me a while to figure out). After this, I passed local certification tests.
Now my game passes certification locally, but when I submit my game to the store, it fails certification on the Microsoft side for the same 3 items listed above.
I dug through the .appxbundle file I submitted to Microsoft to check the actual version numbers of the DLLs. ShapDx.dll, SharpDX.MediaFoundation.dll, and ShapDX.DXGI.dll are all showing correctly version 4.1.0 in their metadata. So it appears I am sending the right DLLs to fix the problem in the submission package.
Do I need to do something else besides simply downloading SharpDX.MediaFoundation 4.1.0-ci217 via Nuget to get the new dlls to pass certification? Or is the only current workaround to not use SHarpDX.MediaFoundation? I have 4 in game music tracks right now and would rather not remove usage of the Song class if possible.
Thanks,
Brett
Same Problem as Brett, No matter what I do or which version I use, the windows Cert always fails, they claim sharp isn't supported if there is a work around please let me know, i'm getting the exact same errors as Brett, please advise.
Supported API test
FAILED
Supported APIs
Error Found: The supported APIs test detected the following errors:
API GetModuleHandleA in kernel32.dll is not supported for this application type. SharpDX.DXGI.dll calls this API.
API LoadLibraryExA in kernel32.dll is not supported for this application type. SharpDX.DXGI.dll calls this API.
API MFCreateSensorActivityMonitor in mfplat.dll is not supported for this application type. SharpDX.MediaFoundation.dll calls this API.
Impact if not fixed: Using an API that is not part of the Windows SDK for Microsoft Store apps violates the Microsoft Store certification requirements.
How to fix: Review the error messages to identify the API that is not part of the Windows SDK for Microsoft Store apps. Please note, apps that are built in a debug configuration or without .NET Native enabled (where applicable) can fail this test as these environments may pull in unsupported APIs. Retest your app in a release configuration, and with .NET Native enabled if applicable. See the link below for more information:
Alternatives to Windows APIs in Microsoft Store apps.
@DrSlaphead,
Either I am doing something wrong when trying to implement the discussed workarounds using the newer version of SharpDX or the certification process has changed and it is not possible to use the song class anymore and pass online certification.
Either way, I replaced the MonoGame built in Song class for playing music by playing music tracks using the built in Sound Effects system. Then I removed the offending DLL altogether from the build process which allowed me to pass online Microsoft certification.
-Brett
Error Found: The supported APIs test detected the following errors:
API MFCreateMuxStreamAttributes in mfplat.dll is not supported for this application type. SharpDX.MediaFoundation.dll calls this API.
API MFCreateMuxStreamMediaType in mfplat.dll is not supported for this application type. SharpDX.MediaFoundation.dll calls this API.
API MFCreateMuxStreamSample in mfplat.dll is not supported for this application type. SharpDX.MediaFoundation.dll calls this API.
API MFCreateSensorGroup in mfplat.dll is not supported for this application type. SharpDX.MediaFoundation.dll calls this API.
API MFCreateSensorStream in mfplat.dll is not supported for this application type. SharpDX.MediaFoundation.dll calls this API.
Why is this not fixed?
@kibblebits , running into the same issue:

Could we migrate to the latest SharpDX?
(According to https://github.com/sharpdx/SharpDX/issues/939 this should be fixed)
@devedse Yes, we should upgrade to 4.2.0. This would require a pull request in the Dependencies repo first, then a pull request to update the Dependencies submodule in this repo.
There's a helper script to pull the SharpDX packages from NuGet included in the dependencies repo here. You can run it by calling pull-nugets.bat <Version>, so to upgrade to 4.2.0 that'd be pull-nugets 4.2.0. It expects NuGet to be in your PATH (i.e. you can run NuGet CLI from cmd).
I intend to push to use the NuGets directly (#6144) once we get rid of Protobuild (#6207), so this will just be a version change in a csproj file.
@Jjagg
I just tried to upgrade all dependencies for UWP and I'm still seeing some errors:

Apparently there's still an issue with SharpDX 4.2.0. I'll see if I can work together with the guys there to fix it.
I have a UWP app where all I'm using SharpDX for is to iterate through font characters, similar to this post: https://edi.wang/post/2017/1/22/windows-10-uwp-get-fonts.
My app does not fail cert locally, but fails in the store with the same issue talked about in this thread. This is an updated version of my app, but I didn't touch any of the SharpDX code. The app passed cert before, but now doesn't pass.
API GetModuleHandleA in kernel32.dll is not supported for this application type. Socket.WebPins.UwpApp.dll calls this API.
API LoadLibraryExA in kernel32.dll is not supported for this application type. Socket.WebPins.UwpApp.dll calls this API.
I'm using 4.2.0.
I'm stuck and cannot submit my app. Any update on this issue?
The libs you are using are incompatible with the windows store, remove them, all media foundation class libs fail, always have, rename them in your monogame folder so they don’t get linked that should fix it, you might need to change your sfx and music,
Depending how your doing it
Sent from my iPhone X
On Mar 27, 2019, at 1:45 PM, stoltzystoltz notifications@github.com wrote:
I have a UWP app where all I'm using SharpDX for is to iterate through font characters, similar to this post: https://edi.wang/post/2017/1/22/windows-10-uwp-get-fonts.
My app does not fail cert locally, but fails in the store with the same issue talked about in this thread. This is an updated version of my app, but I didn't touch any of the SharpDX code. The app passed cert before, but now doesn't pass.
API GetModuleHandleA in kernel32.dll is not supported for this application type. Socket.WebPins.UwpApp.dll calls this API.
API LoadLibraryExA in kernel32.dll is not supported for this application type. Socket.WebPins.UwpApp.dll calls this API.I'm stuck and cannot submit my new update. Thoughts?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
I'm confused. To clarify, I don't know what a "monogames folder" is. My UWP app is not a game, just a simple app and the only namespace I'm using is SharpDX.DirectWrite related to listing fonts. My app is in the store now and has never failed cert until today.
Most helpful comment
Apparently there's still an issue with SharpDX 4.2.0. I'll see if I can work together with the guys there to fix it.