T4 text templating engine
Перейти к файлу
Mikayla Hutchinson d6fd26ba90 Fix race in incremental build tests 2024-01-25 15:33:55 -05:00
.github/workflows Update GitHub pipeline 2023-10-01 19:04:46 -04:00
.vscode Fix some warnings 2023-10-12 18:18:59 -04:00
Mono.TextTemplating Fix relative pragma tests 2024-01-22 23:49:11 -05:00
Mono.TextTemplating.Build Clean up the msbuild schema 2024-01-11 14:26:49 -05:00
Mono.TextTemplating.Build.Tests Fix race in incremental build tests 2024-01-25 15:33:55 -05:00
Mono.TextTemplating.Roslyn Add support for C# 11 and newer versions 2023-10-12 18:18:59 -04:00
Mono.TextTemplating.Tests Fix race in incremental build tests 2024-01-25 15:33:55 -05:00
TextTransform Fix some more warnings 2023-10-01 19:04:46 -04:00
dotnet-t4 Fix more packaging issues 2023-10-02 23:16:40 -04:00
dotnet-t4-project-tool Clean up some build props 2022-10-06 01:52:10 -04:00
.editorconfig Fix some more warnings 2023-10-01 19:04:46 -04:00
.gitattributes Add a NuGet.config to keep GitHub Actions happy 2022-01-26 03:40:23 -05:00
.gitignore gitignore test runner 2022-10-03 18:23:01 -04:00
Directory.Build.props Migrate to DotNet.ReproducibleBuilds 2023-10-12 18:18:59 -04:00
LICENSE Style cleanup and set up package 2019-12-05 16:45:14 -05:00
Mono.TextTemplating.sln Remove support for .NET Core < 6.0 2023-10-01 19:03:17 -04:00
NuGet.config Add a NuGet.config to keep GitHub Actions happy 2022-01-26 03:40:23 -05:00
README.md Update the repo README 2022-10-05 02:42:09 -04:00
TextTemplating.snk Sign the assemblies 2017-03-17 00:18:20 -04:00
code_of_conduct.md Fix links to Code of Conduct 2020-04-10 12:52:34 -07:00
release-steps.md Update release_steps.md 2021-02-22 22:00:42 -05:00
version.json Update version to 3.0.0-preview.* 2023-10-01 19:04:46 -04:00

README.md

Mono.TextTemplating

Build NuGet version (dotnet-t4)

T4 templates are a simple general-purpose way to use C# to generate any kind of text or code files.

Mono.TextTemplating started out as an open-source reimplementation of the Visual Studio T4 text templating engine, but has since evolved to have many improvements over the original, including support for C# 10 and .NET 6.

The dotnet-t4 tool can be used either to process T4 templates directly, or preprocess them into runtime template classes that can be included in your app and processed at runtime.

$ dotnet tool install -g dotnet-t4
$ echo "<#@ parameter name='Name' #>Hello <#=Name#>" | t4 -o - -p:Name=World
Hello World

To learn more, see the dotnet-t4 readme.

For advanced use, the engine itself is available as a package called Mono.TextTemplating that can be embedded in an app. For details, see the Mono.TextTemplating package readme.