MonoGame With .NET 7?

Are there any problems with MonoGame & .NET 7 or is everything good?

Hey @Ezra_Sidran, modified your title, just letting you know.

I think it works, just try a blank template project to see if it works…


But I suspect you mean are there any hiccups?




I did this the 7.0 bit, on a DesktopDX project, not tested DesktopGL, and it works… that is in the csproj file…

Works from linux as well - Linux Mint 21.2 Cinnamon

Good to know. Thanks, everybody. We just switched to .NET 7 and we’re having some hiccups. Good to know it’s not MonoGame.

1 Like

My understanding is even number versions are long term support and odd numbers are short term, no idea why but yeah, heard this recently…


What kind of hiccups?

With files and serializer. Here’s a screen shot I took to send over to my partner in Liverpool who did the upgrade to NET .7:

It’s happening while loading a scenario file (yes, created under .NET 6). Hopefully not all our old scenario files are now munged and we have to write a convertor.

I see… that is odd, but those are XML files…?

What is the exact full exception message. There have been multiple reports in the dotnet repo cincerning xml serialization issues in net7.

1 Like

Its more so that even number is long term support, so no major api changes that would require a semantic major version increase.

Odd numbers are the preview for new things that would require semantic version major number update and gives them time to preview new features and work out kinks before next LTS release.

1 Like

Looking at the diffs that my partner in Liverpool made, this seems to be the change that fixed it:

        XmlDictionaryReader reader = XmlDictionaryReader.CreateTextReader(fs, new XmlDictionaryReaderQuotas{MaxArrayLength = int.MaxValue });
1 Like

Works Fine. 5 was a mess. but 6+ should work out of the box.

? umm

Apparently something about increasing the max array length. I don’t mess with his code.