Correct way to make a NuGet package project with a analyzer/source generator and reference it in the same solution? #120977
-
|
I have a solution with projects Now I want to
The problem is If I get the reference using |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
|
The consumer library should add a reference to the source generator, and sets output type to |
Beta Was this translation helpful? Give feedback.
The consumer library should add a reference to the source generator, and sets output type to
Analyzer. Check how unit test of System.Text.Json uses the generator:runtime/src/libraries/System.Text.Json/tests/System.Text.Json.SourceGeneration.TestLibrary/System.Text.Json.TestLibrary.Roslyn4.4.csproj
Line 8 in c5bb20a
runtime/src/libraries/System.Text.Json/tests/System.Text.Json.SourceGeneration.Tests/System.Text.Json.SourceGeneration.Roslyn4.4.Tests.csproj
Lines 18 to …