Token导航 LogoToken导航

Agent Skill · 开发

dotnet-version-upgrade(点网版本升级)

dotnet-version-upgrade 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

dotnet-version-upgrade 是开发类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为需要联网;许可证信息还不明确,第三方扫描已通过,按安装量在开发类的 21,746 个 Skill 里排第 17,004。

总安装 447周安装 19GitHub Stars 16下载 157核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
unknown

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:dotnet-version-upgrade(点网版本升级)
来源仓库:https://github.com/wshaddix/dotnet-skills
仓库路径:skills/dotnet-version-upgrade
安装命令:
npx skills add https://github.com/wshaddix/dotnet-skills --skill dotnet-version-upgrade
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/wshaddix/dotnet-skills --skill dotnet-version-upgrade

这个 Skill 是做什么的

开发类 Skill 面向写代码、改代码和排查问题,一般会读写仓库文件,部分还会执行构建或测试命令。

提供 .NET 版本升级的综合规划与执行指导。支持 TFM 迁移、包更新和破坏性变更检测。包含测试验证与弃用 API 替换建议。适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。适用于 LTS 升级或多版本并行维护。

dotnet-version-upgrade 属于开发类 Skill,可作为该场景下的辅助能力补充。

来源仓库内路径:skills/dotnet-version-upgrade

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/wshaddix/dotnet-skills --skill dotnet-version-…;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要需要联网,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

dotnet-version-upgrade 怎么安装?

在终端执行 npx skills add https://github.com/wshaddix/dotnet-skills --skill dotnet-version-upgrade。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

dotnet-version-upgrade 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

dotnet-version-upgrade 需要什么权限?

权限级别是需要联网。该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

dotnet-version-upgrade 是免费的吗?

公开资料没有标注明确许可证,收费和商用限制都无法确认。正式使用前请到来源仓库核对授权说明。

dotnet-version-upgrade 用的人多吗?

公开数据是累计安装 447 次,近一周安装 19 次,下载 157 次,GitHub 16 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

dotnet-version-upgrade 安全吗?

第三方扫描结果为通过,但这只覆盖已知的静态检查项,不能替代自己读一遍源码和安装命令。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。
  • 第三方扫描已通过,常见的高风险行为没有命中。

先想清楚的地方

  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理开发类任务、又不想每次都手写提示词的人。

不太适合

  • 需要明确授权才能用到公司项目里的场景。
  • 需要厂商级技术支持和 SLA 的生产系统。

开发类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
skill-vetter

技能审查员 · OpenClaw

8,779,018986操作浏览器MIT-0通过
ontology

本体论 · OpenClaw

6,636,960576只读MIT-0通过
entra-app-registration

内部应用程序注册 · Codex、Claude

6,631,872764接触敏感数据未明确通过
entra-app-registration

内部应用程序注册 · Codex、Claude

3,757,680201接触敏感数据未明确通过
nano-banana-pro

纳米香蕉专业版 · OpenClaw

3,526,898364接触敏感数据MIT-0有提醒
dotnet-version-upgrade

点网版本升级 · 本页

44716需要联网未明确通过

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

dotnet-version-upgrade

Comprehensive guide for.NET version upgrade planning and execution. This skill consumes the structured output from [skill:dotnet-version-detection] (current TFM, SDK version, preview flags) and provides actionable upgrade guidance based on three defined upgrade lanes. Covers TFM migration, package updates, breaking change detection, deprecated API replacement, and test validation.

Out of scope: TFM detection logic (owned by [skill:dotnet-version-detection]), multi-targeting project setup and polyfill strategies (see [skill:dotnet-multi-targeting]), cloud deployment configuration, CI/CD pipeline changes.

Cross-references: [skill:dotnet-version-detection] for TFM resolution and version matrix, [skill:dotnet-multi-targeting] for polyfill-first multi-targeting strategies when maintaining backward compatibility during migration.


Upgrade Lanes

Select the appropriate upgrade lane based on project requirements and ecosystem constraints.

