3

In a VS2015 website (not web app) project I inherited, there is no Web.Release.config, only a debug one.

How do I add a new config file so that it works with the project correctly.

I tried doing the Add->New Item->Web Configuration File and named it "Web.Release.config", but when I go into the configuration manager for "Release" it is still pointing to Debug for the configuration and the drop-down doesn't have any other options. It also doesn't show the new config file under the "web.config" like the debug one is.

runfastman
  • 927
  • 2
  • 11
  • 31

1 Answers1

1

Apparently you can't use more than on Config file for a website project. I can create them by right clicking on App_data->PublishProfiles->ReportGenDev.pubxml but only the main config file is used. I don't know how the project got a debug config under the main one, but it is not used when publishing.

I need a WebApplication in order to create a web config transform.

(reference) how to add files in web.config transformation process?

There are a some hacks you can do to get around this. (reference) https://andrewtwest.com/2010/02/25/using-web-config-transformations-in-web-site-projects/

runfastman
  • 927
  • 2
  • 11
  • 31