Skip to content
Closed
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions .claude-plugin/marketplace.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"name": "dotnet-maui-skills",
"description": "Official Marketplace for .NET MAUI development - C#, XAML, cross-platform mobile (iOS, Android) and desktop (MacCatalyst, Windows) apps",
"owner": {
"name": "Microsoft",
"url": "https://github.com/dotnet/maui"
},
"repository": "https://github.com/dotnet/maui",
"plugins": [
{
"name": "dotnet-maui-skills",
"source": "./",
"version": "1.0.0",
"description": ".NET MAUI development toolkit with specialized skills agents covering C#, XAML, MVVM, UI Testing, performance optimization, and cross-platform best practices."
}
]
}
16 changes: 16 additions & 0 deletions .claude-plugin/plugin.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"name": "dotnet-maui-skills",
"version": "1.0.0",
"description": ".NET MAUI development toolkit with specialized skills agents covering C#, XAML, MVVM, UI Testing, performance optimization, and cross-platform best practices.",
"author": {
"name": "Microsoft",
"url": "https://github.com/dotnet/maui"
},
"repository": "https://github.com/dotnet/maui",
"skills": [
"./.claude/skills/dotnet-workload-info",
"./.claude/skills/maui-doctor"
],
"agents": [
]
}
149 changes: 149 additions & 0 deletions .claude/skills/dotnet-workload-info/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,149 @@
---
name: dotnet-workload-info
description: Discover .NET SDK versions, workload sets, manifest versions, and workload dependencies (Xcode, JDK, Android SDK) from live NuGet APIs. Use when asked about: .NET SDK requirements/versions, workload set versions, workload manifest versions, Xcode version requirements, JDK version requirements, Android SDK packages, or MAUI NuGet package versions. Triggers on questions like "What Xcode is required for .NET 10?" or "What's the latest workload set?"
---

# .NET Workload Info Discovery

Query live NuGet APIs to discover authoritative .NET SDK versions, workload sets, and dependency requirements.

## Inputs

| Parameter | Required | Example | Notes |
|-----------|----------|---------|-------|
| dotnetVersion | yes | 9.0, 10.0 | Major.minor format |
| prerelease | no | true/false | Default false |
| workload | no | ios, android, maui | Alias or full id |

## Workload Aliases

| Alias | Full ID |
|-------|---------|
| ios | microsoft.net.sdk.ios |
| android | microsoft.net.sdk.android |
| maccatalyst | microsoft.net.sdk.maccatalyst |
| macos | microsoft.net.sdk.macos |
| tvos | microsoft.net.sdk.tvos |
| maui | microsoft.net.sdk.maui |

---

## Discovery Process

### Step 1: Get Latest SDK Version

```bash
curl -s "https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/releases-index.json" | \
jq '.["releases-index"][] | select(.["channel-version"]=="{MAJOR}.0")'
```

Extract `latest-sdk` and derive SDK band:
- `10.0.102` → band `10.0.100` (hundreds digit)
- `10.0.205` → band `10.0.200`

### Step 2: Find Workload Set Package

```bash
curl -s "https://azuresearch-usnc.nuget.org/query?q=Microsoft.NET.Workloads.{MAJOR}.0&prerelease=false&semVerLevel=2.0.0"
```

Filter: Match `Microsoft.NET.Workloads.{major}.{band}`, exclude `.Msi.*`, pick highest version.

Comment on lines +50 to +51

Copilot AI Jan 29, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The workload set package naming convention shows packages like "Microsoft.NET.Workloads.10.0.100" but the example shows searching with "Microsoft.NET.Workloads.10.0" (without the band). While this works for the search, it might confuse readers. Consider clarifying that the search term is intentionally broader to find all band variants, then filtered to the specific band.

Suggested change
Filter: Match `Microsoft.NET.Workloads.{major}.{band}`, exclude `.Msi.*`, pick highest version.
This query intentionally searches for `Microsoft.NET.Workloads.{MAJOR}.0` (without the band digit) so that all band variants (for example, `Microsoft.NET.Workloads.10.0.100`, `Microsoft.NET.Workloads.10.0.200`) are returned in a single call.
Filter: From those results, select packages whose ID starts with `Microsoft.NET.Workloads.{band}`, exclude `.Msi.*`, then pick the highest version.

Copilot uses AI. Check for mistakes.
**Version conversion**: NuGet `10.102.0` → CLI `10.0.102` (swap middle segments)

