MonoGame 3.8.1

Great news!

4 Likes

Love it!

Just a few things to mention as a JetBrains Rider user transitioning from a 3.8.0 project.

This change made it so my project wouldn’t build, as it went from directly referencing the mgcb dll to the dotnet tool, which I didn’t have installed.

My workaround was to install it via cli:

dotnet tool install -g dotnet-mgcb

Which installed it to my ~/.dotnet/tools directory as mgcb.exe. Unfortunately, this is also not invoked correctly by the build script, because it is intended to be invoked directly, not prefaced by dotnet. See here for why.

To finally fix it I simply renamed the executable dotnet-mgcb.exe so it would be properly run. Not sure why I had to go through these steps, but hopefully this will be a help to any others running into this problem.

7 Likes

Congrats and thanks for all the hard work!

1 Like

Does anyone have a different recommendation for the template. Only the attached one loads for me and I tried repairing installing directly, and from Visual Studio.

2 Likes

The UWP one works for me… straight out of the box…

1 Like

We noticed a few hiccups in the release that we’re presently addressing, we’re hoping to release a hotfix soon.

For the time being, if you’re running into issues with either MGCB, the MGCB Editor, or running the templates, please verify those points:

  • If converting projects, please check this updated migration guide. It is not yet published to the documentation site but will be soon;
  • If you can’t build the templates, please disable implicit usings by changing this property to false <ImplicitUsings>false</ImplicitUsings>. MonoGame will be updated to remove this feature;
  • If double-clicking an .mgcb file from Visual Studio with the extension installed freezes Visual Studio, please launch the MGCB Editor through the CLI with dotnet mgcb-editor within your project directory instead. An update to the Visual Studio extension will be published to fix this freeze.
5 Likes

3.8.1.303 has been published. Please upgrade both your projects and Visual Studio extension to avoid issues.

2 Likes

Forgive my ignorance, I am getting the following error after making the changes…

Severity Code Description Project File Line Suppression State
Error MSB3073 The command dotnet mgcb /quiet /@:C:\Users\Charles Humphrey\source\repos\NemoKradXNA\StarLords\StarLords\Content\Content.mgcb /platform:Windows /outputDir:C:/Users/Charles Humphrey/source/repos/NemoKradXNA/StarLords/StarLords/Content/bin/Windows/Content /intermediateDir:C:/Users/Charles Humphrey/source/repos/NemoKradXNA/StarLords/StarLords/Content/obj/Windows/net6.0-windows/Content /workingDir:C:/Users/Charles Humphrey/source/repos/NemoKradXNA/StarLords/StarLords/Content/ exited with code 1. StarLords C:\Users\Charles Humphrey.nuget\packages\monogame.content.builder.task\3.8.1.263\build\MonoGame.Content.Builder.Task.targets 142

I opened my old 3.8.0 in VS 2022, updated the packages to 3.8.1, set the TargetFramework in the project file for “net6.0” (but had to then set that to “net6.0-windows”, and now I get this build error.

What have I done wrong?

Thanks in advance…

1 Like

You might want to read the couple messages just before yours, it looks like your tests overlapped the hotfix release by a few seconds.

Package version in references and in .config/dotnet-tools.json should be 3.8.1.303

3 Likes

I updated to 303, and still get the error, but not updated dotnet-tools.json.

Just got off lunch, so will try that after work :slight_smile:

1 Like

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.

2 Likes

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.

2 Likes

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?

1 Like

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=3.8.0.1641, Culture=neutral, PublicKeyToken=null Ÿ MGFX “;-m O #ifdef GL_ES

That work from MGCB Editor and not from VS2022…

1 Like

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

1 Like

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

1 Like

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

1 Like

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

Thanks @mrhelmut

1 Like

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

1 Like

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.

1 Like