背景第一:我在Windows 10 Pro笔记本电脑上有一个数据库--Visual Studio 2015中的第一个EF6模型(最新的nuget 6.1.3指向本地SQL Server 2014 SP1 Express数据库)。在我从Windows8.1和Visual Studio2013升级之后。我也升级了模型从EF5大约6个月前以及,但我不认为这是相关的,因为我也尝试重建从零开始。
模型:大约有100个表,50个视图和250个关联。
问题是每次我想要对模型进行更改时,在
点击任何一个实体都是可以的,移动它们或者编辑它们也是可以的。问题是点击背景画布。
我已经开始通过model browser从数据库中更新模型,但是我无法使用右键单击图表来创建新的关联。
我在任何地方都没有看到任何关于这个问题的评论。有什么原因或解决办法吗?
顺便说一句,我刚刚重新安装了Windows 10 Pro,只安装了SQL Server 2014 SP1 Express和Visual Studio 2105 Pro。所以我的系统上没有自定义的东西。
更新:当devenv.exe变得无响应时,ProcDump提供此堆栈跟踪,建议本地代码搜索图形对象:
[External Code]
[Managed to Native Transition]
Microsoft.VisualStudio.Modeling.Sdk.Diagrams.GraphObject.14.0.dll!<Module>.GeoSCursor.search(GeoSCursor* value)
Microsoft.VisualStudio.Modeling.Sdk.Diagrams.GraphObject.14.0.dll!Microsoft.VisualStudio.Modeling.Diagrams.GraphObject.VGGraph.GetObjectsInRect(LRECT bbox, Microsoft.VisualStudio.Modeling.Diagrams.GraphObject.VGLayoutObjectList items, VSGLayoutObject** ignoreItems, int numberItems, int numbertypes, int* types, bool searchSubGraphs)
Microsoft.VisualStudio.Modeling.Sdk.Diagrams.GraphObject.14.0.dll!Microsoft.VisualStudio.Modeling.Diagrams.GraphObject.VGGraph.GetObjectsInRect(LRECT bbox, Microsoft.VisualStudio.Modeling.Diagrams.GraphObject.VGLayoutObjectList items, VSGLayoutObject** ignoreItems, int numberItems, int numbertypes, int* types, bool searchSubGraphs)
Microsoft.VisualStudio.Modeling.Sdk.Diagrams.GraphObject.14.0.dll!Microsoft.VisualStudio.Modeling.Diagrams.GraphObject.VGGraph.get_ObjectsInRectangle(double x0, double y0, double x1, double y1, bool searchSubGraphs)
Microsoft.VisualStudio.Modeling.Sdk.Diagrams.14.0.dll!Microsoft.VisualStudio.Modeling.Diagrams.GraphWrapper.HitTest(Microsoft.VisualStudio.Modeling.Diagrams.RectangleD hitArea, bool requireCompleteContainment, bool searchSubGraphs)
Microsoft.VisualStudio.Modeling.Sdk.Diagrams.14.0.dll!Microsoft.VisualStudio.Modeling.Diagrams.GraphWrapper.SpatialQuery(Microsoft.VisualStudio.Modeling.Diagrams.GraphWrapper.SpatialDirection direction, Microsoft.VisualStudio.Modeling.Diagrams.ShapeElement currentShape, Microsoft.VisualStudio.Modeling.Diagrams.ShapeElement parentShape)
Microsoft.VisualStudio.Modeling.Sdk.Diagrams.14.0.dll!Microsoft.VisualStudio.Modeling.Diagrams.ShapeElement.FindNextInChildShapes(Microsoft.VisualStudio.Modeling.Diagrams.ShapeElement startFromChildShape, bool focusableRequired)
Microsoft.VisualStudio.Modeling.Sdk.Diagrams.14.0.dll!Microsoft.VisualStudio.Modeling.Diagrams.ShapeAccessibleObject.GetChild(int index)
System.Windows.Forms.dll!System.Windows.Forms.AccessibleObject.GetFocused()
System.Windows.Forms.dll!System.Windows.Forms.AccessibleObject.Accessibility.IAccessible.accFocus.get()
System.Windows.Forms.dll!System.Windows.Forms.InternalAccessibleObject.System.Windows.Forms.UnsafeNativeMethods.IAccessibleInternal.get_accFocus()
Update2:XtraSimplicity有一个解决方案,适用于某些人,但不适用于我。感谢他的建议,我已经排除了这是一个直接的图形驱动程序问题。我有一个英特尔高清图形系列和NVIdia GeForce GT 750M显示器适配器在我的笔记本电脑。Intel是通常的活动适配器,但当只启用NVidia时,问题也会出现。我也尝试过在Visual Studio中禁用硬件支持的建议,但是如果有任何事情只会在edmx打开时使VS的性能变得更差。
我们在两台带有Windows10和触摸屏的笔记本电脑上也遇到了同样的问题。关闭进程tabtip.exe似乎可以解决这个问题。
来源:https://connect.microsoft.com/visualstudio/feedback/details/2011437
转到任务管理器并结束tabtip.exe(触摸键盘和手写面板)上的进程。这样做后,设计师将作出良好的反应。注意:如果单击或触摸任务栏中的键盘图标,tabtip.exe将重新启动。
我尝试了接受的答案,它确实对我有用,但是问题在重新启动时返回。我也尝试了其他的答案,但没有成功。我找到了有问题的windows服务,并使用Windows10服务管理屏幕禁用了该服务。我希望这对其他有这个问题的人有帮助。
禁用服务:
验证:
注意:这确实会让你的手势和触控板有点混乱,所以如果你经常使用它,那么就不要这样做。本指南适用于Windows10,适用于我,但可能不适用于您。此外,我还没有测试Windows update是否会重新启用该服务。
我不能评论,因为我只是在最低评论声誉之下,然而我一直有完全相同的问题。
和你一样,我也重新安装了Windows10(企业版)和Visual Studio(包括2013 Pro和2015 Pro),但没有效果。
目前,我把这个问题放在次要位置,通过使用Devart's Entity Developer(https://www.devart.com/entitydeveloper/)和手动编辑类以匹配数据库更改的组合来解决这个问题。
它很乏味,也没有多少乐趣--但它对我(暂时)很管用。
希望这能帮到别人。
编辑:
对于将来可能遇到这篇文章的人来说,以下内容似乎为我解决了这个问题:
虽然您可能不必这样做,但我没有勾选“启用富客户端可视化体验”。
如果这不起作用,看看这个答案下面的评论--它可能会有用。:)
资料来源:http://pinter.org/?p=2611
编辑2:
我的问题回来了,经过进一步调查,它似乎是由远程桌面(我目前使用的是ESXI托管的Windows 10 VM)引起的。切换到VNC或使用VMWare VSphere Web控制台会使Visual Studio运行得非常好。希望这能帮到别人!:)