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

Mik*_*ynn 22 .net assemblies visual-studio nuget

如何在不添加绑定到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:

Leo*_*SFT 33

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

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

在此输入图像描述

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


Mat*_*tze 9

我通过针对更高的 .Net Framework 版本解决了这个问题。从 4.7 切换到 4.7.2,警告消失了。我从 EF6 切换到 EF.Core 后开始出现警告


bal*_*int 7

真正的问题是,在执行 nuget 更新时,.csproj 文件中的引用不会更新,因此会出现警告,要求在 app.config 中覆盖这些引用。如果更新 .csproj,所有警告都会消失。