Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document NU1507 #2873

Merged
merged 2 commits into from
Sep 2, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions docs/reference/errors-and-warnings/NU1507.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
---
title: NuGet Warning NU1507
description: NU1507 warning code
author: jeffkl
ms.author: jeffkl
ms.date: 09/01/2022
ms.topic: reference
f1_keywords:
- "NU1507"
---

# NuGet Warning NU1507

## Scenario 1

<pre>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/.</pre>

### 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:

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