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 sources add does not work if nuget.config does not have proper section #1589

Closed
bigcat8828 opened this issue Oct 16, 2015 · 4 comments
Labels
Priority:3 Issues under consideration. With enough upvotes, will be reconsidered to be added to the backlog. Product:NuGet.exe NuGet.exe Triage:Investigate Type:Bug
Milestone

Comments

@bigcat8828
Copy link

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:

  1. Change the nuget.config to only including following
    <?xml version="1.0" encoding="utf-8"?> <configuration />
  2. 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.

@yishaigalatzer yishaigalatzer added this to the Client-VNext milestone Oct 16, 2015
@yishaigalatzer yishaigalatzer added Priority:3 Issues under consideration. With enough upvotes, will be reconsidered to be added to the backlog. Type:Bug labels Oct 16, 2015
@yishaigalatzer
Copy link

Thanks for reporting it, for the completeness of this report, what version of nuget.exe are you using.

@bigcat8828
Copy link
Author

This happens in both nuget 2.8 and 3.x

@harikmenon harikmenon modified the milestones: Client-VNext, Future Apr 19, 2016
@leasunhy
Copy link

leasunhy commented 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

@nkolev92
Copy link
Member

This has been long fixed now.

At the minimum 5.x has a fix for this. Closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Priority:3 Issues under consideration. With enough upvotes, will be reconsidered to be added to the backlog. Product:NuGet.exe NuGet.exe Triage:Investigate Type:Bug
Projects
None yet
Development

No branches or pull requests

7 participants