T4Toolbox with Clarius T4 Editor Pro

Aug 17, 2010 at 11:29 AM

Hello,
I have a set of templates/generators i created with the T4 Toolbox from Codeplex.
We've bought the T4 Editor Pro version last week, but i'm having some trouble combining the two.

My template setup is as followed :
- Main TT generator file
- Main TT Template file (MainTemplate class inherited from T4 ToolBox Template class)
- TT Template file 1 (FirstTemplate class inherited from T4 ToolBox Template class)
- TT Template file 2 (SecondTemplate class inherited from T4 ToolBox Template class)

The Main TT Generator file includes T4Toolbox.tt, T4Toolbox imports namespace T4Toolbox
When text-transformation runs the Main TT Generator creates an instance of Main TT Template and calls the Render method (this is the T4 Toolbox render)
Main TT Template creates instances of TT Template 1 and TT Template 2 and calls RenderToFile() on both of them.

With this template setup i get errors that the Main TT Template, TT Templates 1 and 2 do not contain definitions for Render, RenderToFile and TransformText.
I tried importing T4Toolbox namespace in all templates but that didn't help.
I guess these errors happen because the T4 ToolBox and T4 Editor work in different ways?

Is it at all possible to combine the two? And if so, is there some documentation on how to set that up?
If combining is not possible, does T4 Editor support the setup as described above?

Thanks for any help.

Kind regards,
Marco

Coordinator
Aug 17, 2010 at 12:43 PM

Marco,

Last time I tried Clarius editor didn't work with T4 Toolbox. I would suggest getting the Tangible T4 Editor.

Oleg

Aug 17, 2010 at 2:34 PM

Hi Oleg,

 

Too bad i already bought the Clarius editor :( I should have checked before :D.

The only reason i bought it was because of the Intellisense, the power of T4 Toolbox with the Generator and Template classes works perfectly for me!

 

Do you know if the Tangible T4 Editor supports Template inheritance?

I've made a BaseTemplate (this inherites from T4 Toolbox Template). All my templates inherit from this BaseTemplate class.

In the generator.tt I include this BaseTemplate.tt file and I don't include it in each seperate template file, this because when I do I get an error that the BaseTemplate.tt has already been included.

One of the major problems I have with Clarius in combination with T4 Toolbox is that Clarius needs the BaseTemplate.tt include in each template because else it doesn't see the methods defined in the BaseTemplate.

 

Thanks for your help!!