.NET 4.5.1至4.6.1更新之后的程序集清单定义不匹配

时间:2018-08-12 05:35:30

标签: c# asp.net .net visual-studio

我刚刚对MVC网络应用进行了一些更新。该应用程序正在运行.NET Framework 4.5.1,现在已更新为4.6.1。还更新了NuGet软件包。

现在我在输出窗口中看到很多警告:

belongs_to

在“错误”窗口中,我得到:

1>------ Publish started: Project: My Web App, Configuration: dev.example.com Any CPU ------
1>No way to resolve conflict between "System.Runtime, Version=4.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" and "System.Runtime, Version=4.0.20.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a". Choosing "System.Runtime, Version=4.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" arbitrarily.
1>No way to resolve conflict between "System.Runtime.Extensions, Version=4.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" and "System.Runtime.Extensions, Version=4.0.10.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a". Choosing "System.Runtime.Extensions, Version=4.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" arbitrarily.
1>No way to resolve conflict between "System.Reflection, Version=4.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" and "System.Reflection, Version=4.0.10.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a". Choosing "System.Reflection, Version=4.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" arbitrarily.
1>No way to resolve conflict between "System.Runtime.InteropServices, Version=4.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" and "System.Runtime.InteropServices, Version=4.0.20.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a". Choosing "System.Runtime.InteropServices, Version=4.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" arbitrarily.
1>Consider app.config remapping of assembly "System.Runtime.Serialization.Xml, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" from Version "4.0.10.0" [C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.1\Facades\System.Runtime.Serialization.Xml.dll] to Version "4.1.3.0" [C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\Microsoft\Microsoft.NET.Build.Extensions\net461\lib\System.Runtime.Serialization.Xml.dll] to solve conflict and get rid of warning.
1>Consider app.config remapping of assembly "System.Globalization.Extensions, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" from Version "0.0.0.0" [] to Version "4.1.0.0" [C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\Microsoft\Microsoft.NET.Build.Extensions\net461\lib\System.Globalization.Extensions.dll] to solve conflict and get rid of warning.

{
    Many more of "1>Consider app.config remapping of assembly ..." 
}

1>Transformed Web.config using C:\Users\Robert\Source\Repos\My Product Selector\My Web App\Web.my-dev.example.com.config into obj\my-dev.example.com\TransformWebConfig\transformed\Web.config.
1>Copying all files to temporary location below for package/publish:
1>obj\my-dev.example.com\AspnetCompileMerge\Source.
1>C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\aspnet_compiler.exe -v / -p "C:\Users\Robert\Source\Repos\My Product Selector\my Web App\obj\my-dev.example.com\AspnetCompileMerge\Source" -u -c "C:\Users\Robert\Source\Repos\My Product Selector\my Web App\obj\my-dev.example.com\AspnetCompileMerge\TempBuildDir" 
1>C:\Users\Robert\Source\Repos\My Product Selector\my Web App\obj\my-dev.example.com\AspnetCompileMerge\Source\web.config(117,0): Error ASPCONFIG: Could not load file or assembly 'System.Runtime, Version=4.3.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
1>
========== Build: 0 succeeded, 0 failed, 1 up-to-date, 0 skipped ==========
========== Publish: 0 succeeded, 1 failed, 0 skipped ==========

我不确定该去哪里。我正在使用VS Professional2017。我尝试删除/ bin文件夹中的所有内容并重建。

1 个答案:

答案 0 :(得分:1)