skip to Main Content

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!

2

Answers


  1. Chosen as BEST ANSWER

    It turns out it was the setting:

    Tools > Text Editor > C# > Advanced > Analysis > Show compiler errors and warnings for: That was set to None and should be set to Entire Solution.

    I changed this a while back to make VS not use as much CPU. Had no clue it affected this.

    Creds to ChatGPT for solving it where no support could!


  2. 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

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search