Fluidify 1.0.1

dotnet add package Fluidify --version 1.0.1
                    
NuGet\Install-Package Fluidify -Version 1.0.1
                    
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="Fluidify" Version="1.0.1">
  <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="Fluidify" Version="1.0.1" />
                    
Directory.Packages.props
<PackageReference Include="Fluidify">
  <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 Fluidify --version 1.0.1
                    
#r "nuget: Fluidify, 1.0.1"
                    
#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.
#:package Fluidify@1.0.1
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Fluidify&version=1.0.1
                    
Install as a Cake Addin
#tool nuget:?package=Fluidify&version=1.0.1
                    
Install as a Cake Tool

Fluidify

A modern alternative to T4 — an MSBuild task that processes Fluid (Liquid) template files at build time to generate code, configuration, or any other text output.

Installation

dotnet add package Fluidify

Fluidify is a development dependency — it runs only at build time and adds nothing to your project's runtime output.

Usage

Add <Fluidify> items to your project file. Each item points to a .fluid template, and any custom metadata you set becomes a template variable.

<ItemGroup>
  <Fluidify Include="WelcomeMessage.cs.fluid" Name="Alice" />
  <Fluidify Include="Config/appsettings.json.fluid" AppName="MyApp" Version="1.0.0" />
</ItemGroup>

Templates use standard Liquid syntax:

WelcomeMessage.cs.fluid

public static class WelcomeMessage
{
    public const string Text = "Welcome, {{ Name }}!";
}

Building the project renders each template before compilation. The output path is inferred by stripping the .fluid extension, so WelcomeMessage.cs.fluid produces WelcomeMessage.cs.

Fluidify works with any text format — C#, JSON, HTML, YAML, or anything else. The .fluid extension is just a convention; the template itself is plain text with Liquid tags.

Compilation

Generated .cs files are automatically included in compilation. To opt out, set Compile="false":

<ItemGroup>
  <Fluidify Include="WelcomeMessage.cs.fluid" Name="Alice" Compile="false" />
</ItemGroup>

For non-.cs outputs that should be compiled, set Compile="true" explicitly:

<ItemGroup>
  <Fluidify Include="Templates/Helper.fluid" Compile="true" />
</ItemGroup>

Custom output path

Use the Destination metadata to write the output to a different location:

<ItemGroup>
  <Fluidify Include="Templates/report.html.fluid"
            Destination="Output/report.html"
            Title="Status Report"
            Author="MyApp" />
</ItemGroup>

Relative paths are resolved from the project directory. Directories are created automatically.

How it works

Fluidify registers an MSBuild target that runs before CoreCompile. For each <Fluidify> item it:

  1. Parses the .fluid file using the Fluid template engine
  2. Passes all item metadata (except Destination and Compile) as template variables
  3. Writes the rendered output to the inferred or specified destination

MSBuild tracks input and output timestamps, so templates are only re-rendered when the source file changes.

License

Apache-2.0

There are no supported framework assets in this package.

Learn more about Target Frameworks and .NET Standard.

  • .NETStandard 2.0

    • 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
1.0.1 56 3/5/2026
1.0.0 34 3/5/2026
0.2.0 35 3/4/2026
0.1.0 33 3/4/2026