/RoslynRazorTemplating

Dynamically compile razor templates for use in .Net Core Console projects

Primary LanguageC#MIT LicenseMIT

RoslynRazorTemplating

Use the power of the Razor templating engine, in projects other than MVC

This repository is accompanied by the following article, please visit that website for complete documentation.

https://blogs.siliconorchid.com/post/coding-inspiration/razor-templating-with-roslyn/

Requirements:

  • .Net Core 2.0
  • VS 2017

To build: Make sure that the .cshtml template file (EmailTemplates/SampleEmailTemplate.cshtml) is set to "Copy to Output Directory"

If you are having problems running the project, please check that you are using the same Nuget Package versions that are identified in the source. It has been reported that using more recent versions of MS packages causes problems.