.NET Core 3.0 - Build mgcb

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:
http://www.monogameextended.net/posts/getting-started-with-monogame-extended

I then:

  • 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 3.7.0.9

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 3.7.0.9 to 3.7.0.4 and I can successfully build I did have to modify a project file version since it referenced 3.7.0.9, 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 3.7.0.4 it works flawlessly.