T4 text templating engine
Перейти к файлу
Mikayla Hutchinson 857d4d0a9f Use async main instead of sync-over-async 2023-10-02 00:57:17 -04:00
.github/workflows Update GitHub pipeline 2023-10-01 19:04:46 -04:00
.vscode Add readme and update schema for build targets 2023-10-02 00:21:59 -04:00
Mono.TextTemplating Merge pull request #148 from MaceWindu/patch-1 2023-10-02 00:18:32 -04:00
Mono.TextTemplating.Build Fix empty item metadata overwriting encoded value 2023-10-02 00:52:22 -04:00
Mono.TextTemplating.Build.Tests Disable parallelization on MSBuild tests 2023-10-01 20:43:31 -04:00
Mono.TextTemplating.Roslyn Update dependencies 2023-10-01 19:04:43 -04:00
Mono.TextTemplating.Tests Remove Mono tests 2023-10-01 19:57:46 -04:00
TextTransform Fix some more warnings 2023-10-01 19:04:46 -04:00
dotnet-t4 Use async main instead of sync-over-async 2023-10-02 00:57:17 -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 Add LICENSE.txt to packages 2023-10-02 00:21: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.