Source generation certainly makes Find All References noisy. #DotNet #Roslyn #SourceGenerators

I can't decide which should be true, but surely one of them should be:

* Code marked with [GeneratedCode] should be ignored by code coverage, or
* Generated code should be marked with [ExcludeFromCodeCoverage]

I'm looking at you, code generators for [LoggerMessage] and [GeneratedRegex] and/or Microsoft.Testing.Extensions.CodeCoverage. 👀

#DotNet #Roslyn #SourceGenerators

What are C# source generators and why should you care? In this week’s Breakpoint Show, we chat with @andrewlock about this powerful compiler feature that can transform your .NET codebase. Metaprogramming, but make it clean!

#DotNet #CSharp #SourceGenerators

https://www.breakpoint.show/podcast/episode-041-source-generators-with-andrew-lock/

Episode 041 – Source Generators with Andrew Lock - The Breakpoint Show

https://youtu.be/pdyB0C6vuS8Welcome to the forty-first episode of The Breakpoint Show! In this episode, we're diving into one of the most powerful and often underutilized features in modern C#—source generators. And we’ve brought in a special guest to help guide us through it: Andrew Lock, author, speaker, and all-around .NET expert. Source generators are a feature of

The Breakpoint Show -

Source Generators в C# - від теорії до практики

#dotnet #csharp #sourcegenerators #roslyn

https://taraskovalenko.github.io/posts/source-generators/

Source Generators в C# - від теорії до практики

Source Generators були представлені в .NET 5 як інструмент для генерації коду під час компіляції, це інструмент для метапрограмування під час компіляції в C#. До їх появи розробники використовували різні підходи для генерації коду:

Taras Kovalenko
https://github.com/csharpfritz/InstantAPIs - Generate "instant" #MinimalAPIs for #ASPnet using Reflection or #SourceGenerators. Nice experiment @csharpfritz.
GitHub - csharpfritz/InstantAPIs: A library that generates Minimal API endpoints for an Entity Framework context.

A library that generates Minimal API endpoints for an Entity Framework context. - GitHub - csharpfritz/InstantAPIs: A library that generates Minimal API endpoints for an Entity Framework context.

GitHub
You should not write code that machines can generate #dontent #csharp #mvvm #sourcegenerators
https://github.com/JasonBock/Rocks - Rocks: #Roslyn #SourceGenerators based #Mocks. No reflection penalty. Really cool @jasonbock.
GitHub - JasonBock/Rocks: A mocking library based on the Compiler APIs (Roslyn + Mocks)

A mocking library based on the Compiler APIs (Roslyn + Mocks) - JasonBock/Rocks

GitHub

Hey #dotnet friends using System.Text.Json ✋

Has anyone managed to create code that uses source generators but for snake_case naming policy?

I notice I can not pass anywhere the serializer options when I specify using the source generator, and then I can not pass the snake_case naming policy?

Any help please, repost for reach?

#csharp #aspnet #aspdotnet #serialization #json #snake_case #jsonserializer #sourcegenerators #systemtextjson

I'm familiar with T4 templates and static code generation. But I want to change to using the later technology, so I've been reading up on .NET #SourceGenerators. I think I've followed most of what I've read, but the brain is feeling a bit mush.

Chillout topic for today 😎.

I'm still discovering the usefulness of Source generators but the community around it grows every day.

See 🔎 the awesome 💯 (yet not in the name) repository of C# Source Generators related projects - https://github.com/amis92/csharp-source-generators

Do you use them in your projects? If so please share the examples 🙏.

#dotnet #sourcegenerators

GitHub - amis92/csharp-source-generators: A list of C# Source Generators (not necessarily awesome) and associated resources: articles, talks, demos.

A list of C# Source Generators (not necessarily awesome) and associated resources: articles, talks, demos. - GitHub - amis92/csharp-source-generators: A list of C# Source Generators (not necessaril...

GitHub