简体   繁体   English

警告MSB3276 - 发现同一依赖程序集的不同版本之间存在冲突

[英]warning MSB3276 - Found conflicts between different versions of the same dependent assembly

My solution consists of multiple projects and compiles fine. 我的解决方案包含多个项目并编译好。 I'm using nuget and one of the packages that I use is log4net.2.0.0. 我正在使用nuget,我使用的其中一个软件包是log4net.2.0.0。 I've recently updated the package to log4net.2.0.3 and made sure that in each project that belongs to the solution, the reference is updated. 我最近将软件包更新到log4net.2.0.3,并确保在每个属于该解决方案的项目中,引用都会更新。 Unfortunately I'm still getting the following warning during the compilation process: 不幸的是,在编译过程中我仍然收到以下警告:

(ResolveAssemblyReferences target) -> C:\\Program Files (x86)\\MSBuild\\12.0\\bin\\Microsoft.Common.CurrentVersion.targe ts(1635,5): warning MSB3276: Found conflicts between different versions of the same dependent assembly. (ResolveAssemblyReferences目标) - > C:\\ Program Files(x86)\\ MSBuild \\ 12.0 \\ bin \\ Microsoft.Common.CurrentVersion.targe ts(1635,5):警告MSB3276:发现同一依赖程序集的不同版本之间存在冲突。 Please set the "AutoGenerateBindingRedirects" property to true in the project file. 请在项目文件中将“AutoGenerateBindingRedirects”属性设置为true。 For more information, see http://go.microsoft.com /fwlink/?LinkId=294190. 有关详细信息,请参阅http://go.microsoft.com/fwlink/?LinkId = 294190。

or a more elaborate version of this warning when compiling with /verbosity:detailed 使用/ verbosity编译时,或者更详细的警告版本:详细

Consider app.config remapping of assembly "log4net, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a" from Version "1.2.11.0" [] to Version "1.2.13.0" [Z:\\xxx\\packages\\log4net.2.0.3\\lib\\net40-full\\log4net.dll] to solve conflict and get rid of warning. 考虑从版本“1.2.11.0”[]到版本“1.2.13.0”[Z:\\ xxx \\ packages \\ log4net.2.0.3 \\ lib \\]的app.config重新映射程序集“log4net,Culture = neutral,PublicKeyToken = 669e0ddf0bb1aa2a” net40-full \\ log4net.dll]解决冲突并摆脱警告。 C:\\Program Files (x86)\\MSBuild\\12.0\\bin\\Microsoft.Common.CurrentVersion.targets(1635,5): warning MSB3276: Found conflicts between different versions of the same dependent assembly. C:\\ Program Files(x86)\\ MSBuild \\ 12.0 \\ bin \\ Microsoft.Common.CurrentVersion.targets(1635,5):警告MSB3276:发现同一依赖程序集的不同版本之间存在冲突。 Please set the "AutoGenerateBindingRedirects" property to true in the project file. 请在项目文件中将“AutoGenerateBindingRedirects”属性设置为true。 For more information, see http://go.microsoft.com/fwlink/?LinkId=294190 . 有关详细信息,请参阅http://go.microsoft.com/fwlink/?LinkId=294190 [Z:\\xxx\\xxx\\xxx\\xxx.csproj] [Z:\\ XXX \\ XXX \\ XXX \\ xxx.csproj]
AssemblyFoldersEx location: "{Registry:Software\\Microsoft.NETFramework,v4.5,AssemblyFoldersEx}" AssemblyFoldersEx位置:“{Registry:Software \\ Microsoft.NETFramework,v4.5,AssemblyFoldersEx}”

I understand what it means, unfortunately I can't track down which project/library still references the old version of log4net. 我理解它意味着什么,遗憾的是我无法追踪哪个项目/库仍然引用旧版本的log4net。 I understand that I can mask the warning just by simply remapping in app.config, but it seems like sweeping the problem under the rug rather than actually solving it properly. 我知道我可以通过简单地重新映射到app.config来掩盖警告,但它似乎在地毯下扫除问题而不是实际解决它。

What is the best way of tracking down where in my solution I have areference to the old version of log4net? 在我的解决方案中我追踪旧版log4net的最佳方法是什么? I've tried all the obvious including searching through all the files for the version number. 我已经尝试了所有显而易见的事情,包括搜索所有文件的版本号。 I also made sure that no other nupkgs have the dependencies set to this specific version of log4net. 我还确保没有其他nupkgs将依赖项设置为此特定版本的log4net。

Any help would be much appreciated. 任何帮助将非常感激。

Thanks to my dad and https://github.com/mikehadlow/AsmSpy I managed to find that: 感谢我的父亲和https://github.com/mikehadlow/AsmSpy,我设法找到了:

Reference: log4net 1.2.11.0 by SuperSocket.SocketBase 参考:SuperSocket.SocketBase的log4net 1.2.11.0

Haha! 哈哈! Great handy tool! 非常方便的工具!

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 抑制MSB3276:发现不同版本之间存在冲突 - Suppressing MSB3276: Found conflicts between different versions 警告:发现同一依赖程序集的不同版本之间存在冲突 - Warning: Found conflicts between different versions of the same dependent assembly 解决MSB3247 - 发现同一依赖程序集的不同版本之间存在冲突 - Resolving MSB3247 - Found conflicts between different versions of the same dependent assembly 发现相同从属程序集的不同版本之间存在冲突 - Found conflicts between different versions of the same dependent assembly 发现同一依赖程序集的不同版本之间无法解决的冲突 - Found conflicts between different versions of the same dependent assembly that could not be resolved 在同一从属程序集的不同版本之间发现冲突-app.config与packages.config不同 - Found conflicts between different versions of the same dependent assembly - app.config different from packages.config 帮助:使用SQLIte找到相同从属程序集的不同版本之间的冲突 - Help : Found conflicts between different versions of the same dependent assembly using SQLIte Visual Studio .NET:警告MSB3277:发现不同版本之间存在冲突 - Visual Studio .NET: warning MSB3277: Found conflicts between different versions VS2005:发现同一从属程序集的不同版本之间存在冲突 - VS2005: Found conflicts between different version of the same dependent assembly 如何抑制“发现不同版本之间的冲突”警告? - How to suppress 'Found conflicts between different versions of' warning?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM