来源信息
- 仓库
- microsoft/aitour26-BRK445-building-enterprise-ready-ai-agents-with-microsoft-foundry
- 最近来源活动
- 2026年4月20日 15:28
- 检测到的 SKILL.md 语言
- 英语
- 星标
- 74
- 分支
- 38
安装方式
默认使用会先检查来源的 Prompt;你也可以切换为直接命令,或下载本地副本。
检查来源文件
决定是否安装前,请先阅读 SKILL.md,以及 SkillsMP 当前展示的配套文件。
菜单
默认使用会先检查来源的 Prompt;你也可以切换为直接命令,或下载本地副本。
决定是否安装前,请先阅读 SKILL.md,以及 SkillsMP 当前展示的配套文件。
基于 SOC 职业分类
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/microsoft/aitour26-BRK445-building-enterprise-ready-ai-agents-with-microsoft-foundry --skill aspire-package-upgrade命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
正在显示 SKILL.md
| name | aspire-package-upgrade |
| description | Upgrading .NET Aspire packages to latest stable/preview versions |
| domain | aspire, dotnet, nuget |
| confidence | high |
| source | earned (verified via full restore+build on 13.2.2 upgrade, 2026-04-20) |
.NET Aspire releases frequently, and Aspire packages should be kept aligned with the installed Aspire CLI version. This skill documents the process for discovering latest versions, upgrading all Aspire packages together, and validating the upgrade with a build.
Key Principle: Aspire.* packages should track the same major.minor version (e.g., all on 13.2.x) to avoid API/behavior mismatches.
$packages = @(
'aspire.apphost.sdk',
'aspire.azure.ai.openai',
'aspire.azure.ai.inference',
'aspire.hosting.azure.aifoundry',
'aspire.hosting.azure.applicationinsights',
'aspire.hosting.azure.cognitiveservices',
'communitytoolkit.aspire.hosting.sqlite'
)
foreach ($pkg in $packages) {
$response = Invoke-RestMethod "https://api.nuget.org/v3-flatcontainer/$pkg/index.json"
# Get versions starting with desired major.minor (e.g., 13.2)
$v13 = $response.versions | Where-Object { $_ -match '^13\.2\.' } | Sort-Object -Descending
$v13stable = $v13 | Where-Object { $_ -notmatch 'preview|alpha|beta|rc' } | Select-Object -First 1
if ($v13stable) {
Write-Output "$pkg : $v13stable (stable)"
} elseif ($v13 | Select-Object -First 1) {
Write-Output "$pkg : $($v13 | Select-Object -First 1) (preview-only)"
} else {
Write-Output "$pkg : No 13.2.x versions found"
}
}
grep -rn "Aspire\." --include="*.csproj" src/
grep -rn "Aspire\.AppHost\.Sdk" --include="*.csproj" src/
Build a version table: project → current version → target version.
The SDK version in <Project Sdk="Aspire.AppHost.Sdk/X.Y.Z"> should match the Aspire CLI version.
Before:
<Project Sdk="Aspire.AppHost.Sdk/13.1.0">
After:
<Project Sdk="Aspire.AppHost.Sdk/13.2.2">
Use the edit tool to update each <PackageReference Include="Aspire.*" Version="..." /> in every .csproj under src/.
Target versions (as of 13.2.2 release):
Prefer stable where available. If only preview versions exist for a package, use the latest preview aligned with the target major.minor.
After upgrading Aspire packages, restore may fail with NU1605 (package downgrade) errors. This happens when:
Resolution: Bump the conflicting package to match the transitive dependency version.
Example (from 13.2.2 upgrade):
error NU1605: Detected package downgrade: Microsoft.Extensions.AI.Abstractions from 10.2.0 to 10.1.1.
DataService -> Aspire.Azure.AI.Inference 13.2.2-preview.1.26207.2 -> Microsoft.Extensions.AI 10.2.0 -> Microsoft.Extensions.AI.Abstractions (>= 10.2.0)
DataService -> Microsoft.Extensions.AI.Abstractions (>= 10.1.1)
Fix: Bump DataService's direct reference from 10.1.1 to 10.2.0.
dotnet restore src\ZavaAppHost\ZavaAppHost.csproj
dotnet build src\ZavaAppHost\ZavaAppHost.csproj --no-restore
Success Criteria:
On Failure:
git checkout -- src/)<PackageReference Include="Aspire.*" or CommunityToolkit.Aspire.*<Project Sdk="Aspire.AppHost.Sdk/..."> lineSome Aspire packages (especially Azure AI integrations) don't yet have stable releases. Track the latest preview version aligned with the target Aspire version (e.g., 13.2.2-preview.1.26207.2 for the 13.2.2 release).
Current preview-only packages (as of 13.2.2):
All Aspire. packages should be on the same major.minor version (e.g., all on 13.2.x).* Mixing versions (e.g., 13.1.0 and 13.2.2) can cause runtime API mismatches and is NOT supported.
dotnet build before pushingaspire --version → 13.2.2+25961cf...dotnet restore src\ZavaAppHost\ZavaAppHost.csprojdotnet build src\ZavaAppHost\ZavaAppHost.csproj --no-restore → SUCCESS (0 errors)dotnet restore completes (low-severity NU1901 warnings are OK)dotnet build completes with 0 errors