-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Internal NuGet dependency #6
Comments
I can try to take a look, sure. Did you see the guidance on NuGet dependencies in the cookbook? https://github.com/dotnet/roslyn/blob/main/docs/features/source-generators.cookbook.md#use-functionality-from-nuget-packages Also since this project was created, there is now testing support for generators via roslyn-sdk which might be easier to use for some scenarios. A good repo example for that would be https://github.com/jmarolf/generator-start |
Thanks for your reply. I had not seen generator-start before, so it was interesting to review that code. But as soon as I added a dependency to System.Text.Json to that generator, I got the same problem as in my project. So it's obviously something I'm doing wrong. |
There is some discussion about that in dotnet/docs#28054. |
Here is a sample project that covers the case with NuGet dependencies: |
Can you please update the code to show how do if the generator is dependent on a NuGet package. I think it is a common scenario.
I have try to use you template to write a generator that is generating code based on a json file using System.Text.Json, but I cannot make it to work.
And how do I add the json file to the tests that you have in the template?
The text was updated successfully, but these errors were encountered: