sdk icon indicating copy to clipboard operation
sdk copied to clipboard

dotnet restore global.json not working (Windows 10)

Open kscott5 opened this issue 10 years ago • 1 comments

Following the documentation, this command isn't working as expected.

Steps to reproduce

dotnet-restore.pdf

--Greenshelter
    --mvc
        --src
            project.json
        --test
        global.json

Expected behavior

Restore project.json dependencies reference by the global.json

Actual behavior

PS C:\apps\pcsc\GreenShelter> dotnet restore global.json
error: Invalid input 'global.json'. Valid file names are 'project.json' or '*.project.json'.
PS C:\apps\pcsc\GreenShelter> dotnet restore .\global.json
error: Invalid input '.\global.json'. Valid file names are 'project.json' or '*.project.json'.

Environment data

PS C:\apps\pcsc\GreenShelter> dotnet --info
.NET Command Line Tools (1.0.0-preview2-003121)

Product Information:
 Version:            1.0.0-preview2-003121
 Commit SHA-1 hash:  1e9d529bc5

Runtime Environment:
 OS Name:     Windows
 OS Version:  10.0.10586
 OS Platform: Windows

kscott5 avatar Sep 12 '16 17:09 kscott5

The issues was with the global.json SDK version was different from the .NET Command Line Tool version. Changes to match the dotnet --info. Issue resolved.

kscott5 avatar Sep 26 '16 21:09 kscott5