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.
<PackageVersion Include="RuntimeT4Generator" Version="0.3.20" />
                    
Directory.Packages.props
<PackageReference Include="RuntimeT4Generator">
  <PrivateAssets>all</PrivateAssets>
  <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version 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.
#addin nuget:?package=RuntimeT4Generator&version=0.3.20
                    
Install RuntimeT4Generator as a Cake Addin
#tool nuget:?package=RuntimeT4Generator&version=0.3.20
                    
Install RuntimeT4Generator as a Cake Tool

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 837 1/12/2022
0.3.19 333 1/9/2022
0.3.18 328 1/9/2022
0.3.17 303 1/9/2022
0.3.16 351 1/9/2022
0.3.13 357 1/6/2022
0.3.12 337 1/6/2022
0.3.11 336 1/6/2022
0.3.10 344 1/6/2022
0.3.7 338 1/4/2022
0.3.6 343 1/4/2022
0.3.5 366 1/4/2022
0.3.4 364 1/4/2022
0.3.3 330 1/4/2022
0.3.2 387 1/4/2022
0.3.1 322 1/4/2022
0.3.0 311 1/4/2022
0.2.1 360 1/3/2022
0.2.0 354 1/3/2022
0.1.3 362 1/2/2022
0.1.2 386 12/29/2021
0.1.1 350 12/29/2021
0.1.0 289 12/29/2021
0.0.6 336 12/29/2021
0.0.5 346 12/29/2021 0.0.5 is deprecated because it has critical bugs.
0.0.4 363 12/29/2021 0.0.4 is deprecated because it has critical bugs.
0.0.3 311 12/22/2021
0.0.2 362 12/22/2021
0.0.1 340 12/21/2021