Closed JimSEOW closed 7 years ago
I added generated *.tt.cs codes to repository. Thanks.
@kazuyaujihara Thank you for your prompt response. This is the script I use to generate *.tt.cs
For unknown reasons, it does not work. Could you please feedback. Thank you.
@echo off
SETLOCAL ENABLEDELAYEDEXPANSION
:: set the working dir (default to current dir)
set wdir=%cd%
if not (%1)==() set wdir=%1
:: set the file extension (default to tt.cs)
set extension=tt.cs
if not (%2)==() set extension=%2
echo executing transform_all from %wdir%
:: create a list of all the T4 templates in the working dir
dir %wdir%\*.tt /b /s > t4list.txt
echo the following T4 templates will be transformed:
type t4list.txt
:: transform all the templates
for /f %%d in (t4list.txt) do (
set file_name=%%d
set file_name=!file_name:~0,-6!.%extension%
echo: \--^> !file_name!
TextTransform.exe -out !file_name! %%d
)
echo transformation complete`
@JimSEOW I could not catch what you want to do. Let me know the details like error messages.
@kazuyaujihara
TextTransform.exe -out filename.tt filename.tt.cs does not work.I
Can you share how to generate *.tt.cs correctly?
According to my research, TextTransform.exe only supports CR LF for eol. CRs might be removed through Git. .gitattributes file is changed to set proper eol.
The NCDK.sln file come without proper T4 Templating configuration. It would help other if there is instruction how to TextTransform all the .tt files before opening the NCDK.sln