title: Use Newtonsoft library in NetStandard 2.0 class library
body: <p>I am developing a class library based on the <strong>NetStandard 2.0</strong> framework for multiple platform compatibility sakes, and I need to serialize and deserialize objects. So I added a reference to the <strong>Newtonsoft</strong> library.</p>
  
  <p>The problem is that I have the following exception at runtime:</p>
  
  <blockquote>
    <p>System.IO.FileNotFoundException: 'Could not load file or assembly 'System.ComponentModel.Annotations, Version=4.2.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.'</p>
  </blockquote>
  
  <p>I tried to manually add a reference to the <strong>System.ComponentModel.Annotations version 4.2.0.0</strong> but this version is not available.</p>
  
  <p><strong>Is there a way to use Newtonsoft with NetStandard 2.0, or an alternative to perform serialization/deserialization operations?</strong></p>
  
  <p><strong>Update: it seems that adding a reference to System.ComponentModel.Annotations" Version="4.4.1" and rebuilding the solution fixed the problem.</strong></p>
  
  <p><strong>Here is the content of my csproj file:</strong></p>
  
  <pre><code>&lt;Project Sdk="Microsoft.NET.Sdk"&gt;
  
    &lt;PropertyGroup&gt;
      &lt;TargetFramework&gt;netstandard2.0&lt;/TargetFramework&gt;
    &lt;/PropertyGroup&gt;
  
      &lt;ItemGroup&gt;
        &lt;PackageReference Include="Newtonsoft.Json" Version="10.0.3" /&gt;
        &lt;PackageReference Include="System.ComponentModel.Annotations" Version="4.4.1" /&gt;
      &lt;/ItemGroup&gt;
  &lt;/Project&gt;
  </code></pre>