title: Why can't I reference System.ComponentModel.DataAnnotations?
body: <p>I'm trying to use DataAnnotations in my WPF project to specify a maximum length of strings, with the following:</p>
  
  <pre><code>using System.ComponentModel.DataAnnotations;
  </code></pre>
  
  <p>However, I get the error</p>
  
  <blockquote>
    <p>The type or namespace name 'DataAnnotations' does not exist in the
    namespace 'System.ComponentModel' (are you missing an assembly
    reference?)</p>
  </blockquote>
  
  <p>I've seen other examples where <code>DataAnnotations</code> <em>does</em> exist in this namespace. I'm using C#4. Is there any reason why I can't use this? What can I do to fix it?</p>