dotnet restore error
See original GitHub issueHi,
I’m trying to run the command but I got an error with nuget, can’t understand why. Does anyone have the same problem? Solutions?
Steps to reproduce
dotnet restore -v verbose
Actual behavior
Failed to create prime the NuGet cache. restore failed with: 1
trace: NuGet Command Line Version: 3.5.0.0
error: Unexpected failure reading NuGet.Config. Path: ‘C:\Users\padovani.enrico
AppData\Roaming\NuGet\NuGet.Config’.
error: Error 0x1A88. Debugging resource strings are unavailable. See http://g
o.microsoft.com/fwlink/?linkid=106663&Version=4.0.22220.0&File=mscorrc.dll&Key=0
x1A88
trace: System.AggregateException: One or more errors occurred. (Unexpected failu
re reading NuGet.Config. Path: ‘C:\Users\padovani.enrico\AppData\Roaming\NuGet\N
uGet.Config’.) —> NuGet.Configuration.NuGetConfigurationException: Unexpected
failure reading NuGet.Config. Path: ‘C:\Users\padovani.enrico\AppData\Roaming\Nu
Get\NuGet.Config’. —> System.BadImageFormatException: Error 0x1A88. Debugging
resource strings are unavailable. See http://go.microsoft.com/fwlink/?linkid=10
6663&Version=4.0.22220.0&File=mscorrc.dll&Key=0x1A88
trace: at NuGet.Configuration.Settings.CreateDefaultConfig
trace: at NuGet.Configuration.Settings.<>c__DisplayClass20_0.<.ctor>b__0()
trace: at NuGet.Configuration.Settings.ExecuteSynchronizedCore(Action ioOpera
tion)
trace: — End of inner exception stack trace —
trace: at NuGet.Configuration.Settings.ExecuteSynchronizedCore(Action ioOpera
tion)
trace: at NuGet.Configuration.Settings.ExecuteSynchronized(Action ioOperation
)
trace: at NuGet.Configuration.Settings…ctor(String root, String fileName, Bo
olean isMachineWideSettings)
trace: at NuGet.Configuration.Settings.ReadSettings(String root, String setti
ngsPath, Boolean isMachineWideSettings)
trace: at NuGet.Configuration.Settings.LoadUserSpecificSettings(List1 validS ettingFiles, String root, String configFileName, IMachineWideSettings machineWid eSettings, Boolean useTestingGlobalPath) trace: at NuGet.Configuration.Settings.LoadDefaultSettings(String root, Strin g configFileName, IMachineWideSettings machineWideSettings, Boolean loadAppDataS ettings, Boolean useTestingGlobalPath) trace: at NuGet.Configuration.Settings.LoadDefaultSettings(String root, Strin g configFileName, IMachineWideSettings machineWideSettings) trace: at NuGet.CommandLine.XPlat.RestoreCommand.<>c__DisplayClass0_1.<<Regis ter>b__1>d.MoveNext() trace: --- End of inner exception stack trace --- trace: at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskC anceledExceptions) trace: at System.Threading.Tasks.Task
1.GetResultCore(Boolean waitCompletionN
otification)
trace: at Microsoft.Dnx.Runtime.Common.CommandLine.CommandLineApplication.<>c
__DisplayClass68_0.<OnExecute>b__0()
trace: at Microsoft.Dnx.Runtime.Common.CommandLine.CommandLineApplication.Exe
cute(String[] args)
trace: at NuGet.CommandLine.XPlat.Program.MainInternal(String[] args, Command
OutputLogger log)
trace: —> (Inner Exception #0) NuGet.Configuration.NuGetConfigurationException
: Unexpected failure reading NuGet.Config. Path: ‘C:\Users\padovani.enrico\AppDa
ta\Roaming\NuGet\NuGet.Config’. —> System.BadImageFormatException: Error 0x1A8
8. Debugging resource strings are unavailable. See http://go.microsoft.com/fwli
nk/?linkid=106663&Version=4.0.22220.0&File=mscorrc.dll&Key=0x1A88
trace: at NuGet.Configuration.Settings.CreateDefaultConfig
trace: at NuGet.Configuration.Settings.<>c__DisplayClass20_0.<.ctor>b__0()
trace: at NuGet.Configuration.Settings.ExecuteSynchronizedCore(Action ioOpera
tion)
trace: — End of inner exception stack trace —
trace: at NuGet.Configuration.Settings.ExecuteSynchronizedCore(Action ioOpera
tion)
trace: at NuGet.Configuration.Settings.ExecuteSynchronized(Action ioOperation
)
trace: at NuGet.Configuration.Settings…ctor(String root, String fileName, Bo
olean isMachineWideSettings)
trace: at NuGet.Configuration.Settings.ReadSettings(String root, String setti
ngsPath, Boolean isMachineWideSettings)
trace: at NuGet.Configuration.Settings.LoadUserSpecificSettings(List`1 validS
ettingFiles, String root, String configFileName, IMachineWideSettings machineWid
eSettings, Boolean useTestingGlobalPath)
trace: at NuGet.Configuration.Settings.LoadDefaultSettings(String root, Strin
g configFileName, IMachineWideSettings machineWideSettings, Boolean loadAppDataS
ettings, Boolean useTestingGlobalPath)
trace: at NuGet.Configuration.Settings.LoadDefaultSettings(String root, Strin
g configFileName, IMachineWideSettings machineWideSettings)
trace: at NuGet.CommandLine.XPlat.RestoreCommand.<>c__DisplayClass0_1.<<Regis
ter>b__1>d.MoveNext()<—
Environment data
dotnet --info
output:
.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: 6.3.9600 OS Platform: Windows RID: win81-x64
Issue Analytics
- State:
- Created 7 years ago
- Comments:7 (2 by maintainers)
Top GitHub Comments
@enrico-padovani would you try deleting your NuGet.Config file at
C:\Users\padovani.enrico\AppData\Roaming\NuGet\NuGet.Config
from the error here it looks like this file is corrupt.//cc @mishra14
In the while I’ve changed my laptop and reinstalled everything from scratch with windows 10. Despite the fact that now it seems to work, I’m still on .net “old school” unless it will look like a solid thing.