最近,我在Visual Studio 2012中的XAML代码中没有智能感知。这是一个bug还是一个新功能呢?有其他人遇到了这个问题吗?
最近,我在Visual Studio 2012中的XAML代码中没有智能感知。这是一个bug还是一个新功能呢?有其他人遇到了这个问题吗?
我曾经遇到同样的问题,即在XAML中没有智能感知,安装“Visual Studio 2012更新2”解决了这个问题: Visual Studio 2012更新2
我想我找到了答案。我使用的是Magellan框架,它试图在演示命名空间URI下注册控件。他们这样做是为了让你在那里的控件上使用XML前缀。这会导致Visual Studio 2012 XAML编辑器出现问题。
[assembly: XmlnsDefinition("http://schemas.microsoft.com/winfx/2006/xaml/presentation", "Magellan")]
[assembly: XmlnsDefinition("http://schemas.microsoft.com/winfx/2006/xaml/presentation", "Magellan.Abstractions")]
[assembly: XmlnsDefinition("http://schemas.microsoft.com/winfx/2006/xaml/presentation", "Magellan.Controls")]
[assembly: XmlnsDefinition("http://schemas.microsoft.com/winfx/2006/xaml/presentation", "Magellan.Views")]
我从Magellan的Properties\AssemblyInfo.cs
文件中删除了这个,看起来似乎已经解决了。如果问题没有再次出现,我会确认这个答案。