Create any file with Razor-Collection of common programming errors
Yes you can, just take a look at the RazorEngine on codeplex. Razor is just a templating engine that could be used in any application including console, desktop, … and it is not tightly coupled coupled to an HttpContext
like the WebForms pseudo view engine.