问题
I have had the following warning show up in visual studio when compiling a project using ServiceStack 3.9.71.0 (seems to affect most recent releases too). Not sure why it hasn't shown up before but it has started showing up after I created a test lib which references my main project and both have references to the same service stack DLLs:
Warning 2 Found conflicts between different versions of the same dependent assembly that could not be resolved. These reference conflicts are listed in the build log when log verbosity is set to detailed. C:\Program Files (x86)\MSBuild\12.0\bin\Microsoft.Common.CurrentVersion.targets 1635
Inspecting the build log shows:
10> There was a conflict between "ServiceStack.Interfaces, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" and "ServiceStack.Interfaces, Version=3.9.60.0, Culture=neutral, PublicKeyToken=null". 10> "ServiceStack.Interfaces, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" was chosen because it was primary and "ServiceStack.Interfaces, Version=3.9.60.0, Culture=neutral, PublicKeyToken=null" was not. 10> References which depend on "ServiceStack.Interfaces, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" [C:\proj\packages\ServiceStack.Common.3.9.71\lib\net35\ServiceStack.Interfaces.dll] ...
This error is correct as it seems an older version of ServiceStack.Interfaces is referenced (http://i.imgur.com/4vw3069.jpg) by the latest releases in NuGet in addition to an old version of ORMLite. I have removed all previous versions of ServiceStack from my system so its not picking up any old DLLs. My projects just have references to ServiceStack, common, interfaces and text; I removed ORM as I do not use it but adding it to both projects did not help.
A little unsure how I can resolve this error as Github does not seem to have been updated since 3.9.60, any ideas?
回答1:
This is just a warning, it should build, and can safely be ignored. The error message does indicate that the build system correctly chose v1.0.0.0.
"ServiceStack.Interfaces, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" was chosen
The version was intentionally reset from 3.9 to 1.0, about 4 months ago in this commit. This coincides with the beta release of ServiceStack v4. Presumably the v3 assembly versions where reset to a low number to allow for future BSD builds to be created without encroaching on the v4 version numbering, and to denote the clear change of project ownership.
来源:https://stackoverflow.com/questions/21283965/is-there-a-build-issue-in-the-recent-versions-of-servicestack-3