简体   繁体   中英

Regenerate T4 template after each build on build server without Vistual Studio

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

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM