Skip to content

WarrenFerrell/CSharpSourceGenerationUtils

Repository files navigation

CSharp.SourceGenerationUtils.

Collection of Helper classes to make Source Generation for csharp easier.

Prerequisites

Visual Studio version 16.8 and above is required as its first version to support source generators.

<PropertyGroup>
  <CompilerGeneratedFilesOutputPath>$(MSBuildProjectDirectory)/generated</CompilerGeneratedFilesOutputPath>
  <EmitCompilerGeneratedFiles>true</EmitCompilerGeneratedFiles>
</PropertyGroup>

<Target Name="ExcludeGenerated" BeforeTargets="AssignTargetPaths">
  <ItemGroup>
    <Generated Include="generated/**/*.g.cs" />
    <Compile Remove="@(Generated)" />
  </ItemGroup>
  <Delete Files="@(Generated)" />
</Target>

notes

Some of the foundational code was based on code from https://github.com/chaowlert/PrimaryConstructor

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages