Visual studio 由于App.config中的System.Runtime绑定,VS2017 MSTEST发现失败
每当我的项目在Visual studio 由于App.config中的System.Runtime绑定,VS2017 MSTEST发现失败,visual-studio,nuget,mstest,Visual Studio,Nuget,Mstest,每当我的项目在app.config中的Runtime元素下有System.Runtime绑定时,中的测试发现就会失败。输出窗口中的测试输出如下所示: [9/28/2017 12:37:17 PM Informational] ------ Discover test started ------ [9/28/2017 12:37:18 PM Warning] The given assembly name or codebase was invalid. (Exception from HRES
app.config
中的Runtime
元素下有System.Runtime
绑定时,中的测试发现就会失败。输出窗口中的测试输出如下所示:
[9/28/2017 12:37:17 PM Informational] ------ Discover test started ------
[9/28/2017 12:37:18 PM Warning] The given assembly name or codebase was invalid. (Exception from HRESULT: 0x80131047)
[9/28/2017 12:37:18 PM Informational] ========== Discover test finished: 3 found (0:00:00.8953713) ==========
[9/28/2017 12:37:18 PM Informational] No tests found to run.
<dependentAssembly>
<assemblyIdentity name="System.Runtime" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.10.0" newVersion="4.0.10.0" />
</dependentAssembly>
System.Runtime
绑定如下所示:
[9/28/2017 12:37:17 PM Informational] ------ Discover test started ------
[9/28/2017 12:37:18 PM Warning] The given assembly name or codebase was invalid. (Exception from HRESULT: 0x80131047)
[9/28/2017 12:37:18 PM Informational] ========== Discover test finished: 3 found (0:00:00.8953713) ==========
[9/28/2017 12:37:18 PM Informational] No tests found to run.
<dependentAssembly>
<assemblyIdentity name="System.Runtime" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.10.0" newVersion="4.0.10.0" />
</dependentAssembly>
此绑定是由于NuGet安装/更新而声明的。Github上有一个关于它的开放问题,不幸的是,没有解决此问题的解决方案。但是如果有一些解决这个问题的方法,你可以检查它是否适合你。app.config中的
dependentAssembly
标记不是引用,而是程序集绑定重定向。该引用位于csproj文件中。