Add source generator from local dll into C# project? #49820
-
Hi! I am not very familiar with Roslyn analyzer before, but recently have tried a lot on source generator. It is brilliant! From the tutorial it seems source generator can be added as a project reference or nuget package. I wonder is there an easier way, to simply add a local dll file? I think it would be useful to include the dll directly with source code in some cases, if it is shared by multiple projects but itself does not change very often (and of course, I don't want to publish a nuget package). Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
dotnet/roslyn-sdk@52f4c4e#diff-25d4a52c171c6bbd87583d2ade5d4c118a243eb59c1361a1c75c9a4d5c1f56df ? |
Beta Was this translation helpful? Give feedback.
-
You can add an analyzer/source generator directly by adding an <ItemGroup>
<Analyzer Include="Path/To/Your/Analyzer.dll" />
</ItemGroup> |
Beta Was this translation helpful? Give feedback.
You can add an analyzer/source generator directly by adding an
Analyzer
item. IE: