Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Previously referenced DLL is still included in build output after removing reference

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?

like image 724
Jim Avatar asked Jan 30 '26 23:01

Jim


2 Answers

It is likely that the project you're building transitively depends on that assembly.

like image 149
Matthew Avatar answered Feb 01 '26 13:02

Matthew


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.

like image 36
Tim Coker Avatar answered Feb 01 '26 12:02

Tim Coker



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!