How to disable a Nuget Feed in a .NET project

Most of us use private Feeds in Nuget for storing our Nuget Packages. However, since some projects might have other security restrictions that others, it is possible that we want to disable some Feeds in our project, so that we do not have them as references.

To do this “black-listing” of Feeds you can use the following configuration:

The new Nuget.Config file should now look like this:

<?xml version="1.0" encoding="utf-8"?>
        <add key="XXXX" value="true" />
        ... Other packageSources you do NOT want
    <add key="" value="" protocolVersion="3" />
    ... Other packageSources you want
  ... Remaining configuration
comments powered by Disqus