Problem with MGCB Editor after upgrade to 3.8.1.303

Hi,

Some time ago, I’ve upgraded to 3.8.1.303 and migrated my project according to the migration guide. All went fine, however I didn’t try starting mgcb-editor back then. Recently I needed to debug a custom content processor and started mgcb-editor the first time after the migration (using dotnet mgcb-editor from the command line in project directory).

Turns out the editor starts and loads my .mgcb file correctly, but when I click build/rebuild/clean absolutely nothing happens - no error, no “up to date” message, no anything. Tried cleaning the nuget caches and doing dotnet tools restore manually - no change. The same happens if I create a new project in VS from a template, and there’s no difference whether I try to build and empty .mgcb file or add some content files.

Suprisingly, it works if I build the editor from source. However then it fails to load my custom content processors’ assembly with a Could not load file or assembly 'MonoGame.Framework, Version=3.8.1.303, Culture=neutral, PublicKeyToken=null' exception.

I’m using VS2022 on Windows.

I had this type of issue when I had moved my nuget packages path. For some reason or other I believe you need to make sure that your dotnet-mgcb nuget folders are in C:\Users\[WINDOWS_USER]\.nuget\packages\ and that your folder containing your Content.mgcb (or whatever other .mgcb) file has the .config folder with the dotnet-tools.json file within it. I’m shooting this from memory though, so YMMV.

2 Likes

That was it :slight_smile:. My .mgcb file was located in a project folder which did not have the .config/dotnet-tools.json file, and so the editor was not able to invoke mgcb. Adding the file resolved the issue. Apparently the content builder task within the project invokes mgcb in a slighly different way, since the content build from VS worked fine.

Thanks for help!

2 Likes