sdk
sdk copied to clipboard
dotnet restore global.json not working (Windows 10)
Following the documentation, this command isn't working as expected.
Steps to reproduce
--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
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.