Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/clojure/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Visual studio 由于App.config中的System.Runtime绑定,VS2017 MSTEST发现失败_Visual Studio_Nuget_Mstest - Fatal编程技术网

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文件中。