question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

EF Tools 1.1.0-preview4 Unrecognized option '--config'

See original GitHub issue

Notes by @rowanmiller

This affects just the 1.1.0-preview4 tools on apps that target full .NET (rather than .NET Core). I have not been able to find a way to workaround this with the latest tools preview.

The best option right now is to roll back to the 1.0.0-preview3 version of the Microsoft.EntityFrameworkCore.Tools.DotNet package. Fortunately, because of the way things are factored, you can keep using the 1.1 versions of all the other packages.

  "tools": {
    "Microsoft.EntityFrameworkCore.Tools.DotNet": "1.0.0-preview3-final"
  },

Steps to reproduce

  1. Upgrade nuget packages from v1.0.1 to v1.1.0.
  2. Use ‘dotnet ef’ to generate migrations
  3. Error: Unrecognized option ‘–config’

I’ve tried to delete the older SDK and runtime, but it doesn’t solve the problem.

The issue

It’s not possible to generate migrations with v1.1.0. The website is building and running successfully.

Further technical details

EF Core version: 1.1.0 Operating system: Windows 10 Visual Studio version: VS2015

My project.json:

{
  "dependencies": {
    "TinyMapper": "2.0.8",
    "Hangfire.Dashboard.Authorization": "2.1.0",
    "Hangfire": "1.6.6",
    "Hangfire.SqlServer": "1.6.6",
    "Microsoft.AspNetCore.Authentication.JwtBearer": "1.1.0",
    "Microsoft.AspNetCore.Diagnostics": "1.1.0",
    "Microsoft.AspNetCore.Mvc": "1.1.0",
    "Microsoft.AspNetCore.Owin": "1.1.0",
    "Microsoft.AspNetCore.Server.IISIntegration": "1.1.0",
    "Microsoft.AspNetCore.Server.Kestrel": "1.1.0",
    "Microsoft.AspNetCore.StaticFiles": "1.1.0",
    "Microsoft.Extensions.Configuration.EnvironmentVariables": "1.1.0",
    "Microsoft.Extensions.Configuration.FileExtensions": "1.1.0",
    "Microsoft.Extensions.Configuration.Json": "1.1.0",
    "Microsoft.Extensions.DependencyInjection": "1.1.0",
    "Microsoft.Extensions.DependencyInjection.Abstractions": "1.1.0",
    "Microsoft.Extensions.Logging": "1.1.0",
    "Microsoft.Extensions.Logging.Console": "1.1.0",
    "Microsoft.Extensions.Logging.Debug": "1.1.0",
    "Microsoft.EntityFrameworkCore.SqlServer": "1.1.0",
    "Microsoft.EntityFrameworkCore.SqlServer.Design": "1.1.0",
    "Microsoft.EntityFrameworkCore.Tools": {
      "version": "1.1.0-preview4-final",
      "type": "build"
    }
  },

  "tools": {
    "Microsoft.EntityFrameworkCore.Tools.DotNet": "1.1.0-preview4-final"
  },

  "frameworks": {
    "net461": {}
  },

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

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

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

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:4
  • Comments:33 (12 by maintainers)

github_iconTop GitHub Comments

2reactions
michaelroefcommented, Nov 28, 2016

Just edit project.json and change the tools back to 1.0.0-preview3. It works with the latest EntityFrameworkCore (v1.1.0).

1reaction
AdrienTorriscommented, Jun 13, 2017

After some tests I had to use the old version 1.0.0-preview3 and it did the job.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cannot find command 'dotnet ef'
In my case, the tools folder didn't exist inside %USERPROFILE%\.dotnet\ so I had to run the command dotnet tool install --global dotnet-ef ......
Read more >
Passing connection string to entity framework core update ...
Hi, I'm trying to pass the connection string to entity framework core update commandline without ... Unrecognized option '--connection'.
Read more >
EF Core tools reference (.NET CLI)
Reference guide for the Entity Framework Core .NET Core CLI tools.
Read more >
EF Core tools reference (Package Manager Console)
Reference guide for the Entity Framework Core Visual Studio Package Manager Console.
Read more >
EF Core Migrations using CLI
Open command prompt and navigate to your project's root folder and enter dotnet ef --help to list EF Core commands, as shown below....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found