Content.mgcb and Visual Basic.

Hi folks. I’ve had some spare time today to get to grips with the Pipeline tool and the mgcb file. I’m fine with what the tool does now and how fonts are loaded (although I hope that’s simplified at some time) and the file sits nicely in my content folder with it’s copy property as Copy always.

However, in the Load event I can’t load anything from the file. Two quick examples, a png file and a font. The Content.mgcb file header shows:

/outputDir:bin /intermediateDir:obj /platform:Windows /config: /profile:Reach /compress:False

and the two major lines of interest under that are:

begin Fonts/Arial-12.spritefont begin Pics/SoftStar.png

I’ve removed the # character as it messes up the forum post.
My load content lines are:

SoftStarTexture = Content.Load(Of Texture2D)("Pics/SoftStar") FontArial = Content.Load(Of SpriteFont)("Fonts/Arial-12")

Both lines give the error - Could not load xxx asset as a non-content file!

The softstar.png file is written to the Bin\Pics folder as I would expect, but there is no Font directory created in Bin.

I’ve tried all the possible variations of syntax on the file names in the load statements and I’m now exhausted.

I’m guessing other people must have got this working with VB, so what on earth am I doing wrong?

Thanks.

That means it didn’t find the XNB file for those assets. Make sure that Content/Pics/SoftStar.xnb and Content/Fonts/Arial-12.xnb exist in your output path.

Ah, now then… Should building the mgcb project create folders and files under Bin or Content?

I have a Pics folder under Bin, and in there is the xnb for the SoftStar, but no font folder is created and there are no font.xnb files. The Pipeline project builds without any errors.

Just to be clear, I found them!! The paths the assets are being created in are Application\Content\Bin, then under that I have Pics and a Fonts. Is this correct?