AStarDev.SourceGenerators 0.1.12

There is a newer version of this package available.
See the version list below for details.
dotnet add package AStarDev.SourceGenerators --version 0.1.12
                    
NuGet\Install-Package AStarDev.SourceGenerators -Version 0.1.12
                    
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="AStarDev.SourceGenerators" Version="0.1.12" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="AStarDev.SourceGenerators" Version="0.1.12" />
                    
Directory.Packages.props
<PackageReference Include="AStarDev.SourceGenerators" />
                    
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 AStarDev.SourceGenerators --version 0.1.12
                    
#r "nuget: AStarDev.SourceGenerators, 0.1.12"
                    
#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 AStarDev.SourceGenerators@0.1.12
                    
#: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=AStarDev.SourceGenerators&version=0.1.12
                    
Install as a Cake Addin
#tool nuget:?package=AStarDev.SourceGenerators&version=0.1.12
                    
Install as a Cake Tool

Roslyn Source Generators Sample

A set of three projects that illustrates Roslyn source generators. Enjoy this template to learn from and modify source generators for your own needs.

Content

AStarDev.SourceGenerators

A .NET Standard project with implementations of sample source generators. You must build this project to see the result (generated code) in the IDE.

  • SampleSourceGenerator.cs: A source generator that creates C# classes based on a text file (in this case, Domain Driven Design ubiquitous language registry).
  • SampleIncrementalSourceGenerator.cs: A source generator that creates a custom report based on class properties. The target class should be annotated with the Generators.ReportAttribute attribute.

AStarDev.SourceGenerators.Sample

A project that references source generators. Note the parameters of ProjectReference in AStarDev.SourceGenerators.Sample.csproj, they make sure that the project is referenced as a set of source generators.

AStarDev.SourceGenerators.Tests

Unit tests for source generators. The easiest way to develop language-related features is to start with unit tests.

How To?

How to debug?

How can I determine which syntax nodes I should expect?

Consider using the Roslyn Visualizer toolwindow, witch allow you to observe syntax tree.

How to learn more about wiring source generators?

Watch the walkthrough video: Let’s Build an Incremental Source Generator With Roslyn, by Stefan Pölz The complete set of information is available in Source Generators Cookbook.

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
0.1.14 172 8/9/2026
0.1.13 125 8/7/2026
0.1.12 118 8/7/2026
0.1.11 85 8/7/2026
0.1.10 110 8/7/2026
0.1.9 76 8/7/2026
0.1.8 85 8/7/2026
0.1.0 103 8/7/2026

v0.1.11 - Actual fix: drop custom nuspec (NuspecFile mode skipped _GetPackageFiles, package had zero DLLs); move Attributes DLL out of lib/ so no TFM-scoped asset restricts compatibility.
v0.1.10 - Fix NuGet package framework compatibility: empty dependency group for all-frameworks support (did not work, nuspec mode broken).
v0.1.9 - Framework compatibility fix attempt (published with restrictions).
v0.1.8 - Fix NuGet package structure: analyzer DLL and Attributes DLL were missing due to MSBuild target ordering.
v0.1.7 - Fix bug in AutoRegisterServiceAttribute detection/code generation.
v0.1.6 - Fix build and packaging issues.
v0.1.5 - Update dependencies to latest Roslyn versions.
v0.1.4 - Add missing namespace in generated ServiceRegistrations class.
- Rename ServiceAttribute to AutoRegisterServiceAttribute for clarity