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?
- In Solution Explorer, select the project.
- On the View menu, click Property Pages.
- 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.
- 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...
精彩评论