Skip to content

Install a global tool in a custom location fails to run #15179

Open
@flaxed

Description

I have created a net 5 CLI program as a tools package and was testing a local tool install before migrating to executing the tool in step of a CI build.

Installation works fine with:

dotnet tool install --add-source '..\packages\' --version 1.0.8-beta --tool-path ./tools Foo.Bar

and installs fine with:

warning NU1603: restore depends on Foo.Bar (>= 1.0.8-beta) but Foo.Bar 1.0.8-beta was not found. An approximate best match of Foo.Bar 1.0.8-beta-g00e633e505 was resolved.
You can invoke the tool using the following command: cr-confgen
Tool 'foo.bar' (version '1.0.8-beta-g00e633e505') was successfully installed.

but when I try to execute the tool with

.\tools\cr-confgen.exe

I'm getting this error:

Cannot use file stream for [X:\tools\Foo.Bar.runtimeconfig.json]: No such file or directory
Invalid runtimeconfig.json [X:\tools\.store\Foo.Bar\1.0.8-beta-g00e633e505\Foo.Bar\1.0.8-beta-g00e633e505\tools\net5.0\any\Foo.Bar.runtimeconfig.json] [X:\tools\.store\Foo.Bar\1.0.8-beta-g00e633e505\Foo.Bar\1.0.8-beta-g00e633e505\tools\net5.0\any\Foo.Bar.runtimeconfig.dev.json]

Installation and execution both works fine with Install a global tool and the Install a local tool methods described in the documentation at How to manage .NET tools

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions