Skip to content
This repository

RazorMachine is a robust Razor 2.0 templating engine that supports layouts as well as a _viewStart construct like Asp.Net MVC

branch: master
Octocat-spinner-32 Source nunit -> msunit December 11, 2013
Octocat-spinner-32 .gitattributes setup October 25, 2012
Octocat-spinner-32 .gitignore terminology changes November 15, 2012
Octocat-spinner-32 Update December 10, 2013


var rm = new RazorMachine();
var result = 
   rm.Execute("Hello @Model.FirstName @Model.LastName", new {FirstName="John", LastName="Smith"});

RazorMachine is a robust and easy to use .Net Razor v2/v3 template engine. The master branch uses Razor v3. This implementation supports layouts (masterpages) and a _viewStart construct, just like MVC does support these features. The RazorEngine works independently from MVC. It only needs the System.Web.Razor reference. It almost works exacly like Asp.Net MVC. Take a look at to see how easily this framework works.

This RazorEngine originally was published at CodeProject


There is a package available at NuGet. To install RazorMachine using NuGet, run the following command in the Package Manager Console

PM> Install-Package RazorMachine
Something went wrong with that request. Please try again.