Skip to content

Avoid crash when NuGet.Config file is not valid and show error to user - #1360

Merged
clairernovotny merged 2 commits into
NuGetPackageExplorer:mainfrom
campersau:avoidnugetconfigcrash
Mar 28, 2024
Merged

clairernovotny merged 2 commits into
NuGetPackageExplorer:mainfrom
campersau:avoidnugetconfigcrash

Conversation

@campersau

Copy link
Copy Markdown
Collaborator

When the NuGet.Config file contains invalid XML it would result in a crash when opening the package chooser window.

Now it willl show the error to the user:
image

We already did that for publishing:

UIServices.Show(e.Message, MessageLevel.Error);

@clairernovotny

Copy link
Copy Markdown
Member

Can we make this one better by showing a dialog with a "reset to default" button? Not sure if that should simply delete the file and let NuGet recreate it or if there's a default NuGet.config file that should be written instead.

@clairernovotny

Copy link
Copy Markdown
Member

Ping @campersau?

@clairernovotny
clairernovotny merged commit 84b36ca into NuGetPackageExplorer:main Mar 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants