title: Entity Framework Migrations Error - Sequence contains no elements
body: <p><strong>command:</strong> add-migration blahblah -verbose<br>
  <strong>error:</strong> Sequence contains no elements</p>
  
  <p>I did a few things before getting this error. I made a change to my code-first model but did not run<code>add-migration</code> yet. Then I added an EDMX model to play around with an idea visually. I realized the EDMX model was messing with my code so I removed it. I tried to run <code>add-migration</code> and got "Sequence contains no elements". I upgraded to EF 5 and uninstalled the old Migrations package except for my configurations. Then I tried <code>add-migration</code> again and I am still getting "Sequence contains no elements". Below is the rest of the error.</p>
  
  <pre><code>System.InvalidOperationException: Sequence contains no elements
     at System.Linq.Enumerable.Single[TSource](IEnumerable`1 source)
     at System.Data.Entity.Migrations.Infrastructure.EdmModelDiffer.GetQualifiedTableName(XDocument model, String entitySetName)
     at System.Data.Entity.Migrations.Infrastructure.EdmModelDiffer.&lt;FindRenamedIndependentAssociationColumns&gt;b__ba(&lt;&gt;f__AnonymousType16`2 &lt;&gt;h__TransparentIdentifieraa)
     at System.Linq.Enumerable.&lt;&gt;c__DisplayClass12`3.&lt;CombineSelectors&gt;b__11(TSource x)
     at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()
     at System.Linq.Enumerable.&lt;ConcatIterator&gt;d__71`1.MoveNext()
     at System.Linq.Enumerable.&lt;ConcatIterator&gt;d__71`1.MoveNext()
     at System.Linq.Enumerable.&lt;DistinctIterator&gt;d__81`1.MoveNext()
     at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
     at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
     at System.Data.Entity.Migrations.Infrastructure.EdmModelDiffer.Diff(XDocument sourceModel, XDocument targetModel, String connectionString)
     at System.Data.Entity.Migrations.DbMigrator.Scaffold(String migrationName, String namespace, Boolean ignoreChanges)
     at System.Data.Entity.Migrations.Design.MigrationScaffolder.Scaffold(String migrationName, Boolean ignoreChanges)
     at System.Data.Entity.Migrations.Design.ToolingFacade.ScaffoldRunner.Scaffold(MigrationScaffolder scaffolder)
     at System.Data.Entity.Migrations.Design.ToolingFacade.ScaffoldRunner.RunCore()
     at System.Data.Entity.Migrations.Design.ToolingFacade.BaseRunner.Run()
  Sequence contains no elements
  </code></pre>