Resharper does not highlight unused methods, variables, fields

I got a new Laptop and installed yesterday VisualStudio 2017, Resharper C# Version 2018.3.4 and the Visual Studio PowerTools.

On my old Laptop unused methods, variables, fields, usings were highlighted grey. I really liked that feature.

Now on my new laptop fields and variables are under waved, methods are not marked. I spent already a lot of time on Google but i did not find something about it.

Is there a configuration possiblity? Is this because of installing powertools? 

 

Thanks in advance

Tom

8 comments

Hello Thomas!

 

Could you please provide screenshot demonstrating the specified behavior?

Is it reproduced for newly created solution?

Thanks in advance.

0

Yes, for sure..

Please see the screenshot below: unused variables, methods, arguments of methods, unnecessary qualifiers

 

 

All those were shown highlighted grey on my old laptop (Font Color grey). 

No, it is an old solution that i opened now on my new laptop, so i did not change anything on the solution / project settings.
Or do you mean, that i should create a new solution for verification?

Greetings from Austria

Tom

0

Hello Tom!

 

Thank you for the reply.

Yes, I've meant if you could reproduce the problem on newly created solution.

What Alt+Enter menu offers you for the unused method/variable? What does tooltip say when you hover over the unused method/variable?

Thank you.

0

Hello Angelina,

I can reproduce it on a newly created solution.

Tooltip unused Variable:

Alt+Enter unused Variable:

 

ToolTip unused Method:

 Alt+Enter unused Variable:

 

I hope it has nothing todo with installing Microsoft PowerTools?

 

0

Hello Thomas!

 

Thank you for the provided info.

Could you please check if ReSharper | Options | Code Inspection | Settings | Color Identifiers is enabled.

Also please provide screenshot of Tools | Options | Environment | Fonts and Colors demonstrating ReSharper Dead Code entry.
Thank you.

0

Hello Angelina,

oooh great.. That was the reason... The Fonts and Colors for Dead Code entry was set to black, i changed it to Gray and ... tadaaa...

 

now just the unused field is underwaved but not gray... Is there a special color setting for unused fields?? i looked into the fonts and colors settings, but i did not find something..

 

Thank you.

0

Hello Thomas!

 

Sorry for delay in responding.

Could you please specify what warning is shown for this underlined field?

Thank you.

0

Hey Angelina,

no Problem.. Nice to hear from you now! :-)

Here you are:

 

In meanwhile another question popped up concerning colering..

When I click on a word in the texteditor automatically all words that are in the current page are marked

If I then for example mark the word Monitor within the _scriptMonitorRequests all words "Monitor" are marked violet and additional the one-click coloured words from before are marked as grey:

 

The originally marked word Monitor that I like to Edit, Replace, Cut,... is for me not really visible, because it is nearly the same color...

2 questions:

- Can I disable the "one-click" colouring feature and if yes which Color property is this?
- Can I change the color of the original selceted Word so that there is a difference in color between one-click selection and marking? And if yes which Color property is that?

PS: I don't know if those are Resharper or VisualStudio features, so please excuse if those are Visual Studio settings..

 

Thank you in advance
LG

 

0

Please sign in to leave a comment.