Found conflicts between different versions of the same dependent assembly that could not be resolved
2017-10-27 16:19
1131 查看
https://stackoverflow.com/questions/24772053/found-conflicts-between-different-versions-of-the-same-dependent-assembly-that-c
While the other responses say this, they don't make it explicit, so I will....
On VS2013.2, to actually trigger the emission of the cited information, you need to not read the message, which says:
C:\Program Files (x86)\MSBuild\12.0\bin\Microsoft.Common.CurrentVersion.targets(1697,5): warning MSB3277: Found conflicts between different versions of the same dependent assembly that could not be resolved. These reference conflicts are listed in the build log when log verbosity is set to detailed.
This is incorrect (or at least it was for some versions of Visual Studio - it seems to be OK on an up to date VS2015 Update 3 or later).
Instead turn it to Diagnostic (from Tools->Options->Project and Solutions->Build and Run, set MSBuild project build output verbosity), whereupon you'll see messages such as:
There was a conflict between "Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed" and "Newtonsoft.Json, Version=6.0.5.17707, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed".
"Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed" was chosen because it was primary and "Newtonsoft.Json, Version=6.0.5.17707, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed" was not.
Then
search for "was chosen" to find the drilldown.
..And yes, for those looking at the detail of the [diagnostic] message, it was news to this ignoramus that there's a convention in town whereby all
While the other responses say this, they don't make it explicit, so I will....
On VS2013.2, to actually trigger the emission of the cited information, you need to not read the message, which says:
C:\Program Files (x86)\MSBuild\12.0\bin\Microsoft.Common.CurrentVersion.targets(1697,5): warning MSB3277: Found conflicts between different versions of the same dependent assembly that could not be resolved. These reference conflicts are listed in the build log when log verbosity is set to detailed.
This is incorrect (or at least it was for some versions of Visual Studio - it seems to be OK on an up to date VS2015 Update 3 or later).
Instead turn it to Diagnostic (from Tools->Options->Project and Solutions->Build and Run, set MSBuild project build output verbosity), whereupon you'll see messages such as:
There was a conflict between "Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed" and "Newtonsoft.Json, Version=6.0.5.17707, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed".
"Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed" was chosen because it was primary and "Newtonsoft.Json, Version=6.0.5.17707, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed" was not.
Then
Ctrl-Alt-Oto go to Build output window
search for "was chosen" to find the drilldown.
..And yes, for those looking at the detail of the [diagnostic] message, it was news to this ignoramus that there's a convention in town whereby all
6.xversions are, internally Assembly Version
6.0.0.0, i.e. only the SemVer Major component goes into the Assembly Version :)
相关文章推荐
- Field XXX in XXXX required a bean of type XXXX that could not be found.
- Solution For "could not be located or a different control is assigned to the same ID after postback"
- springcloud-3:required a bean of type 'com.netflix.discovery.DiscoveryClient' that could not be found.
- required a bean of type 'org.hibernate.SessionFactory' that could not be found.
- 如何解决The type or namespace name 'ScriptService' could not be found (are you missing a using directive or an assembly reference?)
- 关于错误 The type or namespace name `Vuforia' could not be found. Are you missing an assembly reference?
- It is not possible to run two different versions of ASP.NET in the same IIS process.问题的解决
- required a bean of type 'org.hibernate.SessionFactory' that could not be found.
- .net4 wpf App 使用log4net 错误:The type or namespace name 'log4net' could not be found (are you missing a using directive or an assembly reference?)
- This platform could not be created because a solution platform of the same name already exists解决方法
- "The specified module could not be found " has Resolved
- This platform could not be created because a solution platform of the same name already exists.
- <iOS> The operation could not be performed because of one or more tree conflicts.
- It is not possible to run two different versions of ASP.NET in the same IIS process:IIS
- The file or Assembly "BMC.arnettoc.dll" or a dependency could not be found.
- It is not possible to run two different versions of ASP.NET in the same IIS process
- 解决 A component required a bean of 'XXX.RoleService' that could not be found.
- mybatis Field xxxMapper in xxxx required a bean of type 'XXXMapper' that could not be found.
- The type or namespace name `MovieTexture' could not be found. Are you missing an assembly reference?
- The type or namespace name 'log4net' could not be found (are you missing a using directive or an assembly refere