RuntimeT4Generator 0.3.20

dotnet add package RuntimeT4Generator --version 0.3.20
NuGet\Install-Package RuntimeT4Generator -Version 0.3.20
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="RuntimeT4Generator" Version="0.3.20">
  <PrivateAssets>all</PrivateAssets>
  <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add RuntimeT4Generator --version 0.3.20
#r "nuget: RuntimeT4Generator, 0.3.20"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install RuntimeT4Generator as a Cake Addin
#addin nuget:?package=RuntimeT4Generator&version=0.3.20

// Install RuntimeT4Generator as a Cake Tool
#tool nuget:?package=RuntimeT4Generator&version=0.3.20

RuntimeT4Generator

This is a replacement of TextTemplatingFilePreprocessor.

Installation

Install via Nuget.

dotnet add package RuntimeT4Generator

How to use

<ItemGroup>
    
    <AdditionalFiles Include="A.tt" RuntimeT4Generator_Namespace="YourOwnNamespace" />
    
    <AdditionalFiles Include="B.tt" RuntimeT4Generator_TypeName="YourOwnClassName" />
    
    <AdditionalFiles Include="D.tt" RuntimeT4Generator_ParameterName="buffer" />
    
    <AdditionalFiles Include="D.tt" RuntimeT4Generator_Modifier="partial struct" />
    
    <AdditionalFiles Include="E.tt" RuntimeT4Generator="" />
    
    <AdditionalFiles Include="E.tt" RuntimeT4Generator="Utf8, Utf16, StringBuilder" />
</ItemGroup>

You can use RuntimeT4Generator_Namespace, RuntimeT4Generator_TypeName and RuntimeT4Generator_ParameterName at the same time.

This source generator support the 3 types.

Type RuntimeT4Generator Value
System.StringBuilder "StringBuilder" or ""
System.StringBuilder "StringBuilder" or ""
ref Cysharp.Text.Utf16ValueStringBuilder "Utf16"
ref global::System.Runtime.CompilerServices.DefaultInterpolatedStringHandler "DefaultInterpolatedStringHandler"

T4Attribute has come since version 0.3.10

[RuntimeT4Generator.T4(kind:RuntimeT4Generator.Kind.Utf8)]
partial struct BigTemplate
{}

RuntimeT4Generator will search BigTemplate.tt under the project directory.

There are no supported framework assets in this package.

Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
0.3.20 678 1/12/2022
0.3.19 276 1/9/2022
0.3.18 269 1/9/2022
0.3.17 244 1/9/2022
0.3.16 291 1/9/2022
0.3.13 294 1/6/2022
0.3.12 281 1/6/2022
0.3.11 280 1/6/2022
0.3.10 288 1/6/2022
0.3.7 279 1/4/2022
0.3.6 288 1/4/2022
0.3.5 307 1/4/2022
0.3.4 309 1/4/2022
0.3.3 276 1/4/2022
0.3.2 331 1/4/2022
0.3.1 266 1/4/2022
0.3.0 256 1/4/2022
0.2.1 303 1/3/2022
0.2.0 297 1/3/2022
0.1.3 304 1/2/2022
0.1.2 328 12/29/2021
0.1.1 291 12/29/2021
0.1.0 232 12/29/2021
0.0.6 279 12/29/2021
0.0.5 266 12/29/2021
0.0.4 288 12/29/2021
0.0.3 248 12/22/2021
0.0.2 300 12/22/2021
0.0.1 282 12/21/2021