开发者

multiple versions of dll for WCF service with two services exposed

开发者_开发知识库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";
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