我们完全基于t4Scaffold模板使用我们的.net项目。因此,我们必须将此操作自动化。实际上,我们尝试执行powershell命令,但是搭建命令不起作用。就像
"The term 'T4Scaffolding' is not recognized as the name of a cmdlet, function, script file, or operable program"我们通过以下链接获得帮助:How can I t4 scaffold from powershell.exe?
但是它不起作用,我们的要求是使用jenkins自动将t4Scaffold和生成的文件移动到另一个文件夹。
发布于 2014-09-30 16:47:17
我们有一个执行T4生成的BAT文件。文本转换是Visual Studio附带的工具(我们将其提交到build tools文件夹中)
@echo off
SETLOCAL ENABLEDELAYEDEXPANSION
SET TextTransform="%~dp0..\Build\tools\TextTransform\TextTransform.exe"
%TextTransform% "YourFile.tt" -out "YourFile.cs"
echo Transformation Complete计算机上TextTransform.exe的实际位置将位于C:\Program Files (x86)\Common Files\microsoft shared\TextTemplating\下的文件夹中
https://stackoverflow.com/questions/26097255
复制相似问题