2
votes

WPF Designer loads successfully when using x86, but when using x64 I got such error:

Error 1 Undefined CLR namespace. The 'clr-namespace' URI refers to a namespace 'TerminatorConsole2.View' that is not included in the assembly. C:\Oleg\projects\MBClient\TerminatorConsole2\View\StrategyView.xaml 5 12 TerminatorConsole2

What's the problem and how to fix it?

<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">
...............
2
Could you please add the xaml file listing and its code-behind? - Sergey Vyacheslavovich Brunov
added xaml code. code behind is default - just call to InitializeComponent() - Oleg Vazhnev
Please make sure that StrategyView class (code-behind) is defined inside TerminatorConsole2.View namespace. - Sergey Vyacheslavovich Brunov

2 Answers

2
votes

Taking a guess. Visual Studio is a 32bit application and it doesn't load x64 dlls correctly :)