开发者

How can I change the WCF Service used based upon the current Configuration

开发者 https://www.devze.com 2023-03-25 01:32 出处:网络
I have a WPF client application that is connected to WCF Service.How can I set up my project so that in DEBUG configuration it points to the WCF Service in the solution and in RELEASE c开发者_开发知识

I have a WPF client application that is connected to WCF Service. How can I set up my project so that in DEBUG configuration it points to the WCF Service in the solution and in RELEASE c开发者_开发知识库onfiguration it points to the WCF Service on the internet? Can I do some sort of App.Config transformations? It takes so much time to erase the service references and recreate them to point to the deployed WCF Service.


Just my thought, you can develop a facade class that can choose which service to call. And in that facade class, you can use #DEBUG macro to distinguish the code.

0

精彩评论

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