mrahhal / Migrator.EF6

.NET Core CLI tool to enable EF6 migrations in an Asp.Net Core app.
MIT License
82 stars 15 forks source link

Problem with newest .net core sdk (2.1.2) #51

Closed mrahhal closed 6 years ago

mrahhal commented 6 years ago

It seems that the tool stops working if you update to the latest sdk. The exception stacktrace is:

Unhandled Exception: Microsoft.DotNet.Cli.Utils.CommandUnknownException: No executable found matching command "dotnet-ef"
   at Microsoft.DotNet.Cli.Utils.ProjectDependenciesCommandFactory.FindProjectDependencyCommands(String commandName, IEnumerable`1 commandArgs, String configuration, NuGetFramework framework, String outputPath, String buildBasePath, String projectDirectory)
   at Microsoft.DotNet.Cli.Utils.ProjectDependenciesCommandFactory.Create(String commandName, IEnumerable`1 args, NuGetFramework framework, String configuration)
   at Migrator.EF6.Tools.Program.Dispatch(String[] args)
   at Migrator.EF6.Tools.Program.Main(String[] args)

Looks like it's a problem with dispatching. (Hello again)

dotnet --info:

.NET Command Line Tools (2.1.2)

Product Information:
 Version:            2.1.2
 Commit SHA-1 hash:  5695315371

Runtime Environment:
 OS Name:     Windows
 OS Version:  10.0.16299
 OS Platform: Windows
 RID:         win10-x64
 Base Path:   C:\Program Files\dotnet\sdk\2.1.2\

Microsoft .NET Core Shared Framework Host

  Version  : 2.0.3
  Build    : a9190d4a75f4a982ae4b4fa8d1a24526566c69df

@nphmuller any ideas?

Anyone else facing this problem?

mrahhal commented 6 years ago

Currently checking if the newest DotnetToolDispatcher version that Nick mentioned fixes this.

mrahhal commented 6 years ago

Resolved in #52

Had to use a newer DotnetToolDispatcher and edit a couple of things. Fixed in 2.0.1.

altso commented 6 years ago

I had the same error in 2.0.0. It's no longer an issue after upgrading to 2.0.1, but please keep in mind that the version must be updated in both places: PackageReference and DotNetCliToolReference.