1

We build a highly configurable .Net Client/Server application.

(Client is C#/WPF, Server is C#/WebService)

There is a single code base, but each customer has its own 'profile'.

The profile contains:

  • Database/Connection string
  • XML configuration of many aspects of the application
  • Mail Settings (SMTP/POP3/IMAP)
  • other application settings

I am aware that the .Net way to do this is the App.config/Web.config/*.exe.config file, which means we need a collection of different *.config files, basically one for each customer.

The 'profile' will be used by various sections of the company and various pieces of the software:

  • Development/Bug fixing (Visual Studio, Raw Database Viewer, Helper Applications)
  • Create/Edit XML Configuration (Editor for XML Configuration)
  • Testing (.exe only)
  • Support (.exe only)

We need a good (simple/straightforward/understandable/maintainable) approach to switch profiles for all sections of the company.

I have seen SO Q&A App.Config Transformation for projects which are not Web Projects in Visual Studio 2010?

But this works around the build process inside Visual Studio. Most sections of the company do not use Visual Studio.

  • Well, I imagine a solution around these several *.config files, but want to switch them in sync – DrKoch Jan 14 '15 at 19:54
  • What prevents you from doing that now? – Robert Harvey Jan 14 '15 at 20:01
  • please don't cross-post: stackoverflow.com/questions/27647252/… – gnat Jan 14 '15 at 20:05
  • I have the very same problem at work. What I did was apply configuration transformations during my build using this. It took some tweaking to get it to work both locally and our CI server. Unfortunately, there is no easy solution. – MetaFight Jan 14 '15 at 20:19
  • @gnat Well, I got virtually nothing on StackOverfow and the question seems to fit here better anyway – DrKoch Jan 15 '15 at 6:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.