-
Notifications
You must be signed in to change notification settings - Fork 175
Description
Describe the issue or request
When generating a C# AutoRest client, the following public feed is included in the .csproj file in order to access the Microsoft.Azure.AutoRest.CSharp package.
<RestoreAdditionalProjectSources>https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-net/nuget/v3/index.json</RestoreAdditionalProjectSources>
Previously, when requesting packages not in this feed, it returned a 404, allowing NuGet restore to fall back to the other configured feeds. Some time since the end of September, the feed now returns the below error instead. It continues to be able to successfully retrieve Microsoft.Azure.AutoRest.CSharp.
Response status code does not indicate success: 401 (Unauthorized - No local versions of package '{package name}'; please provide authentication to access versions from upstream that have not yet been saved to your feed. (DevOps Activity ID: {guid})).
This prevents the NuGet restore from completing successfully when the project requires other packages.
Workaround: apply packageSourceMapping in NuGet.Config to restrict the azure-sdk feed to only be used for Microsoft.Azure.AutoRest.CSharp.
Workaround: replicate Microsoft.Azure.AutoRest.CSharp to another accessible feed without upstream sources and remove the azure-sdk feed from the project.
Describe your ideas for solutions
Revert or further alter the settings or configuration of the azure-sdk public feed, preventing it from attempting to replicate upstream packages when a package is not found (by an unauthenticated agent?).