MGCB can't find default importer

hey,

I’m still relatively new to this sort of thing so I’m learning a lot as I go, but I’ve been trying to set up the basics for the game I’m trying to make, but the mgcb editor isn’t working properly.

image

If this image uploaded properly, the icons on the .mgcb files isn’t there. I’ve tried setting it up through the control panel and registering it according to the guide from the monogame website, but it didn’t work. I’ve heard this is obsolete now. I’m using Visual Studio 2022 and I downloaded monogame through it.

Could I get some guidance with this?

1 Like

Hi @sauropodah, Welcome to the Community!

Can you try following my guide below:

Ask me anything there or here.

Happy Coding!

EDIT

I am assuming you are on Windows…

I am on Windows 10, yes. I went through the guide and downloaded the components I didn’t have (the workloads were already fine). I’ve downloaded the monogame extension fine and the project I’ve been working on was created from a monogame template (it’s been a while but I believe it’s the cross-platform desktop application). I never got the developer mode warning, but I imagine that wouldn’t have much of a bearing on the .mgcb files not being set up since the rest of the monogame stuff is functioning normally. I can inconsistently pull up the mgcb app, but it gives me a warning that reads “Catastrophic failure (Exception from HRESULT: 0x8000FFFF (E_UNEXPECTED))” beforehand. And this happens after double clicking one of the .mgcb files.

I think the issue is mainly because the package for the mgcb tool isn’t set up correctly and I’m not sure how I’m supposed to because the other guides seem to be outdated or there’s something going on on my end I missed.

Do not worry about this, this is being fixed:

Catostrophic Failure (Exception from HRESULT: 0x8000FFF (E_UNEXPECTED)) - Developer Community (visualstudio.com)

So, you got everything working now?

EDIT

OH the developer mode is for UWP apps only…

oh, wack-

no, I was able to open it before as well, but it just won’t let me build .xnb files from stuff like .png, .gif, etc., saying that it can’t find the default importer. I imagine that gifs could easily be weird, so I made a png of it and it was still having issues. I was given the impression that the icons on the .mgcb files not being there is related.

Are they the same in windows explorer?

EDIT

image

Expected behaviour

yup, they are.

image

Expected appearance inside VS

here’s VS

image

What do you see in the right click open with menu in VS

image
image

Click the MGDB Editor and click Set Default, and click ok

EDIT

I know it shows default, but just try it.

nothing seems to have changed. I changed it to another default and set it back as well.

Does the editor not open?

The icons stopped being a thing a few releases ago but I suspect this is a VS thing, we will find out after the patch…

correct, it’s not even opening now.

so there’s not supposed to be icons that show up even if it’s working…?

Yeah not seen them for a while.

@Aristurtle might know the solution to re-assign the system level link to the editor for the filetype… might be a while today before he can take a look.

no worries, thank you for all your help so far!

1 Like

Oh also:

Correct, there are no icons that show up for the .mgcb file type. It’ll just show as the standard paper looking icon

image

Could you try the following for me and tell me what the output result is

  1. Right-click the project in the Solution Explorer panel
  2. Select Open in terminal near the bottom

Then in the terminal panel that opens at the bottom, enter the following command

dotnet mgcb-editor ./Content/Content.mgcb

What happens when you enter this command? Does it output any error or anything?

it pulls up the MGCB Editor without any errors. I tried building again in the editor and it gave me the same error as before.