Skip to content

Add an example for 'Consume MSBuild properties and metadata' for IncrementalSourceGenerators #77155

Answered by 333fred
rgbav asked this question in Q&A
Discussion options

You must be logged in to vote

I have to add
<CompilerVisibleItemMetadata Include="AdditionalFiles" MetadataName="FileGenerator_FileRole"/>
to the project that uses the source generator project - then this metadata setting is visible. But is this the right way?

Yes, that is the only way. The metadata comes from the consuming project.

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@rgbav
Comment options

@333fred
Comment options

Answer selected by rgbav
# for free to join this conversation on GitHub. Already have an account? # to comment
Category
Q&A
Labels
None yet
2 participants