error when using RenderToFile

Oct 21, 2009 at 4:52 PM

I am getting this error after upgrading to Visual Studio 2010

Error 17 Running transformation: System.TypeLoadException: Could not load type 'Microsoft.VisualStudio.TextTemplating.ITextTemplatingEngineHost' from assembly 'Microsoft.VisualStudio.TextTemplating.10.0, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.
   at T4Toolbox.TransformationContext.Render(String content, OutputInfo output, CompilerErrorCollection errors)
   at T4Toolbox.Template.Render()
   at T4Toolbox.Template.RenderToFile(String fileName)
   at Microsoft.VisualStudio.TextTemplating0AEB80F4267BD02B9B43C11D74E20906.GeneratedTextTransformation.TransformText() in c:\Development\PIMS\PIMSClasses\T4\Generator.tt:line 940
   at Microsoft.VisualStudio.TextTemplating.TransformationRunner.RunTransformation(TemplateProcessingSession session, String source, ITextTemplatingEngineHost host, String& result)  1 1 

Any idea as to why?

 

Rob

Oct 22, 2009 at 7:23 PM

To expand on the above - if I create a script template and run it with no modification I get the above error also.  I am using VS2010 Professional Beta 2.

 

 

Oct 24, 2009 at 11:37 AM

Same problem here.

@Rob: Have you found a solution already?

Oct 24, 2009 at 1:19 PM

@nielss1409

Tried looking in 'Microsoft.VisualStudio.TextTemplating.10.0.dll' and that interface is not implemented although the documentation indicates it should be?

 

To overcome, have changed my T4 code to not use rendertofile so all it now created to a single file rather than to multiple files which meant I no longer need to use T4Toolbox so can remove the include. 

 

Let me know if you want to know any more details.

Coordinator
Oct 25, 2009 at 4:44 AM
Edited Oct 25, 2009 at 4:59 AM

If you are using Beta 2, please install build 9.10.23.1 of the toolbox.

Oct 26, 2009 at 8:44 AM

Oleg, Rob,

Thanks for your quick responses. Will check changes later today.

Kind Regards,

Niels