roslyn-sdk icon indicating copy to clipboard operation
roslyn-sdk copied to clipboard

If my vsix diagnostics show up - what are reasons why the codefixes are not offered in IDE?

Open taori opened this issue 4 years ago • 8 comments

@sharwell If i debug my vsix i get codefixes - if i install the vsix i don't get code fixes and diagnostics only. Is there a known issue which rings a bell regarding such a behavior?

taori avatar Jan 24 '20 10:01 taori

apparently related: https://github.com/dotnet/roslyn/issues/21444

taori avatar Jan 26 '20 20:01 taori

@sharwell Do you have any useful pointers for me to look at how to solve this? Could it be that diagnostics reported through RegisterSemanticDiagnosis are not supplied with codefixes and merely report diagnostics? That would not explain why it works in debug but i am stuck with guessing right now.

taori avatar Jan 28 '20 18:01 taori

I haven't seen this behavior. Is the code for this analyzer open source?

sharwell avatar Feb 06 '20 15:02 sharwell

Hmm. interesting. Yes it is: https://github.com/taori/Amusoft.CodeAnalysis.Analyzers

taori avatar Feb 06 '20 15:02 taori

Thanks! Does this apply to all the code fixes, or just some of them?

sharwell avatar Feb 06 '20 19:02 sharwell

I was unable to use any codefix. Adding comments to a method body should be enough to verify whether something is wrong I think.


From: Sam Harwell [email protected] Sent: Thursday, February 6, 2020 8:00:22 PM To: dotnet/roslyn-sdk [email protected] Cc: Andreas Müller [email protected]; Author [email protected] Subject: Re: [dotnet/roslyn-sdk] If my vsix diagnostics show up - what are reasons why the codefixes are not offered in IDE? (#425)

Thanks! Does this apply to all the code fixes, or just some of them?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/dotnet/roslyn-sdk/issues/425?email_source=notifications&email_token=ABKJZYF2MDSUO33REIF7BOTRBRM4NA5CNFSM4KLD47V2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOELAMHCI#issuecomment-583058313, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ABKJZYERDWG5FMUQDLD5XNDRBRM4NANCNFSM4KLD47VQ.

taori avatar Feb 06 '20 19:02 taori

@sharwell Did you spot anything suspicious or is it working for you if you install the extension? In some issue i read if it works for others, but not the developer it might be a case of a rootsuffix dirty state.

In case you got around to checking it out yet, ofc

taori avatar Feb 09 '20 04:02 taori

I had a similar problem.

In my case I had Resharper installed and in its options (Environment > Editor > Visual Studio Features) the Visual Studio light bulb was disabled (checkbox "Do not show Visual Studio light bulb").

I got it working after unchecking it and instead checking "Merge Visual Studio light bulb actions into ReSharper action indicator", and also checking "Show Visual Studio light bulb actions in submenu".

@taori Maybe you have also ReSharper installed?

RalfKoban avatar Jul 30 '20 20:07 RalfKoban