Visual Studio 2013 Reference Hell - 它一直在寻找根本不存在的旧版本 DLL - 为什么?
Visual Studio 2013 Reference Hell - It keeps finding an older version of the DLL that does not exist anyhwere - Why?
我有一些源代码放在共享驱动器上,映射到 F 驱动器。
我有一堆我构建的程序集,位于此处:F:\Development\OurProject\Assemblies\Projects\Release
此文件夹内有此特定的 dll:Common.Themes.dll(以及相应的 Common.Themes.pdb)。我昨晚刚刚执行了完整构建,所以两者的日期都是 2018 年 10 月 22 日 7:47 下午。该 dll 的产品版本和文件版本为 5.0.6869.33817
在我开发的这个虚拟机中,我有一个 C: 驱动器。我刚刚在这个驱动器中搜索了任何 Common.Themes.dll,所以我可以将它们从这个 C: 驱动器中删除。我什至关闭了我所有的项目,这样我就可以删除在这里找到的任何 dll:C:\Users\justlooking\AppData\Local\Microsoft\VisualStudio.0\ProjectAssemblies
而且我还删除了以下所有内容:C:\Users\justlooking\AppData\Local\Temp\
此计算机上 dll/pdb 的唯一实例位于:C:\Users\justlooking\Documents\Visual Studio 2013\Projects\MyThemeTest\
随便...
在这个F盘上我这里有以下解决方案:F:\Development\OurProject\UserProfiles\UserProfiles.sln
在此解决方案中,我们有两个项目 files\folders:
F:\Development\OurProject\UserProfiles\UserProfiles
F:\Development\OurProject\UserProfiles\TestContainer
在打开解决方案之前,我从两个位置删除了 bin/obj 文件夹(TestContainer 是启动项目 - UserProfiles 不引用此 DLL)。
正如我提到的,TestContainer 确实引用了 Common.Themes.DLL。今天早上我删除了引用并通过 browsing/navigating 将其重新添加到 Assemblies 文件夹,今天多次。
打开解决方案后,会重新创建 bin/obj 文件夹,如果我转到 TestContainer 的 bin 文件夹,所有引用都会立即放在那里。目前,我看到 Common.Themes.DLL 日期为 10/22/2018 7:47PM。到目前为止一切顺利!
我按下绿色播放按钮(到 debug/build 项目)它还在绿色播放按钮旁边显示 Internet Explorer,因为它会默认调出 IE。
VS 完成构建后,我查看了 TestContainer\bin 文件夹,10/22/2018 7:47PM dll 被日期为 10/9/2018 8:40PM
pdb 是 10/22/2018 7:47PM,但 dll 是 10/9/2018,不同的大小(显然)和不同的版本 (5.0.6856.35405)。一个旧版本。这是唯一执行此操作的文件。
为什么哦为什么要这样做???我无法让它停止。我不知道它从哪里得到它以及如何得到它。
谢谢。
好的,根据@Caius Jard 所说,我在解决方案目录中做了一个 "find in files"。令我惊讶的是,TestContainer .csproj Common.Theme 被引用了两次。
当我重新添加参考资料时,我看到了更新:
<Reference Include="System.Xml" />
<Reference Include="System.Xml.Linq" />
<Reference Include="Common.Controls, Version=5.0.5493.35273, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\Assemblies\Projects\Release\Common.Controls.dll</HintPath>
</Reference>
<Reference Include="Common.Themes, Version=5.0.6869.33817, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\Assemblies\Projects\Release\Common.Themes.dll</HintPath>
</Reference>
所有正确的版本,并且 HintPath 使用的是相对路径。凉爽的。这就是我在检查 .csproj 文件时关注的地方。
但现在我意识到,如果我滚动到底部,我会看到:
<ItemGroup>
<CustomReference Include="Gizmox.WebGUI.Forms">
<HintPath>F:\Development\AWayOlderVersion\UserProfiles\TestContainer\bin\Gizmox.WebGUI.Forms.dll</HintPath>
<Visible>false</Visible>
</CustomReference>
<CustomReference Include="Gizmox.WebGUI.Forms.Themes">
<HintPath>F:\Development\AWayOlderVersion\UserProfiles\TestContainer\bin\Gizmox.WebGUI.Forms.Themes.dll</HintPath>
<Visible>false</Visible>
</CustomReference>
<CustomReference Include="Common.Themes">
<HintPath>F:\Development\AnOlderVersion\UserProfiles\TestContainer\bin\Common.Themes.dll</HintPath>
<Visible>false</Visible>
</CustomReference>
</ItemGroup>
F:\Development\AnOlderVersion\ ... 仍然存在。所以它是从那里拉出来的。
我不明白为什么会有这些 "CustomReferences",在删除那个项目组(所以所有三个自定义引用)之后,它似乎工作正常。
我有一些源代码放在共享驱动器上,映射到 F 驱动器。
我有一堆我构建的程序集,位于此处:F:\Development\OurProject\Assemblies\Projects\Release
此文件夹内有此特定的 dll:Common.Themes.dll(以及相应的 Common.Themes.pdb)。我昨晚刚刚执行了完整构建,所以两者的日期都是 2018 年 10 月 22 日 7:47 下午。该 dll 的产品版本和文件版本为 5.0.6869.33817
在我开发的这个虚拟机中,我有一个 C: 驱动器。我刚刚在这个驱动器中搜索了任何 Common.Themes.dll,所以我可以将它们从这个 C: 驱动器中删除。我什至关闭了我所有的项目,这样我就可以删除在这里找到的任何 dll:C:\Users\justlooking\AppData\Local\Microsoft\VisualStudio.0\ProjectAssemblies
而且我还删除了以下所有内容:C:\Users\justlooking\AppData\Local\Temp\
此计算机上 dll/pdb 的唯一实例位于:C:\Users\justlooking\Documents\Visual Studio 2013\Projects\MyThemeTest\
随便...
在这个F盘上我这里有以下解决方案:F:\Development\OurProject\UserProfiles\UserProfiles.sln
在此解决方案中,我们有两个项目 files\folders:
F:\Development\OurProject\UserProfiles\UserProfiles
F:\Development\OurProject\UserProfiles\TestContainer
在打开解决方案之前,我从两个位置删除了 bin/obj 文件夹(TestContainer 是启动项目 - UserProfiles 不引用此 DLL)。
正如我提到的,TestContainer 确实引用了 Common.Themes.DLL。今天早上我删除了引用并通过 browsing/navigating 将其重新添加到 Assemblies 文件夹,今天多次。
打开解决方案后,会重新创建 bin/obj 文件夹,如果我转到 TestContainer 的 bin 文件夹,所有引用都会立即放在那里。目前,我看到 Common.Themes.DLL 日期为 10/22/2018 7:47PM。到目前为止一切顺利!
我按下绿色播放按钮(到 debug/build 项目)它还在绿色播放按钮旁边显示 Internet Explorer,因为它会默认调出 IE。
VS 完成构建后,我查看了 TestContainer\bin 文件夹,10/22/2018 7:47PM dll 被日期为 10/9/2018 8:40PM
pdb 是 10/22/2018 7:47PM,但 dll 是 10/9/2018,不同的大小(显然)和不同的版本 (5.0.6856.35405)。一个旧版本。这是唯一执行此操作的文件。
为什么哦为什么要这样做???我无法让它停止。我不知道它从哪里得到它以及如何得到它。
谢谢。
好的,根据@Caius Jard 所说,我在解决方案目录中做了一个 "find in files"。令我惊讶的是,TestContainer .csproj Common.Theme 被引用了两次。
当我重新添加参考资料时,我看到了更新:
<Reference Include="System.Xml" />
<Reference Include="System.Xml.Linq" />
<Reference Include="Common.Controls, Version=5.0.5493.35273, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\Assemblies\Projects\Release\Common.Controls.dll</HintPath>
</Reference>
<Reference Include="Common.Themes, Version=5.0.6869.33817, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\Assemblies\Projects\Release\Common.Themes.dll</HintPath>
</Reference>
所有正确的版本,并且 HintPath 使用的是相对路径。凉爽的。这就是我在检查 .csproj 文件时关注的地方。
但现在我意识到,如果我滚动到底部,我会看到:
<ItemGroup>
<CustomReference Include="Gizmox.WebGUI.Forms">
<HintPath>F:\Development\AWayOlderVersion\UserProfiles\TestContainer\bin\Gizmox.WebGUI.Forms.dll</HintPath>
<Visible>false</Visible>
</CustomReference>
<CustomReference Include="Gizmox.WebGUI.Forms.Themes">
<HintPath>F:\Development\AWayOlderVersion\UserProfiles\TestContainer\bin\Gizmox.WebGUI.Forms.Themes.dll</HintPath>
<Visible>false</Visible>
</CustomReference>
<CustomReference Include="Common.Themes">
<HintPath>F:\Development\AnOlderVersion\UserProfiles\TestContainer\bin\Common.Themes.dll</HintPath>
<Visible>false</Visible>
</CustomReference>
</ItemGroup>
F:\Development\AnOlderVersion\ ... 仍然存在。所以它是从那里拉出来的。
我不明白为什么会有这些 "CustomReferences",在删除那个项目组(所以所有三个自定义引用)之后,它似乎工作正常。