Fwd: T4 Toolbox without VS integration

Developer
Jul 5, 2012 at 8:39 PM
There is the file.

---------- Forwarded message ----------
From: Marcos M. Romero <lagear@gmail.com>
Date: 2009/3/31
Subject: Re: T4 Toolbox without VS integration
To: [email removed]
Cc: Oleg Sych <Oleg.Sych@catapultsystems.com>


Hi Dylan
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();
// …
generator.Run();
#>
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.
Best,


2009/3/26 <dbourque@lewis.com>

Thanks guys. I appreciate the help.

Dylan Bourque
Lewis Computer Services


From: "Marcos M. Romero" <lagear@gmail.com>
To:
Cc: Dylan Bourque <dbourque@lewis.com>
Date: 03/26/2009 05:09 PM
Subject: Re: T4 Toolbox without VS integration





Hi Dylan,

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.

Regards

Marcos Romero

2009/3/26 Oleg Sych <Oleg.Sych@catapultsystems.com>
Dylan,

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.

Regards,

Oleg Sych
Senior Lead Consultant

727.251.5813 | Cell

www.CatapultSystems.com

CATAPULT SYSTEMS INC.
THE MICROSOFT CONSULTING COMPANY

From: Dylan Bourque [mailto:dbourque@lewis.com]
Sent:
Thursday, March 26, 2009 2:33 PM
To:
oleg_sych@hotmail.com
Subject:
T4 Toolbox without VS integration

Hi Oleg,

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?

Thanks,

Dylan Bourque

Lewis Computer Services

dbourque@lewis.com