【发布时间】:2010-06-22 20:18:15
【问题描述】:
我一直在开发 WPF 应用程序。由于我在 Expression Blend 4 中设计 UI 并在 Visual Studio 2010 中处理代码隐藏部分,因此我经常从一种工具切换到另一种工具。
我在现有的 Grid 中添加了一些图像控件,并为它们分配了一些图像。在 Blend 中,我构建了项目并运行了它。工作得很好。当我切换到 Visual Studio 时,我收到此错误:
未定义的 CLR 命名空间。这 'clr-namespace' URI 指的是 命名空间“MS.Internal.Media”即 不包括在 部件。 C:\Users\Dennis\Documents\Visual 工作室 2010\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">
什么可能导致这个错误?
【问题讨论】:
标签: c# .net wpf visual-studio-2010 expression-blend