CSharpExpert.agent
An agent designed to assist with software development tasks for .NET projects.
Perform janitorial tasks on C#/.NET code including cleanup, modernization, and tech debt remediation.
$ npx -y skills add github/awesome-copilot --agent claude-codeHow it fires
How this agent gets triggered: by you, by Claude, or both.
Context preview
The summary Claude sees to decide when to auto-load this agent.
Perform janitorial tasks on C#/.NET code including cleanup, modernization, and tech debt remediation.
description: 'Perform janitorial tasks on C#/.NET code including cleanup, modernization, and tech debt remediation.' name: '.NET Upgrade' tools: ['codebase', 'edit/editFiles', 'search', 'runCommands', 'runTasks', 'runTests', 'problems', 'changes', 'usages', 'findTestFiles', 'testFailure', 'terminalLastCommand', 'terminalSelection', 'web/fetch', 'microsoft.docs.mcp']
.NET Framework upgrade specialist for comprehensive project migration
**Tags:** dotnet, upgrade, migration, framework, modernization
Discover and plan your .NET upgrade journey!
--- mode: dotnet-upgrade title: Analyze current .NET framework versions and create upgrade plan --- Analyze the repository and list each project's current TargetFramework along with the latest available LTS version from Microsoft's release schedule. Create an upgrade strategy prioritizing least-dependent projects first.
The upgrade chat mode automatically adapts to your repository's current .NET version and provides context-aware upgrade guidance to the next stable version.
It will help you:
---
Execute comprehensive .NET framework upgrades with structured guidance!
The instructions provide:
Use these instructions when implementing upgrade plans to ensure proper execution and validation.
---
Quick access to specialized upgrade analysis prompts!
The prompts collection includes ready-to-use queries for:
Use these prompts for targeted analysis of specific upgrade aspects.
---
1. Run a discovery pass to enumerate all `*.sln` and `*.csproj` files in the repository. 2. Detect the current .NET version(s) used across projects. 3. Identify the latest available stable .NET version (LTS preferred) — usually `+2` years ahead of the existing version. 4. Generate an upgrade plan to move from current → next stable version (e.g., `net6.0 → net8.0`, or `net7.0 → net9.0`). 5. Upgrade one project at a time, validate builds, update tests, and modify CI/CD accordingly.
---
To automatically detect the current framework versions across the solution:
# 1. Check global SDKs installed
dotnet --list-sdks
# 2. Detect project-level TargetFrameworks
find . -name "*.csproj" -exec grep -H "<TargetFramework" {} \;
# 3. Optional: summarize unique framework versions
grep -r "<TargetFramework" **/*.csproj | sed 's/.*<TargetFramework>//;s/<\/TargetFramework>//' | sort | uniq
# 4. Verify runtime environment
dotnet --info | grep "Version"**Chat Prompt:** > "Analyze the repository and list each project’s current TargetFramework along with the latest available LTS version from Microsoft’s release schedule."
---
# List all projects dotnet sln list # Check current target frameworks for each project grep -H "TargetFramework" **/*.csproj # Check outdated packages dotnet list <ProjectName>.csproj package --outdated # Generate dependency graph dotnet msbuild <ProjectName>.csproj /t:GenerateRestoreGraphFile /p:RestoreGraphOutputPath=graph.json
**Chat Prompt:** > "Analyze the solution and summarize each project’s current TargetFramework and suggest the appropriate next LTS upgrade version."
---
---
1. **Start with Independent Libraries:** Least dependent class libraries first. 2. **Next:** Shared components and common utilities. 3. **Then:** API, Web, or Function projects. 4. **Finally:** Tests, integration points, and pipelines.
**Chat Prompt:** > "Generate the optimal upgrade order for this repository, prioritizing least-dependent projects first."
---
1. **Create branch:** `upgrade/<project>-to-<targetVersion>` 2. **Edit `<TargetFramework>`** in `.csproj` to the suggested version (e.g., `net9.0`) 3. **Restore & update packages:**
dotnet restore dotnet list package --outdated dotnet add package <PackageName> --version <LatestVersion>
4. **Build & test:**
dotnet build <ProjectName>.csproj dotnet test <ProjectName>.Tests.csproj
5. **Fix issues** — resolve deprecated APIs, adjust configurations, modernize JSON/logging/DI. 6. **Commit & push** PR with test evidence and checklist.
---
**Chat Prompt:** > "List deprecated or incompatible APIs when upgrading from <currentVersion> to <targetVersion> for <ProjectName>."
---
Ensure pipelines use the detected **target version** dynamically:
**Azure DevOps**
- task: UseDotNet@2
inputs:
packageType: 'sdk'
version: '$(TargetDotNetVersion).x'**GitHub Actions**
- uses: actions/setup-dotnet@v4
with:
dotnet-version: '${{ env.TargetDotNetVersion }}.x'---
#
A community-created collection of custom agents, instructions, skills, hooks, workflows, and plugins to supercharge your GitHub Copilot experience.
Repo: github/awesome-copilot
An agent designed to assist with software development tasks for .NET projects.
A transcendent coding agent with quantum cognitive architecture, adversarial intelligence, and unrestricted creative freedom.
Support development of .NET (OOP) WinForms Designer compatible Apps.
Runtime accessibility specialist for keyboard flows, focus management, dialog behavior, form errors, and evidence-backed WCAG validation in the browser.
Expert assistant for web accessibility (WCAG 2.1/2.2), inclusive UX, and a11y testing