c# - In the same project two libraries need two different version of a third library -
in c# project need make backplane signalr realized azure service bus. in startup wrote:
globalhost.dependencyresolver.useservicebus(asb_endpoint, topic);
in same project there's rebus configuration azure service bus, like:
return rebus.config.configure.with(new unitycontaineradapter(container)) .logging(l => l.log4net()) .transport(l => l.useazureservicebus(cs, qname)) .routing(r => r.typebasedroutingfromappconfig()) .options(o => o.simpleretrystrategy(errorqueueaddress: errorqname, maxdeliveryattempts: 3));
both uses extension method implementation of useazureservicebus
, useservicebus
.
the problem is: both extension methods part of 2 libraries, , libraries conflicting on various dependencies. have rebus' useazureservicebus
extension, need rebus.azureservicebus
version 0.99.39, in turn needs @ least windowsazure.servicebus
3.0.4, use dll called microsoft.servicebus
3.0.0 conflicts internal work of extension method useservicebus.
how can handle this?
edit 1 : looks problem fixed microsoft.aspnet.signalr.servicebus
version 2.2.2. don't know in meanwhile
it sounds need give each assembly alias, can use class in version.
see:
what use aliases property of assembly references in visual studio 8
msdn: https://msdn.microsoft.com/en-us/library/ms173212.aspx
here walkthrough: https://blogs.msdn.microsoft.com/ansonh/2006/09/27/extern-alias-walkthrough/
extern alias fooversion1; fooversion1::acme.foo f = new fooversion1::acme.foo(); f.bar();
the other option have use global alias on default, can use global full namespace of class need use if exists in 2 different assemblies.
eg:
global::assembly1.class1 c = new global::assembly1.class1(); global::assembly2.class1 c2 = new global::assembly2.class1();
Comments
Post a Comment