Pre-compile razor views in asp .net mvc 5

前端 未结 1 376
终归单人心
终归单人心 2020-12-06 01:30

I have an ASP .Net MVC5 website, I have performance issues, I want to pre-compile the razor views and exclude them when deploying my website in IIS, I followed the steps ind

相关标签:
1条回答
  • 2020-12-06 02:13

    You don't need RazorGenerator for this. When publishing just set the option to "Precompile during publishing", under "File Publish Options" on the "Settings" tab. Click "Configure" and then tick "Merge all outputs to a single assembly". Give it a unique name, generally something like [ProjectName].Precompiled.

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