Skip to content

Instantly share code, notes, and snippets.

@cartermp
Last active May 3, 2020 03:32
Show Gist options
  • Save cartermp/5304f2a2bca26099ad249c6d7a6f8e90 to your computer and use it in GitHub Desktop.
Save cartermp/5304f2a2bca26099ad249c6d7a6f8e90 to your computer and use it in GitHub Desktop.
<!-- This goes in the top-level property group -->
<PropertyGroup>
<LangVersion>preview</LangVersion>
</PropertyGroup>
<!-- Add this as a new ItemGroup, replacing paths and names appropriately -->
<ItemGroup>
<!-- Note that this is not a "normal" ProjectReference.
It needs the additional 'OutputItemType' and 'ReferenceOutputAssmbly' attributes. -->
<ProjectReference Include="path-to-sourcegenerator-project.csproj"
OutputItemType="Analyzer"
ReferenceOutputAssembly="false" />
</ItemGroup>
@guisantos
Copy link

Change the include to path-to-source-generator. It's misspelled.

@cartermp
Copy link
Author

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment