Skip to content

'Dotnet tool restore' does not work correctly when NUGET_PACKAGES (global-packages) is set to an alternative location  #11432

Open
@da9l

Description

Issue Title

'dotnet tool restore' does not work correctly when NUGET_PACKAGES (global-packages) is set to an alternative location.

Description

If you set NUGET_PACKAGES to an alternate folder. "D:\cache" on a build agent for instance,

dotnet tool restore # and then directly after
dotnet paket info # or paket <whatever>.

will fail with $lastexitcode=1 and
Run "dotnet tool restore" to make the "paket" command available.

The same error happens for at least two other tools as well. gitversion.tool and dotnet-fsharplint.

Repro steps

See this minimal example: https://github.com/da9l/dotnetpaketProblem_minimalExample/blob/master/readme.md

Expected behavior

it should work.

Actual behavior

fail with $lastexitcode=1 and
Run "dotnet tool restore" to make the "paket" command available.

Known workarounds

Don't set NUGET_PACKAGES to anything non-standard.

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