Visual Studio Online website gets deployed to Azure in debug mode

倖福魔咒の 提交于 2019-12-10 14:50:41

问题


I created an ASP.NET MVC web application project which I commit to Visual Studio Online (Git repo) and is linked to a Windows Azure website for automatic deployment (if all unit tests succeed). My project contains the default Web.Release.config transformation that should remove the Web.config attribute /configuration/system.web/compilation/@debug which should (amongst others) enable script bundling.

It appears the web.config transformation is not executed during deployment, so I guess it doesn't use the Release configuration during build/deployment.

I also don't find a way to alter the default build definition in Visual Studio Online.

How can I get Visual Studio Online/Azure to deploy my project using Release build configuration?


回答1:


Update your Build Definition to specify you want the build to be a release build. To do this, in Team Explorer, go to the Builds section. Right-click on your build definition and select Edit Build Definition. In the Build Definition settings, click on the Process node. Under 2.Build, set your Configurations to Any CPU|Release.

Here's a screen capture for reference.



来源:https://stackoverflow.com/questions/21219536/visual-studio-online-website-gets-deployed-to-azure-in-debug-mode

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!