Enabling DataAnnotations in full/core platforms of .NET Core
<p>I've created a .NET Core (package) library project, which has a class like this:</p>

<pre><code>public class Subscriber //: Representation
{
    [Required]
    public SubscriberDef Info;
    public Guid ProviderID;
}
</code></pre>

<p>No matter what I do, the compiler is not happy with the <code>[Required]</code> attribute.  I'm constantly told this:</p>

<pre><code>NET Framework 4.5.1 - Not Available
NET Platform 5.4 - Available
</code></pre>

<p>My project.json initially looked like this:</p>

<pre><code>"frameworks": {
  "net451": {
    "dependencies": {
      "WebApi.Hal": "2.6.0",
    }
  },
  "dotnet5.4": {
    "dependencies": {
      "Microsoft.CSharp": "4.0.1-beta-23516",
      "System.Collections": "4.0.11-beta-23516",
      "System.Linq": "4.0.1-beta-23516",
      "System.Runtime": "4.0.21-beta-23516",
      "System.Threading": "4.0.11-beta-23516",
    }
  }
},
"dependencies": {
  "Excqape": "0.7.0",
  "System.ComponentModel.Annotations": "4.0.11-beta-23516"
}
</code></pre>

<p>I tried switching the target framework moniker (TFM) from <code>net451</code> to <code>net46</code>. No luck.  I tried different versions of System.ComponentModel.Annotations being used for both frameworks, still no luck.  </p>

<p>What makes this particularly strange is that if I create an ASP.NET Core project, then I am free to have two frameworks where data annotation are respected and will compile:</p>

<pre><code>"frameworks": {
  "dnx46": { },
  "dnxcore50": { }
},
</code></pre>

<p>I figure if data annotations work inside of ASP.NET Core, then assuredly they would work in .NET Core as well?  </p>

<p>Am I doing something wrong, or are data annotations truly unavailable for .NET Core fullCLR at this time?</p>