question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

EF Tools throws "Unrecognized option '--build-base-path'" inside package manager console

See original GitHub issue

I have two projects in solution: asp.net core web and core class library that contains DataContext and migrations.

The issue

It’s not possible to generate migrations with v1.1.0. The website is building and running successfully.

Steps to reproduce:

  1. Upgrade nuget packages from v1.0.1 to v1.1.0.
  2. Use ‘add-migration’ to generate migrations or ‘update-database’ inside package manager console
  3. Error: Unrecognized option '–build-base-path

project.json for web:

{
  "dependencies": {
    "Microsoft.ApplicationInsights.AspNetCore": "1.0.0",
    "Newbor.Data": "1.0.0-*",
    "Microsoft.AspNetCore.Authentication.JwtBearer": "1.0.0",
    "AutoMapper.Data": "1.0.0-beta1",
    "Microsoft.AspNet.Tooling.Razor": "1.0.0-rc1-final",
    "FluentValidation": "6.4.0-beta8",
    "Microsoft.NETCore.App": {
      "version": "1.1.0",
      "type": "platform"
    },
    "Microsoft.AspNetCore.Diagnostics": "1.1.0",
    "Microsoft.AspNetCore.Mvc": "1.1.0",
    "Microsoft.AspNetCore.Routing": "1.1.0",
    "Microsoft.AspNetCore.Server.IISIntegration": "1.1.0",
    "Microsoft.AspNetCore.Server.Kestrel": "1.1.0",
    "Microsoft.AspNetCore.Session": "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.Logging": "1.1.0",
    "Microsoft.Extensions.Logging.Console": "1.1.0",
    "Microsoft.Extensions.Logging.Debug": "1.1.0",
    "Microsoft.Extensions.Options.ConfigurationExtensions": "1.1.0",
    "NLog.Extensions.Logging": "1.0.0-rtm-alpha5"
  },

  "tools": {
    "Microsoft.AspNetCore.Server.IISIntegration.Tools": "1.1.0-preview4-final"
  },

  "frameworks": {
    "netcoreapp1.0": {
      "imports": [
        "dotnet5.6",
        "portable-net45+win8"
      ]
    }
  },

  "buildOptions": {
    "emitEntryPoint": true,
    "preserveCompilationContext": true
  },

  "runtimeOptions": {
    "configProperties": {
      "System.GC.Server": true
    }
  },

  "publishOptions": {
    "include": [
      "wwwroot",
      "**/*.cshtml",
      "appsettings.json",
      "web.config",
      "nlog.config"
    ]
  },

  "scripts": {
    "postpublish": [ "dotnet publish-iis --publish-folder %publish:OutputPath% --framework %publish:FullTargetFramework%" ]
  }
}

project.json for class library:

 {
  "version": "1.0.0-*",

  "buildOptions": {
    "emitEntryPoint": true
  },

  "dependencies": {
    "Microsoft.EntityFrameworkCore.Tools.Core": "1.0.0-rc2-final",
    "Microsoft.AspNetCore.Identity.EntityFrameworkCore": "1.1.0",
    "Microsoft.EntityFrameworkCore.SqlServer": "1.1.0",
    "Microsoft.EntityFrameworkCore.Tools": "1.1.0-preview4-final",
    "Microsoft.NETCore.App": {
      "version": "1.1.0",
      "type": "platform"
    },
    "NLog.Extensions.Logging": "1.0.0-rtm-alpha5"
    
  },
  
  "frameworks": {
    "netcoreapp1.0": {
      "imports": [
        "dotnet5.6",
        "portable-net45+win8"
      ]
    }
  },

  "tools": {
    "Microsoft.EntityFrameworkCore.Tools": "1.1.0-preview4-final",
    "Microsoft.EntityFrameworkCore.Tools.DotNet": "1.1.0-preview4-final"
  }
}

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:3
  • Comments:10 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
bricelamcommented, Dec 8, 2016

Do you have projects in the same solution with a different version of Microsoft.EntityFrameworkCore.Tools installed?

0reactions
bricelamcommented, Jan 6, 2017

See #7358 for details on trying out the next release.

Read more comments on GitHub >

github_iconTop Results From Across the Web

EF Tools throws "Unrecognized option '--build-base-path ...
I have two projects in solution: asp.net core web and core class library that contains DataContext and migrations.
Read more >
EF Core 2.0 Migrations Not Recognized by Package ...
net core 2.0 web app through the package manager console in visual studio 2017. I receive the error: "The EntityFramework package is not ......
Read more >
EF Core tools reference (Package Manager Console)
Reference guide for the Entity Framework Core Visual Studio Package Manager Console.
Read more >
How to Solve the Command or File Was Not Found EF ...
In this article, we are going to learn how to solve the Command or File Was Not Found EF Core migration error.
Read more >
Rider: running entity framework commands in asp.net project
So, I'm getting started on uding rider for asp.net , and the tutorial I am following is using entity framework (and uses vs)...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found