Hi Champs,
Today I am going to explain how we can setup the Razor Generator to you Sitecore Visual Studio Project for Pre-Compiled MVC views. Below are the steps to configure this.
- Open your MVC solution in Visual Studio.
- Install the Razor Generator tool.
- Open Properties of your view (.cshtml file).
- Set the Custom Tool field value to RazorGenerator and press Enter. In this case, a .cs file with the source code should be created for a view.
- Build your project and copy the assembly with precompiled views into the \bin folder of your Sitecore XP solution.
Happy Learning