LanePathUse CaseRisk Level
Production (default)net8.0 -> net10.0LTS-to-LTS, recommended for most appsLow -- both endpoints are LTS with long support windows
Staged productionnet8.0 -> net9.0 -> net10.0When ecosystem dependencies require incremental migrationMedium -- intermediate STS version has shorter support
Experimentalnet10.0 -> net11.0 (preview)Non-production exploration of upcoming featuresHigh -- preview APIs may change or be removed

Lane Selection Decision Flow

  1. Are all your NuGet dependencies available on the target LTS? Yes -> Production lane (direct LTS-to-LTS).
  2. Do any dependencies require an intermediate version? Yes -> Staged production lane.
  3. Are you exploring preview features for R&D or proof-of-concept? Yes -> Experimental lane.

Production Lane: LTS-to-LTS (net8.0 -> net10.0)

The recommended default upgrade path. Both.NET 8 and.NET 10 are Long-Term Support releases, providing a stable migration with well-documented breaking changes.

Upgrade Checklist

Step 1: Update TFM in project files

<!-- Before -->
<PropertyGroup>
  <TargetFramework>net8.0</TargetFramework>
</PropertyGroup>

<!-- After -->
<PropertyGroup>
  <TargetFramework>net10.0</TargetFramework>
</PropertyGroup>

For solutions with shared properties:

<!-- Directory.Build.props -->
<PropertyGroup>
  <TargetFramework>net10.0</TargetFramework>
</PropertyGroup>

Step 2: Update global.json SDK version

{
  "sdk": {
    "version": "10.0.100",
    "rollForward": "latestFeature"
  }
}

Step 3: Update NuGet packages

Use dotnet-outdated to detect stale packages and identify which packages need updates for TFM compatibility:

# Install dotnet-outdated as a global tool
dotnet tool install -g dotnet-outdated-tool

# Check for outdated packages across the solution
dotnet outdated

# Check a specific project
dotnet outdated MyProject/MyProject.csproj

# Auto-upgrade to latest stable versions
dotnet outdated --upgrade

# Upgrade only to the latest minor/patch (safer)
dotnet outdated --upgrade --version-lock major

For ASP.NET Core shared framework packages, update version references to match the target TFM:

<ItemGroup>
  <!-- Match package version to TFM major version -->
  <PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" Version="10.*" />
  <PackageReference Include="Microsoft.Extensions.Hosting" Version="10.*" />
</ItemGroup>

Step 4: Review breaking changes

# Build to surface warnings and errors
dotnet build --warnaserror

# Run analyzers for deprecated API usage
dotnet build /p:TreatWarningsAsErrors=true

Review the official breaking change lists:

Step 5: Replace deprecated APIs

Common replacements when moving from net8.0 to net10.0:

DeprecatedReplacementNotes
BinaryFormatterSystem.Text.Json or MessagePackBinaryFormatter throws PlatformNotSupportedException starting in net9.0
Thread.Abort()Cooperative cancellation via CancellationTokenThread.Abort() throws PlatformNotSupportedException
WebRequest / HttpWebRequestHttpClient via IHttpClientFactoryObsolete (SYSLIB0014), migrate to HttpClient

Recommended modernizations (not deprecated, but improve performance and AOT readiness):

PatternImprovementNotes
Regex without source gen[GeneratedRegex] attributeSource-generated regex is faster and AOT-compatible

Step 6: Run tests and validate

# Run full test suite
dotnet test --configuration Release

# Enable trim/AOT analyzers to surface compatibility warnings without publishing
dotnet build --configuration Release /p:EnableTrimAnalyzer=true /p:EnableAotAnalyzer=true

.NET Upgrade Assistant

The.NET Upgrade Assistant automates parts of the migration process. It is most useful for large solutions with many projects.

# Install as a global tool
dotnet tool install -g upgrade-assistant

# Analyze a project (non-destructive, reports recommendations)
upgrade-assistant analyze MyProject/MyProject.csproj

# Perform the upgrade (modifies files)
upgrade-assistant upgrade MyProject/MyProject.csproj

