在我的项目中,在 VisualStudio 2013 和 2012 中打开"生成定义"文件中的"进程"选项卡需要 2-3 分钟。
打开其内容时,选项卡显示"正在下载自定义程序集"。
完成后,并显示内容,我会看到各种警告和错误,例如:
Summary: There were 0 failures, 404 errors and 15 warnings loading custom activities and services.
...
Error: Could not load file or assembly 'Infrastructure.Interface, Version=1.0.3981.21634, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.
...
Error: API restriction: The assembly 'file:///C:Users<username>AppDataLocalTempVSTFSBuild8809fd18-08a3-4d58-8a87-35bbc833a4ed1163529353ThirdPartyBinariesvjredist64vjscor.dll' has already loaded from a different location. It cannot be loaded from a new location within the same appdomain.
...
Warning: Could not load file or assembly 'file:///C:Users<username>AppDataLocalTempVSTFSBuild8809fd18-08a3-4d58-8a87-35bbc833a4ed1163529353ThirdPartyBinariesSQLXML 4.0cvtschema.exe' or one of its dependencies. The module was expected to contain an assembly manifest.
任何人都可以建议问题是什么以及如何解决吗?谢谢。
TFS 生成控制器和代理可以具有自定义活动,它们从源代码管理到控制器Version control path to custom assemblies
设置中指示的路径下载这些活动。
由于模板可能使用这些自定义程序集中的自定义类型,因此当您打开 Edit Build Definition -> Process
或 Queue new build -> Parameters
时,VS 也需要它们。所以VS下载它们,不幸的是它没有本地缓存,所以它每次都下载它们。此外,VS 将程序集加载到 VS 进程中,这可能会导致Could not load file or assembly...
错误。
正如您所发现的,解决方案是将那里的组件减少到最低限度。