Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nuget.exe should show a helpful message when nuget.config is corrupt #1302

Closed
emgarten opened this issue Aug 31, 2015 · 6 comments
Closed

nuget.exe should show a helpful message when nuget.config is corrupt #1302

emgarten opened this issue Aug 31, 2015 · 6 comments
Assignees
Labels
Area:ErrorHandling warnings and errors/log messages & related error codes. Functionality:VisualStudioUI Priority:2 Issues for the current backlog. Product:NuGet.exe NuGet.exe Resolution:Duplicate This issue appears to be a Duplicate of another issue

Comments

@emgarten
Copy link
Member

An invalid nuget.config will cause a generic exception and error message.

Steps

  1. Create a new UWP app
  2. Copy .vs\config\applicationhost.config to nuget.config or create a corrupted nuget.config file
  3. From the solution folder run: nuget.exe restore -configfile nuget.config -packagesdirectory packages

Expected:
An error message referring to nuget.config

Actual:

Restoring packages for <mypath>\Projects\App13\App13\project.json...
Unable to resolve Microsoft.NETCore.UniversalWindowsPlatform (≥ 5.0.0) for UAP,Version=v10.0.
Exception of type 'NuGet.CommandLineException' was thrown.
@csharpfritz
Copy link
Contributor

Similarly, ensure that a friendly and detailed error message is shown for corruption of
project.json files as well.

On Mon, Aug 31, 2015 at 2:52 PM, Justin Emgarten notifications@github.com
wrote:

An invalid nuget.config will cause a generic exception and error message.

Steps

  1. Create a new UWP app
  2. Copy .vs\config\applicationhost.config to nuget.config or create a
    corrupted nuget.config file
  3. From the solution folder run: nuget.exe restore -configfile
    nuget.config -packagesdirectory packages

Expected:
An error message referring to nuget.config

Actual:

Restoring packages for \Projects\App13\App13\project.json...
Unable to resolve Microsoft.NETCore.UniversalWindowsPlatform (≥ 5.0.0) for UAP,Version=v10.0.
Exception of type 'NuGet.CommandLineException' was thrown.


Reply to this email directly or view it on GitHub
#1302.

@yishaigalatzer yishaigalatzer added this to the 3.3.0-commandline milestone Aug 31, 2015
@yishaigalatzer yishaigalatzer added the Priority:2 Issues for the current backlog. label Aug 31, 2015
@emgarten
Copy link
Member Author

@deepakaravindr was this fixed in your change?

@deepakaravindr deepakaravindr self-assigned this Nov 12, 2015
@deepakaravindr
Copy link

Yes, this will get fixed by the PR: NuGet/NuGet.Client#103 as well

@yishaigalatzer
Copy link

The message should show what file is introducing the bad xml.

Duplicate bug: #834

@yishaigalatzer yishaigalatzer modified the milestones: 3.4 Beta, 3.4 RTM Feb 25, 2016
@yishaigalatzer yishaigalatzer added the Area:ErrorHandling warnings and errors/log messages & related error codes. label Feb 25, 2016
@yishaigalatzer
Copy link

Summary: Any invalid config file that should be picked up, but fails to load should be turned into an error message that shows both in the UI and commandline. The error should be meaningful and point to the filename/file path and location in the file

@yishaigalatzer
Copy link

#1567

@yishaigalatzer yishaigalatzer removed this from the 3.4 RTM milestone Feb 25, 2016
@yishaigalatzer yishaigalatzer added the Resolution:Duplicate This issue appears to be a Duplicate of another issue label Feb 25, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area:ErrorHandling warnings and errors/log messages & related error codes. Functionality:VisualStudioUI Priority:2 Issues for the current backlog. Product:NuGet.exe NuGet.exe Resolution:Duplicate This issue appears to be a Duplicate of another issue
Projects
None yet
Development

No branches or pull requests

5 participants