Reputation: 3536
I have a full framework .NET 4.7.2 (also tried 4.6.1) class library that references ServiceStack 4.5.8.0
. When attempting to upgrade to ServiceStack 5.5.0
, I get the following compile-time error:
The type 'IReturn<>' is defined in an assembly that is not referenced. You must add a reference to assembly 'ServiceStack.Interfaces, Version=4.0.0.0, Culture=neutral, PublicKeyToken=e06fbc6124f57c43'.
and
Argument 1: cannot convert from 'MyRadNameSpace.MySweetClass' to 'ServiceStack.IReturnVoid
There is a related question, but the question revolves around using .NET Standard and .NET core, whereas this library targets the full framework.
How can I troubleshoot this issue?
Upvotes: 1
Views: 288
Reputation: 143319
The error suggests you still have a dependency that's referencing an incompatible ServiceStack.Interfaces build. This is typically due to having dependencies that reference both .NET Framework and .NET Standard builds of ServiceStack packages within the same project in which case you'll need to multi-target your .NET Standard projects.
It could also be due to a version mismatch. Note all dependencies should be referencing the same version version number for all ServiceStack packages, i.e. they all should be referencing the same 5.x
version. You can also try deleting the /bin
and /obj
folders to force a clean restore and build.
Upvotes: 1