But tell me, which processor you have in your mac? Maybe there is a problem. I have M1 in mini and M2 in macbook
I reproduced it too.
-
macOS 12.5
-
Visual Studio for Mac 17.3
-
MonoGame.Framework.DesktopGL 3.8.1.303
-
MonoGame.Content.Builder.Task 3.8.1.303
Investigating the cause, we found that Content was not copied to the execution directory (bin/Debug/net6.0) at the time of build.
Further investigation revealed that Content was not built.
Further investigation revealed that Content.mgcb was empty.
Further investigation revealed that “Save” in the MGCB Editor may not be saved to a file in rare cases.
Thank you! Good Job!
hi,
thank you
How did you solve the problem?
I have a 3,7 GHz 6-Core Intel Core i5 in my iMac.
Hi there. A couple of important notes.
1: Despite that that Monogame only ““supports”” .net 6, I apparently still need to have .netcore 3.1 sdk on my machine (in addition to 6.0) in order to build my monogame project even though it does not target 3.1.
2: Using the NuGet from within Visual Studio 2022 to update Monogame’s NuGet packages MonoGame.Framework.Android from 3.8.0.1641 to 3.8.1.303 causes an entire project to become broken. using Microsoft.Xna.Framework;
yields red squiggly lines under the letters .Xna
and VS claims that no such namespace exists. Uninstalling Monogame from the host machine and re-installing it completely at the newest version doesn’t help. Restarting Visual Studio doesn’t fix it. Restarting the computer doesn’t fix it. Deleting the obj and bin folders also does not fix it.
Same for upgrading MonoGame.Content.Builder.Task from 3.8.0.1641 to 3.8.1.303.
3: The instructions to install mgcb-editor are not working. I’ve installed the C# templates and the content builder will not launch from any location; it cannot be found. Double-clidking the Content.mgcb file itself only opens it up as a text file and does’t launch mgcb-editor either. I’ve been on MG’s discord channel and no usable advice was given for these issues.
For the record, I have finally managed to figure out how to get mgcb working again. I had to install a bunch of new stuff and now the command is mgcb-editor-windows
. Lord knows that was not in any instructions I’ve read, anywhere, and oddly enough, I JUST INSTALLED mgcb-editor on a different computer earlier this week and there was no -windows
prefix so I have NO IDEA where that came from.
I still cannot make Visual Studio open up the ContentBuilder simply by double-clicking on the Content.mgcb file… which isn’t a big deal.
What is kind of a big deal is that although I can succeed in adding content to my game with the Content Builder in this way by launching it from the command line traditionally, MGCB now fails to display ANYTHING when I build or rebuild files so I don’t know if it would tell me even if I had an error or or not in the build process (haven’t had one yet) so this is a pretty annoying step backwards as far as functionality goes.
If I EVER manage to upgrade my project to 3.8.1.303 it might work I imagine but at the moment I doubt that this is looking plausible.
hey bin/Debug/net6.0 location is empty despite successful compilation I recovered the .xnb file generated in ios/bin and I pasted it to this location is that a good thing or it needs another manipulation thank you
Well for those of us who already had global mgcb and then upgraded to 3.8.1, how would you recommend us to use mgcb? I could not get mgcb to open by double-clicking on the Content.mgcb file as instructions said would work after upgrading to 3.8.1 so I had to go with the global route. I couldn’t find another way. I really couldn’t figure out what else to do. Using dotnet-mgcb-editor-windows
is the new command that I have to use from the shell and it’s what launches mgcb-editor now and it works just as well as before. But if you think that this is a pending problem then I’m open-minded to hearing what I ought to do… but at the moment, I’m not going to fiddle around uninstalling a working method of building my content unless someone can give clear instructions on what to do instead that they can guarantee will work… because I don’t want to go through all this again… this update to 3.8.1 has been a nightmare.
It’s the same for me. I would even donate on Patreon for paid support. Not getting any answers from them to all these problems after updating to 3.8.1 is very discouraging. This also doesn’t help to people who are considering start using Monogame.
@Matthew_Exline I assume you checked the updated migration guide, right?
dotnet-mgcb-editor-windows? Are you sure? This one I used when I work on Windows computer. That first. Second - on mac, I think, we should use dotnet- mgcb-editor-mac (as shown on Release MonoGame v3.8.1_HOTFIX · MonoGame/MonoGame · GitHub). But independently whatever you install, command should be mgcb-editor/mgcb-editor-mac (if you list installed dotnet tools, you have column with “commands”), dotnet-mgcb-editor-xxxx is only package name.
However this not working on M1
Ok, its clear now.
Today I read in the documentation: “However , it is not yet possible to use the MGCB or the MGCB Editor on Apple M1 silicon, unless you are running the osx-x64
variant of the .NET SDK (and therefore using Rosetta emulation). We are working toward resolving this inconvenience.”
And this is “solution” for my case I must wait…
Yes, I am sure, and I just double-checked 1.5 seconds ago just to be sure that I’m sure. The command that I use (The only command that will work, as far as I can figure out) to launch MGCB Editor on my computer is mgcb-editor-windows
. mgcb-editor
(which is the command that I’ve always used before, for several years) is no longer working. It gives an error which says: “Cound not execute because the specified command or file was not found. Possible reasons for theis include:” and goes on and on. I’m not currently typing on the same coputer that I devolop on so I’m not able to copy-paste the entire error into this text box. Also, I’m not using a mac, never have.
Yes I have read the migration guide. It doesn’t say anything nice about Android developers. Basically, we’re expected to create an entirely new project and start copy-pasting our code over into it. I did eventually do it, but I felt like I was being made to sit in the back of the bus.
I still cannot launch MGCB Editor in the ways that they say I ought to be able to, and I followed all of the instructions. Currently, I can use the new instruction mgcb-editor-windows
to launch MGCB Editor, which is weird. I’ve been using Monogame for several years now and have never needed the ‘-windows’ at the end, but hey, whatever works, man. Whatever works. I’m just glad that I was finally able to modernize my project, finally. Nice to know that I can safely make backups too which I can put on any fresh install of Windows and Monogame, if the need were ever to arise, which is the main reason I wanted to update in the first place. Tried running a copy of my old project on a new PC with a fresh version of MG and it wouldn’t work at all, so I HAD to figure out how to update, or else I literally did not own a back-up of my project in the event that the one PC that I’m building it on could tank, which was slightly unnerving.
I thought about Mac because with Hobbit7 we’re talking about VS2022 for MAC and MGCB. Hence the mistake and the presumption that you are using a Mac On Windows it is actually command ending with -windows But I have never used command line on this system Sorry for confusion.
Hi,
Has anyone had success using MGCB with Mac for IOS?
For me ANDROID it works fine
thank you
The migration guide says to update the TargetFramework to “net6.0” in your .csproj for any of the MonoGame packages, but this only works for the MonoGame.Framework.DesktopGL package. If you’re using MonoGame.Framework.WindowsDX you get xna namespace compile errors. You instead have to set TargetFramework to net6.0-windows:
<TargetFramework>net6.0-windows</TargetFramework>
I found this out because I ran “dotnet new mgdesktopgl” and “dotnet new mgwindowsdx” and spotted the difference.
Would be good if the migration guide could be updated to mention this so that other people don’t waste hours figuring out what’s wrong like I did.
Having the same problem, no idea how to work around it
MGCB seems broken on iOS (with MonoGame 3.8.1.303).
For me the XNB files are compiled into Content/bin/iOS/Content/ folder. However they do not get deployed to iOS device. Therefore I had to
- ensure they are marked as “Content” and “PreserveNewest” in the project.
- conditionally change ContentManager.RootDirectory to Content/bin/iOS/Content/ depending on whether I target iOS or Android in order for this to work.
MGCB on Android works as expected.
Hi
Thank you for your answer
is it possible to make an illustration i am a bit confused
when you talk about
ContentManager.RootDirectory
is that Content.RootDirectory = "Content"
in the Game1.cs?
thanks again