.Net Core v. 1.1.0 not found

.net-core entity-framework-core

Question

I'm trying to reverse engineer an existing database using EF Core in a .Net Core class library project.

Here's the project.json

{
  "dependencies": {
    "Microsoft.NETCore.App": {
      "version": "1.1.0",
      "type": "platform"
    },
    "Microsoft.EntityFrameworkCore.Design": "1.1.0",
    "Microsoft.EntityFrameworkCore.SqlServer": "1.1.0",
    "Microsoft.EntityFrameworkCore.SqlServer.Design": "1.1.0",
    "Microsoft.EntityFrameworkCore.Tools": "1.1.0-preview4-final"
  },

  "frameworks": {
    "netcoreapp1.1": {
      "imports": [
        "dotnet5.6",
        "portable-net45+win8"
      ]
    }
  }
}

and this is the error I get:

PM> scaffold-dbcontext "data source=Server;Initial Catalog=Database;Integrated Security=true" Microsoft.EntityFrameworkCore.SqlServer -verbose
Build started...
Build succeeded.
The specified framework 'Microsoft.NETCore.App', version '1.1.0' was not found.
  - Check application dependencies and target a framework version installed at:
      C:\Program Files\dotnet\shared\Microsoft.NETCore.App
  - The following versions are installed:
      1.0.1
      1.1.0-preview1-001100-00
  - Alternatively, install the framework version '1.1.0'.
Process finished with non-zero exit code

This is while I have targeted the 1.1.0 of .Net.

enter image description here

1
2
2/28/2017 6:16:02 AM

Accepted Answer

As error log says, you do not have 1.1.0 version of .NET Core installed on your machine. This version is needed by scaffold-dbcontext tool, that is part of .NET Core CLI, not part of your application and therefore doesn't use nuget packages from your app.

To install .NET Core 1.1.0 go to .NET Core Download page and select x86/x64 version that you need. After that, you will have new '1.1.0' folder in C:\Program Files\dotnet\shared\Microsoft.NETCore.App, that is the default place for the .NET Core framework.

7
2/28/2017 5:23:23 PM


Related Questions





Related

Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow
Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow