I have a Web Pages (Razor) c# app and I have moved it to VS 2013 Community Edition Update 4
Previously, when I wanted to see where a variable or function was used/references, I used the "Find ALl References" tool (Shift + F12) and I would get a list of each occurrence and where it was found (page and line).;
Now I find that the only time I can get Find All References to work is on a cshtml page within the App_Code folder. It does nothing in pages that are in the top-level project folder (i.e., the pages which make up the bulk of my website). I highlight a variable and hit Shift+F12 (or click on Find All References in the right-click menu) and nothing happens: no hour glass, no flicker, no list of references (even though the page is riddled with references to the highlighted variable).
Is there some setting or something that can make this useful feature work in the cshtml pages in the top-level project folder like it does in pages in the App_Code folder?
It seems that Visual Studio 2013 is lacking this feature. I cannot say if Visual Studio 2015 has fixed this issue.
What I do:
Find all CTRL+SHIFT+F
Search MyPublicMethod(
or .MyPublicProperty
Search in file types: *.cshtml
Problem with this approach: if you have duplicated properties in multiple classes (name
, url
, ...) you will not be able to tell to what class the property belongs without reading your code.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With