Featured resource
2026 Tech Forecast
2026 Tech Forecast

Stay ahead of what’s next in tech with predictions from 1,500+ business leaders, insiders, and Pluralsight Authors.

Get these insights
  • Course

Developing Source Generators in C#

C# Source Generators can analyze your code and generate new C# code while your project is compiling. This course will teach you how to build and use C# Source Generators in your .NET applications.

Advanced
3h 52m
(73)

Created by Thomas Claudius Huber

Last Updated Feb 13, 2024

Course Thumbnail
  • Course

Developing Source Generators in C#

C# Source Generators can analyze your code and generate new C# code while your project is compiling. This course will teach you how to build and use C# Source Generators in your .NET applications.

Advanced
3h 52m
(73)

Created by Thomas Claudius Huber

Last Updated Feb 13, 2024

Get started today

Access this course and other top-rated tech content with one of our business plans.

Try this course for free

Access this course and other top-rated tech content with one of our individual plans.

This course is included in the libraries shown below:

  • Core Tech
What you'll learn

When building .NET applications, you often have to write repetitive code. Instead of manually writing that code, you can generate it with a C# Source Generator. In this course , Developing Source Generators in C#, you’ll learn how to use a C# Source Generator to analyze your code and to generate additional C# code while your project is compiling. First, you’ll explore what a C# Source Generator is and what problems it helps you to solve. Next, you will create a C# Source Generator. You will learn how to set it up, how to analyze the syntax of your code, how to generate a source file, and how to add that source file on the fly to the compilation. Finally, you’ll learn how to package the source generator in a NuGet package, so that you can use it in different .NET projects. When you're finished with this course, you’ll have the skills and knowledge of C# Source Generators needed to build and use C# Source Generators in your .NET projects.

Developing Source Generators in C#
Advanced
3h 52m
(73)
Table of contents

About the author
Thomas Claudius Huber - Pluralsight course - Developing Source Generators in C#
Thomas Claudius Huber
31 courses 4.8 author rating 3908 ratings

Thomas is a well-known author, software developer, and speaker from Germany. He specializes in .NET, C#, TypeScript, XAML, and Azure.

Get started with Pluralsight