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.

ProjectDependenciesCommandFactory cannot find command in desktop .NET class library project

See original GitHub issue

Steps to reproduce

Create a sample project using dotnet-ef

{
  "version": "1.0.0-*",
  "buildOptions": {
    "emitEntryPoint": false
  },
  "dependencies": {
    "Microsoft.EntityFrameworkCore.Sqlite": "1.0.0-*",
    "Microsoft.EntityFrameworkCore.Tools": {
      "type": "build",
      "version": "1.0.0-*"
    }
  },
  "frameworks": {
    "net451":{}
  },
  "tools": {
    "Microsoft.EntityFrameworkCore.Tools": {
      "imports": [
        "portable-net451+win8"
      ],
      "version": "1.0.0-*"
    }
  }
}
dotnet restore
dotnet ef migrations list --verbose

Expected behavior

dotnet-ef.dll (in Microsoft.EntityFrameworkCore.Tools) should dispatch via ProjectDependenciesCommandFactory to Microsoft.EntityFrameworkCore.Tools.Cli.exe (a project dependency) and list all migrations in the project

Actual behavior

No executable found matching command "Microsoft.EntityFrameworkCore.Tools.Cli"

ProjectDependenciesCommandFactory tries to find a command in bin/Debug/net451/win7-x64, but the command is actually in bin/Debug/net451/

Environment data

dotnet --info output:

.NET Command Line Tools (1.0.0-rc2-002673)

Product Information:
 Version:     1.0.0-rc2-002673
 Commit Sha:  c0aeb91d61

Runtime Environment:
 OS Name:     Windows
 OS Version:  10.0.10586
 OS Platform: Windows
 RID:         win10-x64
"Microsoft.DotNet.Cli.Utils/1.0.0-rc2-002673"

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:14 (14 by maintainers)

github_iconTop GitHub Comments

1reaction
Sridhar-MScommented, May 6, 2016

@brthor I was about to comment the same thing 😃

0reactions
TheRealPiotrPcommented, May 8, 2016

Fixed by dotnet/cli#2933

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cannot invoke project dependency command on a library
ProjectDependenciesCommandFactory should create and execute a command on the netstandard library. Actual behavior. On a library project. Running ...
Read more >
Why can't I reference my class library?
I right click the Bin folder or Project and select Add Reference, then select my Class Library Project, it adds the 15 or...
Read more >
Trying to make a class class Library and getting some odd ...
Hi All. The title tells the table. I try to all the dll to a project and get the error shown in the...
Read more >
Tutorial: Create a .NET class library using Visual Studio
Right-click on the solution in Solution Explorer and select Add > New Project. On the Add a new project page, enter library in...
Read more >
How to convert an application project to class library ...
In the Solutions Explorer window, right-click the exe project and then select Properties in the popup. Then change the Output type from Windows...
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