#sourcegenerator
In #Unity, sometimes, general types can't convey the intention and #typesafety must be enforced, using alias directives is not the answer. We need #type wrappers. But declaring them is boringly repetitive. Why don't delegate that to a #roslyn #sourcegenerator?
github.com/laicasaane/T...
October 16, 2025 at 7:01 AM
I haven't used the "official" testing package for this since it's API makes it hard to do the run-time verification that I describe in the post. I had to go down to working with the SourceGenerator and Compilation APIs directly to get that behavior. Once I was down there, I needed a snapshotting...
September 29, 2025 at 10:13 PM
Learn how to streamline your code by removing 1500 lines of boilerplate with a custom source generator. Optimize your projects, enhance readability, and boost performance. #CodeOptimization #SourceGenerator
dev.to
July 8, 2025 at 3:15 PM
I recently created a SourceGenerator project template for custom file formats. Check it out! https://old.reddit.com/r/dotnet/comments/1kuf8jo/i_recently_created_a_sourcegenerator_project/

#dotnet
May 24, 2025 at 4:24 PM
Just published static view locator source generator for Avalonia so you don't have to use reflection anymore #Avalonia #dotnet #charp #xaml #sourcegenerator www.nuget.org/packages/Sta...
StaticViewLocator 0.0.1
A C# source generator that automatically implements static view locator for Avalonia without using reflection.
www.nuget.org
May 7, 2025 at 9:07 PM
I just published my first C# Source Generator. It generates the >, >=, <, <= operators for a partial type (class, struct or record) which implements IComparable.

#dotnet #csharp #sourcegenerator #opensource

github.com/sonnemaf/Ref...
April 9, 2025 at 12:53 PM
Not sure which package I have to reference to use the DependencyProperty SourceGenerator. Can't find it in the Gallery app or docs.
April 3, 2025 at 1:49 PM
Suppress or enforce? In C#, you can silence warnings OR make sure critical ones can’t be ignored! Learn how to configure diagnostics and take control of your code analysis. ⚡

📚👉🏼 https://bit.ly/4bVU7gJ

#CSharp #Roslyn #CodeAnalysis #SourceGenerator #dotnet
March 16, 2025 at 9:01 AM
As a software engineer, just ranting about a wrong approach in a given context is not enough, we should provide options and alternatives! It applies to #diagnostic #analyzers, they should not just make noise, but providing #code #suggestion!

bit.ly/41eh0ay

#sourcegenerator #csharp #dotnet
February 26, 2025 at 8:31 AM
This library is a C# source generator designed to automatically generate string length constants from Entity Framework configurations and data annotations.

#sourcegenerator #entityframework #stringlength #dotnet

github.com/TarasKovalen...
GitHub - TarasKovalenko/EntityLengths.Generator: Source generator for EF Core entity length constants
Source generator for EF Core entity length constants - TarasKovalenko/EntityLengths.Generator
github.com
January 31, 2025 at 8:53 PM
I just started working on a #dotnet #sourcegenerator for doing dependency injection in #powershell
You can build PowerShell modules in dotnet, but if you do, you are currently faced with these issues:
- no async code
- no dependency injection
- no cancellation token (but still cancelable process)
November 28, 2024 at 11:12 AM
Need testable or just simplified observability in your apps and services?

ActivitySources, Logs and Metrics, all defined quickly and easily on interfaces, injectablable and easy!

github.com/purview-dev/...

#oss #observability #dotnet #opensource #sourcegenerator
GitHub - purview-dev/purview-telemetry-sourcegenerator: .NET Source Generator for interface-based telemetry building activities, activity events, logs and metrics.
.NET Source Generator for interface-based telemetry building activities, activity events, logs and metrics. - purview-dev/purview-telemetry-sourcegenerator
github.com
November 12, 2024 at 6:06 AM
Bis eben noch an meinem #SourceGenerator geschrieben (mit der Roslyn-Sache da)... Holy moly, also war 'n wilder Trip, insb. wenn man mit der #Roslyn-API arbeitet, statt 'n StringBuilder zu nehmen. Kein Wunder, dass man recht wenig Projekte damit gesehen hat und die Leute lieber Quick&Dirty machen.
July 29, 2024 at 10:35 PM
A major version update has just been launched for the NetFabric.CodeAnalysis and NetFabric.Reflection packages. Additionally, a new GitHub pages site has been created for documentation purposes.
github.com/NetFabric/Ne... #dotnet #reflection #roslyn #roslynanalyzer #sourcegenerator
GitHub - NetFabric/NetFabric.CodeAnalysis: Extensions to System.CodeAnalysis (Roslyn) and System.Ref...
Extensions to System.CodeAnalysis (Roslyn) and System.Reflection. - GitHub - NetFabric/NetFabric.CodeAnalysis: Extensions to System.CodeAnalysis (Roslyn) and System.Reflection.
github.com
October 10, 2023 at 2:48 PM