开发者

Always publish website with release code?

Is it possible to change some setting so that Visual Studio always use the "release" configuration when publishing?

I use debug mode when i develop to clear some caches and stuff like that and i also have different web.configs for release and debug. Sometimes when i publish i forget to change the configuration to release and i end up with a broken website ;)

I understand开发者_StackOverflow i can do this with MS Build or something but publish working fine except for this. Any tips?


  1. In Solution Explorer, select the project.
  2. On the View menu, click Property Pages.
  3. Click the Build or Debug tab, in a Visual C# or a Visual F# project, the Compile or Debug tab, in a Visual Basic project, or Configuration Properties, in a Visual C++ project.
  4. In the Configuration drop-down list, click Debug or Release."

Steps provided by: http://msdn.microsoft.com/en-us/library/wx0123s5.aspx


As of at least VS 2017, the web publish settings now include a setting for which configuration to publish, which defaults to Release, so you can publish the release build even when VS is still in Debug configuration.

I just wish that they had also done this for regular Click-Once applications as well...

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