Copilot AI Jan 29, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The version conversion explanation "swap middle segments" is imprecise. The conversion from NuGet version "10.102.0" to CLI version "10.0.102" isn't simply swapping middle segments - it's inserting a ".0" and rearranging. The actual transformation is: take first segment, append ".0.", then append second segment. Consider using the more precise formula shown in workload-dependencies-discovery.md: parts[0] + ".0." + parts[1]

Suggested change
**Version conversion**: NuGet `10.102.0` → CLI `10.0.102` (swap middle segments)
**Version conversion**: NuGet `10.102.0` → CLI `10.0.102` (CLI = `parts[0] + ".0." + parts[1]`, i.e., NuGet `major.band.patch` → CLI `major.0.band`)

Copilot uses AI. Check for mistakes.

### Step 3: Download Workload Set Manifest

```bash
curl -o workloadset.nupkg "https://api.nuget.org/v3-flatcontainer/microsoft.net.workloads.{band}/{version}/microsoft.net.workloads.{band}.{version}.nupkg"
unzip -p workloadset.nupkg data/microsoft.net.workloads.workloadset.json
```
Comment on lines +56 to +59

Copilot AI Jan 29, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The curl command for downloading the workload set uses curly brace placeholders "{band}" and "{version}" which won't be expanded by the shell. These should be either: 1) replaced with actual example values, 2) changed to shell variable syntax ($band, $version), or 3) clearly marked as placeholders requiring manual substitution. The same issue appears in the Step 4 curl command.

Copilot uses AI. Check for mistakes.

Format: `"{workload_id}": "{manifestVersion}/{sdkBand}"`

### Step 4: Download Workload Manifest

Build package id: `{WorkloadId}.Manifest-{sdkBand}` (e.g., `Microsoft.NET.Sdk.iOS.Manifest-10.0.100`)

```bash
curl -o manifest.nupkg "https://api.nuget.org/v3-flatcontainer/{packageid}/{version}/{packageid}.{version}.nupkg"
unzip -p manifest.nupkg data/WorkloadDependencies.json
```

### Step 5: Parse Dependencies

**Android** (`microsoft.net.sdk.android`):
```json
{
"jdk": { "version": "[17.0,22.0)", "recommendedVersion": "17.0.14" },
"androidsdk": {
"packages": ["build-tools;35.0.0", "platform-tools", "platforms;android-35"],
"apiLevel": "35", "buildToolsVersion": "35.0.0"
}
}
```

**iOS/macOS** (`microsoft.net.sdk.ios`):
```json
{
"xcode": { "version": "[26.2,)", "recommendedVersion": "26.2" },
"sdk": { "version": "26.2" }
}
```

**Version ranges**: `[17.0,22.0)` = >=17.0 AND <22.0; `[26.2,)` = >=26.2

---

## MAUI NuGet Packages

MAUI packages may be newer than workload versions. Query for latest:

```bash
curl -s "https://azuresearch-usnc.nuget.org/query?q=packageid:Microsoft.Maui.Controls&prerelease=false" | \
jq '.data[0].versions | map(select(.version | startswith("{MAJOR}."))) | last'
```

Key packages: `Microsoft.Maui.Controls`, `Microsoft.Maui.Essentials`, `Microsoft.Maui.Graphics`

To use newer version than workload:
```xml
<PackageReference Include="Microsoft.Maui.Controls" Version="10.0.30" />
```

---

## Output Format

```json
{
"dotnetVersion": "10.0",
"latestSdk": "10.0.102",
"sdkBand": "10.0.100",
"workloadSet": { "packageId": "...", "nugetVersion": "10.102.0", "cliVersion": "10.0.102" },
"workloads": [{
"workloadId": "microsoft.net.sdk.ios",
"manifestVersion": "26.2.10191",
"sdkBand": "10.0.100",
"dependencies": { "xcode": { "versionRange": "[26.2,)", "recommendedVersion": "26.2" } }
}],
"mauiNugets": [{ "packageId": "Microsoft.Maui.Controls", "latestVersion": "10.0.30" }]
}
```

---

## Error Handling

- No results → retry with `prerelease=true`
- Missing WorkloadDependencies.json → report explicitly
- Missing dependency key → note which keys absent

## Best Practices

- ALWAYS fetch live data; never hardcode versions
- ALWAYS include sdkBand with manifest versions
- Show exact URLs used for transparency

## Reference

See `references/workload-discovery-process.md` for detailed NuGet API documentation and complete examples.
Loading
Loading