Precompile ASP.NET MVC views on Azure Web App

前端 未结 2 1589
粉色の甜心
粉色の甜心 2021-01-30 23:22

Is there a way to precompile the ASP.NET MVC views on an Azure Web App (specifically when published via Release Management on VSTS)?

Once each view has been hit once, th

相关标签:
2条回答
  • 2021-01-30 23:40

    In visual studio 2013+, choose Build->Profiles. Select the profile, then choose "Settings". Underneath "Configuration", expand "File Publish Options", and then check the "Precompile during publishing" option.

    0 讨论(0)
  • 2021-01-30 23:52

    You can add "/p:PrecompileBeforePublish=true" argument in "Visual Studio Build" step:

    Then the task will call aspnet_compiler during the build process and generate a precompiled output for deployment.

    0 讨论(0)
提交回复
热议问题