Skip to content

Pin analyzer rules link in Sdk README to release tag at pack time #3375

@MO2k4

Description

@MO2k4

Context

In #3370, the Sdk package README was updated to link to the analyzer rules index using a blob/main/ URL. As @jviau pointed out, this link can drift over time — a shipped SDK version may reference analyzer rules that were added after that version was released (or vice versa).

Proposal

Rewrite blob/main/ URLs in the README to blob/<tag-or-sha>/ at pack time so the link is a permalink matching the exact release. Two approaches discussed:

  1. MSBuild target before GenerateNuspec — rewrite URLs in a temp copy of the README. There is existing URL rewriting in RepositoryInfo.targets for SourceLink that could serve as a pattern.
  2. sed replacement in the CI pipeline — simpler, but only works in CI, not dotnet pack locally.

Option 1 would be preferred since it works in both CI and local pack.

Related

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions