I am trying to resolve build warnings but I cannot get past this one. I am targeting .Net 4.6.2, but it appears that ServiceStack.Interfaces is targeting a lower version? In the detailed output:
There was a conflict between "System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" and "System, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e, Retargetable=Yes".
1> "System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" was chosen because it was primary and "System, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e, Retargetable=Yes" was not.
1> References which depend on "System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" [C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.2\System.dll].
1> C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.2\System.dll
1> Project file item includes which caused reference "C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.2\System.dll".
Then followed by many regular assemblies which looks good, then the conflict:
1> References which depend on "System, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e, Retargetable=Yes" [].
1> C:\Code\Trunk\packages\ServiceStack.Interfaces.4.5.6\lib\portable-wp80+sl5+net45+win8+wpa81+monotouch+monoandroid+xamarin.ios10\ServiceStack.Interfaces.dll
1> Project file item includes which caused reference "C:\Code\Trunk\packages\ServiceStack.Interfaces.4.5.6\lib\portable-wp80+sl5+net45+win8+wpa81+monotouch+monoandroid+xamarin.ios10\ServiceStack.Interfaces.dll".
1> ServiceStack.Common, Version=4.5.6.0, Culture=neutral, processorArchitecture=MSIL
1> ServiceStack.Interfaces, Version=4.0.0.0, Culture=neutral, PublicKeyToken=e06fbc6124f57c43, processorArchitecture=MSIL
1> ServiceStack.Redis, Version=4.5.6.0, Culture=neutral, processorArchitecture=MSIL
So it appears that ServiceStack.Interfaces is causing the problem, yet I need to reference it. Am I referencing it wrong in some way? How can I resolve the warning?
ServiceStack.Interfaces is a plain PCL library that's just built with the System.Runtime.Serialization it references using VS2017's new MSBuild format. It doesn't explicitly reference any version, the PCL build decides on what version it uses.
Once .NET Standard 2.0 and .NET Core 2.0 is released we'll be merging .NET Standard libraries together into the main ServiceStack NuGet packages in a major v5 release of ServiceStack that will replace the PCL libraries with .NET Standard which will resolve this warning, but we'll need to wait for v5 before we make any structural changes.
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