MonoGame 3.8.1

Thanks. The Monogame templates appeared after reparing my VS installation.

The Windows DX template has errors that have to be resolved before it will build:

Severity	Code	Description	Project	File	Line	Suppression State
Warning	NETSDK1137	It is no longer necessary to use the Microsoft.NET.Sdk.WindowsDesktop SDK. Consider changing the Sdk attribute of the root Project element to 'Microsoft.NET.Sdk'.	mg381 test2	C:\Program Files\dotnet\sdk\6.0.302\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.DefaultItems.targets	147	
Error	CS0104	'ButtonState' is an ambiguous reference between 'System.Windows.Forms.ButtonState' and 'Microsoft.Xna.Framework.Input.ButtonState'	mg381 test2	D:\Code\mg381 test2\Game1.cs	32	N/A
Error	CS0104	'Keys' is an ambiguous reference between 'System.Windows.Forms.Keys' and 'Microsoft.Xna.Framework.Input.Keys'	mg381 test2	D:\Code\mg381 test2\Game1.cs	32	N/A
Error	CS0104	'Color' is an ambiguous reference between 'System.Drawing.Color' and 'Microsoft.Xna.Framework.Color'	mg381 test2	D:\Code\mg381 test2\Game1.cs	42	N/A

2 Likes

Great news! Congratulations!!! :tada:

1 Like

Please check: Remove global usings from 3.8.1 nuget packages. · Issue #7848 · MonoGame/MonoGame · GitHub

2 Likes

:heart_eyes: :star_struck:

:partying_face: :partying_face:

1 Like

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