Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

IntelliSense does not recognize generated constructors

See original GitHub issue

Generated 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:closed
  • Created 2 years ago
  • Comments:18 (11 by maintainers)

github_iconTop GitHub Comments

CollinAlpertcommented, Feb 2, 2022

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 I will remove the thrown exceptions and replace them with Roslyn Analyzers. Hopefully this will solve the problem.

CollinAlpertcommented, Jan 25, 2022

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Post

No results found

github_iconTop Related Hashnode Post

No results found