Hi, I have a win forms app using Enterprise Library Data Access
Application Block and Visual Studio 2005. All the code uses the
default connection string to connect to the db, eg Database db =
DatabaseFactory.CreateDatabase();
I have a Setup Deployment project as part of my solution, which
packages the .exe, .dll, and .config files into an msi file for
deployment. I want to be able make installs for different
environments, eg Test and Dev, in which case I want the default
connection string to be different, eg for the Test database instead of
the Dev database. Any sugggestions on how i should set things up so
that i can do this without having to edit the config file before each
compile?
For example, can i have a Dev and a Test build configuration such that
the Test configuration will either use a different config file or make
a modification to the config file before it is included in the
deployment project?
This seems like it would be a common scenario but I haven't found any
suggestions on how to do it.
thanks in advance,
- Rory
|