简体   繁体   中英

Visual Studio clean solution doesn't delete all dlls / project reference getting moved

I have a VS 2008 C# web app with a bunch of project references to custom dlls. These are all at a relative path from the web project. Recently I've noticed that Clean Solution removes some, but not all, of the dlls from the web app's bin\\debug folder. For example:

<Reference Include="TowerCo.Utilities, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
  <SpecificVersion>False</SpecificVersion>
  <HintPath>..\..\Components\TowerCo.Utilities\bin\Debug\TowerCo.Utilities.dll</HintPath>
</Reference>
<Reference Include="TowerCo.WebControls, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
  <SpecificVersion>False</SpecificVersion>
  <HintPath>..\..\Components\TowerCo.WebControls\bin\Debug\TowerCo.WebControls.dll</HintPath>
</Reference>

The first one works normally (clean cleans it, new versions copied to web project on rebuild) but the second does not. A side effect is that I don't automatically pick up changes to the dependency.

Thanks for any help.

It only seems to delete files it 'knows about'.

For instance old library files, and old references after having renamed projects are still there. Very strange. I always assumed 'Clean' was just a straightforward delete - and I don't quite understand why it isn't. Go in and check each folder by hand if in doubt.

Sometime VS doesn't pick the latest dll if the version is same. Try changing your version in AssemblyInfo.cs and it should work.

In past, I faced the same issue when I was relying on size/timestamp but I later realized that by changing the version, Studio removes the older DLLs and copies the new DLLs.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM