Skip to content
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

[BUG] When upgrading to dev kit the source generators no longer work. #68590

Closed
arunchndr opened this issue Jun 13, 2023 · 3 comments
Closed

Comments

@arunchndr
Copy link
Member

From vscode-dotnettools created by michaelstaib: microsoft/vscode-dotnettools#37

Describe the Issue

I have a project with a source generator which worked with Visual Studio full, Rider and VSCode omnisharp... after upgrading this no longer works. If I build with dotnet build I have no errors but the intellisense does not recognise generated code.

Steps To Reproduce

  1. dotnet new install hotchocolate.templates
  2. dotnet new graphql
  3. dotnet build
  4. code .

In the program.cs the extension method AddTypes has squiggles. This method is created by the source generator.

Expected Behavior

Source generators work like in the previous version.

Environment Information

  • OS macOS
@dotnet-issue-labeler dotnet-issue-labeler bot added Area-Compilers untriaged Issues and PRs which have not yet been triaged by a lead labels Jun 13, 2023
@arunchndr arunchndr added New Feature - Source Generators Source Generators Bug Area-IDE VSCode and removed Area-Compilers untriaged Issues and PRs which have not yet been triaged by a lead labels Jun 13, 2023
@arunchndr arunchndr added this to the 17.7 P4 milestone Jun 13, 2023
@arunchndr arunchndr modified the milestones: 17.7 P4, Preview 2 Jul 6, 2023
@jasonmalinowski
Copy link
Member

@michaelstaib: I'm unable to reproduce this with v2.0.249 of the C# extension and v0.2.100 of the C# Dev Kit extension on macOS. Any chance if you're still seeing it reproduce? Generators are expected to work so if something is broken it's something a bit more subtle. There was one fix that went out today that fixed some references not loading in some situations, so it's possible that's the cause here.

@michaelstaib
Copy link

It works with the newest bits.

@jasonmalinowski
Copy link
Member

jasonmalinowski commented Aug 10, 2023

@michaelstaib I'll close this as fixed then, if you see it again just reactivate and we'll dig further!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants