Hey everyone, I’m trying to submit my UWP game to the Dream. Build. Play competition. The deadline is the end of this month so I’ve been grinding hard. I used the Windows 10 UWP template that comes with MonoGame to port my game. I finally got everything working and submitted it to the Microsoft Store but my game failed the “Supported API” part of certification with the following errors:
Error Found: The supported APIs test detected the following errors:
API MFCreateAudioRendererActivate in mf.dll is not supported for this
application type. SharpDX.MediaFoundation.dll calls this API.API MFCreatePresentationClock in mf.dll is not supported for this application type. SharpDX.MediaFoundation.dll calls this API.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.
Then it says “Using an API that is not part of the Windows SDK for Windows Store apps violates the Windows Store certification requirements.” SharpDX.MediaFoundation.dll is how MonoGame takes care of audio right? How can I fix this? I’m going to need a fast fix to make it back into cert for the competition deadline lol. Thanks a lot in advance for the help!
sigh Yeah… it’s rather frustrating. I’m hoping to get an email reply today… if anyone has stories of how they got around this I would appreciate hearing them.
Personally I only needed to play an MP3, so I followed the instructions here:
to “empty” the SharpDX.mediaFoundation dll/xml (extremely ugly hack, to be honest) , and then I implemented playing the MP3 using the native API (declare a MediaElement in the GamePage.xaml, and use it to play an MP3).
Of course if you need other features from that DLL you’ll have to implement them ‘natively’
Thanks for sharing that… I went ahead and did that, unfortunately I had to cut out one of the things in my game because it’s dependent on that .DLL, but honestly this is better than nothing. I’m going to go ahead and resubmit. Fingers crossed that it works!
Ok so apparently this issue was fixed on the SharpDX side. Brian Peek from Microsoft had this message to share:
Just checking in over here: I did identify the issue and there’s actually a fix in SharpDX, but SharpDX hasn’t released new binaries since the patch was in place, and therefore, MonoGame isn’t using a build of SharpDX with the patch in place. I’ve reached out to the right folks to see if there’s something that can be done for future folks that will run into this.
Rather the next SharpDX release. We should be able to upgrade fairly easy now because we’re already at 4.0.1 (latest stable) version of SharpDX. Then people that want to release to the MS Store can use a develop build of MG.
You can already use the prerelease SharpDX assemblies from NuGet and release on the MS store with those if you’re in a hurry.
Yes it’s the same but using the latest merged fixes (although it’s not signed, so you need to bypass the warning screen, it’s safe, honest)
The MonoGame backend also creates installers for every PR request, which makes it really easy to test and ensure new features will work when built with the build pipeline.
For Windows 10, you HAVE to use the latest dev installer, as UWP has issues in the 3.6 build.
As of 5/20/18 this bug is STILL THERE
JUST SUBMITTED TO MICROSOFT STORE!!!
FAILED
Supported APIs
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.
How the F&%K do you get around it and if it means cleaning out the DLL and making a null XML then for the love of god put that in a new dev version to force people NOT to use the damn thing until it’s fixed correctly!!!
Lolol yeah, I know the feeling man. I fixed it by clearing the dll but I believe if you update one of the components on NuGet (see the above comments towards the end of this thread) it should fix the error.
If that doesn’t work I’d recommend clearing the DLL and just move forward with that.
Nope, Tried 5/19/18, didn’t do diddly, updates to the latest and greatest monogame, dev.
Been working all morning to get it fixed, I 'm VERY hopeful of this work around, I just re-submitted it and since my upload has NO Sharpdx.MediaFoundation has no calls or references to it…… well fingers crossed, here’s what I did
in the c:\program file(86)\monogame\3.0\Assemblies\WindowsUniversal\ folder I renamed the offending xml and dll
Removed all reference to songs in my app and inserted this class, feel free to use it and try it
using System;
using Windows.Media.Core;
using Windows.Media.Playback;
using Windows.UI.Xaml;
namespace Pick_and_Pile
{
public class Music
{
public MediaPlayer mediaPlayer;
/*****************************************************************************************
Function Name : Music
Description : Constructor for this class
******************************************************************************************/
public Music()
{
mediaPlayer = new MediaPlayer();
mediaPlayer.Volume = 1f;
}
/*********************************************************************************************
* Function Name : PlayMedia
* Description : play a song using internal media player "filename.xxx" where xxx = mp3
* ******************************************************************************************/
public void PlayMedia(string fileName)
{
// point to the base folder of the app, if you want to nest deeper go ahead
string name = "ms-appx:///" + fileName;
mediaPlayer.Pause();
mediaPlayer.IsLoopingEnabled = true;
mediaPlayer.Source = MediaSource.CreateFromUri(new Uri($"{name}", UriKind.RelativeOrAbsolute));
mediaPlayer.Play();
}
}
}
I tested it with my game works like a charm even with multiple tunes, invoking it should be obvious, if not let me know ill post it.
but I double checked and there was ZERO Sharpdx.MediaFoundation in my builds