title: "Metadata information not found" while using EF4's POCO Template?
body: <p>I just installed the POCO Template for EF4.  I have a single entity in my model, <strong>AnnouncementText</strong>, and the T4 files seem to be properly generated.  Attempting to access this new entity is throwing the following error when I access the auto-generated property <code>MyObjectContext.AnnouncementTexts</code>:</p>
  
  <blockquote>
    <p>InvalidOperationException: Mapping and metadata information could not be found for EntityType 'MyNamespace.AnnouncementText'.</p>
  </blockquote>
  
  <p>The properties on the <code>AnnouncementText</code> POCO seem to match up with the columns in the database, and I haven't changed any of the auto-generated code.</p>
  
  <p>The stack trace is:</p>
  
  <pre><code>   at System.Data.Objects.ObjectContext.GetTypeUsage(Type entityCLRType)
     at System.Data.Objects.ObjectContext.GetEntitySetForNameAndType(String entitySetName, Type entityCLRType, String exceptionParameterName)
     at System.Data.Objects.ObjectContext.CreateObjectSet[TEntity](String entitySetName)
     at MyNamespace.MyObjectContext.get_AnnouncementTexts() in C:\&lt;snip&gt;\MyObjectContext.Context.cs:line 65
     at MyNamespace.Class1.Main() in C:\&lt;snip&gt;\Class1.cs:line 14
  </code></pre>
  
  <p>If I delete the <code>.tt</code> files from the solution and enable code generation on the model, I am able to access the property without issue.</p>
  
  <p>Here's my code, in case that might help:</p>
  
  <pre><code>using (var context = new MyObjectContext())
     foreach (var at in context.AnnouncementTexts)
        Console.WriteLine(at.Title);
  </code></pre>
  
  <p>Any ideas on what might be wrong?</p>