考虑app.config重新映射没有app.config映射的程序集

时间:2017-08-01 17:20:54

标签: .net visual-studio nuget assemblies

如何在不添加对app.config的绑定的情况下确定修改此引用的位置?

Consider app.config remapping of assembly "System.Runtime.Serialization.Primitives, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" from Version "4.1.1.0" [] to Version "4.1.2.0" [F:\Production\packages\System.Runtime.Serialization.Primitives.4.3.0\lib\net46\System.Runtime.Serialization.Primitives.dll] to solve conflict and get rid of warning. 12>C:\Program Files (x86)\MSBuild\14.0\bin\Microsoft.Common.CurrentVersion.targets(1820,5): warning MSB3247: Found conflicts between different versions of the same dependent assembly. In Visual Studio, double-click this warning (or select it and press Enter) to fix the conflicts; otherwise, add the following binding redirects to the "runtime" node in the application configuration file:

4 个答案:

答案 0 :(得分:29)

  

如何在不添加对app.config的绑定的情况下确定修改此引用的位置?

您可以尝试将“MSBuild项目构建输出详细程度”更改为“详细”或更高版本以检查详细错误日志。要通过工具 - >执行此操作选项......->项目和解决方案 - >构建和运行。将 MSBuild项目构建输出详细级别设置为详细或更高级别。构建项目并在输出窗口中签出错误日志。 ResolveAssemblyReferences任务(MSB3247发起的任务)应该可以帮助您调试此特定问题。

enter image description here

然后转到旧版本的项目,删除引用,然后添加正确的引用。

答案 1 :(得分:2)

当我升级Microsoft身份软件包(通过NuGet)时,我开始收到错误消息。 web.config文件的<runtime>节点中的某些版本号未更新。我是按照Leo Liu-MSFT的说明(上文)找到此修复程序的。

答案 2 :(得分:1)

我通过定位更高版本的.Net Framework解决了这一问题。从4.7切换到4.7.2,警告消失了。从EF6切换到EF.Core

后,警告开始

答案 3 :(得分:0)

真正的问题是,在进行nuget更新时,.csproj文件中的引用未更新,因此警告了在app.config中覆盖这些引用。如果您更新.csproj,则所有警告都会消失。

相关问题