Lingering Issue/Can't Pass Certification: [UWP] Issue regarding SharpDX.MediaFoundation

So by a miracle and the power of Monogame, I’ve gotten the Visual Studio engine working on UWP and everything seems to work fine. Except that I can’t get it through certification. This wouldn’t be so bad, as it’s something that’s not our fault.

Error:
“API MFCreateSensorGroup in mfplat.dll is not supported for this application type. SharpDX.MediaFoundation.dll calls this API.”

And through research I’ve found this:

Here is a topic a year ago on this very issue. And there’s the comment from a MS rep saying we can ask for waives. And yet I can’t find anything about a fix since then. I’ve updated everything, tried almost everything and still nothing works.

What’s worse is I went ahead and sent notes and feedback asking for a waive, and I’m not getting through, and no response at all.

I’m really stuck on this as there’s nothing more I can do to resolve this as it’s not really something on our end that’s causing the problem.

Has someone solved this yet or can we get an update about this issue?

IT IS STILL NOT RESOLVED AND HERES THE ERROR THEN I’LL STOP SHOUTING!

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.

Yes I have the latest Dev version of mono game, No i’m not using “song” no music, in fact I’ve tried pretty much everything so STOP the god damn Sharpdx.MediaFoundation crap from even being apart of my game, WTF do I do now, spent the best part of 18 months writing and rewriting win32 to pass as uwp now this one damn error over and over no matter what I do, and if one more person tells me to take it up with Microsoft i’m going to go ballistic, you know that never return or care about indy developers, Monogame was invented for that, SharpDX don’t know squat and still haven’t fixed it
so what now??

Hi Paul,

quite a long time ago I had the same problem. I followed this instructions and it worked for me:

In fact I have several games in the UWP store (even on XBox 1 Store) which use this hack.

It is not a matter of using or not using ‘song’ (or other functions). As long as the DLL includes them, the stupid UWP store will complain. So, in these instructions you end up “emptying” the DLL in order to pass certification (extremely ugly hack)

If you install a new MonoGame version, you have to do the whole process again as the new installation will probably overwrite the modified DLL.

Now for a cleaner/definitive fix… the problem resides in SharpDX. The SharpDX dll 4.1 ( Latest sharpdx fails windows store certification! (4.0.1) · Issue #939 · sharpdx/SharpDX · GitHub ) has been fixed but not available still as stable version. The MG team will include the fix as soon as the SDX 4.1 goes stable.

You could try to compile MG with the 4.1 pre-release version, or modify the SharpDX 4.0.1 stable to include the UWP fix and then compile MG with it, or go with the ugly hack. That’s all I can think of.

Cheers Mate,

Heres what I did to combat this bugger! :slight_smile:

renamed the offending DLL and XML files in the WindowsUniversal folder (c:\program files(x86)…… etc
added this class to play music, works great and finished game now available on the store

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();
    }
  }
}

// Game now available on the Store