Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

wpf xaml designer bug

every time we open a *.xaml file in our project - we see not working designer and a lot of messages 'type not found' 'assembly not found' etc. After a couple of experiments, i found out a root of a problem : create new WPF application, create a folder in project root, add some value converter to folder, try to use it on your 'MainWindow.xaml'

you will probably write something like this :

xmlns:Folder="clr-namespace:WpfApp.Folder"

and then

   <Window.Resources>
        <Folder:SomeValueConverter x:Key="someKey"/>
    </Window.Resources>

You know...

And, now the most interesting thing! when you build your project for x86 or 'any CPU' - everything will be just fine, designer will be available, all namespaces will be imported perfectly!BUT, just change you project configuration to x64...Rebuild solution and open design view... You'll be amazed...errors, types not found, etc... How the hell to use VS xaml designer in x64 applications?

Windows 7 enterprise x64, Visual Studio 2010 Ultimate

like image 543
illegal-immigrant Avatar asked Mar 15 '11 16:03

illegal-immigrant


1 Answers

Others have reported the same problem. One of the workarounds suggested was to do the design work with a 32-bit target, and then switch to 64-bit only when you're ready to compile and deploy.

like image 61
Chris Wenham Avatar answered Sep 28 '22 12:09

Chris Wenham