title: Database First Error Entity Framework .NET Core
body: <p>I am converting an old Class Library to a Class Library Package. This Class Library is the DAL Layer of an old project - which we will be upgrading to latest .NET.</p>
  
  <p>In the old Class Library we are using <code>edmx</code> files for Database first. In the new .NET the support for edmx has stopped, but we still need to generate the Model from the Database - Because the database is already in place.</p>
  
  <p>For this I am following the Steps provided in this link: <a href="https://docs.efproject.net/en/latest/platforms/aspnetcore/existing-db.html" rel="nofollow noreferrer">https://docs.efproject.net/en/latest/platforms/aspnetcore/existing-db.html</a></p>
  
  <p>So what I have done is created a new Class Library Package:</p>
  
  <p><a href="https://i.stack.imgur.com/eCl3r.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/eCl3r.png" alt="enter image description here"></a></p>
  
  <p>And the project.json is this:</p>
  
  <pre><code>{
    "version": "1.0.0-*",
    "description": "xPT.DAL Class Library",
    "authors": [ "Dawood" ],
    "tags": [ "" ],
    "projectUrl": "",
    "licenseUrl": "",
    "frameworks": {
      "net46": {
        "dependencies": {
          "Microsoft.CSharp": "4.0.1",
          "System.Collections": "4.0.11",
          "System.Linq": "4.1.0",
          "System.Runtime": "4.1.0",
          "System.Threading": "4.0.11"
        }
      }
    },
    "dependencies": {
  
    }
  }
  </code></pre>
  
  <p>Now when I install: <code>Microsoft.EntityFrameworkCore.SqlServer</code>, as mentioned in the Link above, I get this error:</p>
  
  <p>Using this command : <code>Install-Package Microsoft.EntityFrameworkCore.SqlServer</code></p>
  
  <p><a href="https://i.stack.imgur.com/OG31K.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/OG31K.png" alt="enter image description here"></a></p>
  
  <p>The Error List:</p>
  
  <p><a href="https://i.stack.imgur.com/MfCn3.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/MfCn3.png" alt="enter image description here"></a></p>
  
  <p>It says here:</p>
  
  <pre><code>The dependency Microsoft.Extensions.Caching.Abstractions 1.0.0 in project xPT.DAL does not support framework .NETFramework,Version=v4.6
  </code></pre>
  
  <p>But according to the documentation, this library should be supported for all above <code>4.5.1</code>: <a href="https://docs.efproject.net/en/latest/providers/sql-server/index.html#supported-platforms" rel="nofollow noreferrer">https://docs.efproject.net/en/latest/providers/sql-server/index.html#supported-platforms</a></p>
  
  <p>What am I doing wrong? </p>