Iâm in the process of upgrading my Monogame project to the newest version (3.5).
Iâve systematically gotten rid of all the insane error messages (so far) except one:
âMicrosoft.Xna.Framework.Game.Exit()â is obsolete: âThis platformâs policy does not allow programmatically closing.â
Itâs been pointed out that while this message is normal for some platforms (like Windows Phone), it should still be valid for a Windows desktop program, which is what Iâm making.
Does Visual Studio think Iâm making something other than a desktop program and why? I have a hypothesis that it could be that Iâm referencing the wrong MonoGame.Framework.dll. I tried switching from the one labelled as âWindowsâ to âWindowsUniversalâ and then to âWindows8â, but got the following error each time:
A reference to âMonoGame.Frameworkâ could not be added. The project targets â.NET Frameworkâ while the file reference targets â.NETCoreâ.
I created a new, blank project and used it as a reference to find the correct assembly to use in the existing project.
For me, it was under
C:\Program Files (x86)\MonoGame\v3.0\Assemblies\Windows\MonoGame.Framework.dll,
which wasnât showing up in the reference manager for some reason. I had to manually browse to it.