Multi-file
codingOfficial
Official Provider SkillView repo
Upgrade C# code to use newer C# language features. Use this skill whenever the user wants to modernize C# code to a specific language version (e.g., "upgrade to C# 12", "use latest C# features", "modernize this C# code"), apply new language features from any C# version 7.0 through 15, or when migrating a .NET project to a newer target framework and the C# language version increases. Also trigger when the user asks about what C# features are available for a given version, wants to know which mode
Files11 files
SKILL.md447 lines
Loading editor…
Install
RecommendedOne command — your agent picks it up automatically.
Select an AI agent above to see the install command.
or
Manual Install
More stepsDownload the archive and add the files to your project manually.
Skill details
Versionv1.0.0
AuthorMicrosoft
Categorycoding
Skill IDmicrosoft/upgrade-agent-plugins/plugins/upgrade-agent/extenders/upgrade-dotnet/upgrade/skills/lazy/common/modernizing-csharp-version
Files11 files
Related skills
Aspire IntegrationAdds Aspire orchestration to an existing repository for inner-loop development and optional Azure deployment readiness. Use when asked to "aspirerify a project", "add Aspire to a solution", "integrate Aspire", "set up an AppHost", "add aspire init", or "orchestrate services with Aspire". Handles CLI setup, TFM compatibility gating, inter-service communication mapping, and delegates AppHost wiring to the Aspire CLI agent skills.Aspire Version UpgradeUpgrade existing Aspire projects to a newer Aspire version. Also handles TFM upgrades — preferred when the solution contains Aspire projects, since the Aspire version drives the required TFM. Triggers for "upgrade Aspire", "update Aspire version", "move to latest Aspire", or any .NET upgrade request on a solution with Aspire artifacts.Azure Functions UpgradeUpgrade Azure Functions project from in-process model to isolated worker model. Use when user wants to migrate Azure Functions from in-proc to isolated, upgrade Functions hosting model, or modernize Azure Functions projects.Azure MigrateMigrates applications to Azure cloud services by starting an app modernization migration session. Use when user wants to migrate to Azure, start Azure migration, get help migrating an application to Azure, see Azure migration options, or start app modernization for Azure. Triggers for "migrate to Azure", "Azure migration", "move to Azure", "cloud migration", and "app modernization" requests.Branch SyncOn-demand sync of the upgrade working branch with its source branch (typically main) using merge or rebase. Detects divergence, resolves conflicts using upgrade context (prefer upgraded code in files we changed, prefer source elsewhere), validates with a build, and rolls back on any failure. Trigger phrases: "sync", "sync with main", "merge from main", "pull from main", "rebase on main", "branch sync", "catch up with source".Building ProjectsBuild tool selection and orchestration for .NET projects during modernization upgrades. Use this skill whenever the agent modifies code files, project files, packages, or configuration and needs to validate the build — which is virtually every upgrade task. Covers: choosing between `dotnet build` and `msbuild.exe`, restore strategy, targeted vs solution builds, resolving MSBuild errors (MSB3086, MSB4019, NETSDK1005, etc.), handling multi-targeting scenarios, resource generation failures with .re