When to use Upgrade Assistant:

  • Large solutions with many projects and complex dependency graphs
  • Legacy.NET Framework-to-modern-.NET migrations
  • When you need a comprehensive dependency analysis before committing to an upgrade

Limitations:

  • May not handle all breaking changes -- manual review is still required
  • Custom MSBuild extensions and third-party build tooling may need manual adjustment
  • Does not update runtime behavior differences -- test coverage is essential
  • Not needed for small projects with few dependencies (manual TFM update is simpler)

Staged Production Lane: net8.0 -> net9.0 -> net10.0

Use the staged lane when direct LTS-to-LTS migration is blocked by ecosystem constraints. Staging through.NET 9 (STS) provides an incremental migration path.

When to Stage Through.NET 9

  • Third-party package compatibility: A critical dependency only supports net9.0 (not yet net10.0) and you need to upgrade away from net8.0 now.
  • Large breaking change surface: The combined breaking changes from net8.0 to net10.0 are too many to address at once; incremental steps reduce risk.
  • Incremental validation: You want to validate behavior changes at each step before proceeding.

.NET 9 Context

.NET 9 is a Standard Term Support (STS) release:

  • GA: November 2024
  • End of support: May 2026 (18 months from GA)
  • C# version: C# 13

Because.NET 9 is approaching end of support, do not stop at net9.0. Plan the second hop (net9.0 -> net10.0) before starting the first.

Staged Upgrade Checklist

Hop 1: net8.0 -> net9.0

  1. Update TFM to net9.0 in.csproj / Directory.Build.props
  2. Update global.json to SDK 9.0.xxx
  3. Run dotnet outdated --upgrade for package updates
  4. Review .NET 9 breaking changes
  5. Replace deprecated APIs flagged by SYSLIB diagnostics and CS0618 warnings (e.g., BinaryFormatter -> System.Text.Json)
  6. Run dotnet test --configuration Release to validate
  7. Deploy to staging environment, validate in production with monitoring

Hop 2: net9.0 -> net10.0

  1. Update TFM to net10.0 in.csproj / Directory.Build.props
  2. Update global.json to SDK 10.0.xxx
  3. Run dotnet outdated --upgrade again
  4. Review .NET 10 breaking changes
  5. Replace any additional deprecated APIs introduced between net9.0 and net10.0
  6. Run dotnet test --configuration Release to validate
  7. Deploy to staging, remove any net9.0-specific workarounds

Timeline guidance: Complete both hops within the.NET 9 support window (before May 2026). Running production workloads on an unsupported STS release exposes you to unpatched security vulnerabilities.


Experimental Lane: net10.0 -> net11.0 (Preview)

For non-production exploration of upcoming features..NET 11 is currently in preview and its APIs may change or be removed before GA.

Guardrails

  • Non-production only. Do not deploy preview-targeted code to production environments.
  • Separate branch or project. Isolate experimental work from production codebases.
  • Pin the preview SDK. Use global.json to lock the specific preview SDK version to avoid silent behavior changes between previews.
  • Expect breaking changes between previews. APIs marked [RequiresPreviewFeatures] can change shape between preview releases.

Enabling Preview Features

Step 1: Install the preview SDK

# Verify installed SDKs
dotnet --list-sdks

# Example: 11.0.100-preview.1.xxxxx should appear

Step 2: Pin to preview SDK in global.json

{
  "sdk": {
    "version": "11.0.100-preview.1.25120.13",
    "rollForward": "disable"
  }
}

Use "rollForward": "disable" to prevent automatic SDK version advancement between previews.

Step 3: Set TFM and enable preview features

<PropertyGroup>
  <TargetFramework>net11.0</TargetFramework>
  <LangVersion>preview</LangVersion>
  <EnablePreviewFeatures>true</EnablePreviewFeatures>
</PropertyGroup>

Step 4: Enable runtime-async (optional)

Runtime-async moves async/await from compiler-generated state machines to runtime-level execution, reducing allocations and improving performance for async-heavy workloads:

