Pipeline not working after changing default folder?

Hello,

I’m learning to use monoGame and recently changed the default folder for VisualStudio2017. Now I’m getting errors when loading seemingly any content through the pipeline. Monogame is completely up to date, and I am running windows 10. Occasionally, when the content can be built in the pipeline tool itself, attempting to run the program will result in an error from Content.Load

Inner Exception 1:
FileNotFoundException: Content\3D\ShipTexture_0.xnb

Inner Exception 2:
DirectoryNotFoundException: Could not find a part of the path ‘C:\Users\ … \Visual Studio\repos\MonoGame\MouseTest\MouseTest\bin\Windows\x86\Debug\Content\3D\ShipTexture_0.xnb’.

The file in question can be found in the 3D folder located at my default directory for Visual Studio. It appears that the Pipeline is creating the folder and files in the wrong location then looking for them where they should be.

I have no idea how to fix this. If anyone can help it would be much appreciated. Thank you for your time.

TLDR: When using the Content.Load the 3D folder containing the necessary .xnb files is created in my default directory for visual studio (next to my repos folder). The ContentLoadException I get looks for the 3D folder where is should be (in the content of my project)

Hello, and welcome to Monogame!

As far as I understand you moved your content outside of or renamed the Content folder generated by the project template? If it fails to build in both the pipeline tool and when you run the application, it might be worth checking the content.mgcb file in a text editor (not the pipeline tool) in case there are references to the previous location. By default folder are you referring to the Content Directory generated by the template?

If this didn’t make sense or you need further clarification, don’t hesitate to let me know!

I tried to recreate the problem in a new project and once again the ‘3D’ subfolder containing the .xnb files was created outside the content folder generated by the project template. Once I moved the folder into the content directory the project worked as desired. But every time new content was added I had to do this again.

I reinstalled both mono game and visual studio, hoping that would help my problem. I did more tests, and this issue only occurs when, in the MonoGame Pipeline Tool, I add existing item, choose the file, add link to file.

The program now runs when I copy the file to the directory. I am unsure if I am using the link file feature incorrectly. For now I will copy the files.

Thank you for your time.

1 Like