1. <i id='TVtmE'><tr id='TVtmE'><dt id='TVtmE'><q id='TVtmE'><span id='TVtmE'><b id='TVtmE'><form id='TVtmE'><ins id='TVtmE'></ins><ul id='TVtmE'></ul><sub id='TVtmE'></sub></form><legend id='TVtmE'></legend><bdo id='TVtmE'><pre id='TVtmE'><center id='TVtmE'></center></pre></bdo></b><th id='TVtmE'></th></span></q></dt></tr></i><div id='TVtmE'><tfoot id='TVtmE'></tfoot><dl id='TVtmE'><fieldset id='TVtmE'></fieldset></dl></div>

      1. <small id='TVtmE'></small><noframes id='TVtmE'>

        <legend id='TVtmE'><style id='TVtmE'><dir id='TVtmE'><q id='TVtmE'></q></dir></style></legend>
      2. <tfoot id='TVtmE'></tfoot>
        • <bdo id='TVtmE'></bdo><ul id='TVtmE'></ul>

        “无法加载文件或程序集"使用团队城市建造时

        时间:2023-05-20

            <tbody id='8kOrv'></tbody>
          <legend id='8kOrv'><style id='8kOrv'><dir id='8kOrv'><q id='8kOrv'></q></dir></style></legend>

          <tfoot id='8kOrv'></tfoot>
        1. <i id='8kOrv'><tr id='8kOrv'><dt id='8kOrv'><q id='8kOrv'><span id='8kOrv'><b id='8kOrv'><form id='8kOrv'><ins id='8kOrv'></ins><ul id='8kOrv'></ul><sub id='8kOrv'></sub></form><legend id='8kOrv'></legend><bdo id='8kOrv'><pre id='8kOrv'><center id='8kOrv'></center></pre></bdo></b><th id='8kOrv'></th></span></q></dt></tr></i><div id='8kOrv'><tfoot id='8kOrv'></tfoot><dl id='8kOrv'><fieldset id='8kOrv'></fieldset></dl></div>

          <small id='8kOrv'></small><noframes id='8kOrv'>

            <bdo id='8kOrv'></bdo><ul id='8kOrv'></ul>

                  本文介绍了“无法加载文件或程序集"使用团队城市建造时的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  限时送ChatGPT账号..

                  我在 Team City (8.0.4) 构建服务器上遇到了单元测试问题 - 代码构建 &通过 Resharper 和 nCrunch 在本地运行所有测试.

                  I'm running into an issue with unit tests on our Team City (8.0.4) build server - the code builds & runs all tests locally via Resharper and nCrunch.

                  但是在服务器上运行时,我得到以下错误,即使 Unity 程序集与单元测试程序集存在于同一目录中,并且在单元测试程序集中被引用.

                  But when running on the server I get the following error, even though the Unity assembly exists in the same directory as the unit test assembly, and is referenced in the unit test assembly.

                  SetUp 方法失败.SetUp:System.IO.FileNotFoundException:无法加载文件或程序集Microsoft.Practices.Unity,版本=2.0.414.0,Culture=neutral,PublicKeyToken=31bf3856ad364e35"或其依赖项之一.该系统找不到指定的文件.在 XXXX.Unity.UnityContainerAdapter..ctor()在 XXXX.GraphExtensionsTests..ctor() 在 c:TeamCityV7Agent-1workf02f7e27c0bedfa2XXXXGraph.TestsExtensionsGraphExtensionsTests.cs:line 44

                  SetUp method failed. SetUp : System.IO.FileNotFoundException : Could not load file or assembly 'Microsoft.Practices.Unity, Version=2.0.414.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified. at XXXX.Unity.UnityContainerAdapter..ctor() at XXXX.GraphExtensionsTests..ctor() in c:TeamCityV7Agent-1workf02f7e27c0bedfa2XXXXGraph.TestsExtensionsGraphExtensionsTests.cs:line 44

                  我已确认 Microsoft.Practices.Unity 的副本是正确的版本.

                  I've confirmed the copy of Microsoft.Practices.Unity is the correct version.

                  我还确认程序集是使用完整版框架构建的,而不是使用客户端配置文件.

                  I've also confirmed the assemblies are built using the full version of the framework - not using client profile.

                  您知道 Team City 可能会失败的原因吗?

                  Any ideas why Team City might be failing?

                  推荐答案

                  检查您用来定位测试程序集的模式.我在另一个库中遇到了类似的问题,结果发现模式是在 binRelease 和 objRelease 下找到测试程序集;obj 文件夹不包含项目引用的所有程序集,实际上只是编译器的临时文件夹.

                  Check the pattern you're using to locate your test assemblies. I had a similar problem with another library and it turns out the pattern was finding the test assembly under binRelease and objRelease; the obj folder doesn't contain all the assemblies referenced by the project and is really just a scratch folder for the compiler.

                  这篇关于“无法加载文件或程序集"使用团队城市建造时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:在 CruiseControl.NET 构建中使用“devenv"和“msbuild"有什么区别? 下一篇:在 C# 中将 char 转换为 int

                  相关文章

                  <legend id='O7gNd'><style id='O7gNd'><dir id='O7gNd'><q id='O7gNd'></q></dir></style></legend>
                      <bdo id='O7gNd'></bdo><ul id='O7gNd'></ul>

                    1. <small id='O7gNd'></small><noframes id='O7gNd'>

                    2. <tfoot id='O7gNd'></tfoot>
                      <i id='O7gNd'><tr id='O7gNd'><dt id='O7gNd'><q id='O7gNd'><span id='O7gNd'><b id='O7gNd'><form id='O7gNd'><ins id='O7gNd'></ins><ul id='O7gNd'></ul><sub id='O7gNd'></sub></form><legend id='O7gNd'></legend><bdo id='O7gNd'><pre id='O7gNd'><center id='O7gNd'></center></pre></bdo></b><th id='O7gNd'></th></span></q></dt></tr></i><div id='O7gNd'><tfoot id='O7gNd'></tfoot><dl id='O7gNd'><fieldset id='O7gNd'></fieldset></dl></div>