-
Notifications
You must be signed in to change notification settings - Fork 249
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
Can't remove config key using nuget.exe #8223
Comments
Was able to repro in mentioned versions and also NuGet Version: 4.4.3.5892. |
Any updates? 5.3.0 is still affected. |
Still the same with nuget version 5.3.1.6268... |
I had the same issue. For now I use the following workaround: |
@kennydv Perfect your workaround work perfectly 🥇 😄 |
Guys, please up-vote the original post in this thread, so it gains more visibility. Maybe they'll fix it sooner this way. |
Just encountered this issue too. I'm using version 5.5.1.6542. No good way to unset the config. Vote for such feature. |
This is still a problem in NuGet Version: 5.7.0.6726 |
/cc @dominoFire |
Hi. I've got the same issue with NuGet 5.9.1.11, MS Windows Server 2016 v1607 (OS build 14393.4402). |
I took some time today to look into this, and just merged a fix. Basically, the "delete" codepath didn't save to disk! @kennydv your workaround worked because the 2nd key/value caused the modified config to be written to disk (code). I tested your workaround and my PR didn't break it, but you could drop the workaround after the PR is released. Thank you all for commenting and upvoting. We'll let you know when it's planned for release. |
Details about Problem
NuGet product used: NuGet.exe
NuGet version (x.x.x.xxx): 5.0.2.5988
OS version (i.e. win10 v1607 (14393.321)): win10 v1709 (16299.1146)
Worked before? If so, with which NuGet version:
Hasn't worked since at least 4.9.3. Not sure prior to that.
Detailed repro steps so we can see the same problem
NuGet CLI config command documentation states that you can remove a key from the config file by using
nuget config -set <name>=
with no value after the =. However, this seems to have no affect on the config file.Example:
nuget config -set dependencyVersion="Highest"
New dependencyVersion key will be added to nuget.config:
Now try to remove the key:
nuget config -set dependencyVersion=
nuget.config file is unchanged, dependencyVersion key and value are still present:
Other suggested things
Also tried:
nuget config -set dependencyVersion=""
which has no affect.
nuget config -set dependencyVersion=" "
This will replace the value with a space (" "), but the key is still present in the file.
Verbose Logs
Please include verbose logs (NuGet.exe -verbosity detailed | dotnet.exe --verbosity diag | etc...)
No info in the verbose log other than version:
Sample Project
Very helpful if you can zip a project and paste into this issue!
The text was updated successfully, but these errors were encountered: