2017-06-20 63 views
2

我正在嘗試解析生成警告,但是我無法通過這一個。我的目標是.Net 4.6.2,但似乎ServiceStack.Interfaces是針對較低版本?在詳細的輸出:在ServiceStack.Interfaces系統,版本= 4.0.0.0和系統,版本= 2.0.5.0之間的衝突

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". 

再後面許多常規組件看起來不錯,那麼衝突:

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 

所以看來ServiceStack.Interfaces原因造成的問題,但我需要引用它。我是否以某種方式引用了錯誤?我該如何解決警告?

回答

4

ServiceStack.Interfaces是一個普通的PCL庫,它是使用VS2017的新MSBuild格式引用的System.Runtime.Serialization構建的。它不explicitly reference any version,PCL版本決定它使用什麼版本。

一旦.NET Standard 2.0和.NET Core 2.0發佈,我們將把.NET標準庫合併到一個ServiceStack的主版本5中的主ServiceStack NuGet包中,該版本將用.NET Standard替換PCL庫,將解決此警告,但在進行任何結構更改之前,我們需要等待v5。

+0

好的,謝謝我現在就壓制它。 – user917170