简体   繁体   English

从.xaml.cs文件中“转到定义”将我带到.gics文件而不是Visual Studio 2015中的.xaml文件

[英]“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. 我习惯于在XAML中定义的元素名称后面的代码中使用Visual Studio Go To Definition(或ReSharper的Ctrl +左键单击),直接将我带到该元素的XAML。 For some reason it's taking me to .gics file instead. 出于某种原因,它将我带到.gics文件。 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. 这也不是我的项目特有的 - 我可以创建一个新的WPF项目,向XAML添加一个按钮并获得相同的结果,尝试从代码隐藏文件转到XAML中的按钮声明。

I tried to do the same thing in VS 2015 Professional on another computer and get the same problem. 我试图在另一台计算机上的VS 2015 Professional中做同样的事情并得到同样的问题。

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. 但是当我在Surface上的Visual Studio Enterprise 2015中执行此操作时,它可以正常工作并转到XAML(所有测试都使用新的WPF项目完成) - 我找不到任何可以控制它的选项。

Any ideas for this would be greatly appreciated. 对此的任何想法将不胜感激。

Well, it seems as ReSharper actually changed the behavior - very naughty. 好吧,似乎ReSharper实际上改变了行为 - 非常顽皮。 I am happy to say that ReSharper 9.2 fixed this problem (I was using 9.1.3 initially). 我很高兴地说ReSharper 9.2解决了这个问题(我最初使用的是9.1.3)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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