In a project I have the following reference layout:
References
+- AssemblyA 6.7.6643.0
+- AssemblyB
| \- AssemblyA 7.0.0.0
\- AssemblyC
\- AssemblyA 7.0.0.0
AssemblyB and AssemblyC are NuGet references for which there is no downgrade. Due to circumstances outside of my control, upgrading AssemblyA is not an option. But I get this warning:
Found conflicts between different versions of "AssemblyA" that could not be resolved. These reference conflicts are listed in the build log when log verbosity is set to detailed.
So I did just that and this is the output:
There was a conflict between "AssemblyA, Version=6.7.6643.0" and "AssemblyA, Version=7.0.0.0". "AssemblyA, Version=6.7.6643.0" was chosen because it was primary and "AssemblyA, Version=7.0.0.0" was not. References which depend on "AssemblyA, Version=6.7.6643.0" [AssemblyA.dll]. AssemblyA.dll Project file item includes which caused reference "AssemblyA.dll". AssemblyA, Version=6.7.6643.0 References which depend on "AssemblyA, Version=7.0.0.0" []. AssemblyB.dll Project file item includes which caused reference "AssemblyB.dll". AssemblyB, Version=7.0.0.0 AssemblyC.dll Project file item includes which caused reference "AssemblyC.dll". AssemblyC, Version=9.0.0.0
It chose the version I wanted it to, but I still get a warning in Visual Studio. So I updated the app.config binding redirect in the hopes it would get rid of the warning:
<dependentAssembly>
<assemblyIdentity name="AssemblyA" publicKeyToken="..." culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-7.0.0.0" newVersion="6.7.6643.0" />
</dependentAssembly>
But the warning persists. I have confirmed that if I upgrade AssemblyA to 7.0.0.0 it causes the warning to go away. But as I said earlier, for other reasons outside of my control I cannot upgrade this assembly right now.
Is there anyway to suppress this warning just for this one particular instance?
Thanks