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

Unrecognized option '--connection' when executing dotnet ef cli #21028

Closed
wilson0x4d opened this issue May 23, 2020 · 2 comments
Closed

Unrecognized option '--connection' when executing dotnet ef cli #21028

wilson0x4d opened this issue May 23, 2020 · 2 comments

Comments

@wilson0x4d
Copy link

wilson0x4d commented May 23, 2020

I expect to be able to specify a connection string when executing scaffold, migrations, database, and similar commands from cli.

Steps to reproduce

Execute a command which interacts with a database:

dotnet ef migrations add InitialCreate --connection "Server=srv;Database=db;UID=usr;PWD=pass;"

Observe error:

Unrecognized option '--connection'

Listing the --help for the current version does not show alternative names for this option.

Further technical details

EF Core version: 3.1.4
Database provider: Microsoft.EntityFrameworkCore.SqlServer
Target framework: netcoreapp3.1
Operating system: Windows 10
IDE: Visual Studio 16.6
Shell: PSCore 6

@wilson0x4d
Copy link
Author

while reviewing source control history i found a commit on 3/10 that corresponds with issue #10750 -- this issue discusses adding --connection to dotnet ef database command. upon review of the code it looks like the commit will also update dotnet ef migrations command.

i believe this issue can be closed as 'already fixed' (efcore5 preview3), thanks for the implementation @bricelam / @ajcvickers !

@wilson0x4d
Copy link
Author

wilson0x4d commented May 23, 2020

... upon looking more closely i realized i was using the wrong parameter for the desired command. Everything is working exactly as it should be (in EFCore 5 preview 4 👍 ) Thanks again!

@wilson0x4d wilson0x4d reopened this May 23, 2020
@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
Projects
None yet
Development

No branches or pull requests

2 participants