Could not load asset as a non-content file (mgcp path problem?)

I downloaded and installed MonoGam 3.5.
I’m using Windows 10 and Visual Studio Pro 2015
I created a new WindowsDX MonoGame project
I added one texture to my mgcp project (in directory textures/) and the content pipeline can bulid it.

Loading it using Content.Load(“tetures/blargh”) doesn’t work.
The error I get at runtime is:

Exception thrown: 'Microsoft.Xna.Framework.Content.ContentLoadException' in MonoGame.Framework.dll
Additional information: Could not load textures/blergh asset as a non-content file!

When I look at the built data, it lives in Content\bin
The executable, and working directory when running the project, is in bin\Windows\x86\Debug
I have a hunch that this is some change in how directories are intended to be set up, but I haven’t found a good answer.

I have tried setting the “Content.RootDirectory” to the following values, non of which work:
“Content”
“…/…/…/…/Content”
“…/…/…/…/Content/bin”

Maybe something else is the matter? I don’t know. I can’t find any useful documentation for the error, and the internet is full of questions about this that largely have no answer.

Another clue:
When I add an item, it always says “the file is outside the target directory, do you want to copy it?”
It does this even if the file is in the exact place it’s supposed to be copied to!
If I choose to “add a link,” then the texture is built to a filename like Content\bin\textures\blargh.xnb
However, if I choose to “copy file,” then the texture is built to a filename like Content\bin\Windows\textures\blargh.xnb

Thus, my conclusion is that “Add link” somehow breaks the output directly path, and makes the file not found.
Copying the asset into the directory (EVEN IF IT’S ALREADY IN THERE) will make the content builder generate the assets in a working location.

This is intended. If you have the build action of the mgcb set to MonoGameContentReference it should automatically copy the xnb’s over to ‘workingdir/Content’, if not you have to copy them over manually. The docs were recently updated to briefly explain how the MonoGameContentReference build action works, so check it out if things aren’t clear yet.

I think this is a bug. There is probably already an open issue for this on GitHub.

Right – and I think that bug is what makes it not work, because the content goes outside the “Windows” directory.
When I add the content in-place in the input Content directory (by selecting “copy into directory”) the content gets built to Content/bin/Windows, and it gets picked up from there correctly without me needing to do anything else.

So, for now, the work-around is “always use copy into directory”

Hopefully the Googles will pick up on this thread and show it when others run into the same problem, to save them the digging I had to do!

Yeah, linking is broken :frowning: