-
Notifications
You must be signed in to change notification settings - Fork 253
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
Corrupt NuGet.config is ignored by nuget #1567
Comments
Consider warning also for files without a configuration section. e.g. <?xml version="1.0" encoding="utf-8"?>
<packageSources>
<clear />
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" />
<add key="azure" value="https://www.myget.org/F/azureadwebstacknightly/" />
</packageSources> |
Looks like a duplicate of #1302 Also reported on Twitter: https://twitter.com/devlead/status/684305178342731776 |
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 (both nuget.exe and xplat). The error should be meaningful and point to the filename/file path and location in the file. This should work both for the scenario where you pass in a -configFile or the config file is on disk, see #1302 for another repro scenario. |
fixed NuGet/Home#2158 and NuGet/Home#1567 fixed NuGet/Home#2197
fixed NuGet/Home#2158 and NuGet/Home#1567 fixed NuGet/Home#2197
it's fixed |
example:
Create a console app
install jquery
Clean the packages folder
Drop the following content into a local nuget.config
run nuget.exe restore consoleapp.sln
Expected
Fail or warn
Actual
The invalid config is ignored and restore proceeds
Why does it matter?
Imaging the config file was pointing to a different repository, but it had a flaw where the XML was invalid. The restore will bring down incorrect packages or fail with a warning that the packages don't exist.
The text was updated successfully, but these errors were encountered: