✅ How to add a nuget dependencies on a Source generator project?
I basically want to import this dependencies called Newtonsoft.Json, but it seems like it can't be find the assembly elsewhere.. anyone knows how?
6 Replies
You have to bundle the dlls into your package... There's a discussion or something on it somewhere
Ah no, it's in the cookbook: https://github.com/dotnet/roslyn/blob/main/docs/features/source-generators.cookbook.md#use-functionality-from-nuget-packages
GitHub
roslyn/source-generators.cookbook.md at main · dotnet/roslyn
The Roslyn .NET compiler provides C# and Visual Basic languages with rich code analysis APIs. - roslyn/source-generators.cookbook.md at main · dotnet/roslyn
it quite an inconvenient, but I'll take it, thanks!
Yepyep, but most of SG authorship falls into that category
Just be thankful it's possible...
yeah..
Was this issue resolved? If so, run
/close
- otherwise I will mark this as stale and this post will be archived until there is new activity.
Was this issue resolved? If so, run /close
- otherwise I will mark this as stale and this post will be archived until there is new activity.