Browsing All posts tagged under »Razor«

How to render a Razor template with PowerShell

April 29, 2012

2

The Microsoft ASP.NET Razor view engine has an API that can be leveraged outside of the normal ASP.NET MVC context. In this post we are going to use PowerShell to render a Razor template. Lets get started. First of all we have to load the System.Web.Razor.dll assembly: Add-Type -Path path\to\System.Web.Razor.dll There are three classes in the Razor […]