Setting up the Razor Generator for Visual Studio Application

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.

  1. Open your MVC solution in Visual Studio.
  2. Install the Razor Generator tool.
  3. Open Properties of your view (.cshtml file).
  4. 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.rezor
  5. Build your project and copy the assembly with precompiled views into the \bin folder of your Sitecore XP solution.

Happy Learning

Advertisement

One thought on “Setting up the Razor Generator for Visual Studio Application

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s