All Projects → RdJNL → TextTemplatingCore

RdJNL / TextTemplatingCore

Licence: other
T4 Text Templating with .NET Core

Programming Languages

C#
18002 projects

Projects that are alternatives of or similar to TextTemplatingCore

Unchase.Odata.Connectedservice
📜 A Visual Studio extension for connecting to OData services with generating client-side C# proxy-classes
Stars: ✭ 39 (+62.5%)
Mutual labels:  visual-studio, visual-studio-extension
Visual-Studio
A Discord Rich Presence extension for both Visual Studio 2017 and 2019.
Stars: ✭ 80 (+233.33%)
Mutual labels:  visual-studio, visual-studio-extension
Community.VisualStudio.Toolkit
Making it easier to write Visual Studio extensions
Stars: ✭ 165 (+587.5%)
Mutual labels:  visual-studio, visual-studio-extension
auto-save-vs-extension
An extension that automatically saves the file as you're working on it.
Stars: ✭ 30 (+25%)
Mutual labels:  visual-studio, visual-studio-extension
ace-jump
Allows for quick movement around the editor screen. Inspired by AceJump for Webstorm and Vim plugin AceJump.
Stars: ✭ 44 (+83.33%)
Mutual labels:  visual-studio, visual-studio-extension
BuiltinCmd
VS extension that provide a built-in terminal window for CMD or Powershell.
Stars: ✭ 30 (+25%)
Mutual labels:  visual-studio, visual-studio-extension
vs-material-icons-generator
This plugin will help you to set material design icons to your Xamarin projects In Visual Studio.
Stars: ✭ 50 (+108.33%)
Mutual labels:  visual-studio, visual-studio-extension
CodegenCS
C# Toolkit for Code Generation (T4 alternative!)
Stars: ✭ 119 (+395.83%)
Mutual labels:  t4, t4-engine
Codist
A visual studio extension which enhances syntax highlighting, quick info (tooltip), navigation bar, scrollbar, display quality and brings smart tool bar to code editor.
Stars: ✭ 134 (+458.33%)
Mutual labels:  visual-studio, visual-studio-extension
SmartCommandlineArgs
A Visual Studio Extension which aims to provide a better UI to manage your command line arguments
Stars: ✭ 70 (+191.67%)
Mutual labels:  visual-studio, visual-studio-extension
experimental-tools
A bunch of quality refactorings and code fixes that are going to improve your C# development experience in Visual Studio and remove some common pain.
Stars: ✭ 19 (-20.83%)
Mutual labels:  visual-studio, visual-studio-extension
unittestgenerator
A unit test generation extension for Visual Studio that aims to always produce code that compiles - covering the basic cases automatically and preparing as much as it can for the complex cases.
Stars: ✭ 32 (+33.33%)
Mutual labels:  visual-studio, visual-studio-extension
DisposableFixer
This is a Visual Studio Extension and NuGet package that should identify and fix problems as memleaks while using IDisposables.
Stars: ✭ 37 (+54.17%)
Mutual labels:  visual-studio, visual-studio-extension
PlantUml-Language-Service
PlantUml Language Service extension for Visual Studio 2017 and 2019
Stars: ✭ 24 (+0%)
Mutual labels:  visual-studio, visual-studio-extension
IncludeToolbox
Visual Studio extension to format, prune, and inspect include directives.
Stars: ✭ 48 (+100%)
Mutual labels:  visual-studio, visual-studio-extension
Unchase.OpenAPI.Connectedservice
📜 Visual Studio extension to generate OpenAPI (Swagger) web service reference.
Stars: ✭ 69 (+187.5%)
Mutual labels:  visual-studio, visual-studio-extension
D365FONinjaDevTools
To make of you a Ninja Developer in Dynamics 365 For Finance and Operations
Stars: ✭ 70 (+191.67%)
Mutual labels:  visual-studio, visual-studio-extension
VSMac-CodeCoverage
A Visual Studio for Mac code coverage extension.
Stars: ✭ 69 (+187.5%)
Mutual labels:  visual-studio, visual-studio-extension
git-tools
This extension provides a git changes tool window, a graphical git history viewer and menus to launch Git Bash, Git Extenstions and TortoiseGit.
Stars: ✭ 72 (+200%)
Mutual labels:  visual-studio, visual-studio-extension
rudebuild
A non-intrusive bulk/unity C++ build tool for Visual Studio
Stars: ✭ 16 (-33.33%)
Mutual labels:  visual-studio, visual-studio-extension

T4 Text Templating with .NET 5

The software in this repository allows you to run a T4 template with the .NET 5 runtime. This means you can load .NET Core and .NET 5 assemblies and use .NET 5 libraries. My team uses it to generate C# code for types in a .NET Core 3.1 assembly (using Reflection). We also use it to process a JSON file using .NET 5's System.Text.Json library.

Author: RdJNL

Latest release

Version 1.1.1 can be downloaded here.

Requirements

  • .NET 5
  • .NET Framework 4.8
  • Visual Studio 2019 (for the VS extension)

How to use it

Visual Studio 2019 extension

  • The extension is provided as a VSIX file. Run this file to install the extension to Visual Studio. You may need to use an elevated command prompt to run the file as admin.
  • Once the extension is installed, open your solution in Visual Studio.
  • Select the .tt file in the Solution Explorer, right click it and click properties.
  • In the properties window, set Custom Tool to TextTemplatingFileGeneratorCore.
  • Right click the file in the Solution Explorer and click Run Custom Tool.

TextTransformCore executable

To use the executable, simply run it from the command line. Provide as first and only argument the path to the template file. If the path has spaces in it, makes sure to surround it with double quotes (").

Limitations

There are several limitations to this approach:

  • The hostspecific setting must be false.
  • No debugging.
  • No template parameters.
  • The VS extension cannot be used in database projects (this seems to be a bug in Visual Studio).

Extra feature

This processor has one feature that Visual Studio's processor does not have:

  • From a T4 template, you can access the TemplateFile string property to get the absolute path to the template file.

How does it work?

The following steps are followed to process the T4 template:

  • .NET Framework 4.8 code (either the VS extension or the TextTransformCore executable) uses Visual Studio's T4 template processor to preprocess the template into C# code. This C# code is saved to a temporary file.
  • The .NET Framework code runs a .NET 5 executable which compiles the C# code and runs it. The result is once again saved to a temporary file.
  • The .NET Framework code loads the content of the temporary file and either passes it to Visual Studio (the VS extension) or saves it to the output file (the TextTransformCore executable).

License

The license for all contents of the repository can be found in the LICENSE file.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].