当我构建我的项目时,我收到了一个令人烦恼的MSB3277警告。我将详细程度增加到“详细”并能够从日志中获取以下信息:
There was a conflict between "Pathoschild.Http.Client, Version=3.0.0.0, Culture=neutral, PublicKeyToken=null" and "Pathoschild.Http.Client, Version=3.1.0.0, Culture=neutral, PublicKeyToken=null".
"Pathoschild.Http.Client, Version=3.0.0.0, Culture=neutral, PublicKeyToken=null" was chosen because it was primary and "Pathoschild.Http.Client, Version=3.1.0.0, Culture=neutral, PublicKeyToken=null" was not.
References which depend on "Pathoschild.Http.Client, Version=3.0.0.0, Culture=neutral, PublicKeyToken=null" [C:\Users\desau\.nuget\packages\pathoschild.http.fluentclient\3.0.0\lib\netstandard1.3\Pathoschild.Http.Client.dll].
C:\Users\desau\.nuget\packages\pathoschild.http.fluentclient\3.0.0\lib\netstandard1.3\Pathoschild.Http.Client.dll
Project file item includes which caused reference "C:\Users\desau\.nuget\packages\pathoschild.http.fluentclient\3.0.0\lib\netstandard1.3\Pathoschild.Http.Client.dll".
C:\Users\desau\.nuget\packages\pathoschild.http.fluentclient\3.0.0\lib\netstandard1.3\Pathoschild.Http.Client.dll
References which depend on "Pathoschild.Http.Client, Version=3.1.0.0, Culture=neutral, PublicKeyToken=null" [].
C:\Users\desau\.nuget\packages\stronggrid\0.30.0\lib\netstandard1.3\StrongGrid.dll
Project file item includes which caused reference "C:\Users\desau\.nuget\packages\stronggrid\0.30.0\lib\netstandard1.3\StrongGrid.dll".
C:\Users\desau\.nuget\packages\stronggrid\0.30.0\lib\netstandard1.3\StrongGrid.dll
如果我正确理解这个日志,它告诉我我的项目引用了 Pathoschild.Http.Client 3.0 和 3.1 两个版本。因为我的项目引用了一个名为 StrongGrid 的 nuget 包,而 StrongGrid 引用了 Pathoschild 3.1 版本,所以我能理解对 3.1 版本的引用。
但是我不明白对于 3.0 版本的引用来自哪里。
如果有帮助信息的话,我使用的是 Visual Studio 2017 和 MSBuild 15。
pathoschild.http.fluentclient
到3.1.0
是否有帮助? - Martin Ullrich