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 362 1/12/2022
0.3.19 170 1/9/2022
0.3.18 156 1/9/2022
0.3.17 168 1/9/2022
0.3.16 163 1/9/2022
0.3.13 165 1/6/2022
0.3.12 158 1/6/2022
0.3.11 171 1/6/2022
0.3.10 167 1/6/2022
0.3.7 172 1/4/2022
0.3.6 195 1/4/2022
0.3.5 175 1/4/2022
0.3.4 181 1/4/2022
0.3.3 158 1/4/2022
0.3.2 170 1/4/2022
0.3.1 167 1/4/2022
0.3.0 163 1/4/2022
0.2.1 162 1/3/2022
0.2.0 161 1/3/2022
0.1.3 174 1/2/2022
0.1.2 184 12/29/2021
0.1.1 156 12/29/2021
0.1.0 156 12/29/2021
0.0.6 160 12/29/2021
0.0.5 192 12/29/2021
0.0.4 185 12/29/2021
0.0.3 178 12/22/2021
0.0.2 171 12/22/2021
0.0.1 166 12/21/2021