Search code examples
azureazure-devopsazure-artifacts

why azure artifacts include all reference 3rd packages


I have two packages (A & B)

  1. package-B reference package-A
  2. package-A reference some 3rd packages from nuget

When I publish the package-B to Azure Artifacts , why all 3rd packages from nuget are Also publish to the Azure Artifacts , but if I just publish package-A to the Azure Artifacts , that just have package-A

enter image description here


Solution

  • You have the 'Upstream sources' setting enabled for this artifacts feed:

    Upstream sources enabled

    Microsoft Docs on Upstream sources states:

    Upstream sources enable you to use a single feed to store both the packages you produce and the packages you consume from "remote feeds": both public package managers (npmjs.com, NuGet.org, Maven Central, and PyPI) and Artifacts feeds. Once you've enabled an upstream source, any user connected to your feed can install a package from the remote feed, and your feed will save a copy.

    You can remove upstream sources like this:

    • Go to the feed in Azure DevOps
    • Click the gear-icon on the top right
    • Open the right-most tab Upstream sources
    • Remove any upstream sources you might have