dotnet/roslyn-sdk

Analyzer as nuget package does not create editor hints in VisualStudio ?

bramerdaniel opened this issue · 4 comments

I am working on a project that contains also a DiagnosticAnalyser.
Disributed as nuget package it seems to work, but it does not generate the squiggly editor marks in the VisualStudio editor,
I tried to pack it into a visual studio extension, here it works fine.
Having that problem, codefixes do not work as well, when shipped as npkg.

I also tried existing analyzers/codefixes (xunit + xunit.analyzers ) with the same result.
I tried to google this problem, but could not find any usefull hints.

Is this not working in general, or am I the only one having that problem ?

Are you able to create a sample project to demonstrate this issue? Another option would be to show a NuGet package that reproduces this issue.

I just created a xunit test project and added one test method that causes an analyser problem.

AnalyserProblem

Here is a screenshot of my studio.

Here is the zipped project
XUnitTest.zip

After playing arround with my VisualStudio, I found out that in my experimental instance, the squiggles are getting displayed.
Comparing the two, the only difference seemed to be the Resharper installation on my normal instance.....

Step by step checking the options of the Resharper options page, I found the missleading setting.
ResharperOption

If I uncheck the marked checkbox, the analyser squiggles are displayed.
So I assume it is a Resharper error, as it hides the squiggels even if it does not show its own analysis squiggles.