Use var everywhere in file/project/solution not working

0

I'm using Visual Studio 2017 (15.7.1) and Resharper 2018 (2018.1) and am trying to run the command "Use var" but apply it accross the entire solution. I use the left hand side "hammer" icon and select "Use var" and tell it to apply across the solution. A dialog appears "Applying in scope" and seems to scan all my source files, but then only changes the line that I originally selected.

enter image description here

Kevin Brydon

Posted 2018-05-14T11:00:30.730

Reputation: 415

Answers

0

Instead of using the "hammer" icon I use the "lightbulb" icon and it works as expected. I have no idea why. Hopefully someone can come up with the proper solution

enter image description here

Place your cursor on the end of the type name to get the hammer icon on the left hand side (bad)

MyType{cursor here} varibleName = something();

Place the cursor somewhere inside the type declartion to get the lightbulb icon on the left hand

MyT{cursor here}ype varibleName = something();

Kevin Brydon

Posted 2018-05-14T11:00:30.730

Reputation: 415