Get-StringFromTemplate functionality ... custom cmdlet?

Oct 21, 2012 at 7:22 PM
Edited Oct 21, 2012 at 7:22 PM

What would be the best (easyest) way to create functionality that enables you to just return string content from a rendered t4 template. Withour generating any files. 

I already found the code that renders the templates in T4Scaffolding/Cmdlets /InvokeScaffoldTemplateCmdlet.cs more exactly GetTemplateOutput function. But how do I consume this in my own CustomScaffolder's cmdlet ... there is a lot of internal functionality used.


Oct 21, 2012 at 10:27 PM

Let me answer my own question :)

Just call Invoke-ScaffoldTemplate cmdlet without OutPutPath parameter ... that should do the trick!