EF Tools 1.1.0-preview4 Unrecognized option '--config'
See original GitHub issueNotes 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
- Upgrade nuget packages from v1.0.1 to v1.1.0.
- Use ‘dotnet ef’ to generate migrations
- 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:
- Created 7 years ago
- Reactions:4
- Comments:33 (12 by maintainers)
Top 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 >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Just edit project.json and change the tools back to 1.0.0-preview3. It works with the latest EntityFrameworkCore (v1.1.0).
After some tests I had to use the old version 1.0.0-preview3 and it did the job.