MikroDel
MikroDel

Reputation: 6735

WCF app.config for release and for test

For example in Web.config it is possible to have Web.Release.config

where is some database connection defined like:

<connectionStrings>
   <!-- live db connection -->
</connectionStrings>

and Web.Test.config with:

<connectionStrings>
   <!-- test db connection -->
</connectionStrings>

Question: is is possible to make the similar construction for app.config to consume different Services depending on build target?

Background information: if I use Add Service Reference... in Visual Studion than some URL is used and it generate endpoints:

<endpoint address />

To switch to other endpoint I have to change app.config manually or generate new Service Reference

Upvotes: 2

Views: 302

Answers (1)

Anders Abel
Anders Abel

Reputation: 69260

Yes, there is a plugin to visual studio called SlowCheetah that add config transform capabilities to app.config files, just the same way as it works for web.config. It's very useful - I don't understand why it isn't included as default functionality in Visual Studio.

Upvotes: 4

Related Questions