As several commercial monogames (Carrion and SoR4) have already used AOT, I thought I would try AOT compiling following this tutorial:
I successfully compiled the blank project for both non-AOT and AOT (which outputs the blue screen), however, I ran into problems with the NeonShooter/Platformer2D samples.
The language of the tutorial isn’t very clear where it says you need to “transplant links to sample sources and assets”, I interpreted this to mean to overwrite the references to the Content/Game in ‘.csproj’ and ‘Program.cs’, respectively. This compiled with no errors, and the non-AOT version of the game worked (screenshot 1), however, the AOT version crashed (screenshot 2). I tried debugging the AOT version, and the error seems to originate from loading the Content (screenshot 3).
Can someone ( @harry-cpp ) offer some advice on how to do AOT properly? AOT support is a pretty big deal, especially the imminent wasm output, which is expected to bring monogame to a far larger audience than ever before. Thus, incorporating a workable AOT guide into the official documentation would seem like it would help many developers.
PS: I am on VS2019 16.9.0 preview 2.0, Windows 10 and Monogame 3.8.