The game that I’m working on loads all textures from a folder in the Content sub-project and stores them in a Texture2D[].
For reasons that I cannot figure out, it appears as if the ContentManager (Content) for XNA never unloads these textures, ever. So even if I delete them from the folder, they’re still stored in the pipeline.
Here is my Content folder:

And here is the ContentManager’s loadedAssets in debug.

As you can see from the elements outlines in red, those textures have been deleted from the Content folder but they persist in the ContentManager cache. This means that when I load all textures from the “TileSets” folder, the supposedly deleted textures get loaded in as well.
I’ve tried Content.Dispose() and Content.Unload() in my main UnloadContent() but those don’t fix the problem. Also made sure that the textures were deleted from the folder in my external folder explorer and even checked ContentPipeline.xml; the textures are not referenced there.
What’s going on? Am I missing something?
Apparently I had missed the .xnb files, which are stored in
~\bin\x86\Debug\Content.After deleting the files from there, everything worked as expected.