dotnet
csharp-source-generators
Our great sponsors
dotnet | csharp-source-generators | |
---|---|---|
28 | 9 | |
2,725 | 1,874 | |
3.3% | - | |
5.2 | 7.7 | |
7 days ago | 8 days ago | |
C# | ||
GNU General Public License v3.0 or later | 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.
dotnet
-
Current state of MAUI?
Not https://github.com/CommunityToolkit/dotnet
-
Source Generator Debug always NulLReferecneException
Here's some: - MVVM Toolkit - PolySharp - ComputeSharp
-
How did you guys get your first C# job?
Started programming by writing some apps for Windows Phone later UWP during university. A few years ago I started collaborating a lot on GitHub to some Microsoft projects, like the Windows Community Toolkit. There I created a lot of new APIs and libraries, like all the new animation APIs and pipeline brush APIs, etc. I then also proposed adding some general .NET APIs to it, and that's how the MVVM Toolkit was born, along with other libraries which are now moved to the .NET Community Toolkit. Fast forward until about late 2020, and they pinged me saying the new Microsoft Store (which hadn't been announced yet back then) was using several of those new APIs I had written, so we started collaborating more so that I could add more functionality they needed. After that shipped, at some point there was a new opening to which I applied, and here I am in the Microsoft Store team and also leading the .NET Community Toolkit 🙂
-
AppCenter and ComunityToolkit MVVM Compile-error
This is tracked by https://github.com/CommunityToolkit/dotnet/issues/409. The issue is likely that AppCenter image using an older version of Visual Studio (and Roslyn). The MVVM Toolkit needs at least Roslyn 4.0 (ie. Visual Studio 2022) in order to work. Unfortunately this is not something we can change from the MVVM Toolkit, you have to open a support request for AppCenter to ask for a newer Roslyn version, or see if there is a way for you to enable that in your pipeline 🥲
-
WPF - MVVM Community Toolkit - RelacyCommand CanExecute not updating
The toolkit's:
-
The Next C# with Mads Torgersen
https://github.com/CommunityToolkit/dotnet/issues/224 - one ask and fix.
-
I want to learn WPF and was told I should use a MVVM based framework any up to date suggestions?
Yeah, the fact properties use fields with annotations right now isn't ideal, it's just the best we could do until C# gets partial properties. I do plan on adding support for that though as soon as C# gets that feature. You can follow the progress here 🙂
-
Guard Library - StaticDotNet.ArgumentValidation
For comparison, CommunityToolkit.Diagnostics has a guard library.
-
Thinking about zero-allocation parsing.
There is some stuff in CommunityToolkit to lower allocations of frequently converted Spans, StringPool comes to mind.
-
CommunityToolkit.MVVM questions
Most likely this: https://github.com/CommunityToolkit/dotnet/blob/main/src/CommunityToolkit.Mvvm/DependencyInjection/Ioc.cs
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?
ComputeSharp - A .NET library to run C# code in parallel on the GPU through DX12, D2D1, and dynamically generated HLSL compute and pixel shaders, with the goal of making GPU computing easy to use for all .NET developers! 🚀
Roslyn - The Roslyn .NET compiler provides C# and Visual Basic languages with rich code analysis APIs.
ResXFileCodeGenerator - VocaDb.ResXFileCodeGenerator is a C# source generator to generate strongly-typed resource classes for looking up localized strings.
MVVM-Samples - Sample repo for MVVM package
stronginject - compile time dependency injection for .NET
PostSharp.NotifyPropertyChanged - auto-magic INotifyPropertyChanged done right
NullGuard - Adds null argument checks to an assembly
jab - C# Source Generator based dependency injection container implementation.
HttpClientCodeGenerator - HttpClientGenerator is a tool that uses the Roslyn code generator feature to write boilerplate HttpClient code for you.
PropertyChanged.SourceGenerator - Powerful INotifyPropertyChanged / INotifyPropertyChanging Source Generator, which generates INPC boilerplate for you as part of your build. Supports features such as automatic and manual dependencies between properties, notifications when specific properties change, and more.
dotnet-options-generator - Generate and register IOptions from appsettings.json at compile-time with source generators.