<PropertyGroup>
  <TargetFramework>net11.0</TargetFramework>
  <LangVersion>preview</LangVersion>
  <EnablePreviewFeatures>true</EnablePreviewFeatures>
  <Features>$(Features);runtime-async=on</Features>
</PropertyGroup>

Runtime-async requires both EnablePreviewFeatures and the Features flag. It is experimental and may change significantly before GA.

Experimental Upgrade Checklist

  1. Install the.NET 11 preview SDK and pin it in global.json with "rollForward": "disable"
  2. Update TFM to net11.0 and set <LangVersion>preview</LangVersion> + <EnablePreviewFeatures>true</EnablePreviewFeatures>
  3. Run dotnet outdated to check package compatibility with the preview TFM
  4. Build and review warnings -- preview SDKs may flag new SYSLIB diagnostics or CA2252 (preview feature usage)
  5. Replace any deprecated APIs surfaced by the new analyzer version
  6. Run dotnet test to validate -- expect some third-party packages to lack preview TFM support
  7. Document findings for future production upgrade planning

What to Explore in.NET 11 Preview

FeatureAreaNotes
Runtime-asyncPerformanceAsync/await at runtime level; requires opt-in
Zstandard compressionI/OSystem.IO.Compression.Zstandard; 2-7x faster than Brotli
BFloat16NumericsSystem.Numerics.BFloat16 for AI/ML workloads
Happy EyeballsNetworkingConnectAlgorithm.Parallel for dual-stack IPv4/IPv6
C# 15 preview featuresLanguageCollection expression arguments (with() syntax)
CoreCLR on WASMRuntimeExperimental alternative to Mono for Blazor WASM

Breaking Change Detection

Systematic approaches to identify and resolve breaking changes during any upgrade.

Build-Time Detection

# Clean build to surface all warnings (not just incremental)
dotnet clean && dotnet build --no-incremental

# Treat warnings as errors to catch deprecation notices
dotnet build /p:TreatWarningsAsErrors=true

# List specific obsolete API warnings
dotnet build 2>&1 | grep -E "CS0618|CS0612"
  • CS0618: Use of an [Obsolete] member with a message
  • CS0612: Use of an [Obsolete] member without a message
  • CS8073: Expression always evaluates to the same value (type behavior change)

Analyzer Diagnostics

Enable.NET analyzers to detect additional issues:

<PropertyGroup>
  <EnableNETAnalyzers>true</EnableNETAnalyzers>
  <AnalysisLevel>latest-recommended</AnalysisLevel>
</PropertyGroup>

Key analyzer categories for upgrades:

  • CA1422: Platform compatibility (API removed on target platform)
  • CA1416: Platform-specific API usage without guards
  • CA2252: Opting into preview features
  • SYSLIB0XXX: Obsolete system API diagnostics (e.g., SYSLIB0011 for BinaryFormatter)

API Diff Tools

For library authors, use API compatibility tools to validate public surface changes:

# Package validation detects breaking changes against a baseline
dotnet pack /p:EnablePackageValidation=true /p:PackageValidationBaselineVersion=1.0.0

# Standalone API comparison
dotnet tool install -g Microsoft.DotNet.ApiCompat.Tool
apicompat --left-assembly bin/Release/net8.0/MyLib.dll \
          --right-assembly bin/Release/net10.0/MyLib.dll

See [skill:dotnet-multi-targeting] for detailed API compatibility validation workflows including suppression files and CI integration.


Package Update Strategies

dotnet-outdated

The dotnet-outdated tool provides a comprehensive view of package staleness:

# Install
dotnet tool install -g dotnet-outdated-tool

# Show all outdated packages with current vs latest versions
dotnet outdated

# Lock major version, show only minor/patch updates (safer incremental upgrades)
dotnet outdated --version-lock major

# Auto-upgrade with version locking to avoid unexpected major bumps
dotnet outdated --upgrade --version-lock major

# Output as JSON for CI integration
dotnet outdated --output-format json

Central Package Management

For solutions using Central Package Management (Directory.Packages.props), update versions centrally:

