IntelliSense does not recognize generated constructors
See original GitHub issueGenerated code with the NoArgsConstructor
, AllArgsConstructor
and RequiredArgsConstructor
attributes does not get picked up by IntelliSense. The constructors can be used and the build passes without issues, however it would be nice if IntelliSense also recognized a presence of the generated constructors. This issue is observed in Visual Studio 2022 as well as Rider 2021.3.2.
Issue Analytics
- State:
- Created 2 years ago
- Comments:18 (11 by maintainers)
Top Results From Across the Web
Why is Visual Studio's Intellisense not showing constructors?
There is a way to refresh Intellisense. To do so, press Ctrl + Shift + R , or go to Edit>Intellisense>Refresh Local Cache....
Read more >Intellisense generating bad constructor recommendation in ...
I'm trying to define a constructor for a C# class and Intellisense keeps wanting to generate a return type which is, of course, ......
Read more >Source generated code is not always recognized by IntelliSense
When using a Source Generator library (e.g. Lombok.NET), IntelliSense works for a short period of time before it stops recognizing generated code.
Read more >How to fix Visual Studio 2022 17.5 Intellisense not working
This is a general problem that started with 17.5: intellisense, renaming, underlining all failing; GoToDeclaration etc all much slower.
Read more >Add "Generate constructor" option in "Show Fixes ...
In IntelliJ is possible to generate a constructor from fields very easily. ... But this option don't exists in the Show Fixes popup....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I think I am getting closer to diagnosing this issue. My current implementation of the Source Generators throws an exception when code cannot be generated (e.g. when a
partial
modifier is missing). This seems to cause issues in the IDE (see https://youtrack.jetbrains.com/issue/RIDER-74077). I will remove the thrown exceptions and replace them with Roslyn Analyzers. Hopefully this will solve the problem.Interesting. The past few days it has been on and off for me as well. I will write up a bug ticket for ReSharper this week.