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

Strange ef dbcontext scaffold experience #5743

Closed
WillBaldwin opened this issue Jun 13, 2016 · 2 comments
Closed

Strange ef dbcontext scaffold experience #5743

WillBaldwin opened this issue Jun 13, 2016 · 2 comments

Comments

@WillBaldwin
Copy link

WillBaldwin commented Jun 13, 2016

Steps to reproduce

  1. Start with a new ASP.NET Core Web Application (.NET Core)
  2. Select Asp.NET Core Templates: Web Application
    1. Install-Package Microsoft.EntityFrameworkCore.Tools -Pre
    2. Install-Package Microsoft.EntityFrameworkCore.SqlServer -Pre
    3. Install-Package Microsoft.EntityFrameworkCore.SqlServer.Design -Pre
    4. Add to Project.json
            "Microsoft.EntityFrameworkCore.Tools": {
        "version": "1.0.0-preview1-final",
        "imports": [
            "portable-net45+win8+dnxcore50",
            "portable-net45+win8"
        ]
    },
5. cd src
6. cd MyProject
7. dotnet ef dbcontext scaffold -c ApplicationContext -o Models "Data Source=MyServer;Initial Catalog=MyDatabase;Integrated Security=True" Microsoft.EntityFrameworkCore.SqlServer --force

The issue

The database schema is reverse engineered as expected.
An unexpected error message is returned with no apparent remedy

dotnet : Done
At line:1 char:1
+ dotnet ef dbcontext scaffold -c ApplicationContext -o Models "Data So ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (Done:String) [], RemoteException
    + FullyQualifiedErrorId : NativeCommandError

Further technical details

EF Core version: 1.0.0-rc2-final
Operating system: Windows 10 Enterprise
Visual Studio version: VS 2015

@lajones
Copy link
Contributor

lajones commented Jun 13, 2016

@WillBaldwin My suspicion is you'll need to either put single quotes as well as double quotes around the connection string and/or install Powershell 5. Please see #5376 for details.

@natemcmaster
Copy link
Contributor

Actually, the error here is a little misleading, but will be fixed in preview2.

What is happening: Preview 1 logs the message "Done" to the stderr. PowerShell treats any output to stderr as an "error" and shows the warning, but the "dotnet ef" command actually ran just fine. We fixed this for Preview 2 by logging "Done" to stdout instead. This fix was added in #5542.

Closing as a duplicate of #5012

@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
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants