MonoGame UWP Failing Cert On Microsoft Store

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!

1 Like

Sorry I didn’t see this other thread… Store Certification issues regarding SharpDX.MediaFoundation

I’m going to email the submission people as suggested and see if they will work with me on this.

It sucks that this issue is still present :frowning: The post in the other thread links to the relevant discussion on GitHub: https://github.com/MonoGame/MonoGame/issues/5003#issuecomment-232702207

Apparently this is a bug in the validation that “will be fixed” as stated a year and a half ago :frowning: Hopefully that email does the trick.

1 Like

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.

Fingers crossed!

hi,

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’ :frowning:

1 Like

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!

1 Like

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.

SharpDX fix:

1 Like

So, await 3.8 release?

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.

1 Like

I have to wait for a public release of MG, Git is just not something I can work out at this point.

that’s excellent news :slight_smile:

1 Like

You can download development builds from the downloads page. It’s aptly under the “Development Builds” header.

2 Likes

That’s weird… so, is it an installer variant?

It’s exactly the same as stable downloads. Just built on the build servers from the develop branch.

1 Like

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.

1 Like

I see, thanks guys, will give it a whirl on a clean system…

Quick update on this.

The WACK test still throws the same failed error with the latest monogame but the SharpDX.MediaFoundation pre-release on nuget does fix it.

Just download the latest monogame dev branch and swap out the MediaFoundation reference for the nuget one. (Version: 4.0.1-ci184)

1 Like

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!!!

1 Like

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

1 Like