question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

dotnet restore error

See original GitHub issue

Hi,

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.Task1.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:closed
  • Created 7 years ago
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
emgartencommented, Aug 19, 2016

@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

1reaction
enrico-padovanicommented, Dec 6, 2016

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

net - Dotnet restore error
1 Answer 1 · dotnet restore fails if CLI is installed in a path with spaces · Restore of DotNet.exe is not working....
Read more >
dotnet restore command - .NET CLI
Learn how to restore dependencies and project-specific tools with the dotnet restore command.
Read more >
dotnet restore error NU1701 when using dotnet sdk 6.0. ...
We have a solution targeting both .Net Framework 4.7.2 and .Net 6.0. ... When explicitly using mcr.microsoft.com/dotnet/sdk:6.0.202 as the base ...
Read more >
Dotnet restore failed on .net core 3.1 - C#
I have some test that I'd like to build in Travis CI, however I'm getting The command "dotnet restore" failed and exited with...
Read more >
dotnet restore fails after migrating from NET Core 3.1 ...
I have a solution containing 1 C# project and 1 C++/CLI project. C# project references the C++ one. While both were targeting ....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found