Great news!
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.
Congrats and thanks for all the hard work!
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.
The UWP one works for me… straight out of the box…
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.
3.8.1.303 has been published. Please upgrade both your projects and Visual Studio extension to avoid issues.
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…
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
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
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.
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.
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=3.8.0.1641, 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
Sorted, spoted I had rolled it back to the ols 3.8.1 version, re updated it, and now no build issue
Thanks @mrhelmut
Thank you so much for the new release. The possibility to use newest .NET features will surely drive the interest in the framework.
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.