I'm using Visual Studio 2010 and working on a project that someone else created. This project had references to several DLLs (directly referencing the DLL), many of which I don't need anymore because of some major design changes. I've removed the references from my project, but the unneeded DLLs still get put in the build output when building my project, and they get included as detected dependencies in a new Setup project that I created.
Why when I've removed a reference to a DLL does it still get detected as a dependency and get included in the build? There is nothing in code referencing any of these DLLs, I've made sure of that. I've also opened the csproj file in a text editor and don't see anything referencing these DLLs that still show up in the build, so what gives?
It is likely that the project you're building transitively depends on that assembly.
Use Build > Clean Solution or Rebuild Solution and it will probably go away.
The output folder doesn't get cleaned when simply building a solution, so any old files are left there until you issue either of the above commands.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With