Skip to content

Commit

Permalink
Add simple nuget.config to avoid lots of package management warnings (m…
Browse files Browse the repository at this point in the history
…icrosoft#1301)

Otherwise, someone with multiple package sources defined gets dozens of
warnings like the following when building the repo:
```
warning NU1507: There are 4 package sources defined in your configuration. When using central package management, please map your packa
ge sources with package source mapping (https://aka.ms/nuget-package-source-mapping) or specify a single package source. The following sources are defined: ...
```
  • Loading branch information
stephentoub authored Jun 2, 2023
1 parent fa67b4c commit 5c6a605
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ dotnet/.config
*.user
*.userosscache
*.sln.docstates
nuget.config

# User-specific files (MonoDevelop/Xamarin Studio)
*.userprefs
Expand Down
15 changes: 15 additions & 0 deletions nuget.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>

<packageSources>
<clear />
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" />
</packageSources>

<packageSourceMapping>
<packageSource key="nuget.org">
<package pattern="*" />
</packageSource>
</packageSourceMapping>

</configuration>

0 comments on commit 5c6a605

Please sign in to comment.