Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issues using Microsoft.EntityFrameworkCore.Tools 1.0.0-preview3-final #6855

Closed
rome3ro opened this issue Oct 25, 2016 · 6 comments
Closed

Issues using Microsoft.EntityFrameworkCore.Tools 1.0.0-preview3-final #6855

rome3ro opened this issue Oct 25, 2016 · 6 comments

Comments

@rome3ro
Copy link

rome3ro commented Oct 25, 2016

Following this guide but changing version on package Microsoft.EntityFrameworkCore.Tools to the preview3 when executes "dotnet ef" after "dotnet restore" fires up this error: No executable found matching command "dotnet-ef". And when I rollback to the preview2 but along with the package Microsoft.EntityFrameworkCore.Design on version 1.1.0-preview1-final gave another error dotnet quit unexpectedly (on window alert) and message error on terminal says: Unhandled Exception: System.MissingMethodException: Entry point not found in assembly 'Microsoft.EntityFrameworkCore.Design, Version=1.1.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'.
this occurs on "dotnet ef" after "dotnet restore"...

All this with Visual Studio Code on macOS Sierra

BTW this is my project.json that works well on dotnet ef execution and this is for a web api project

{
  "dependencies": {
    "Microsoft.NETCore.App": {
      "version": "1.0.1",
      "type": "platform"
    },    
    "Npgsql.EntityFrameworkCore.PostgreSQL": "1.0.2",    
    "Microsoft.EntityFrameworkCore.Design": {
      "version": "1.0.0-preview2-final",
      "type": "build" 
    },
    "Microsoft.AspNetCore.Mvc": "1.0.1",
    "Microsoft.AspNetCore.Routing": "1.0.1",
    "Microsoft.AspNetCore.Server.IISIntegration": "1.0.0",
    "Microsoft.AspNetCore.Server.Kestrel": "1.0.1",
    "Microsoft.Extensions.Configuration.EnvironmentVariables": "1.0.0",
    "Microsoft.Extensions.Configuration.FileExtensions": "1.0.0",
    "Microsoft.Extensions.Configuration.Json": "1.0.0",
    "Microsoft.Extensions.Configuration.CommandLine": "1.0.0",
    "Microsoft.Extensions.Logging": "1.0.0",
    "Microsoft.Extensions.Logging.Console": "1.0.0",
    "Microsoft.Extensions.Logging.Debug": "1.0.0",
    "Microsoft.Extensions.Options.ConfigurationExtensions": "1.0.0"
  },

  "tools": {
    "Microsoft.AspNetCore.Server.IISIntegration.Tools": "1.0.0-preview2-final",
    "Microsoft.EntityFrameworkCore.Tools": "1.0.0-preview2-final" 
  },

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

  "buildOptions": {
    "emitEntryPoint": true,
    "preserveCompilationContext": true
  },

  "runtimeOptions": {
    "configProperties": {
      "System.GC.Server": true
    }
  },

  "publishOptions": {
    "include": [
      "wwwroot",
      "**/*.cshtml",
      "appsettings.json",
      "web.config"
    ]
  },

  "scripts": {
    "postpublish": [ "dotnet publish-iis --publish-folder %publish:OutputPath% --framework %publish:FullTargetFramework%" ]
  },

  "tooling": {
    "defaultNamespace": "API"
  }
}
@bricelam
Copy link
Contributor

The package listed in your tools section needs to be updated to Microsoft.EntityFrameworkCore.Tools.DotNet.

@rome3ro
Copy link
Author

rome3ro commented Oct 25, 2016

Ok thanks bricelam, adding that package on tools with the latest version fix the problem now dotnet ef runs correctly!

@rowanmiller
Copy link
Contributor

Closing this one out. The change required in the tools node is documented in the release post. The docs will cut over to 1.1 content once we RTM it.

@ArashMotamedi
Copy link

@rowanmiller Thanks for the details. Here's a nuance: I'm having the same issue but my project is Asp.net Core on .Net Framework 4.6.1, and it seems EF.Tools.DotNet:1.1.0* is not available for net461. What dependencies and tools should I specify to be able to run ef commands?

@rowanmiller
Copy link
Contributor

@bricelam could you help out with the above question?

@bricelam
Copy link
Contributor

For now, you need to add it manually to the csproj (NuGet will enable installing from the UI later).

<ItemGroup>
  <DotNetCliToolReference Include="Microsoft.EntityFrameworkCore.Tools.DotNet" Version="1.0.0-msbuild3-final" />
</ItemGroup>

@ajcvickers ajcvickers reopened this Oct 16, 2022
@ajcvickers ajcvickers closed this as not planned Won't fix, can't repro, duplicate, stale Oct 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants