-
Notifications
You must be signed in to change notification settings - Fork 256
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 Generation Debug Launch Profile can reference non-netstandard2.0 versions of a multi-targeted library. #1128
Comments
Note that the only debugging strategy I would recommend for source generators is writing a unit test with the source generator testing library and debugging the unit test. |
@sharwell I am also seeing an issue when building a test project as you suggested.
I am multi-targeting, sure. But analyzers can only come from netstandard2.0. It makes no sense for this to be the analyzer assembly reference found (even though my test project is set to net461 at the moment.) I think this is a bug. |
Seems like this is about a half a workaround:
I have to manually reference MSBuild files and etc. from my package project (which would be provided via NuGet normally), which feels like a medium-sized oversight as well.
|
I am multi-targeting my templating library Weave and have had to workaround what appears to be a bug in the debug launch profile for source generators.
You can find a repro case here:
https://github.com/otac0n/Weave/tree/feature-source-generators c49ef389
This workaround is (currently) working for debugging:
However, I will also report that the behavior of the workaround is quite stange.
It is not enough to make that change on the filesystem and debug, or even to restart Visual Studio. I found that I actually had to interact with the Project Settings dialog:
This may be a clue, or it may be aggressive caching that is unrelated.
Visual Studio Details:
The text was updated successfully, but these errors were encountered: