Skip to content

Add dotnet target framework badge#11949

Draft
LuxologyGG wants to merge 1 commit into
badges:masterfrom
LuxologyGG:feat/auto-badge-issue-6934
Draft

Add dotnet target framework badge#11949
LuxologyGG wants to merge 1 commit into
badges:masterfrom
LuxologyGG:feat/auto-badge-issue-6934

Conversation

@LuxologyGG

@LuxologyGG LuxologyGG commented Jun 22, 2026

Copy link
Copy Markdown

Summary

Implements a new platform-support badge for .NET target frameworks, addressing #6934.

Note: This PR remains in draft while earlier open PRs are finalized. PRs #11938 (Buildbot) and #11936 (MacPorts) have been updated with review feedback and rebased onto current master.

Badge routes

  • /dotnet/v/:packageName — target frameworks for the latest stable NuGet package version
  • /dotnet/vpre/:packageName — target frameworks for the latest version including prereleases

Example

https://img.shields.io/dotnet/v/Humanizer.Core

Shows supported target frameworks (e.g. net48 | net8.0 | netstandard2.0) from the NuGet registration API dependency groups.

Implementation notes

  • Fetches package metadata from the NuGet registration5-gz-semver2 API
  • Normalizes framework monikers (e.g. .NETFramework4.8net48) for consistent display
  • Handles dependency groups with no targetFramework as all, per NuGet API semantics
  • Follows the pipe-separated display pattern used by other platform-support badges (e.g. PyPI pyversions)

Tests

  • Unit tests in services/dotnet/dotnet.service.spec.js (17 passing)
  • Integration tests in services/dotnet/dotnet.tester.js (4 passing)
  • npm run lint (0 errors)

Closes #6934

@github-actions

github-actions Bot commented Jun 22, 2026

Copy link
Copy Markdown
Contributor
Warnings
⚠️

This PR modified service code.
Please run tests by including affected services in the pull request title.

Messages
📖 ✨ Thanks for your contribution to Shields, @LuxologyGG!

Generated by 🚫 dangerJS against f10e20d

@LitoMore

Copy link
Copy Markdown
Member

@LuxologyGG Can you go back and take a look at the PRs you created earlier before creating more?

@LuxologyGG

Copy link
Copy Markdown
Author

@LuxologyGG Can you go back and take a look at the PRs you created earlier before creating more?

Sorry about that, pausing new PRs now. Will clean up the existing ones first.

Implement a platform-support badge that reads .NET target frameworks from
the NuGet registration API for a given package. Supports stable (v) and
prerelease (vpre) version selection, following the pipe-separated display
pattern used by other platform-support badges.
@LuxologyGG

Copy link
Copy Markdown
Author

I have addressed review feedback on the earlier open PRs:

This PR has been rebased onto current master and remains in draft until the earlier PRs are reviewed. All tests pass locally (npm run lint, npm run test:core -- --grep "NET service", npm run test:services -- --grep Dotnet).

@cursor cursor Bot force-pushed the feat/auto-badge-issue-6934 branch from 2cd77cc to f10e20d Compare June 23, 2026 20:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

Badge request: dotnet version

3 participants