I have this cshtml file located in this path
"~/Areas/Services/Views/Quotations/SpecificForms/PC/PCReceipts.cshtml"
I am trying to render this as a string and pass a viewmodel to it.
Currently I am using RazorLight v1.1.0 from Nuget and this is what I have tried so far:
var tempatePath = "~/Areas/Services/Views/Quotations/SpecificForms/PC/PCReceipts.cshtml";
IRazorLightEngine engine = EngineFactory.CreatePhysical(templatePath);
However when I run it, I get an error saying that I require an absolute path instead. How can I convert what I have currently to an absolute path? If I give it an absolute path, when I compile and run the program, won't the absolute path disappear?