|
Hi,
I am using unit tests to test my templates, using the Engine and the TemplateHost class.
string rootDir = Directory.GetCurrentDirectory();
IDictionary<string, PropertyData> arguments =
new Dictionary<string, PropertyData>();
arguments["myarg"] = new PropertyData(1, typeof(long));
TemplateHost host = new TemplateHost(rootDir, arguments);
host.TemplateFile = "myfile.t4";
Engine engine = new Engine();
engine.ProcessTemplate(File.ReadAllText(host.TemplateFile), host);
The instruction engine.ProcessTemplate just stop the test with the error
Test method mymethod threw exception: System.EntryPointNotFoundException: Entry point was not found..
Microsoft.VisualStudio.TextTemplating.ITextTemplatingEngineHost.get_TemplateFile()
Microsoft.VisualStudio.TextTemplating.Engine.ProcessTemplate(String content, ITextTemplatingEngineHost host)
mymethod() in myfile.cs: line 78
I am using VS2008, GAX Feb 2008 and GAT for VS2008.
Any idea?
Thanks in advance
|