I have four separate projects:
MyUserControl - Needs a reference to a service implementing
IMyService
MyService - Implements
IMyService
MySharedInterfaces - Contains
IMyUserControl
andIMyService
MyWebApp
The user control needs to be dynamically loaded at runtime. This implements IMyUserControl
and has a property of type IMyService
which will be set at runtime.
The trouble is even with the option to reuse types, MyWebApp isn't reusing the IMyService
interface. It always generates it again from the Service Reference. This wouldn't be an issue if I could cast it to MySharedInterfaces.IMyService
, which I can't understand, since it should be exactly the same.
The user control is expecting something of type IMyService
. Is there anyway to either cast the WebServiceReference.IMyService
back to MySharedInterface.IMyService
or force the WebServiceReference
to reuse the MySharedInterface.IMyService
?