Missing Method on launch

I’ve been using Monogame for a couple of years now, and was recently rearranging my project a bit. A few days ago, I tried running what I have to work on the UI a bit, when I noticed I was getting a missing method exception.

Now, just to pre-empt those who will of course feel the need to tell me to go read the manual and search Google: I did both. Here is the exact error message I’m getting:

System.MissingMethodException: Method not found: 'Void SharpDX.DXGI.SwapChain1.Present(Int32, SharpDX.DXGI.PresentFlags, SharpDX.DXGI.PresentParameters)'.
   at Microsoft.Xna.Framework.Graphics.GraphicsDevice.PlatformPresent()
   at Microsoft.Xna.Framework.UAPGamePlatform.Present()
   at Microsoft.Xna.Framework.Game.EndDraw()
   at Microsoft.Xna.Framework.Game.DoDraw(GameTime gameTime)
   at Microsoft.Xna.Framework.Game.Tick()
   at Microsoft.Xna.Framework.UAPGameWindow.Tick()
   at Microsoft.Xna.Fra

The only thing I’m doing is calling XamlGame<MyGame>.Create(launchArguments, Window.Current.CoreWindow, swapChainPanel);, and the only difference from previously is that I installed VS2017 and updated all my packages to the latest.

Whatever isn’t finding that method isn’t my code, so there isn’t anything I can do to fix it, or at least not any I can find by searching. This looks like either a bug or a major breaking change to me. If there’s an easy solution, though, I’d be glad to hear it.

Which packages did it update? Make sure it is using the SharpDX libraries distributed with MonoGame, not through Nuget.

1 Like

That could be it. I know I was using the Nuget packages before successfully, but if those aren’t officially supported, it would make sense for things to suddenly fail. I’ll get back to you on that. Thanks for the suggestion!

EDIT: That did it. Thanks again for your help!

Good to see it fixed. There have been API changes in the latest SharpDX releases, and there are other changes in SharpDX (support for Windows versions) that make it difficult for us to move to them yet.