When trying to "Build" my game using Visual Studio, some files and folders get left out of the build

I’m trying to export my game using the “Build” function in VS however the build seems to always delete certain files and folders.
If anyone has any fixes or suggestions I would honestly appreciate it a lot. This is extremely frustrating.

What gets deleted, exactly and what problems does it cause?

Certain folders and json files. As result it crushes before booting

Check your csproj and your content config. If you didn’t set them to copy, they won’t be copied by default.

Can you explain how to do that?

This is the basics you can easily google. But if you don’t want to set the build action manually for every single content file you add, I recommend this. GitHub - Martenfur/Nopipeline: A Monogame Content Pipeline enhancer.

1 Like

Right click the extra items you wish to include in your build in the Solution explorer panel in Visual Studio.
From there you can set Copy To Output Directory. I usually use “Copy if newer”.

Image belows sets up Readme.txt file to be copied.

1 Like