Class Central is learner-supported. When you buy through links on our site, we may earn an affiliate commission.

Pluralsight

Developing Source Generators in C# 10

via Pluralsight

Overview

Save Big on Coursera Plus. 7,000+ courses at $160 off. Limited Time Only!
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.

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.

Syllabus

  • Course Overview 1min
  • Understanding C# Source Generators 27mins
  • Setting up a C# Source Generator 17mins
  • Generating Source Files 26mins
  • Working with the Syntax API 50mins
  • Adding a Marker Attribute 27mins
  • Using the Semantic Model 66mins
  • Packaging Your Source Generator 16mins

Taught by

Thomas Claudius Huber

Reviews

4.8 rating at Pluralsight based on 66 ratings

Start your review of Developing Source Generators in C# 10

Never Stop Learning.

Get personalized course recommendations, track subjects and courses with reminders, and more.

Someone learning on their laptop while sitting on the floor.