-
Notifications
You must be signed in to change notification settings - Fork 13
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. #37
Comments
I see the same thing in my projects where I make extensive use of the OneOf.SourceGenerator package. The The type or namespace name 'GenerateOneOfAttribute' could not be found (are you missing a using directive or an assembly reference?) Roslyn CS0246 Building the projects with |
I spotted as well that custom Roslyn Analyzers (in general I mean, not only source generators) are not always called in the context of the new C# extension + C# Dev Kit. @mavasani do you think it can be something similar to what you fixed for diagnostic suppressors ? I also spotted that if you open simultaneously the same project with both VSCode and VS, then sometimes it is "fixing" analyzers execution with VSCode. Quite weird. cc @jbevain |
+1 |
Just now, I was running vscode in windows and everything was fine, recognizing |
I was on a Win10 machine at the time. EDIT: I also just tried this on a MacBook, and the same behavior occurs on that (source generator's marker attribute shows up as a compiler error within VS Code). |
On my side analyzers are not correctly running and I repro both on windows and ubuntu. (Perhaps we need another issue given it is not a source generator). But I have the feeling it is quite the same issue, and related to the Roslyn LSP. |
We've got #61 tracking looking at analyzers as well, although there's a good chance they've both got the same root cause. |
@mvromer OK, thanks for confirming it's not just macOS! |
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
dotnet new install hotchocolate.templates
dotnet new graphql
dotnet build
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
The text was updated successfully, but these errors were encountered: