-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
EF Tools 1.1.0-preview4 Unrecognized option '--config' #7071
Comments
If you want to use package manager console to run the migrations,
Also ensure If you want to use
"dependencies": {
"Microsoft.EntityFrameworkCore": "1.1.0",
"Microsoft.EntityFrameworkCore.Design": "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",
"imports": [
"portable-net45+win8"
],
"type": "build"
}
},
"tools": {
"Microsoft.EntityFrameworkCore.Tools.DotNet": {
"version": "1.1.0-preview4-final",
"imports": [
"portable-net45+win8"
]
},
"Microsoft.EntityFrameworkCore.Tools": {
"version": "1.1.0-preview4-final",
"imports": [
"portable-net45+win8"
]
}
}, |
More on the topic #7076 I have a similar problem |
Confirmed what we speculated in triage: this affects just the The best option right now is to roll back to the "tools": {
"Microsoft.EntityFrameworkCore.Tools.DotNet": "1.0.0-preview3-final"
}, |
Clearing to re-discuss in triage. To me, this would probably be patch worthy, but I'm not sure that we are planning to patch the preview tooling. |
This is fixed in dev (could become 1.1.0-preview5) and dev2 (will become 1.0.0-msbuild2). |
@bricelam does just using preview3 for full .NET projects seem like the best workaround to you? |
Yes, but it depends on Microsoft.NETCore.App 1.0 which is the problem we were trying to solve with the 1.1.0-preview4 release. |
Using the nightly builds would solve both problems 😉 |
@bricelam - If CI passes. 😜 |
I have the same problem, and would love to try out the nightly build. Is it available on a feed? Any idea when 1.1.0-preview5 might come out? |
Just edit project.json and change the tools back to 1.0.0-preview3. |
The nightly feed is available here. |
@microef Thanks, I does work. But it also requires me (and all my devs) to install platform 1.0.0 (we're on 1.1.0), which I'd rather avoid. |
@bricelam Working excellently in 1.2.0-preview4-22817. Thanks! |
Any new on this? In my case the proposed workarounds don't work, neither using the nightly builds nor downgrading the tools to 1.0.0-preview3. I'm really desesperated. I've lost two days with this and I always hit an end with an error, like this (unrecognized option --config) or this:
That is absurd, as my app has only one project and is not a dll (it has also emitEntryPoint:true set).
I've read it five times to get sure that in the second sentence is telling just the opposite of the first one. Furthermore, commands are not working on the PMC anymore, no matter wich version of the tools I install, no matter if I restore the packages and if I restart the computer... Is this a joke? I'm getting crazy with so many versions of everything and I only want to create a migration, it doesn't matter wich version of the tools I have to use... Is there a valid option nowadays? Is very far the next release of the tools? This seems a rabbit hole I can't scape... Please tell me what is the maximum version I can target to get this work. |
@SocVi100, it looks like you got to the bottom it. Well done! x86 will be supported in the new MSBuild-based tooling (for best results, wait for version 1.0.0-msbuild3-final or use the feature work nightly feed). |
@bricelam, thanks! It has been a hard way though... I don't know yet where the "platform": "x86" setting came from. I didn't want to target any platform specifically but in some moment it "slipped in". Anyway, I pity you all in the team, there has been too many changes on key aspects since the "vnext" started its road and that burns anybody a lot. I supose it may be hard to work with so many changing premises. |
@bricelam |
@AR1ES - Are you using project.json based project? If yes then you need to put |
@smitpatel , thanks. |
Hey, After reading all this above I can still not figure out the problem or solution. We have this project.json file content: {
}, We get the error "Unrecognized option '--config' when we run the following CLI cmd from the cmd line console: dotnet ef dbcontext scaffold "Server=;Initial Catalog=;Persist Security Info=False;User ID=;Password=;Pooling=False;Encrypt=True;TrustServerCertificate=False;" Microsoft.EntityFrameworkCore.SqlServer --output-dir models --force We are on Windows 10 (latest patches). VS 2015 (latest patches). We also have installed on the dev machine VS 2017 to play with it (Not clear if that somehow messed us up). We tried rolling back to "Microsoft.EntityFrameworkCore.Tools.DotNet": "1.0.0-preview3-final" but get a message we do not have the 1.0.0 framework installed. We looked for Microsoft.EntityFrameworkCore.Tools.DotNet 1.2.0-preview4-22878 but cannot find it in the nuget pkg list. Is it a daily build? Any definitive ideas or help will be greatly appreciated. P.S. Sorry to say, because we love .NET Core so far but this just feels like a mess that we cannot seem to get clarification on. We just cannot be expected to work our way through all these various versions, etc when we are supposedly doing an upgrade to a stable release. I know you guys are working hard and it is appreciated but sometimes it feels like we are back in dll hell from years ago, except now its packages, sdks and platforms with all different versions and endless possible combinations. Sorry just needed to get that out. I know it will get better. |
@chassq, my working solution was to use 1.1.0-preview3-final.
|
Thanks for the quick reply. Here is what we get now: Restored, cleaned and deleted bin/obj per above. Ran the CLI cmd and get this:
How should we go about installing the 1.0.0 version as specified in the message? Thanks! |
@chassq Install the LTS Runtime from the .NET Core Downloads page. |
Thank you very much. That did the trick. Working again. |
I got this error with |
@cda-1 That's interesting. Maybe because that version doesn't exist (doesn't show up in nuget package mgr) it's actually using the previous version 1.0.0-preview3-final? |
I can no longer find The version numbers are a bit confusing. Has this "fix" been released in some other version that I should switch to? |
If anyone here is interested in trying out the latest (MSBuild/VS2017) tools, see #7358 for details. |
We cannot roll back to '1.1.0-preview3-final' because it seems to be incompatible with current version of NuGet. Help! Blocked on critical migration Error: "The schema version of 'Microsoft.EntityFrameworkCore.Tools.DotNet' is incompatible with version 2.12.0.815 of NuGet" |
@marchy Have you tried using a more recent version of NuGet? 2.12 seems very old, as 3.5 was recently released. (Or are you stuck with VS 2013?) |
Same problem here ... I tried with different versions of Microsoft.EntityFrameworkCore.Tools.DotNet and the problem always occured. I use VS 2015, Update 3. Part of my project.json :
|
After some tests I had to use the old version 1.0.0-preview3 and it did the job. |
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 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.Steps to reproduce
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:
The text was updated successfully, but these errors were encountered: