How can I remove the official NuGet feed packages source

Topics: Ecosystem, General
Dec 18, 2012 at 3:10 PM

I'm working in organization that is not opened to the web
and need to include my local feeds only
I managed to add my local feed via the NuGet.config in the %AppData%
However I can't remove the default official feed
How can i remove it permanently?

Thanks

Dec 20, 2012 at 4:53 AM

Hello Alon,

You can't completely remove the default feed, but you can disable it through Visual Studio's Package Manager Options dialog.  To do this:

  1. Launch Visual Studio and open Tools -> Library Package Manager -> Pakcage Manager Settings.
  2. In the Options window that appears, switch to "Package Sources" (under Pakcage Manager in the treeview at left).
  3. Uncheck the checkbox next to NuGet Offical Package Source.
  4. Click OK to apply your settings.

After you do this, the offical feed will no longer appear in dropdowns, and will no longer be automatically queried.

HTH,
Clay

Dec 20, 2012 at 9:21 PM

You can modify the code to do so.
I think that a tool shouldn't enforce one repository or another. 

Dec 21, 2012 at 7:49 AM

NuGet doesn't enforce any repository. If you don't want to use the official NuGet feed, simply disable it as Clay describes above. Disabling a feed is equivalent to deleting it. The reason we didn't allow you to delete NuGet feed is that when people ever want to add it back, they don't remember the url.

Dec 21, 2012 at 7:36 PM
Edited Dec 21, 2012 at 7:37 PM

Some organizations have no access to the web so the official feed is irrelevant and will be irrelevant.
Their feed is a local intranet feed and they put some CTO approved packages in it.
They also want to give their users version that doesn't require any further manual operations.
These are completly valid reasonable reasons.

 

Dec 21, 2012 at 7:41 PM

As I said, if you don't need the official feed, just disable it. How hard can it be to open the Options dialog, and uncheck a checkbox?

Dec 21, 2012 at 11:54 PM

How hard would it be to make sure that everyone on a team of 50 developers unchecks a checkbox?  What about a company of 500?

Kind of hard, I think.  I think what is being asked for is a way to modify the feed settings globally.  However, I think this is possible through the packageSources section of NuGet.config, as described here: http://docs.nuget.org/docs/release-notes/nuget-2.1

Dec 22, 2012 at 6:33 AM

Saying so is like saying it's hard to install VS in a company of 500.

Dec 22, 2012 at 7:13 AM
Edited Dec 22, 2012 at 7:13 AM

Not true. Installing VS is an Image so it's an automatic process. You are talking about manual setting.
Let's ask it differently - Is nuget.config is read on run time or compile time as a part of the build? 
If it's runtime I can wrap this in installer and plant it for the users... 

Dec 24, 2012 at 5:39 PM

The best would be to specify the feeds/packageSources in the project under source control. Some sort of local nuget.config.

On Dec 22, 2012 8:13 AM, "shkup" <notifications@codeplex.com> wrote:

From: shkup

Not true. Installing VS is an Image so it's an automatic process. You aree talking about manual setting.
Let's ask it differently - Is nuget.config is read on run time or compile time as a part of the build?
If it's runtime I can wrap this in installer and plant it for the users...

Read the full discussion online.

To add a post to this discussion, reply to this email (nuget@discussions.codeplex.com)

To start a new discussion for this project, email nuget@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe or change your settings on codePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at codeplex.com