title: The name "XYZ" does not exist in the namespace "clr-namespace:ABC"
body: <p>I was working on creating some markup extensions and started to get very weird VS behaviours. I have extracted and pinpointed the issue in the separate solution. Problem is that VS can't create a CLR object in XAML. </p>
  
  <p>Here it is:</p>
  
  <p><strong>View:</strong></p>
  
  <pre><code>&lt;Window x:Class="WpfApplication4.MainWindow"
          xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
          xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
          xmlns:wpfApplication4="clr-namespace:WpfApplication4"&gt;
      &lt;Window.Resources&gt;
          &lt;wpfApplication4:Dog x:Key="doggy" /&gt;
      &lt;/Window.Resources&gt;
      &lt;Grid /&gt;
  &lt;/Window&gt;
  </code></pre>
  
  <p><strong>Code behind:</strong></p>
  
  <pre><code>using System.Windows;
  
  namespace WpfApplication4
  {
      public partial class MainWindow : Window
      {
          public MainWindow()
          {
              InitializeComponent();
          }
      }
  }
  </code></pre>
  
  <p><strong>Dog class:</strong></p>
  
  <pre><code>namespace WpfApplication4
  {
      public class Dog
      {
  
      }
  }
  </code></pre>
  
  <p><strong>App.Xaml (no code in App.Xaml.cs):</strong></p>
  
  <pre><code>&lt;Application x:Class="WpfApplication4.App"
               xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
               xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
               StartupUri="MainWindow.xaml"&gt;
      &lt;Application.Resources&gt;
  
      &lt;/Application.Resources&gt;
  &lt;/Application&gt;
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/HyMzZ.png" alt="Project settings"></p>
  
  <p>Exception I am getting:</p>
  
  <pre><code>Error   1   The name "Dog" does not exist in the namespace "clr-namespace:WpfApplication4". \\hopr1\folders$\vxk\Documents\Visual Studio 2012\Projects\WpfApplication4\MainWindow.xaml  6   9   WpfApplication4
  </code></pre>
  
  <p>I am able to run solution, but designer fails with "Invalid Markup" error
  Any ideas?</p>
  
  <p><strong>Edit</strong></p>
  
  <p>I am running VS 2012 Update 2
  The same solution work in VS 2012 Update 1</p>