5

Only having debug and release web.config files is not enough for our deployment process. We use the standard Web.config for local development, Web.Debug.config for the shared development environment, and Web.Release.config for staging and production environments.

Now we would like to have a distinct configuration for staging and production environments.
Is it possible to create a new configuration profile 'staging', have the associated web.staging.config, and tell the build process to use the transformations it defines when we select the appropriate publish profile?

1
  • @Raj, I'm not trying to add a new config file, but a new config transform for the one I have. Commented Oct 8, 2013 at 10:41

1 Answer 1

10

Ok I got it. You need to go to the solution's properties > Configuration > Configuration Manager. Open the Active solution configuration dropdown > New, to create a new configuration scheme. Leave the Create new project configurations checked.

Then right-click the web.config file and click Add Config Transform. Finally, you can edit the publish profiles to use the new configuration.

Sign up to request clarification or add additional context in comments.

1 Comment

+1 caught be out not adding the new configs in the config manager first. Kept wondering why it just kept adding a new web config instead of a nested one!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.