Daniel,
Well, personally, I would have two separate config files (just like you
have two separate binaries) which have two separate connection strings.
You could have a preprocessor statement for a constant which sets
different values based on the build type. However, that means you would
have to put both values into your config file. That's a little hokey to me,
and it's easier to just have two config files, IMO, as you don't want to
distribute the debug connection string in the release file.
--
- Nicholas Paldino [.NET/C# MVP]
-
mv*@spam.guard.caspershouse.com
"Daniel" <da*********@newsgroup.nospamwrote in message
news:88**********************************@microsof t.com...
How can I switch connection strings stored in config file based on the
build
configuration? Or my real question is how most people maintain different
connection strings when their code is running in different environment,
like
development, building, testing....
Thanks.
Daniel