473,587 Members | 2,477 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Build Deployment vs. Production app.config?

Is there a way to script VS.NET to copy different app.config along with
different build configurations?

In fact, it would be great if I could dynamically substitute app.config
values for different deployment scenarios.

Any tips or tools to do this?

Thanks!
Apr 9 '07 #1
2 2725
HI
We did this by creating different app.config's for each environment
(Dev,QA,UAT, PROD) etc. Then we build an installation package (msi) which
can be done from within visual studio itself. Its a project type.

In the installation you can can create a selection environment variable and
then depending on the user or command line input copy the appropriate
app.config.QA or app.config.UAT as Application.exe .config file.

Other than this i am not aware of any built in support. An alternative way
of doing this is to specify an override file. However the same scenarios
would apply as you would need a different override file depending on the
environment.

Hope this helps
Regards
Parag

"Spam Catcher" <sp**********@r ogers.comwrote in message
news:Xn******** *************** ***********@127 .0.0.1...
Is there a way to script VS.NET to copy different app.config along with
different build configurations?

In fact, it would be great if I could dynamically substitute app.config
values for different deployment scenarios.

Any tips or tools to do this?

Thanks!

Apr 9 '07 #2
"Parag Joshi" <pa***@nospam.n ospamwrote in
news:#E******** ******@TK2MSFTN GP02.phx.gbl:
We did this by creating different app.config's for each environment
(Dev,QA,UAT, PROD) etc. Then we build an installation package (msi)
which can be done from within visual studio itself. Its a project
type.

In the installation you can can create a selection environment
variable and then depending on the user or command line input copy the
appropriate app.config.QA or app.config.UAT as Application.exe .config
file.

Other than this i am not aware of any built in support. An alternative
way of doing this is to specify an override file. However the same
scenarios would apply as you would need a different override file
depending on the environment.
Thanks for your help - sounds like a good alternative method.

It's too bad VS.NET doesn't have something built in for this type of stuff
.... considering it already handles different build configurations. .. would
be natural to handle different .config files too.

I'll give your method a try!
Apr 10 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
1982
by: Robert | last post by:
I have what I think should be a pretty common scenario in a corporate environment. I have a web app and three environments on three servers: Development, QA and Production. We develop in development and then deploy the updated application to our QA server and then once tested to our production server. The application has a web.config file. The contents of the file (appsettings part) are different in all three environments because...
4
1624
by: Chuck P | last post by:
I was wondering what practices people have come up with for deployment. I want to precompile the application and encrypt portions of the web.config. In 1.0 I just did a batch file that would copy %source%\*.aspx %web%\*.* copy %source%\bin\*.dll %web%\bin\*.* rem copy %source%\web.config %web%\*.* Would rem out web.config because of changes in web.config. Such as
3
2775
by: Chuck P | last post by:
I need to deploy and asp.net 2.0 application that has dpapi/machine encrypted connection strings. I tried using the VS Build Publish menu selection and then putting the encryption in the global.asax application_start event. Unfortunately this errors because the asp.net account doesn't have write permissions to web.config. I'd rather not give permissions to the account. I tried writing a batch file to compile and then encrypt the...
6
2415
by: Joel H | last post by:
We have several settings in web.config that are different on the developer side than the production side. Our website sourcecode is under sourcesafe control, so before we code, we check out the web.config and change our connection strings to point to development databases, and change "debug=true". Before we deploy, we change everything back. We can't dynamically select the proper connection string in code because we are using the...
1
2031
by: mndang | last post by:
Hi All, This may have been posted before and such, but I tried a few solutions on the web but to no avail. Problem: I have a web projects (not Web Application Project) with many project references and a few 3rd party references. The 3rd party references are automatically added to the web.config file as another <add assembly/element via the VS.NET 2005 IDE.
2
1526
by: SalamElias | last post by:
Hi, I am confornted with a problem regarding web.config file. I have 4 environements (Dev, Test, staging and production). The IT people need wgenever a new MSI delivered to have the right environment keys in there sections and not the dev machines web config. What I mean by that I don't want the IT people to edit the web config for each environement manually. Is there any baset practices or patterns to automatically deploy goof web.config...
1
1748
by: jason | last post by:
In a small shop with 3 .net developers. What would typically be considered a good deployment practice if there is a chance of developers might be working on the same websites at the same time? Do most developers work on the desktop and deploy individual sources using xcopy compiling on the remote web servers? I noticed VS.NET acts kinda strange when just images are opened with other tools while you attempt to added them to a project....
2
4547
by: dasomerville | last post by:
We have different settings for our development, stage and production environments. For example, our development environment connection strings point to development database instances, stage connection strings point to stage database instances and so forth. Without having to maintain separate web.config files, what are the various approaches to having environment-specific settings?
1
2781
by: =?Utf-8?B?Q2h1Y2sgUA==?= | last post by:
I have an asp.net solution with a web deployment project. When we try to build/debug, we get the message: An editor or project is attempting to check out a file that is modified in memory, which will result in saving it. Saving files during the build process is dangerous and can result in incorrect build outputs in future. Do you want to continue with the check out?
0
7854
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8349
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8221
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6629
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
5722
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5395
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
2364
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1455
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1192
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.