<!-- Directory.Packages.props -->
<Project>
  <PropertyGroup>
    <ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
  </PropertyGroup>

  <ItemGroup>
    <!-- Update all Microsoft.Extensions.* packages to match TFM -->
    <PackageVersion Include="Microsoft.Extensions.Hosting" Version="10.*" />
    <PackageVersion Include="Microsoft.Extensions.Http" Version="10.*" />
    <PackageVersion Include="Microsoft.Extensions.Logging" Version="10.*" />
    <!-- Third-party packages: check compatibility before upgrading -->
    <PackageVersion Include="Serilog" Version="4.*" />
  </ItemGroup>
</Project>

Directory.Packages.props resolves hierarchically upward from the project directory. In monorepo structures, verify that nested Directory.Packages.props files are not shadowing the root-level configuration.

ASP.NET Core Shared Framework Packages

ASP.NET Core shared framework packages must align their major version with the target TFM. Two valid approaches:

<ItemGroup>
  <!-- Option A: floating version — auto-resolves latest patch, convenient for upgrades -->
  <PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" Version="10.*" />

  <!-- Option B: pinned version — deterministic CI builds, update explicitly -->
  <PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" Version="10.0.1" />
</ItemGroup>

Pinned versions are recommended for deterministic CI; floating versions are useful during exploratory upgrades. Either way, the major version must match the TFM (e.g., 10.x for net10.0).


Agent Gotchas

  1. Do not skip.NET 9 without validating ecosystem compatibility. While LTS-to-LTS (net8.0 -> net10.0) is the recommended default, some third-party packages may only support net9.0 as an intermediate step. Check package compatibility before selecting a lane.
  2. Do not run production workloads on preview SDKs..NET 11 preview APIs are unstable and will change between preview releases. Isolate experimental work in separate branches or projects with pinned preview SDK versions.
  3. Do not assume.NET 9 STS has 12-month support. STS lifecycle is 18 months from GA..NET 9 GA was November 2024, so end-of-support is May 2026. Always calculate from actual GA date, not release year.
  4. Ensure ASP.NET shared framework package major versions match the TFM. Packages like Microsoft.AspNetCore.Mvc.Testing must have their major version aligned with the project TFM (e.g., 10.x for net10.0). Pin exact versions for deterministic CI or float with wildcards (e.g., 10.*) during exploratory upgrades.
  5. Do not re-implement TFM detection. This skill consumes the structured output from [skill:dotnet-version-detection]. Never parse .csproj files to determine the current version -- use the detection skill's output (TFM, C# version, SDK version, warnings).
  6. Do not treat dotnet-outdated --upgrade as a complete solution. It updates package versions but does not handle breaking API changes within those packages. Always build, test, and review changelogs after upgrading packages.
  7. Do not use "rollForward": "latestMajor" with preview SDKs. This can silently advance to a different preview version with breaking changes. Use "rollForward": "disable" for preview SDKs to maintain reproducible builds.
  8. Do not forget Directory.Packages.props hierarchy. In monorepo structures, nested Directory.Packages.props files shadow parent-level configurations. When upgrading, search upward from the project directory to find all Directory.Packages.props files that may affect package resolution.
  9. Do not ignore SYSLIB diagnostic codes during upgrade. These system-level obsolete warnings (e.g., SYSLIB0011 for BinaryFormatter, SYSLIB0014 for WebRequest) indicate APIs that will throw at runtime on newer TFMs, not just compile-time warnings.

Prerequisites

  • .NET SDK for the target TFM installed (e.g.,.NET 10 SDK for net10.0 upgrade)
  • dotnet-outdated-tool (for package staleness detection): dotnet tool install -g dotnet-outdated-tool
  • upgrade-assistant (optional, for automated migration): dotnet tool install -g upgrade-assistant
  • Output from [skill:dotnet-version-detection] (current TFM, SDK version, preview flags)

References

Last verified: 2026-02-12

平台分布

Codex

35.53%
按下载量换算56

Claude

29.21%
按下载量换算46

Cursor

19.37%
按下载量换算30

Gemini CLI

8.77%
按下载量换算14

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills