Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
/sdkPublic

Dotnet tool command doesn't respect nuget packages path #15306

Open
Assignees
joeloff
Milestone
@uladz-zubrycki

Description

@uladz-zubrycki

Description

It's possible to change the path for nuget packages globally by settingNUGET_PACKAGES environment variable (there're other means of achieving it check thedocumentation for details) .
Once that donedotnet tool fails to start local tool. I guess it happens as tool was actually restored to nonstandard path,dotnet tool is not able to find it there and consistently asks to rundotnet tool restore.

Steps

  1. SetNUGET_PACKAGES environment variable to some directory other than default%userprofile%/.nuget/packages
  2. Initialize tool manifest by runningdotnet new tool-manifest
  3. Install some tool, e.gdotnet tool install paket
  4. Try to run tool, e.gdotnet paket init

Expected result

Tool is invoked (which ispaket init in current case)

Actual result

Error message sayingRun "dotnet tool restore" to make the "paket" command available.

Running restore as suggested doesn't help. But everything works as expected after I manually move tool from the directory it was restored to to the%userprofile%/.nuget/packages.

Haven't checked whether the same is actual for global tool installation, but would guess it is.

Environment

.NET SDK (reflecting any global.json): Version:   5.0.101 Commit:    d05174dc5aRuntime Environment: OS Name:     Windows OS Version:  10.0.18363 OS Platform: Windows RID:         win10-x64 Base Path:   C:\Program Files\dotnet\sdk\5.0.101\Host (useful for support):  Version: 5.0.1  Commit:  b02e13abab.NET SDKs installed:  3.1.404 [C:\Program Files\dotnet\sdk]  5.0.101 [C:\Program Files\dotnet\sdk]

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions


    [8]ページ先頭

    ©2009-2025 Movatter.jp