简体   繁体   English

Visual Studio清洁解决方案不会删除所有已移动的dll /项目引用

[英]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. 我有一个VS 2008 C#Web应用程序,其中包含一系列对自定义dll的项目引用。 These are all at a relative path from the web project. 这些都是来自Web项目的相对路径。 Recently I've noticed that Clean Solution removes some, but not all, of the dlls from the web app's bin\\debug folder. 最近我注意到Clean Solution从web应用程序的bin \\ debug文件夹中删除了一些但不是全部的dll。 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. 第一个正常工作(干净清理它,新版本在重建时复制到web项目)但第二个没有。 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. 如果版本相同,有时VS不会选择最新的dll。 Try changing your version in AssemblyInfo.cs and it should work. 尝试在AssemblyInfo.cs中更改您的版本,它应该工作。

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. 在过去,当我依赖于大小/时间戳时,我遇到了同样的问题但我后来意识到通过更改版本,Studio删除旧的DLL并复制新的DLL。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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