Catalog/NuGet.Config
MaddoScientisto e556d74fd1 Update NuGet source config and add packageSourceMapping
Renamed the private NuGet source from 'GitLab' to 'Nuget-GitLab-AIFotoONLUS' in CI scripts for clarity and consistency. Added a repository-level NuGet.Config with packageSourceMapping to ensure only specific private packages are restored from the GitLab feed, preventing 401 errors when restoring public packages from nuget.org.
2026-02-16 23:12:57 +01:00

30 lines
1.3 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<!--
Repository-level NuGet.Config to control which sources are queried for which
packages. This prevents the GitLab feed from being queried for all package
IDs (which causes 401 errors for packages hosted on nuget.org).
Usage:
- Keep this file in the repository root so `dotnet restore` picks it up by default.
- CI still needs to add the `GitLab` source credentials at runtime (we do this
from the pipeline using `dotnet nuget add source ...`), but the mapping below
ensures only the listed package ID patterns are requested from the GitLab feed.
-->
<configuration>
<packageSources>
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" />
<add key="Nuget-GitLab-AIFotoONLUS" value="https://gitlab.com/api/v4/projects/79509532/packages/nuget/index.json" />
</packageSources>
<!-- Map private package IDs to the GitLab source; everything else uses nuget.org -->
<packageSourceMapping>
<packageSource key="Nuget-GitLab-AIFotoONLUS">
<!-- Add patterns for your private packages hosted in GitLab -->
<package pattern="AIFotoONLUS.*" />
<package pattern="AIFotoONLUS.Core" />
</packageSource>
<packageSource key="nuget.org">
<package pattern="*" />
</packageSource>
</packageSourceMapping>
</configuration>