My solution file contains many projects which consist of many template files and I want regenerate each template after or before build on the project. I know how to do that locally, but I have problem how to do that on build server where Visutal Studio is not installed. Do you have any sollutions?
I know that are two sollutions form this source: Get Visual Studio to run a T4 Template on every build :
a) Visual Studio Visualization and Modeling SDK - i have to install visual studio (except Express Edition) and i can't do that
b) use TextTransform.exe tool, but then I have problems with missing dlls in GAC
Regards
TT stands for - Visual Studio Text Template is a software development tool created by the Microsoft. Further explanation - TT file contains text block and control logic used for generating new files. To write the Text Template file we can use either - Visual C# or Visual Basic Code.
T4 (Text template transformation toolkit) is template based code generation engine. So you can go and write C# code in T4 templates ( . tt is the extension) files and those c# codes execute to generate the file as per the written C# logic.
With Visual Studio 2010 SP1 and the Visual Studio Visualization and Modeling SDK for Visual Studio 2010, you're licensed to copy and redistribute the necessary files to do T4 transforms at build time on a build server (note, only a build server, not arbitrary redistribution). You can simply copy these files from a machine with Visual Studio and the SDK installed.
The two license files in question are: 1) buildserver.txt in the Visual Studio install directory 2) redist.txt in the VisualStudioIntegration\Tools\DSLTools directory of the SDK.
I have found solution;)
For regenerate T4 templates file i use solution described by Cheburek from this page Get Visual Studio to run a T4 Template on every build.
But if I want to use Cheburek solution on build server without Visual Studio installed I need to add following dll files to GAC, and then everything is OK:)
1) Microsoft.VisualStudio.TextTemplating.10.0.dll
2) Microsoft.VisualStudio.TextTemplating.Interfaces.10.0.dll
Regards
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With