title: Caliburn.Micro question: XamlParseException "Cannot set unknown member '{clr-namespace:Caliburn.Micro;assembly=Caliburn.Micro}View.Model'"
body: <p>I am getting a really weird XamlParseException, and I have no idea why.</p>
  
  <p>The message is "Cannot set unknown member '{clr-namespace:Caliburn.Micro;assembly=Caliburn.Micro}View.Model'."</p>
  
  <p>In the view model, I have an ObservableCollection that I'm initializing in the constructor like this:</p>
  
  <pre><code>internal class EntityListScreenViewModel : Screen
  {
      public EntityListScreenViewModel()
      {
          var list = new List&lt;Entity&gt;() { new Entity() { Name = "Joe" } };
          this.Entities = new ObservableCollection&lt;Entity&gt;(list);
      }
  
      public ObservableCollection&lt;Entity&gt; Entities { get; set; }
  }
  </code></pre>
  
  <p>Here's the view:</p>
  
  <pre><code>&lt;Window x:Class="WpfApp.EntityListScreenView"
          xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
          xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
          Height="350" Width="525"&gt;
      &lt;Grid&gt;
          &lt;ListBox x:Name="Entities"/&gt;
      &lt;/Grid&gt;
  &lt;/Window&gt;
  </code></pre>
  
  <p>When I call WindowManager.ShowWindow() on an instance of EntityListScreenViewModel, I get the exception.</p>
  
  <p>If I <em>do not</em> add an Entity to the list (using <code>var list = new List&lt;Entity&gt;();</code> instead), I do not get the exception.</p>
  
  <p>Does anybody have any ideas?</p>
  
  <p><strong>Update:</strong></p>
  
  <p>I tried changing the ObservableCollection to be of type string and added a single string, and I did not get the exception. My suspicion is that Caliburn.Micro is somehow looking for a view to represent the Entity in the ListBox. Could that perhaps be what's going on?</p>
  
  <p><strong>Update 2:</strong></p>
  
  <p>I finally figured out what was really going on... the DefaultItemTemplate in the ConventionManager had some parsed Xaml that was looking for the "Caliburn.Micro" assembly, but I had put the code in with another assembly. Changed the Xaml and the problem went away.</p>