NTypewriter
csharp-source-generators
Our great sponsors
NTypewriter | csharp-source-generators | |
---|---|---|
8 | 9 | |
109 | 1,880 | |
- | - | |
8.3 | 7.6 | |
13 days ago | 5 days ago | |
C# | ||
MIT License | Creative Commons Zero v1.0 Universal |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
NTypewriter
-
This week I released v2.1 of my text-templating library Weave that now uses Source Generators by default.
I am currently using NTypewriter for code generation.
-
Embedded source generation?
With NTypewriter you can generate anything. It connects Scriban templates with data exposed from Roslyn API. You can run templates from VS (design time) or embed them (run time) into your application with the help of Buildalayzer.
-
Typescript models to C# POCOs
With NTypewriter you can generate clients for any language (TS, Java), because you have full control over generated code, but similar to other tools, it uses C# as an input language.
- A useful project I found a couple months ago
-
Code generator like plop.js for dotnet
You can use NTypewriter for that, it is mainly for generating typed TS clients, but in general, you can generate whatever you want.
- Library for generating C# code strings programmatically(Or "Object Oriented-ly")?
-
Tools you use to help you with rapid application development.
You can try to use NTypewriter for code generation, but its main purpose is generation of java script clients for APIs or documentation.
-
Best, most useful extensions for Visual Studio 2022?
NTypewriter is better and alive, but I am definitely biased.
csharp-source-generators
- Any type providers implemented in C# using source generators
-
Custom intellisense error or warning feedback?
I don't know of anything out of the box that would emit errors/warnings for a case like that, but if it was something you were dealing with often enough you could certainly write your own analyzer if one doesn't already exist.
-
Embedded source generation?
List of source generators: https://github.com/amis92/csharp-source-generators
-
What are the hardest topics in C#/.NET you would like to know more/better?
I also couldn't find many info in docs nor more advanced tutorials, but this list of source generators helped me as an inspiration.
-
Why is no-one using Roslyn token-based code generation with Source Generators?
I'm planning to rewrite all of our company's old T4-based codegen tools into Source Generators. I've been looking at how other Source Generators are implemented and what surprised me is that everyone seems to assemble the output code manually as text with string builders or at best some simple templating engine (eg. Scriban). I expected that I would see a lot of projects assembling their output code from Roslyn tokens and then using Roslyn's formatter to produce the actual code that can be emitted into the output file(s), like this article demonstrates. No-one seem to be doing that though. Why?
-
Source generator library
Start from here: C# Source Generators
-
Getting into source generators in .Net
Look here under 'Tips & Tricks'
-
The C# Source Generators revolution
Source generators colletion
-
HttpClientGenerator is a tool that uses the Roslyn code generator feature to write boilerplate HttpClient code for you.
Add it to this list https://github.com/amis92/csharp-source-generators
What are some alternatives?
Typewriter - Automatic TypeScript template generation from C# source files
Roslyn - The Roslyn .NET compiler provides C# and Visual Basic languages with rich code analysis APIs.
Textrude - Code generation from YAML/JSON/CSV models via SCRIBAN templates
dotnet - .NET Community Toolkit is a collection of helpers and APIs that work for all .NET developers and are agnostic of any specific UI platform. The toolkit is maintained and published by Microsoft, and part of the .NET Foundation.
TemplateStudio - Template Studio accelerates the creation of new WinUI 3, WPF, and UWP apps using a wizard-based experience.
ResXFileCodeGenerator - VocaDb.ResXFileCodeGenerator is a C# source generator to generate strongly-typed resource classes for looking up localized strings.
easygen - Easy to use universal code/text generator
stronginject - compile time dependency injection for .NET
scriban - A fast, powerful, safe and lightweight scripting language and engine for .NET
NullGuard - Adds null argument checks to an assembly
jntemplate - jntemplate is an fast and lightweight html templating engine for C# .NET.
HttpClientCodeGenerator - HttpClientGenerator is a tool that uses the Roslyn code generator feature to write boilerplate HttpClient code for you.