Trying to restore environment after crash

My SSD crashed with everything on it. I’ve brought the source back down from the repo but I’m having a tough time getting the environment right. Here’s my current errors. Any suggestions on how to fix?


Thanks for any help!

The MonoGamePlatform property is usually in your .csproj file.

Like this:


(look at the yellow marker color)

Ezra,

Please stop spamming the forums:

This is a community-run framework, with community-run support. This isn’t anyone’s full-time job or anyone’s primary priority, and insinuating that $50 would be worth any programmer’s one-on-one support time with you is massively insulting. If anyone had a quick fix for this problem, I assure you they’d just share it with you upon reading about your hardship. We all want each other to succeed here.

Now, to your issue, it looks like your MGCB is having an issue building your content for some reason. The first step to troubleshoot this would be to open your Content.mgcb with the MGCB Editor directly, make sure its version matches that of your MonoGame target (Help > About), and try to clean and rebuild your content. The MGCB editor will likely give you much more robust errors to help you (and us) figure out exactly what the problem is.

image

Again, please forgive my ignorance, but how do I do this? I mean, where is the MBCB Editor?

You should be able to either just double-click your Content.mgcb to open it, or look in your start menu shortcuts under the MonoGame folder (if using MonoGame 3.8.0 when it was still a global tool). If all else fails, you should be able to find it in your nuget packages, by default located here: C:\Users\[WINDOWS_USERNAME]\.nuget\

Note: having looked at your errors and other threads, it looks like you’re targeting MonoGame 3.8.0. So if you’ve freshly installed 3.8.1, your first step before any of this will be to either remove 3.8.1 and get 3.8.0 instead, or migrate your project to use 3.8.1.

I’ve never attempted to downgrade MonoGame before, but presumably you’d be able to use 3.8.0 easiest by right-clicking your Visual Studio project’s “Dependencies” property, selecting “Manage Nuget Packages”, and in the “Installed” Tab, select the 2 MonoGame packages (one at a time - the content builder, and the framework), and on the right side with one selected, you can use a dropdown to select a previous version, then click Update/Install/Whatever. (writing this from memory, may not be exact)

Are these the correct NuGet packages (I’ve never got the hang of them):


Because they’re 3.8 installed.

I don’t have a MonoGame folder in my Start menu.

Took me a while too, select the MonoGame option to the left, and then select the project to install it into on the upper right, then select the version to embed… accept everything and see what happens :slight_smile:

Okay, so I installed everything to the entire project even though only GSBPMG ‘needs’ MonoGame (the other two projects are vanilla C#):


Didn’t make any difference. Then I tried to install the editor via commandline:

And it’s already installed.
MGCB still not showing up in the Content folder. Content still not getting compiled. I’m sure this is the last thing to restore my development environment before the SSD crash (new SSD and back up drives just arrived).

Looks like you’re missing the MGCB nuget package. It is called “MonoGame.Content.Builder.Task” and you will want to install v3.8.0.1641 (matching your MG framework target).

Once you have it installed, look around here for the editor’s .exe (if memory serves, called “MGCB Editor.exe”) C:\Users\Ezra\.nuget\packages\monogame.content.builder.task\3.8.0.1641\ (path pulled from errors in other thread). You can use the .exe to manually open the tool outside of it being a global tool/associated with .mgcb/whatever, and open your Content.mgcb file manually with it to clean/rebuild your content. At the very least, doing this directly in the editor will likely give us much more robust errors to troubleshoot.

First, thanks for the help! I feel like we’re getting closer. Here’s the current state of things (note MonoGame.Content.Builder.Task is installed to GSBPGEMG, not the entire solution, is this right?):


I found the exe but, nothing happens when I click on it. Do I need to copy it somewhere?
Here’s a look at the cs.proj:

Note the errors on the top and bottom now.
Content.mgcb definitely located in Content folder.

Edit: I don’t think that’s the right editor I installed. I think this is:


How do I extract just this editor? I tried this, from the Downloads subdirectory:

without luck.

Hrm. I believe I sent you on a bit of a goose chase there. Sorry for that. It would appear that the MonoGame.Content.Builder.Task package only has the CLI tool and doesn’t have the actual editor (UI tool).

Perhaps try this: open command prompt (Win + R, type in “cmd”, enter), use command dotnet tool install --global dotnet-mgcb-editor --version 3.8.0.1641 followed by mgcb-editor --register to install and register the editor, then either attempt to double-click your Content.mgcb (theoretically now associated with the editor) or nav to C:\Users\Ezra\.dotnet\tools\mgcb-editor.exe to manually open (or perhaps C:\Users\Ezra\.dotnet\tools\.store\dotnet-mgcb-editor\3.8.0.1641\dotnet-mgcb-editor\3.8.0.1641\tools\netcoreapp3.1\any\mgcb-editor-wpf.exe).

Not much luck with this, either:


When I double-click on mgcb-editor-windows I get a standalone version 3.8.1. It recognizes the content.mgcb but doesn’t build the content.

At this point should we just scrap everything, install 3.8.1 and go with that?

Up to you. Provided you’re not targeting Android or iOS, migrating to 3.8.1 is very simple (target 3.8.1.303). The biggest change will be that it uses .NET 6 instead of .NET Core 3.1, so may cause issues if you are using other libs and such that need .NET Core. If you still want to target 3.8.0 instead I would suggest uninstalling all MonoGame anything and starting again. Seems like you’re having overlapping versions issues (both installed at the same time and things are globally registered and such).

I agree (overlapping install issues).
I only went back to 3.8 because I thought it would be easier.
The MonoGame project uses to DLLs, but they’re .NET 6, so we’re good.
Okay, let’s try that… (fingers crossed).

Okay, instructions followed (porting from 3.8) and we only have this error:

Severity	Code	Description	Project	File	Line	Suppression State
Error	NU1101	Unable to find package MonoGame.Framework.{Platform}. No packages exist with this id in source(s): Microsoft Visual Studio Offline Packages, nuget.org	GSBPGEMG	C:\Users\Ezra\Desktop\Bitbucket GS\gsblackpowder\Solution\GSBPGEMG\GSBPGEMG.csproj	1	

Is “{Platform}” supposed to replaced with “Windows” or something?

IT WORKS!
IT WORKS!
Oh, thank you! Donating money now to MonoGame (look, I’m 68 years old and $50 is like real money to me)
IT WORKS!
IT WORKS!
I couldn’t donate $50 so I’m donating $16/month for a while

2 Likes