I’ve a question for T4 toolbox template. When I run a .tt file from VS there is not a error, but when I run the .tt file from command line, I’ve the follow exception:
The following Exception was thrown:
System.InvalidCastException: Unable to cast object of type ‘Microsoft.VisualStudio.TextTemplating.CommandLine.CommandLineHost’ to type ‘System.IServiceProvider’
The exception was throw in the next code line:
IServiceProvider hostServiceProvider = (IServiceProvider)TransformationContext.Host;
T4 toolbox by architecture cant run from TextTransform.exe command line?