MonoGame 3.8.1

I am so happy about this!

I had recently moved to Ubuntu on my main machine, and using .NET 6 with the latest tools is a must without Visual Studio and Windows. I will make time to try and recompile the client for my game tonight!

I was also very happy to hear that there is a roadmap that is detached from XNA. While contributing isn’t on the table for me, I’d still like to know more.

1 Like

Thank you @MrValentine my guest is that I am missing something on my Visual Studio install for UWP since those don’t select all versions out of the box. Aside from that everything else is working great.

1 Like

OK, so got all that in, and it gets past that error now, but it now cant see the Microsoft.Xna namespace??

Is that right, scopping Game gives me nothing to add, I know I must have missed soething else off, but no idea what??

Any ideas?

Hi, I don’t understand why my effect is always compiled with previous mgcb version …

My effect.xnb :
XNBd / zMicrosoft.Xna.Framework.Content.EffectReader, MonoGame.Framework, Version=, Culture=neutral, PublicKeyToken=null Ÿ MGFX “;-m O #ifdef GL_ES

That work from MGCB Editor and not from VS2022…

That looks like a typical nuget cache issue. Try clearing your nuget cache and restarting VS.

Check that you didn’t forget to upgrade the builder task reference as well.

yea, ried that, restartded, it restored the pacakges and still get the error :confused:

Sorted, spoted I had rolled it back to the ols 3.8.1 version, re updated it, and now no build issue :smiley:

Thanks @mrhlemut

Thank you so much for the new release. The possibility to use newest .NET features will surely drive the interest in the framework. :grinning:

On that note, I made a script that refactors the using declarations in migrated MonoGame projects. It strips *.cs files my removing Microsoft.Xna.Framework declarations and modifies *.csproj files by filling in the global usings available in C#10. You can find it here: MonoGame and .NET6 migration: global usings - Konrad Żaba

The Android template does not build for me.
I set <ImplicitUsings>disabled</ImplicitUsings> as per the instructions above (disabled instead of false).

I tried:
dotnet workload install android
dotnet workload restore (as per the error message)
dotnet tool restore

Note brown warning triangles against the packages.

I had a fully working android solution using 3.80 so in theory all the required components should already be installed.

If you are on and recreated the project with the fixed template, disabling implicit usings is not useful (using will trigger type collisions, if you don’t have type collisions, the problem is not about implicit usings).

You need to install the VS 2022 mobile workload and install it for the CLI with dotnet workload install android. You will also have to approve the Android SDK EULA by launching the SDK manager at least once. Make sure to have the latest android SDK, older versions will not work.

This has been tested and other users have it working, so it’s not a MonoGame problem but a VS/.NET installation issue.

Hi there,
Having the Content file as a link does no open the mgcb editor. I’ve tried it creating a new app from scratch. The Content file works fine if it is not a link. Any idea how to fix this? Because I’m trying to port my 3.8.0 project. I’ve all packages correctly installed.

Excited for the update!

If anyone is in the same unique position as me, where you don’t use Visual Studio (and therefore cannot install the extension) and perhaps have a custom tool building content for you, I had to manually update the dotnet MGCB tools as such:

dotnet tool update dotnet-mgcb -g
dotnet tool update dotnet-mgcb-editor -g

Along with following the project upgrade suggestions in the main post, I was up and running again fairly quickly.

dotnet tool update dotnet-mgcb -g
Tool ‘dotnet-mgcb’ was reinstalled with the latest stable version (version ‘’).

dotnet tool update dotnet-mgcb-editor -g
Tool ‘dotnet-mgcb-editor’ was reinstalled with the latest stable version (version ‘’).


