开发者

how to add assemblies in .net application

开发者 https://www.devze.com 2023-03-27 04:44 出处:网络
I have doubt to refer a same name dll in a single开发者_如何学C project 1.i was create one class library and copy the dll to the start up application path and refer into the project.The DLL version i

I have doubt to refer a same name dll in a single开发者_如何学C project

1.i was create one class library and copy the dll to the start up application path and refer into the project.The DLL version is 1.0

2.That same dll i was register into registry.the DLL Version is 1.1

Is there any possibility to refer a private and global assemble in a single application.but


Assume you have different versions of the exact same assembly? I am confused here as you mention one is in the registry ... do you mean in the GAC (global assembly cache) or have you added some type of interop to the mix?

Assuming you are talking two versions of the same assembly, you do have the option of extern alias, which Scott has mentioned. Another workaround is to set up a WCF "UI" on top of one or both of the versions and then calling that "service endpoint" to utilize the code. This pushes the code into its own process space, which may or may not work. Juval Lowey has pushed this idea, so you should be able to easily find a few examples on the web (or pick up his latest book on WCF).

0

精彩评论

暂无评论...
验证码 换一张
取 消