Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

The specified source 'MySource' is invalid

Tags:

nuget

I am trying to push packages to the VSTS package manager from the command line like this

nuget.exe push -Source "MySource" -ApiKey VSTS *.nupkg

But I am getting the following error

The specified source 'MySource' is invalid. Please provide a valid source.

Event though the source exists.

Any idea why it doesn´t recognize MySource?

I am using TFS2018.

This used to work initially and I pushed multiple packages. I also tried removing the source and creating a new one but the problem persists. Any help suggestions appreciated.

like image 809
doorman Avatar asked Dec 12 '17 14:12

doorman


2 Answers

In my case it was not letting me use the feed because of having it disabled in the VS 2019.
Just go to the VisualStudio and from the Tools menu select Nuget Package Manager and then Package Manager settings

enter image description here

and then from the opened Dialog, select Package Sources and in the list of sources, check the one that you want to enable.

enter image description here

like image 95
Dr TJ Avatar answered Sep 20 '22 15:09

Dr TJ


I forgot to add the source using the following command:

nuget.exe sources Add -Name "MySource" -Source <url>
like image 34
doorman Avatar answered Sep 17 '22 15:09

doorman