Using the article as a reference, I tried to do native publish with .NET 6.0 using the current MonoGame Version 3.8.1.303 and VS2022, but the native binaries do not build.
Microsoft.DotNet.ILCompiler version is 7.0.0 and it references rd.xml from the project.
It did not work in an empty DesktopGL project, nor in the following repository
Is native publish possible with the current MonoGame version?
Unfortunately, we did not get any help from anyone, but we were able to solve the problem on our own.
Finding the following web page was the solution. Thank you very much.
I have published a sample project and documentation on GitHub, and I would be happy to help anyone who has trouble with something similar.
Interesting. I’ve been interested in NativeAOT for potential performance benefits, but it’s incompatible with DirectX builds due to the use of Windows Forms.