Dear ladies and sirs.
I have a client-server application, where there two options for the server - standalone executable or in another AppDomain in the client, which is very convenient for the debugging purposes. The choice of the server is transparent to the client, the only file that needs to be changed is the client app.config.
In order to switch from the standalone server to the local one, some sections need to be un-commented (like nhibernate configuration, which is only relevant to the server) along with individual settings (like authentication implementation, which is again only relevant to the server).
As of now, switching between the two modes is tedious and error prone, because one has to (un)comment several sections and individual settings.
Is there a way to specify conditional settings/sections in app.config? Or maybe there is a way to include another config file in the app.config? This way we could put all the local server specific settings in another file and only (un)comment its inclusion.
I would like to stress the fact, that I wish to have conditional sections, in addition to application settings.
Final note. The described scenario is obviously not for production. It is used exclusively for running unit tests. We use mstest for our unit tests.
Thanks.