Reputation: 122042
So here is my problem.
So when I try to build, I get the error
The type 'Castle.Core.Interceptor.IInterceptor' exists in both 'c:...\Libraries\Rhino.Mocks.dll' and 'c:...\Libraries\Castle.Core.dll'
How then do I specify that I want to use the IInterceptor instance from the Castle.Core.dll rather than the one included in Rhino Mocks?
Upvotes: 33
Views: 21353
Reputation: 351466
You can use an extern alias
to alias one of the assemblies to prevent the ambiguity.
Upvotes: 7
Reputation: 122042
Let's throw the specific answer up here in case someone comes along later. From article here.
extern alias CastleCore;
CastleCore::Castle.Core.Interceptors.IInterceptor
. Or in my case I simply did:using cci = CastleCore::Castle.Core.Interceptors;
and can now reference
cci.IInterceptor
Upvotes: 53