Pipeline tool Linux: Couldn't find default importer for .../Arial20.xnb


there it strikes again. The pipeline tool in Linux does seem to have problems with font files. I had this earlier but could just ignore it. Now this font is needed for the project.

That’s from the Coursera course, the files were provided. I have actually no idea what’s in it and how fonts work with MG.

What can I do about it ? (I do have W10 and VCS2017 if that’s the only way…)

Have fun,

Ah wait,
‘.xnb’ means it is already “compiled”, no need to do again ?

Yep !
You add assets to the pipeline, not the xnbs :wink:


Now MD can’t find the file but it’s there.


The content file was not found.


messageFont = Content.Load(@“fonts/Arial24”); <- I’ve tried a backslash here, does not help

Does not work. :confused:

When I set the build action to “MonoGameContentReference” the “file not found” error disappears but then it still gives an error.

/usr/lib/mono/xbuild/MonoGame/v3.0/MonoGame.Content.Builder.targets: Error: Command '/usr/bin/mono "/usr/lib/mono/xbuild/MonoGame/v3.0/Tools/MGCB.exe" /@:"/home/oppa/Projects/ProgrammingAssignment6/ProgrammingAssignment6/Content/fonts/Arial24.xnb" /platform:DesktopGL /outputDir:"/home/oppa/Projects/ProgrammingAssignment6/ProgrammingAssignment6/Content/bin/DesktopGL" /intermediateDir:"/home/oppa/Projects/ProgrammingAssignment6/ProgrammingAssignment6/Content/obj/DesktopGL" /quiet' exited with code: 255. (ProgrammingAssignment6)

Whatever exit code 255 is/means. Am I the first person on earth trying to do this on Fedora ?

I opened a ticket on the same subject.
On mac os also, now, impossible to import fonts !
I tried with the “stable” version (which crashes all the time) and the dev version.
same result. Impossible to build the xnb…

for the moment, no comment on myu ticket…


1 Like

am I doing this the right way ? I’ve just started to learn MG. If it’s not me, the Linux version would be pointless. I mean, you do need some font at some point. Or is there some kind of built-in default font ?

Have a nice weekend,

@Stephan_Goldenberg A .xnb file is already processed by the MG content pipeline. It cannot be processed again. You should not add .xnb files to your content projects. If you replace the font .xnb file with the sprite font description it was built from and set the MonoGameContentReference build action on your .mgcb in your game project it will work.

The reason the .xnb file can’t be found is because it’s not in the right location. To load the .xnb file it must be in the bin folder where the executable of your project is also located. If you run the pipeline tool, because it works as a stand-alone tool it puts the results in a local bin folder, but your game can’t find it there. The MonoGameContentReference build action runs the pipeline tool to build your content AND copies the .xnb files to your project bin folder. If you get a ContentLoadException saying the file couldn’t be found, check the inner exception; it will tell you the absolute path the ContentManager is trying to load.

@Pierre_Durant your issue must be a different one. IIRC there were some issues with font building on Mac in 3.6, but I’m unaware of issues in develop. Can you link your ticket?


here is the link:

The pipeline tools builds xnbs. So building xnb with it produces… what ?

What is the output folder setup for your mgcb ? Is it the same as the *.exe of your app ?!


The pipeline tools builds xnbs. So building xnb with it produces… what ?

xnb^2 :stuck_out_tongue_winking_eye:

even I knew it doesn’t make sense to process this again. I thought the tool would simply shove the file to the location it belongs. I don’t know where that is. The line to load this has @“fonts\Arial24” in it…
// load sprite font, create message for player score and add to list messageFont = Content.Load<SpriteFont>(@"fonts\Arial24");

So I removed this from the pipeline tool and the project. It does build now, so it seems to have done something.

What is the output folder setup for your mgcb ? Is it the same as the *.exe of your app ?!

What it is mgcb ? MGContentWhat ?

[oppa@oppa-hex-ssd ~]$ find /home/oppa/Projects/ProgrammingAssignment6/ -name Arial24*
[oppa@oppa-hex-ssd ~]$ 

I did not put it there…


Sorry, the mgcb (MonoGameContentBuild(er?)) is the extension name of projects in the pipelinetool.
You can change the path of the pipelinetool project output to match your visual studio’s bin files :wink: