VS05 configurations and app.config's

  • Thread starter Thread starter Oleg.Ogurok
  • Start date Start date
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.
 
This can be done using post-build events. Secondly your deployment project
will contain the project output.

Gabriel Lozano-Morán
 
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.
 
Back
Top