genxgeek
genxgeek

Reputation: 13367

How to prevent webconfig from being automatically generated on build/ & run

I've inherited a visual studio 2010 mvc3 applicaton and the web.config is being generated every time on build and run. I need to change the connection string to test an other database....where is the settting to prevent the web.config from being automatically generated?

Thanks!

Upvotes: 0

Views: 324

Answers (1)

Steve Mitcham
Steve Mitcham

Reputation: 5313

Create a new Configuration for your secondary database and then right click on the Web.config file and select 'Add Config Transforms'.

Then use the information here to adjust the connection string in your alternate configuration:

http://msdn.microsoft.com/en-us/library/dd465326.aspx

Upvotes: 1

Related Questions