I was investigating a build failure recently and saw a warning about conflicts between assemblies. I dug deeper and MSBuild told me this:
There was a conflict between "mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" and "mscorlib, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e, Retargetable=Yes". "mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" was chosen because it was primary and "mscorlib, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e, Retargetable=Yes" was not.`
My solution contains several console applications, lots of class libraries and ASP.NET application. We build on .NET 4.5.2.
Should I be concerned?
When using PCL libraries it is better add Microsoft.Bcl.Build
Nuget package which will attempt to resolve this issue for your.
Also you should investigate dependencies of your class libraries and find where you depends on the PCL library.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With