Precompile ASP.NET MVC views on Azure Web App Precompile ASP.NET MVC views on Azure Web App asp.net asp.net

Precompile ASP.NET MVC views on Azure Web App


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

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


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.