Phillip introduced C## Source Generators here. This post describes two new generators that we added to the samples project in the Roslyn SDK github repo.
The first generator gives you strongly typed access to CSV data. The second one creates string constants based on Mustache specifications.
It is important to have a good mental picture of how source generators operate. Conceptually, a generator is a function that takes some input (more on that later) and generates C## code as output. This ‘function’ runs before the code for the main project is compiled. In fact, its output becomes part of the project.
#.net #.net core #.net framework #c#