Skip to content

Latest commit

 

History

History
32 lines (23 loc) · 1.31 KB

File metadata and controls

32 lines (23 loc) · 1.31 KB
title description author ms.author ms.date ms.topic f1_keywords
NuGet Warning NU1507
NU1507 warning code
jeffkl
jeffkl
09/01/2022
reference
NU1507

NuGet Warning NU1507

Scenario 1

There are 2 package sources defined in your configuration. When using central package management, please map your package sources with package source mapping (https://aka.ms/nuget-package-source-mapping) or specify a single package source. The following sources are defined: https://api.nuget.org/v3/index.json, https://contoso.myget.org/F/development/.

Issue

When using NuGet's central package management (CPM), it is highly recommended that you also use Package Source Mapping. This can help safeguard your software supply chain is crucial if you use a mix of public and private package sources. Visit https://aka.ms/nuget-package-source-mapping to learn more about how package source mapping works.

Solution

Onboard to Package Source Mapping if you have more than one NuGet feed configured when using central package management. You can visit https://aka.ms/nuget-package-source-mapping for more details.

If you are unable to onboard to Package Source Mapping but want to use central package management, can suppress the warning:

<PropertyGroup>
  <NoWarn>$(NoWarn);NU1507</NoWarn>
</PropertyGroup>