我不确定为什么,但最近Visual Studio似乎无法找到根窗口中使用的XAML模式。这是我得到的错误信息:
Message 1 Could not find schema information for the element 'http://schemas.microsoft.com/winfx/2006/xaml/presentation:Window'。
该错误导致IntelliSense无法工作。然而,项目仍然能够按预期进行编译和运行。每个我打开的项目都出现了相同的问题。从一个新项目开始,我会得到以下XAML:
Message 1 Could not find schema information for the element 'http://schemas.microsoft.com/winfx/2006/xaml/presentation:Window'。
该错误导致IntelliSense无法工作。然而,项目仍然能够按预期进行编译和运行。每个我打开的项目都出现了相同的问题。从一个新项目开始,我会得到以下XAML:
<Window x:Class="WpfApplication2.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="MainWindow" Height="350" Width="525">
<Grid>
</Grid>
</Window>
但是我收到了相同的错误信息。
我已经尝试过以下所有方法,但都没有成功:
- 重新安装Visual Studio 2010
- 重新安装.NET
- 删除Visual Studio目录(\Users\[User]\Documents\Visual Studio 2010)。
我该怎么办才能解决这个问题?