473,406 Members | 2,439 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

VS05 configurations and app.config's

Hi there,
When a Windows App is compiled in Visual Studio 2005, app.config is
renamed to MyAppName.exe.config and placed under either bin\Debug or
bin\Release, depending on the currently selected Configuration (Debug
or Release). Is there a way to have separate app.config files for each
configuration (Debug and Release) and instruct VS/MSBuild to copy the
right one during a build?

Subsequently, I want a VS Deployment project in my solution to
recognize this and package the right app.config during a build.

Thanks,

-Oleg.

Nov 27 '06 #1
2 1844
This can be done using post-build events. Secondly your deployment project
will contain the project output.

Gabriel Lozano-Morán

<Ol*********@gmail.comwrote in message
news:11**********************@l39g2000cwd.googlegr oups.com...
Hi there,
When a Windows App is compiled in Visual Studio 2005, app.config is
renamed to MyAppName.exe.config and placed under either bin\Debug or
bin\Release, depending on the currently selected Configuration (Debug
or Release). Is there a way to have separate app.config files for each
configuration (Debug and Release) and instruct VS/MSBuild to copy the
right one during a build?

Subsequently, I want a VS Deployment project in my solution to
recognize this and package the right app.config during a build.

Thanks,

-Oleg.

Nov 28 '06 #2

Thanks. This seems to work when running an app from the build
directory.
However, a deployment package always contains the original config since
during build, the deployment project always copies the original
app.config from the C# project into the MSI.

I'm not sure if there is a way to customize it.
Any ideas?

-Oleg.
Gabriel Lozano-Morán wrote:
This can be done using post-build events. Secondly your deployment project
will contain the project output.

Gabriel Lozano-Morán

<Ol*********@gmail.comwrote in message
news:11**********************@l39g2000cwd.googlegr oups.com...
Hi there,
When a Windows App is compiled in Visual Studio 2005, app.config is
renamed to MyAppName.exe.config and placed under either bin\Debug or
bin\Release, depending on the currently selected Configuration (Debug
or Release). Is there a way to have separate app.config files for each
configuration (Debug and Release) and instruct VS/MSBuild to copy the
right one during a build?

Subsequently, I want a VS Deployment project in my solution to
recognize this and package the right app.config during a build.

Thanks,

-Oleg.
Nov 28 '06 #3

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

Similar topics

2
by: Kevin McNeish [C# MVP] | last post by:
Does anyone know how to set the project constants property for "All Configurations" programmatically? The following code does this by setting each project individually: foreach...
0
by: Matthew | last post by:
I have created two configurations. One is called Release-Internal and one is called Release-External. I also have two config files named Internal.config and External.config. The difference in the...
0
by: Q. John Chen | last post by:
in VS03/ASP.NET, I have to edit the web.config to add the connection string under appSettings. I am sure that I can do the same is VS05. But I noticed that there is a connectionStrings section....
11
by: TARUN | last post by:
Hello All I need to ask about the configuration file in .NET, There are Two config File 1. Web Config 2. Machine config I understand the the usage of Web config , but not able to understand...
7
by: gtrDayve | last post by:
Recently I ran all my Windows Updates which included many for Visual Studio 2005, & now when I open VS05 (using ASP.NET, VB.NET), all my toolbox options are grayed out except for the Data options;...
8
by: =?Utf-8?B?Y2FsZGVyYXJh?= | last post by:
Dear all, I am building a set of libraries working in a n tiers architecture Some of those libraries use common configuration settings like the database connection string and some others. I...
1
by: Richard Lewis Haggard | last post by:
We're using VS05 and today the units tests have stopped working in our development environment. I'm sure that it is something really silly and simple but I'll be darned if I can figure out what it...
1
by: Barney Gumble | last post by:
Hi all. I'd like to get deeper into details of project layout in visual studio. And maybee someone finds it interesting ... I've got a project with the following layout just theoretical: ...
5
by: =?Utf-8?B?SmVycnkgQw==?= | last post by:
I have a app that uses several membership/role providers. I can list these Providers with the code: Dim rootWebConfig1 As Configuration rootWebConfig1 =...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
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...
0
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...

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.