Search

Categories

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Send mail to the author(s) E-mail

# Friday, January 29, 2010

Am using publish web.. and automated build script so web.config is correct for dev and live.  Needs to be a Web Application, and not a Web Site.

http://www.hanselman.com/blog/ManagingMultipleConfigurationFileEnvironmentsWithPreBuildEvents.aspx

Differences between Web Sites and Web Applications http://www.codersbarn.com/post/2008/06/ASPNET-Web-Site-versus-Web-Application-Project.aspx

Also if doing more than one pre-build call need to do this:

call "$(ProjectDir)copyifnewer.bat" "$(ProjectDir)web.config.$(ConfigurationName)" "$(ProjectDir)web.config"
call "$(ProjectDir)copyifnewer.bat" "$(ProjectDir)LoggedIn\web.config.$(ConfigurationName)" "$(ProjectDir)LoggedIn\web.config"

Also I got an error in dev, where my debugging wasn’t working properly.  Had to tick debug info to full here.

image

to do – possibly abstract out the connection string settings (and anything else dev/live specific) into another file, so the actual Web.config can be changed by VS easily.

In Visual Basic the interface is slightly different however it is in there!