HoofMark.CSharpTemplating.Core
0.1.1
dotnet add package HoofMark.CSharpTemplating.Core --version 0.1.1
NuGet\Install-Package HoofMark.CSharpTemplating.Core -Version 0.1.1
<PackageReference Include="HoofMark.CSharpTemplating.Core" Version="0.1.1" />
<PackageVersion Include="HoofMark.CSharpTemplating.Core" Version="0.1.1" />
<PackageReference Include="HoofMark.CSharpTemplating.Core" />
paket add HoofMark.CSharpTemplating.Core --version 0.1.1
#r "nuget: HoofMark.CSharpTemplating.Core, 0.1.1"
#:package HoofMark.CSharpTemplating.Core@0.1.1
#addin nuget:?package=HoofMark.CSharpTemplating.Core&version=0.1.1
#tool nuget:?package=HoofMark.CSharpTemplating.Core&version=0.1.1
HoofMark.CSharpTemplating.Core
Generate code or any other text output from template files written in pure C#.
cstemplate is a VSCode extension and CLI tool that runs C# template files (.template.cs) directly from VS Code.
HoofMark.CSharpTemplating.Core provides the core functionality for compiling and running templates.
Getting started
- Install the CLI tool
cstemplatevia tool packageHoofMark.CSharpTemplating.Cli - Install the
cstemplateextension from the VS Code Marketplace - Add a package reference to
HoofMark.CSharpTemplating.Abstractionsin your template .csproj file - Create a template (
*.template.cs) and optional config (*.json) file in the project - Using VSCode context menu, shortcut keys or command palette, run the template to generate output.
For full documentation, see hoofmark.github.io/cstemplate.
Prerequisites
- .NET 10 SDK or later
- VS Code with the C# Dev Kit extension
Usage
The cstemplate extension for VSCode provides functionality that is similar to T4 templates in Visual Studio, but without the need to learn a separate templating language or to edit complex syntax containing a mix of C# code and embedded template instructions. Template files (*.template.cs) are written in pure C#, so can use any C# language features (StringBuilder, interpolated strings, etc) to generate and format output. If required, templates can also reference NuGet packages and custom DLLs at design time. Standard C# Dev Kit functionality and intellisense provides full support for editing, compiling and debugging templates, while the extension provides context menu, keyboard shortcuts and command palette options to generate code directly within VSCode.
Configuration files placed alongside the templates can be used to define template inputs (argument values, .json or .xml models, database connections, etc). The same template can be reused in multiple projects to generate output specific to each project.
Template output is simply one or more text files, written to a target location relative to the current project / solution. An individual template can be used to generate a single C# class, produce boilerplate code for data access objects, or to scaffold an entire project.
Additional documentation
For full documentation, see hoofmark.github.io/cstemplate.
Feedback
For source code and to log issues and feedback, see GitHub.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- Basic.Reference.Assemblies.Net100 (>= 1.8.4)
- HoofMark.CSharpTemplating.Abstractions (>= 0.1.1)
- Microsoft.CodeAnalysis.CSharp (>= 5.0.0)
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.1.1 | 0 | 7/16/2026 |
See full changelog: https://github.com/hoofmark/cstemplate/CHANGELOG.md