-
-
Notifications
You must be signed in to change notification settings - Fork 73
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
Script with a Source Generator doesn't compile #233
Comments
@mdonatas thank you for the feedback. I haven't messed with this scenario within NetPad yet, but this is a great use case that I'd like to support. I'll check it out. |
Update: I tried to create a fix for this for the upcoming release but as far as I can tell .NET is missing a couple APIs to make this possible via the implementation currently used by NetPad. I'll give it another push after the next update. |
Thanks for the update and for the effort. I take it NetPad uses different pipelines for intellisense and for building as intellisense can handle generators. |
It does. The problem I'm facing currently is I need to get the code the generator would output to include it when compiling your user code but there's no straightforward way to do that programmatically with a generator defined in the BCL (and not in your user code) that I've found so far. One rather hacky way to do it is to create a temp project and have Roslyn run the generator and grab the output but I'm trying to find a more elegant solution. |
A script with a Source Generator fails to compile when run although intelli-sense shows that a Source Generator has run (at least during edit time) as correct xml-doc was made for the partial method.
The text was updated successfully, but these errors were encountered: