【发布时间】:2012-02-13 07:25:44
【问题描述】:
使用 x86 时 WPF Designer 加载成功,但使用 x64 时出现这样的错误:
错误 1 未定义的 CLR 命名空间。 “clr-namespace” URI 指的是程序集中未包含的命名空间“TerminatorConsole2.View”。 C:\Oleg\projects\MBClient\TerminatorConsole2\View\StrategyView.xaml 5 12 TerminatorConsole2
有什么问题以及如何解决?
<UserControl
x:Class="TerminatorConsole2.View.StrategyView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:vw="clr-namespace:TerminatorConsole2.View" <------ problem line
HorizontalAlignment="Center"
VerticalAlignment="Center"
Width="1328" mc:Ignorable="d" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" Height="562">
...............
【问题讨论】:
-
能否请您添加 xaml 文件列表及其代码隐藏?
-
添加了 xaml 代码。后面的代码是默认的 - 只需调用 InitializeComponent()
-
请确保
StrategyView类(代码隐藏)在TerminatorConsole2.View命名空间中定义。