-
Notifications
You must be signed in to change notification settings - Fork 37
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
Source generator does not work as NuGet package in Visual Studio #3
Comments
Installing .net standard 2.1 with Visual Studio Installer may solve your problem. |
I can't find anywhere to "install" .net standard 2.1, and all documentation on source generators in visual studio says only netstandard 2.0 is supported
I haven't found anything to suggest that this situation has changed in the current version of VS(17.4.4) If it matters, I'm doing this in a .NET 7 project |
After checking the dependencies, it seems that only .net standard 2.0 is needed. Unity also only supports Roslyn for .net standard 2.0. Maybe we should bring down the API version? |
Approved, lets bring it down to .NetStandard 2.0 then :) |
…mentation for the source generator aswell as for the systems and samples.
The source generator is now based on .NetStandard2.0, the latest nuget 1.0.7 is currently uploading :) |
Works perfect now, thanks! |
When added as a NuGet library to a project in Visual Studio, the source generator gets an error that it can't be loaded because the dll for netstandard2.1 can't be found.
After some googling, it seems only netstandard2.0 source generators are supported by the IDE.
dotnet/roslyn#47087
Is it possible to downgrade to netstandard2.0?
The text was updated successfully, but these errors were encountered: