Content Manager generating old (non-existant) .xnb files

If I build my game the content manager is generating old .xnb files that were, at one point, a part of the project, but no longer are. The is no reference to them in Pipeline Tool Project and if I rebuild the project in the tool they do not show as being built in the Build Output. However, these .xnb files DO show up in both the Debug and Release directories in the bin. I’ve deleted all of them out of both directories then rebuilt the project for both Debug and Release and, sure enough, they show back up. Does anyone know how I can get rid of them for good?

Try removing the bin and obj folders in the directory of your .mgcb file. Then delete the obj and bin folders of your project and rebuild. This happens because as a build hook, MonoGame copies all .xnb files from the bin folder of the .mgcb build to your project bin folder. This is explained in detail in the docs: http://www.monogame.net/documentation/?page=Using_The_Pipeline_Tool
Check under MonoGameContentReference if you’re interested.

Yep, that did it. Thanks!

1 Like