Jul 5, 2012 at 9:39 PM
There is the file.
---------- Forwarded message ----------
From: Marcos M. Romero <email@example.com>
Subject: Re: T4 Toolbox without VS integration
To: [email removed]
Cc: Oleg Sych <Oleg.Sych@catapultsystems.com
I send you the .tt file that process T4 generation from command line.
1) Copy it to %program files%\T4 Toolbox\T4Toolbox
2) Sample code
<#@ include file="T4Toolbox.tt" #>
<#@ include file="T4Toolbox\VisualStudioContext.tt" #>
<#@ include file="T4Toolbox\MyCodeGenerator.tt" #>
VisualStudioContext.OpenSolution(solutionRootPath + solutionName + ".sln");
MyCodeGenerator generator = new MyCodeGenerator();
Watch out for MyCodeGenerator.tt this is your template generator
This template can run from VS or call it by command line, as sample:
L:\Other Projects Need\SharpArchitecture_1.0_Beta_(rev_337)\src\NorthwindSample\tools\CrudScaffolding>"c:\Archivos de programa\Archivos comunes\Microsoft Shared
\TextTemplating\1.2\TextTransform.exe" -I "c:\Archivos de programa\T4 Toolbox" ScaffoldingGeneratorCommand.tt
I hope this can help u, if u have questions ask me.
Thanks guys. I appreciate the help.
Lewis Computer Services
As Oley said, I was working on the same feature that you need, I'll prepare a sample and send you the las source code of T4 (.tt files) that suport these feature, give me till the next week.
2009/3/26 Oleg Sych <Oleg.Sych@catapultsystems.com>
I am working with Marcos Romero, who is also interested in build-time code generation. Marcos’ idea is to start Visual Studio from the template running in TextTransform.exe and let the rest of T4Toolbox work the way it usually
does. Perhaps you guys can work this out. I will help as much as I can on the framework side.
Senior Lead Consultant
727.251.5813 | Cell
CATAPULT SYSTEMS INC.
THE MICROSOFT CONSULTING COMPANY
From: Dylan Bourque [mailto:firstname.lastname@example.org]
Sent: Thursday, March 26, 2009 2:33 PM
Subject: T4 Toolbox without VS integration
I've just started looking at using the T4 engine for code generation. Currently, we're using a custom solution that we developed internally. I came across your T4 Toolbox while searching for resources on reusable T4 templates, but I need to
be able to do the code generation at build time via the TextTransform.exe command line tool instead of within Visual Studio. In this T4 Toolbox discussion (http://t4toolbox.codeplex.com/Thread/View.aspx?ThreadId=41084),
Christian asks about the same issue. Have you done any work to accommodate this scenario?
Lewis Computer Services