Can I use Web Config Transform without publish with Visual Studio 2012?

后端 未结 3 410
庸人自扰
庸人自扰 2021-02-05 00:57

Does Visual Studio 2012 support running a solution using a specific Web.config transform without the requirement to publish? We are using the web.config to change client setting

3条回答
  •  独厮守ぢ
    2021-02-05 01:48

    The web.config transform feature is only available during publish/package.

    The deal with this is that web projects don't have the abstraction of an alternate folder where the app executes versus the folder where the source is located like win project have. Because of this a lot of VS code touches the source web.config. If the web.config file itself if modified without VS knowing it may lead to strange behavior.

    I have blogged how you can manually do this at http://sedodream.com/2010/10/21/ASPNETWebProjectsWebdebugconfigWebreleaseconfig.aspx.

    There has been a lot of people asking for this feature, even though it may put their web projects into a potentially bad state. Since the demand is soo high I am considering adding a gesture in SlowCheetah that will enable this for web projects as well. I've got an issue on the SlowCheetah project page at https://github.com/sayedihashimi/slow-cheetah/issues/39 to track this. You can follow that issue for further updates. This may be one of the next items that I work on, but in the mean time you can use the instructions at the link above.

提交回复
热议问题