Exit() Obsolete on Windows Desktop

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’m out of ideas.

Found this one google at my first attempt.

:wink:

is WINDOWS defined as the conditional compilation symbol? (in project properties)

I’ve found that post as well, but it sounds like the author is trying to make a Windows Store program. Mine is just for desktop.

Fixed it.

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.