VS05 configurations and app.config's

O

Oleg.Ogurok

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.
 
G

Gabriel Lozano-Morán

This can be done using post-build events. Secondly your deployment project
will contain the project output.

Gabriel Lozano-Morán
 
O

Oleg.Ogurok

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top