bazel-contrib / bazel-contrib/rules_dotnet

Error during NuGet download when using v2 URL and repo hosted by Artifactory

Open
#379 5 comments 0 reactions 0 assignees View on GitHub
Dominant language
Starlark
Stars
209
Forks
98
Avg merge
3h 59m
Merged PRs (30d)
14

Description

**Note**: This issue is related to #378 but not the same. It is a new issue that I foresee after a fix for #378 is released.

When using a v2 URL for the source of a package, rules_dotnet (with a fix for #378) will create a URL that conforms to the pattern "{source}/package/{id}/{version}". However, if the NuGet source is hosted by Artifactory, this URL will be invalid and you will get a 405 Method Not Allowed error. Instead, the URL would have to be of the form "{source}/Download/{id}/{version}". This poses a problem as the format of the URL appears to be hardcoded in nuget_archive.bzl.

I don't know what kind of configuration exists on the Artifactory side, maybe it's possible to configure that token in the URL to match the convention of the public NuGet URL, but this hasn't been a problem for any other NuGet client tooling including Paket.

Contributor guide

Open the contributing guide

Research direction

Start by reading nuget_archive.bzl, where the NuGet download URL format is described as hardcoded. Reproduce or inspect the v2-source path for an Artifactory-hosted source and compare the expected Download URL with the current package URL; done means Artifactory downloads work without breaking public NuGet source handling.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
build-system
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.