file still exists in project file after removing. why?

When i add a file to content and copy the file into project and after that remove the file from content , it still exists in project.
Why it is like so?
Does it have certain cause ?
I think it’s better that file to be completely removed from project after removing from content.

Because content is copied over to your bin file and not removed when the source is deleted. You can clean your project or manually delete the copied content from your bin folder. This is not a MonoGame thing…

Following on what @Jjagg wrote…

In Visual Studio, in the top command bar where you see [File} Click:
Build > Clean -Your Project Name Here- [EDIT Did not know the forum removes things in corner brackets…]

Or I think [Clean Solution] does the same thing too…? [Ah I think this does the process for all attached projects, whereas the one with the project name will do it for individual projects; say you have a Windows Phone/Android and Desktop Project attached, each would be listed with their own Clean command in that list.]

To remove the files that should be copied into the project…

I could be wrong but I just wanted to add this extra info for complete beginners that read this post and do not know where to find this feature.

Hope that helped,


1 Like

I think i have the same kind of issue but XNB files keep being generated at each build if :
-solution is cleaned in VS
-build is cleaned in VS

  • related image files are deleted from bin
  • files in content pipeline are deleted
  • content pipeline is cleaned
  • VS has bee restarted
  • all bin content is deleted to be sure

And if i build after all of this, xnb files keep being generated. I mean, files to product them don’t exist anymore !
Is there another misterious folder on windows keeping these files in memory ?

Well i found it.
I lissed the only folder that matters : MyProject/Content/bin
I was cleaning the folder MyProject/bin but not the previous one :s
all is nice now but why cleaning doesn’t clean this folder ?