System.IO.FileNotFoundException: Could not load file or assembly ‘PresentationFramework, Version=, Culture=neutral, PublicKeyToken=31bf3856ad364e35’. The system cannot find the file specified.
File name: ‘PresentationFramework, Version=, Culture=neutral, PublicKeyToken=31bf3856ad364e35’
at MonoGame.Tools.Pipeline.Styles.<>c.b__0_0(MenuBarHandler h)
at Eto.Style.<>c__DisplayClass13_01.<Add>b__0(THandler w) at Eto.DefaultStyleProvider.<>c__DisplayClass9_01.b__0(Object widget)
at Eto.DefaultStyleProvider.ApplyStyles(Object widget, String style)
at Eto.DefaultStyleProvider.Eto.IStyleProvider.ApplyStyle(Object widget, String style)
at Eto.Widget.OnStyleChanged(EventArgs e)
at Eto.Widget.set_Style(String value)
at MonoGame.Tools.Pipeline.MainWindow.PipelineMenuBar…ctor() in D:\a\MonoGame\MonoGame\Tools\MonoGame.Content.Builder.Editor\MainWindow.eto.cs:line 24
at MonoGame.Tools.Pipeline.MainWindow.InitalizeMenu() in D:\a\MonoGame\MonoGame\Tools\MonoGame.Content.Builder.Editor\MainWindow.eto.cs:line 287
at MonoGame.Tools.Pipeline.MainWindow.InitializeComponent() in D:\a\MonoGame\MonoGame\Tools\MonoGame.Content.Builder.Editor\MainWindow.eto.cs:line 60
at MonoGame.Tools.Pipeline.MainWindow…ctor() in D:\a\MonoGame\MonoGame\Tools\MonoGame.Content.Builder.Editor\MainWindow.cs:line 46
at MonoGame.Tools.Pipeline.Program.Main(String[] args) in D:\a\MonoGame\MonoGame\Tools\MonoGame.Content.Builder.Editor\Program.cs:line 50

What am I missing?

try to reinstall the extension, restart VS - i was experiencing the same

I am unable to build Effect (.fx files) in Visual Studio for Mac 2022.
Textures and other files registered in Content.mgcb build without problems.

Also, the error message in VS for Mac “dotnet mgcb …” command in the error message of VS for Mac and run it in the terminal, it builds normally.

Does anyone know the solution?

What we tried.

Rewrote /private/etc/paths.d/dotnet-cli-tools

~/.dotnet/tools to /Users/{username}/.dotnet/tools.

This seems to be a bug in the .NET SDK.

I deleted ~/.winemonogame.

I deleted .winemonogame from MonoGame 3.8.0 because it seems to not work properly if .winemonogame is left.

mv ~/.winemonogame ~/.winemonogame.bak

I tried re-installing mgcb and mgfxc.


dotnet tool uninstall dotnet-mgcb -g
dotnet tool uninstall dotnet-mgfxc -g


dotnet tool install dotnet-mgcb -g
dotnet tool install dotnet-mgfxc -g

We strongly discourage installing tools with dotnet tool install and even more using the -g or --global parameters. This was the way to use MGCB back on 3.8.0 but we really discourage it with 3.8.1.

3.8.1 uses no-install local tools. If you use dotnet tool install with 3.8.1, you will break MonoGame’s installation and expose yourself to having MGCB version mismatching the one you use in your projects.

If you have a previous 3.8.0 installation, it is strongly recommended that you uninstall the global tools.

Would it be possible to have an idiots guide to migrating the Content.mgcb file from 3.8.0 to 3.8.1?

I migrated my (cross platform) project as per the instructions (installed the VS2022 extension and changed to .NET6) but when I double click on Content.mgcb it opens in the 3.80 version of the editor.

I would like to be able to double click Content.mgcb and have it open in the latest editor.

Note: I very rarely use the command line in Visual Studio to install / uninstall or anything else.
I expect there are plenty more on here who also avoid it.

If you have a previous 3.8.0 installation, it is strongly recommended that you uninstall the global tools.
How is this done? (idiots guide please :upside_down_face:)

What needs to be done after that? I see mention that you just need to install the extension, but it’s not clear how that works - it appears to be just the project templates. Plus, I have it installed already and the old editor is being opened.

Thanks for your patience!!!
We are all in your debt :man_bowing:

The migration guide (read the .config/dotnet-tools.json carefully) + this should be enough (that part is needed if the wrong editor opens):

dotnet tool uninstall dotnet-mgcb -g
dotnet tool uninstall dotnet-mgcb-editor -g
dotnet tool uninstall dotnet-mgfxc -g

Thanks for the quick reply!!

I ran the 3 commands and the middle one performed the uninstall.

I wasn’t aware of the extra migration guide instructions you linked as they are not present here:

You might want to add it in there and also add the uninstall instructions perhaps.
Also, FYI: the point version in the json text is out of date due to the hotfix.

The editor now opens in the correct version.

My solution still doesn’t build but that’s my issue - its failing to load my Tiled maps so I guess something has broken the Tiled API.