简体   繁体   中英

“Go To Definition” from a .xaml.cs file takes me to .g.i.cs files instead of to .xaml file in Visual Studio 2015

I am used to Visual Studio Go To Definition (or ReSharper's Ctrl + left click) in code behind on an element name defined in XAML to take me directly to XAML of that element. For some reason it's taking me to .gics file instead. Where as it's not a huge problem it is annoying as hell. This is also not specific to my project - I can create a new WPF project, add a single button to XAML and get the same result trying to go to the button's declaration in XAML from code behind file.

I tried to do the same thing in VS 2015 Professional on another computer and get the same problem.

But when I do this in Visual Studio Enterprise 2015 on my Surface, it works correctly and goes to XAML (all testing done with new WPF project) - I can't find any option anywhere that would control this.

Any ideas for this would be greatly appreciated.

Well, it seems as ReSharper actually changed the behavior - very naughty. I am happy to say that ReSharper 9.2 fixed this problem (I was using 9.1.3 initially).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM