title: ASP NET CORE Could not load System.Data.SqlClient
body: <p>I have an aspnetcore solution that I split into three projects: </p>
  
  <ul>
  <li>Project.Core <em>dnxcore50</em> Main app - startup resides here and has Project.EF &amp; Project.Model dependency</li>
  <li>Project.EF <em>dotnet5.4</em> class libary - dbcontext resides here and has Project.Model dependency. dotnet-ef tools reside here</li>
  <li>Project.Models <em>dotnet5.4</em> class library</li>
  </ul>
  
  <p>Using the dotnet cli tooling (dotnet-ef) I was able to add migrations to the project successfully. However when I execute update database to apply the migrations, I get an exception that I cant seem to resolve.</p>
  
  <pre><code>C:\Users\chris\Documents\project\core\src\Project.EF
  dotnet ef database update -s ..\Project.Core
  </code></pre>
  
  <blockquote>
    <p>Could not load file or assembly 'System.Data.SqlClient,
    Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or
    one of its dependencies. The system cannot find the file specified.</p>
  </blockquote>
  
  <p>If anyone has some direction on how I can get this final piece working, it would be greatly appreciated. Below is copy of my Project.EF project.json</p>
  
  <pre><code>{
    "dependencies": {
      "Microsoft.EntityFrameworkCore": "1.0.0-*",
      "Microsoft.EntityFrameworkCore.Commands": "1.0.0-*",
      "Microsoft.EntityFrameworkCore.SqlServer": "1.0.0-*",
      "Microsoft.AspNetCore.Hosting": "1.0.0-*",
      "Microsoft.AspNetCore.Identity.EntityFrameworkCore": "1.0.0-*",
      "OpenIddict.EF": "1.0.0-*",
      "Project.Models": "1.0.0-*"
    },
  
    "frameworks": {
      "dotnet5.4": {
        "imports": "portable-net451+win8",
        "dependencies": {
          "System.Data.SqlClient": "4.0.0-*"
        }
      }
    },
  
    "tools": {
      "dotnet-ef": "1.0.0-*"
    }
  }
  </code></pre>