title: The type X conflicts with imported type X
body: <p>In Entity Framework (Database first) I am trying to add some Data annotations to created classes.</p>
  
  <p>In general: I have class X created:</p>
  
  <pre><code>namespace Info
  {
      using System;
      using System.Collections.Generic;
  
      public partial class X
      {
          public string SomeProperty {get; set;}
          ...
      }
  }
  </code></pre>
  
  <p>I want to property <code>SomeProperty</code> to be ignored when serializing to JSON thus in <code>App_Code/Metadata</code> I create class X.cs and I add some MetaData:</p>
  
  <pre><code>namespace Info
  {
  
      public class XMetaData
      {
          [JsonIgnore]
          public string SomeProperty{get; set;}
      }
  
       [MetadataType(typeof(XMetaData))]
       public partial class X
       {
  
       }
  
  }
  </code></pre>
  
  <p>Above I've manually changed namespace from <code>Info.App_Code.Metadata</code> to <code>Info</code> to have partial classes matched.</p>
  
  <p>However in all places where I use X class i have warning </p>
  
  <p><code>The type Info.X in '.../Info/App_Code/Metadata/X.cs ' conflicts with the imported type Info.X in '.../Info/X.cs'. Using the type defined in '.../Info/App_Code/Metadata/X.cs '</code></p>
  
  <p>I expected that both partial classes would be merged however all occurrences are referring to that empty one X class.</p>
  
  <p>Does anybody know what I am missing?</p>