I’m messing with MonoGame and .NET Core 3.0 (released today). However, I ran into a strange issue - I can’t get it to autobuild the Content.mcgb file.
I managed to get the Build Action to set to MonoGameContentReference, but it doesn’t output the content correctly. If I create a .NET Framework project it works flawlessly. I assume the targets do not work with .NET Core. Thoughts?
My understanding on this is, .NET 4.5 and don’t stray far from that, can someone explain the options when setting up a target .NET framework and the differences in doing so? Greatly appreciated as this answer is not possible from any book I have… and I have almost all of them!
Did this get resolved for you?
I’ve been working through some things with MonoGame and .NET Core 3 myself, and have gotten a PNG asset to build just fine into a .xnb file.
I started my project through dotnet new shown here:
- Installed the .NET Core 3 SDK
- Opened the project and changed it to target .NET Core 3 in properties
- Updated the Nuget package of MonoGame.Content.Builder to 126.96.36.199
After that I proceeded to open the Content Pipeline, add a PNG as normal, and built the project through Visual Studio (not in the Pipeline tool). I was able to reference and spritebatch.Draw the Texture2D without issue.
Actually, yes. I used a template to make a shared project. From there I downgraded MonoGame.Content.Builder from 188.8.131.52 to 184.108.40.206 and I can successfully build I did have to modify a project file version since it referenced 220.127.116.11, but it’s been working. Any version above 3.7.04 fails for whatever reason.
What is the error you get with the build?
You don’t happen to have an example or a repo I could pull down and try building?
I don’t. I can’t get it to build the content file in a test project… not sure why. I get that mgcb.exe excited with error 9009. As soon as I downgrade to 18.104.22.168 it works flawlessly.