我一直在开发一个WPF应用程序。由于我使用Expression Blend 4设计UI,并在Visual Studio 2010中处理代码后端,因此我经常从一个工具切换到另一个工具。
我在现有的Grid中添加了一些Image控件,并将一些图像分配给它们。在Blend中,我构建了项目并运行它。一切都很好。但是,当我切换到Visual Studio时,我遇到了这个错误:
未定义的CLR命名空间。'clr-namespace' URI引用了一个未包含在程序集中的命名空间 'MS.Internal.Media'。C:\Users\Dennis\Documents\Visual Studio2010 \ Projects \ solutionName \ projectName \ MainWindow.xaml
由于出现错误,该设计器无法加载。但是,在Blend中,该项目正在工作,我可以看到它。
声明如下(在窗口中):
这个错误可能是由什么原因引起的?
我在现有的Grid中添加了一些Image控件,并将一些图像分配给它们。在Blend中,我构建了项目并运行它。一切都很好。但是,当我切换到Visual Studio时,我遇到了这个错误:
未定义的CLR命名空间。'clr-namespace' URI引用了一个未包含在程序集中的命名空间 'MS.Internal.Media'。C:\Users\Dennis\Documents\Visual Studio2010 \ Projects \ solutionName \ projectName \ MainWindow.xaml
由于出现错误,该设计器无法加载。但是,在Blend中,该项目正在工作,我可以看到它。
声明如下(在窗口中):
<Window
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:MS_Internal_Media="clr-namespace:MS.Internal.Media;assembly=PresentationCore" mc:Ignorable="d" x:Class="projectName.MainWindow"
Height="272" Width="359" Loaded="Window_Loaded" WindowStyle="ThreeDBorderWindow" ResizeMode="NoResize" Icon="/projectName;component/Images/main.ico"
Title="Sample Project">
这个错误可能是由什么原因引起的?