Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Code generation "Quick Actions" in Visual Studio 2022 no longer working in C#

Typically when I implement an interface or write code for which usings are missing it is possible to press Ctrl+. (or right click and press 'Quick Actions and Refactorings...') to get a menu of suggestions on what can be done.

Among these suggestions are options to 'implement the interface' which generates stubs for the required methods/properties or 'add usings' etc.

These are no longer available to me. Various other actions are but afaik the common theme of those not being available any longer are the ones that in one way or another generates code.

None of my colleages have the same problem. I do however have the problem on ALL computers on which my account is logged into Visual Studio. So it clearly has something to do with my settings that are synced.

  • I have tried resetting the settings.

  • I have tried reinstalling VS.

  • I have tried to change various settings according to various slightly related tips on different forums which addresses similar issues.

  • I have checked the roslyn log files for any information on something going wrong.

But so far nothing helps.

I've searched various forums and it seems like ppl have experienced the same or similar issues throughout the years but I am unable to find any thread where anyone has actually found the cause of it nor a solution.

I can't say for sure but I think this started when upgrading from 17.3 to 17.4.

Worth mentioning might be that it actually still works in Visual Basic.

There seems to be no difference if it is .NET FW, Core or 6+.

Has anyone experienced something similar and have any suggestions on what can be done to fix it?

Thanks!

like image 449
jool Avatar asked Sep 07 '25 18:09

jool


1 Answers

Based on my testing, VS 2022 community 17.4.4 still be able to use the 'implement the interface' feature:

enter image description here

enter image description here

From your description, looks like if you don't sign in, everything will be ok.

So here are two solutions:

1, Reset the settings of the C#:

enter image description here

enter image description here

enter image description here

enter image description here

2, Turn off synchronized settings on a particular computer

Otherwise reinstall the VS will be meaningless

enter image description here

enter image description here

like image 115
Bowman Zhu Avatar answered Sep 09 '25 11:09

Bowman Zhu