Answered by:
Separate Web.config file for each solution configuration

Question
-
User1417140358 posted
I have 3 different config files Web.config.Local, Web.config.Dev, Web.config.Prod. Whenever I create a release to deply, I rename respective file to Web.config build it and then deply.
Is there any way where I can have entry in solution configuration for Debug (for Local), Dev, & Prod and the selection itself should decide which config file to select and build the solution?
Or any other simple automated way?
Thursday, November 28, 2013 11:42 PM
Answers
All replies
-
User-1509636757 posted
It is actually web.config transform (from visual studio 2010) that you can think of. Refer this video from Scott: Web Deployment Made Awesome: If You're Using XCopy, You're Doing It Wrong - Scott Hanselman
Also the article will help: Web Deployment: Web.Config Transformation - .NET Web Development and Tools Blog - Site Home - MSDN Blogs
hope it helps./.
Thursday, November 28, 2013 11:53 PM -
User1417140358 posted
Unfortunately my all projects are still in 2005 & 2008. :(
Any thoughts?
Thursday, November 28, 2013 11:59 PM -
User-1509636757 posted
Check out this work around: http://stackoverflow.com/questions/2655129/how-to-enable-add-config-transforms-for-old-visual-studio-2008-project
Its about opening the csproj file in notepad and add/remove some elements.. not sure if it work as i never tried it for transformation..
hope it helps./.
Friday, November 29, 2013 12:07 AM -
Friday, November 29, 2013 2:16 AM
-