Skip to content

How to start?

beakona edited this page Dec 1, 2023 · 1 revision

AutoAs is a .NET Standard 2.0 library that runs during compile-time.

Inside your .NET project:

  1. Install NuGet package BeaKona.AutoAsGenerator or add BeaKona.AutoAsGenerator.dll as Analyzer to your Visual Studio .csproj file.
<ItemGroup>
   <Analyzer Include="absolute-or-relative-path-to\BeaKona.AutoAsGenerator.dll"/>
</ItemGroup>
  1. Mark class as partial.
  2. Append attribute BeaKona.AutoAsAttribute.

Additional links

Introducing C# source generators
Source Generators Cookbook

Clone this wiki locally