多个版本的dll for WCF服务,两个服务暴露 [英] multiple versions of dll for WCF service with two services exposed
问题描述
您可以尝试通过更改当前AppDomain的RelativeSearchPath来更改PrivateBinPath AppDomainSetup。
http://msdn.microsoft.com/en-us/library/system.appdomain.aspx
移动旧的(或更新的)程序集文件到您的应用程序基础下的子文件夹。
所以有一个结构如:
c:\myapp\bin [all curent files]
c: \myapp\bin\older [旧图书馆]
在代码中:
AppDomain.CurentDomain.SetupInformation.PrivateBinPath =旧;
I have 2 wcf projects in the same solution. both reference libraryX, but use different versions. when deployed, both services are in the same folder with the same bin folder, so I have an issue with both DLLs being called libraryX.dll. Internally, they have a different version, so can I just rename the physical filename of one? If not, what is the best approach?
You can try setting the RelativeSearchPath for the current AppDomain by changing the PrivateBinPath on the AppDomainSetup.
http://msdn.microsoft.com/en-us/library/system.appdomain.aspx
And move the older (or newer) assembly file to a subfolder under your application base.
so have a structure like: c:\myapp\bin [all curent files] c:\myapp\bin\older [the older library]
In code:
AppDomain.CurentDomain.SetupInformation.PrivateBinPath = "older";
这篇关于多个版本的dll for WCF服务,两个服务暴露的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!