Closed
Description
The sources add command does not add the package source into the nuget config if the nuget.config doesn’t already have both a element and an existing package source. The command output of sources add is "package sources added successfully", while there is no package source added at all.
How to repo:
- Change the nuget.config to only including following
<?xml version="1.0" encoding="utf-8"?> <configuration />
- Run nuget.exe Sources add -name {sourceName} -source {source}
3.The output is "Package Source with Name: {sourceName} added successfully."
4.Check nuget.config, no source has been added at all.
This bug is that nuget.exe fails to add the package source, while claims it added successfully.
Activity
yishaigalatzer commentedon Oct 16, 2015
Thanks for reporting it, for the completeness of this report, what version of nuget.exe are you using.
bigcat8828 commentedon Oct 16, 2015
This happens in both nuget 2.8 and 3.x
leasunhy commentedon Jun 9, 2017
Also, if no config file is present when one tries to add a package source, the adding will fail.
Running
nuget sources
before adding the source will ensure the existence of the config file to make sure the package source is added.Version:
3.5.0.1938
4 remaining items