After upgrading to ServiceStack v3.9.70 via nuGet from v3.9.43, I noticed that the ServiceStack.Interfaces.dll
is no longer copied over to projects that depend on the class library using ServiceStack. This causes the following error:
System.IO.FileNotFoundException: Could not load file or assembly 'ServiceStack.Interfaces, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.
File name: 'ServiceStack.Interfaces, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'
All other ServiceStack dlls are copied, only ServiceStack.Interfaces is missing. All references are set to Copy Local = True
, and this StackOverflow post's suggestion does not solve the problem.
I noticed that ServiceStack.Interfaces.dll
is the only one with a version of 1.0.0.0, all others are set to 3.9.70.0. Could this be a cause?
Does anyone know how to fix it without manually referencing ServiceStack.Interfaces.dll in cascade in all projects referencing my class library?
Update - 2014-03-06
Problem still exists with v3.9.71.0. It really is related to the fact that the ServiceStack.Interfaces
assembly has its version left to 1.0.0.0 instead of being.
I cloned the github repository for ServiceStack and changed this line in the build\build.proj
file and ran build\build.bat
.
<!-- Exclude versioning future strong-named libs -->
<RegexTransform Include="$(BuildSolutionDir)/src/**/AssemblyInfo.cs"
Exclude="$(SrcDir)/ServiceStack.Interfaces*/Properties/AssemblyInfo.cs">
<Find>\d+\.\d+\.\d+\.\d+</Find>
<ReplaceWith>$(Version)</ReplaceWith>
</RegexTransform>
for this (noticed the removed exclusion)
<RegexTransform Include="$(BuildSolutionDir)/src/**/AssemblyInfo.cs">
<Find>\d+\.\d+\.\d+\.\d+</Find>
<ReplaceWith>$(Version)</ReplaceWith>
</RegexTransform>
Result: Now it works correctly, i.e. the file ServiceStack.Interfaces.dll
is copied over to projects referencing a project that references ServiceStack
.
Can someone explains this to me? Why would you want to exclude the Interfaces from versionning?