I am working on a web project as a Web Site, rather than a Web Application. How can I use a different config file depending on where it is hosted from, so the local version uses my local SQL install, but the published version uses the live database? e.g. connectionStrings.config ignored (not published), connectionStrings.live.config published as connectionStrings.config
I see a policy file option, would that be something able to do this?
There are several options regarding this. The simplest is to use a web deployment project. The ScottGu’s post goes into more detail on this.
For larger projects you will need something like Nant or MSBuild and CruiseControl or TeamBuild.
I also posted something here a while back on supporting complex config deployments