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

发布于 2024-09-29 08:16:02 字数 833 浏览 6 评论 0原文

我有一个 VS 2008 C# Web 应用程序,其中包含一堆对自定义 dll 的项目引用。这些都位于 Web 项目的相对路径中。最近我注意到 Clean Solution 从 Web 应用程序的 bin\debug 文件夹中删除了一些(但不是全部)dll。例如:

<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>

第一个可以正常工作(clean 会清除它,在重建时将新版本复制到 Web 项目),但第二个则不能。副作用是我不会自动获取依赖项的更改。

感谢您的任何帮助。

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.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

骄兵必败 2024-10-06 08:16:02

它似乎只删除它“知道”的文件。

例如,旧的库文件和重命名项目后的旧引用仍然存在。很奇怪。我一直认为“干净”只是一个简单的删除 - 我不太明白为什么不是。如果有疑问,请手动检查每个文件夹。

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.

不可一世的女人 2024-10-06 08:16:02

有时,如果版本相同,VS 不会选择最新的 dll。尝试更改 AssemblyInfo.cs 中的版本,它应该可以工作。

过去,当我依赖大小/时间戳时,我遇到了同样的问题,但后来我意识到,通过更改版本,Studio 会删除旧的 DLL 并复制新的 DLL。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文