title: How can I resolve this? The unit type exists in two dll files
body: <p>I am currently going through a tutorial using Visual Studio 11 beta. When trying to set the max length of a field value in one of my classes:</p>
  
  <pre><code>[MaxLength(50)]
  public string LastName { get; set; }
  </code></pre>
  
  <p>It errors out and wont let me compile because the <code>MaxLength()</code> function exists in two places:</p>
  
  <blockquote>
    <p>Error  4   The type '<strong>System.ComponentModel.DataAnnotations</strong>.MaxLengthAttribute' exists in both 'c:\Users\me\Documents\Visual Studio 11\ContosoUniversity\packages\EntityFramework.4.1.10331.0\lib\net40\EntityFramework.dll' and 'c:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5\System.ComponentModel.DataAnnotations.dll'</p>
  </blockquote>
  
  <p>I have tried to remove both files but that just causes more issues because other code in my project is dependent upon them.</p>
  
  <p>Is there a way I can tell it to use one or the other?</p>
  
  <p><strong>All of these approaches don't seem to be working for me.. Refer to the comments under the answers..  Any other ideas?</strong></p>
  
  <p>Thanks</p>