title: The name does not exist in the namespace "clr-namespace:"
body: <p>This is my MainWindowViewModel.vb</p>
  
  <pre><code>Public Class MainWindowViewModel
  Inherits ViewModelBase
  
  Public Sub New()
  
  End Sub
  
  Private _test As String = "Success"
  Public Property Test() As String
      Get
          Return _test
      End Get
      Set(ByVal value As String)
          _test = value
          RaisePropertyChanged()
      End Set
  End Property
  
  End Class
  </code></pre>
  
  <p>This is my MainWindow.xaml</p>
  
  <pre><code>&lt;Window
  xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  xmlns:local="clr-namespace:Koala"  
  xmlns:d="http://schemas.microsoft.com/expression/blend/2008"  
  xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d"
  Title="MainWindow" Height="350" Width="525"&gt;
  &lt;Window.Resources&gt;
      &lt;local:MainWindowViewModel x:Key="MainWindowViewModelDataSource" d:IsDataSource="True"/&gt;
  &lt;/Window.Resources&gt;
  &lt;Grid DataContext="{Binding Source={StaticResource MainWindowViewModelDataSource}}"&gt;
      &lt;TextBox HorizontalAlignment="Left" Height="23" Margin="156,103,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="120" Text="{Binding Test}"/&gt;
  &lt;/Grid&gt;
  &lt;/Window&gt;
  </code></pre>
  
  <p>And this is the error I get:</p>
  
  <pre><code>Error   1   The name "MainWindowViewModel" does not exist in the namespace "clr-namespace:Koala".   \\psf\Dropbox\Programming\Windows\Koala\Koala\MainWindow.xaml   7   3   Koala
  </code></pre>
  
  <p>I can add a reference to the namespace Koala in the Window tag without problems. When I type <code>&lt;local:</code>, I get the option to use the <code>MainWindowViewModel</code> tag. Whenever I add the <code>x:Key</code> or not, from that moment the error occurs. (Re)building doesn't work, restarting VS2012 doesn't work. I searched dozens of similar problems but it I can't find a fix for mine.</p>
  
  <p>I tried to add the reference through Blend and VS2012 but neither of them work. The odd thing is that I'm able to start the debug mode and see my form on the screen. Also, <code>Success</code> appears in the <code>TextBox</code>.</p>