diff --git a/MoreLinq/MoreLinq.csproj b/MoreLinq/MoreLinq.csproj
index b07b9a2bd..b357ef6c4 100644
--- a/MoreLinq/MoreLinq.csproj
+++ b/MoreLinq/MoreLinq.csproj
@@ -157,7 +157,6 @@
-
TextTemplatingFileGenerator
Aggregate.g.cs
@@ -248,33 +247,4 @@
-
-
-
- %(None.LastGenOutput)
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/MoreLinq/tt.cmd b/MoreLinq/tt.cmd
new file mode 100644
index 000000000..cbb7ac281
--- /dev/null
+++ b/MoreLinq/tt.cmd
@@ -0,0 +1,8 @@
+@echo off
+pushd "%~dp0"
+for /f "tokens=*" %%f in ('dir /s /b *.tt') do (
+ echo>&2 dotnet t4 "%%f"
+ dotnet t4 "%%f" || goto :end
+)
+:end
+popd
diff --git a/MoreLinq/tt.sh b/MoreLinq/tt.sh
new file mode 100755
index 000000000..49be91c70
--- /dev/null
+++ b/MoreLinq/tt.sh
@@ -0,0 +1,4 @@
+#!/usr/bin/env bash
+set -e
+cd "$(dirname "$0")"
+find . -name "*.tt" -print0 | xargs -0 -t -L 1 sh -c '(dotnet t4 "$0" || exit 255)'
diff --git a/build.cmd b/build.cmd
index 18923a015..ae3dbc0db 100644
--- a/build.cmd
+++ b/build.cmd
@@ -13,6 +13,7 @@ if "%1"=="docs" shift & goto :docs
dotnet restore && dotnet tool restore ^
&& call :codegen MoreLinq\Extensions.g.cs -x "[/\\]ToDataTable\.cs$" -u System.Linq -u System.Collections MoreLinq ^
&& call :codegen MoreLinq\Extensions.ToDataTable.g.cs -i "[/\\]ToDataTable\.cs$" -u System.Data -u System.Linq.Expressions MoreLinq ^
+ && call MoreLinq\tt ^
&& for %%i in (debug release) do dotnet build -c %%i --no-restore %* || exit /b 1
goto :EOF
diff --git a/build.sh b/build.sh
index 7d188c377..ac7f75b51 100755
--- a/build.sh
+++ b/build.sh
@@ -12,6 +12,7 @@ codegen() {
}
codegen MoreLinq/Extensions.g.cs -x "[/\\\\]ToDataTable\.cs$" -u System.Linq -u System.Collections MoreLinq
codegen MoreLinq/Extensions.ToDataTable.g.cs -i "[/\\\\]ToDataTable\.cs$" -u System.Data -u System.Linq.Expressions MoreLinq
+MoreLinq/tt.sh
if [[ -z "$1" ]]; then
configs="Debug Release"
else