Cannot invoke project dependency command on a library
See original GitHub issueUpdate: the error is only on libraries, not standalone.
It looks like https://github.com/dotnet/cli/pull/2617 broke PackagedCommandSpecFactory in tools on standalone apps.
Steps to reproduce
Create a tool that invokes tries to execute a dependency command where projectContext is a netstandard library.
new ProjectDependenciesCommandFactory(
projectContext.TargetFramework,
Constants.DefaultConfiguration,
null,
null,
projectContext.ProjectDirectory
)
.Create("dotnet-my-tool",
new []{"--dispatch", "--verbose"},
projectContext.TargetFramework,
Constants.DefaultConfiguration)
Repro project: https://github.com/natemcmaster/dotnet-sample-tool/tree/issue2645.
Expected behavior
ProjectDependenciesCommandFactory should create and execute a command on the netstandard library.
Actual behavior
On a library project
Running C:\Users\namc\dev\dotnet-sample-tool\.dotnet\shared\Microsoft.NETCore.App\1.0.0-rc2-3002476\corehost.exe --runtimeconfig C:\Users\namc\dev\dotnet-sample-tool\SampleLibrary\bin\Debug\netstandard1.5\SampleLibrary.runtimeconfig.json --depsfile C:\Users\namc\dev\dotnet-sample-tool\SampleLibrary\bin\Debug\netstandard1.5\SampleLibrary.deps.json --additionalprobingpath C:\Users\namc\.nuget\packages C:\Users\namc\.nuget\packages\dotnet-my-tool\1.0.0-tmp1461321718.66929\lib\netstandard1.5\dotnet-my-tool.dll --dispatch --verbose
Process ID: 55528
Could not resolve coreclr path
Environment data
Microsoft.DotNet.Cli.Utils/1.0.0-rc2-002476
dotnet --info
output:
.NET Command Line Tools (1.0.0-rc2-002476)
Product Information:
Version: 1.0.0-rc2-002476
Commit Sha: 1a8d393b9b
Fails on windows and linux.
Trace: corehost_trace.log.txt
Issue Analytics
- State:
- Created 7 years ago
- Reactions:4
- Comments:18 (13 by maintainers)
Top Results From Across the Web
Cannot invoke project dependency command on a library
Create a tool that invokes tries to execute a dependency command where projectContext is a netstandard library. ... Repro project: https://github.
Read more >Cannot invoke method get() on null object
I'm experiencing a build issue when adding a firebase dependency to a android library. My setup is as follows. /settings.gradle
Read more >Failed to notify action. Cannot invoke method containers ...
I just upgraded to gradle-rc1 and wanted to see if my projects still build, and immediately I get a failure "Failed to notify...
Read more >Declaring dependencies
Every dependency declared for a Gradle project applies to a specific scope. For example some dependencies should be used for compiling source code...
Read more >Add build dependencies | Android Studio
Learn how to add build dependencies using the Gradle build system in Android Studio.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Glad I found this issue here, very useful. Sorry for the annoying question, but is there a ballpark ETA on this one - just so I can make some plans this end? (An order of magnitude is good enough for me! - 1d/1w/1m/1q/1y)
Has there been any progress on this? There has been a lot of chatter about this limitation, especially because the workarounds are not easy.