T4 text templating engine
Перейти к файлу
Mikayla Hutchinson e128cfc9c8 Merge branch 'release/v3.0.0' 2024-09-03 17:54:03 -04:00
.github/workflows
.vscode
Mono.TextTemplating Don't try to pass langversion 13 just yet 2024-02-27 23:21:40 -05:00
Mono.TextTemplating.Build Use None/Include to ensure items are included in generated nupkg files. 2024-01-24 10:13:02 +00:00
Mono.TextTemplating.Build.Tests Upgrade NuGet.Frameworks for MSBuild tests again 2024-02-28 11:59:34 -05:00
Mono.TextTemplating.Roslyn Separate csc and runtime C# versions 2024-01-26 00:20:42 -05:00
Mono.TextTemplating.Tests Fix race in incremental build tests 2024-01-25 15:33:55 -05:00
TextTransform
dotnet-t4
dotnet-t4-project-tool
.editorconfig
.gitattributes
.gitignore
Directory.Build.props
LICENSE
Mono.TextTemplating.sln
NuGet.config
README.md
TextTemplating.snk
code_of_conduct.md
release-steps.md
version.json Set version to '3.1.0-preview.{height}' 2024-09-03 17:54:03 -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.