efcore: EF Tools 1.1.0-preview4 Unrecognized option '--config'
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
- 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%" ]
}
}
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Reactions: 4
- Comments: 33 (12 by maintainers)
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.
Thank you very much. That did the trick. Working again.
@bricelam Working excellently in 1.2.0-preview4-22817. Thanks!
Confirmed what we speculated in triage: this affects just the
1.1.0-preview4
tools on apps that target full .NET (rather than .NET Core). I couldn’t 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 theMicrosoft.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.