构建缓慢,大量“考虑过的‘路径’,但它并不存在。”在构建日志中

发布于 2024-12-08 18:56:48 字数 2647 浏览 2 评论 0原文

我正在 Visual Studio 中使用一个相当大的解决方案,其中包含 130 多个项目(不要问)。

它具有大约 40 种不同的解决方案配置,因此一次仅构建解决方案的子集。即使只构建大约 25 个项目,在具有 SSD 的计算机上进行增量构建仍然需要大约 30 秒到 1 分钟。

这是一个旧的解决方案,因此它随着时间的推移而增长,现在可能有些东西已经降级,但在启用详细的构建日志记录后,我在每个构建上看到以下记录:

 Dependency "AWSSDK, Version=1.0.9.0, Culture=neutral, PublicKeyToken=cd2d24cd2bace800".
      Resolved file path is "C:\Program Files (x86)\AWS SDK for .NET\bin\AWSSDK.dll".
      Reference found at search path location "{AssemblyFolders}".
          For SearchPath "aaaaaaaaaaaa\bin\Debug".
          Considered "bbbbbbbbbbb\bin\Debug\AWSSDK.dll", but it didn't exist.
          Considered "bbbbbbbbbbb\bin\Debug\AWSSDK.exe", but it didn't exist.
          For SearchPath "{TargetFrameworkDirectory}".
          Considered "C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\AWSSDK.dll", but it didn't exist.
          Considered "C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\AWSSDK.exe", but it didn't exist.
          For SearchPath "{Registry:Software\Microsoft\.NETFramework,v4.0,AssemblyFoldersEx}".
          Considered "C:\Program Files (x86)\NUnit 2.5.2\bin\net-2.0\framework\AWSSDK.dll", but it didn't exist.
          Considered "C:\Program Files (x86)\NUnit 2.5.2\bin\net-2.0\framework\AWSSDK.exe", but it didn't exist.
          Considered "C:\Program Files (x86)\Microsoft XNA\XNA Game Studio\v4.0\References\Windows\x86\AWSSDK.dll", but it didn't exist.
          Considered "C:\Program Files (x86)\Microsoft XNA\XNA Game Studio\v4.0\References\Windows\x86\AWSSDK.exe", but it didn't exist.
          Considered "C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\ReferenceAssemblies\v4.0\AWSSDK.dll", but it didn't exist.
          ...
  Required by "bbbbbbbb\bin\Debug\xxxxxxxxx.dll".
  Found related file "C:\Program Files (x86)\AWS SDK for .NET\bin\AWSSDK.xml".
  This reference is not "CopyLocal" because it's registered in the GAC.

这种情况至少持续了一百多个路径。

AWSSDK 由我们的核心库引用,该库充当它的外观,引用我们外观的每个其他项目都会重复这些消息。外观具有使用 Copy Local: True 引用的库,但它似乎位于 GAC 中,并且没有随我们的 dll 一起出现在 bin 文件夹中。

还有许多其他依赖项输出相同的消息,而不仅仅是这个。

它最终找到了它,但我无法想象这对硬盘驱动器的寻道时间有好处,而且它可能会对构建时间产生负面影响。

谷歌搜索没有找到任何相关信息。

编辑:好的,我将缓慢的构建问题主要缩小到 Visual Studio 中的 Visual WebGui 集成。我在这里发布了我的发现:http://visualwebgui.com/Developers/Forums/tabid/364/forumid/56/postid/50540/scope/posts/Default.aspx

不过,了解如何操作会很有趣帮助 MSBuild 不考虑那么多路径并更快地找到东西。不过,SSD 的帮助很大。

I'm working with a pretty big solution in Visual Studio consisting of over 130 projects (don't ask).

It has around 40 different solution configurations, so only subsets of the solution are built at a time. Even if only building around 25 projects, it still takes around 30 seconds to 1 minute to do an incremental build on a machine with an SSD.

This is an old solution, so it grew over time and it's likely some things are degraded by now, but after enabling detailed build logging I see the following logged on each build:

 Dependency "AWSSDK, Version=1.0.9.0, Culture=neutral, PublicKeyToken=cd2d24cd2bace800".
      Resolved file path is "C:\Program Files (x86)\AWS SDK for .NET\bin\AWSSDK.dll".
      Reference found at search path location "{AssemblyFolders}".
          For SearchPath "aaaaaaaaaaaa\bin\Debug".
          Considered "bbbbbbbbbbb\bin\Debug\AWSSDK.dll", but it didn't exist.
          Considered "bbbbbbbbbbb\bin\Debug\AWSSDK.exe", but it didn't exist.
          For SearchPath "{TargetFrameworkDirectory}".
          Considered "C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\AWSSDK.dll", but it didn't exist.
          Considered "C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\AWSSDK.exe", but it didn't exist.
          For SearchPath "{Registry:Software\Microsoft\.NETFramework,v4.0,AssemblyFoldersEx}".
          Considered "C:\Program Files (x86)\NUnit 2.5.2\bin\net-2.0\framework\AWSSDK.dll", but it didn't exist.
          Considered "C:\Program Files (x86)\NUnit 2.5.2\bin\net-2.0\framework\AWSSDK.exe", but it didn't exist.
          Considered "C:\Program Files (x86)\Microsoft XNA\XNA Game Studio\v4.0\References\Windows\x86\AWSSDK.dll", but it didn't exist.
          Considered "C:\Program Files (x86)\Microsoft XNA\XNA Game Studio\v4.0\References\Windows\x86\AWSSDK.exe", but it didn't exist.
          Considered "C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\ReferenceAssemblies\v4.0\AWSSDK.dll", but it didn't exist.
          ...
  Required by "bbbbbbbb\bin\Debug\xxxxxxxxx.dll".
  Found related file "C:\Program Files (x86)\AWS SDK for .NET\bin\AWSSDK.xml".
  This reference is not "CopyLocal" because it's registered in the GAC.

This goes on for at least a hundred more paths.

AWSSDK is referenced by a core library of ours which acts as a facade for it, every other project that references our facade then repeats these messages. The facade has the library referenced with Copy Local: True, but it seems to be in the GAC and not coming with our dll to bin folders.

There are lots of other dependencies outputting the same messages, not just this one.

It finds it eventually, but I can't imagine this is good on hard drive seek times and it likely contributes to the build times negatively.

Googling this didn't turn out any relevant information.

Edit: Ok, I narrowed the slow build issues mainly to Visual WebGui integration in Visual Studio. I posted my findings here: http://visualwebgui.com/Developers/Forums/tabid/364/forumid/56/postid/50540/scope/posts/Default.aspx

Still, it would be interesting to know how to help MSBuild not consider that many paths and find stuff faster. Though, a SSD helps tremendously.

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

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

发布评论

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

评论(1

野生奥特曼 2024-12-15 18:56:48

我的项目也有类似的问题。不确定它是否对您有帮助,但您可以尝试一下。请阅读我的问题底部的更新:由于 .suo 文件,发布我的 Web 应用程序可能需要很长时间才能完成

I have a similar problem with my projects. Not sure if it will help you but you might give it a try. Read my update at the bottom of my question here: Publishing my web application can take long time to accomplish because of the .suo file

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