- Open the NuGet Package Manager GUI in Visual Studio
- Search for "RazorGenerator"; You will find "RazorGenerator.MsBuild" and "RazorGenerator.Mvc"
- Add "RazorGenerator.MsBuild" to all projects containing Razor Views; This will precompile all Razor views.
- Add "RazorGenerator.Mvc" to your site project; This will add a RazorGeneratorMvcStart() to the App_Start to make sure the website will use the precompiled views.
- Remove duplicate views; If you had copied over any views from a project to your site project, you can remove them from the site project.
I hope the DXA Site project and will soon use Razor Generator too [link].