With .NET 5 release yesterday, I started testing my personal projects by switching their TargetFramework tag from netcoreapp3.1 to net5.0.
I have a playground game in Monogame using the DesktopGL template and after switching the target framework to .NET 5, it worked like a charm. Is it safe to assume that Monogame is compatible with net5.0, though?
I’ve got a reply from @harry-cpp saying that there’s nothing to be done in MonoGame to start using .NET 5 other than just changing the target framework.
So, in my case, all I had to do was changing the *.csproj file like the following:
Like Martenfur said, consoles don’t support net5.0 yet, nor do Android and iOS.
However, you can build MonoGame desktop apps for Windows (x86, x64, ARM, ARM64), macOS 10.13+ (x64), and Linux (x64, ARM, ARM64, etc).
This makes your games natively compatible with the Surface Pro X and future Windows ARM64 devices, and any Linux distros people might install on them too. In theory it should work on Raspberry Pi (ARM, ARM64) as well, though your game may not perform well on such embedded devices.
One more thing, if you’re using a Shared Project, the preprocessor directive for net5.0 is: #if NET5_0