migrating-mvc-controllers

Migrates ASP.NET MVC and WebAPI controllers to ASP.NET Core equivalents.

19|2|Updated May 13, 2026
One-click install
npx skills add https://github.com/microsoft/upgrade-agent-plugins --skill migrating-mvc-controllers
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: migrating-mvc-controllers
Source: https://github.com/microsoft/upgrade-agent-plugins/tree/main/plugins/upgrade-agent/extenders/upgrade-dotnet/upgrade/skills/lazy/web/mvc/migrating-mvc-controllers
Command: npx skills add https://github.com/microsoft/upgrade-agent-plugins --skill migrating-mvc-controllers

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

This Skill automates the migration of ASP.NET Framework MVC and WebAPI controllers to their ASP.NET Core equivalents, streamlining the upgrade process and ensuring compatibility.

Core Features & Use Cases

  • Controller Migration: Converts MVC and WebAPI controllers to ASP.NET Core patterns.
  • Return Type Rewrite: Handles the transformation of return types between the old and new frameworks.
  • ApiController Attribute: Adds the [ApiController] attribute to WebAPI controllers for improved behavior.
  • Async Action Patterns: Migrates async actions to the new framework standards.
  • ViewComponent Conversion: Converts child actions to ViewComponents where applicable.
  • Use Case: For developers looking to upgrade their existing ASP.NET Framework applications to ASP.NET Core, this Skill provides a comprehensive solution to ensure a smooth transition.

Quick Start

Use the migrating-mvc-controllers skill to upgrade your MVC controllers to ASP.NET Core.

Frequently Asked Questions about migrating-mvc-controllers

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I migrate ASP.NET MVC controllers to ASP.NET Core?

You can migrate ASP.NET MVC controllers by rewriting return types, applying the [ApiController] attribute to WebAPI controllers, and converting child actions to ViewComponents for full ASP.NET Core compatibility.

What is the best way to upgrade WebAPI controllers for ASP.NET Core?

The best way to upgrade WebAPI controllers is to apply the [ApiController] attribute and rewrite return types to match ASP.NET Core patterns, automating the transition from the older ASP.NET Framework.

Does ASP.NET Core migration handle converting child actions to ViewComponents?

Yes, ASP.NET Core migration handles converting child actions to ViewComponents. Child actions are not supported in ASP.NET Core, so they are transformed into ViewComponents during the controller upgrade process.

Can I automate async action migration when upgrading MVC controllers to ASP.NET Core?

Yes, you can automate async action migration when upgrading MVC controllers to ASP.NET Core. The migration process updates async actions to align with the new framework standards and patterns.

What return type changes are needed when upgrading WebAPI controllers to ASP.NET Core?

Upgrading WebAPI controllers to ASP.NET Core requires rewriting return types to match the new framework's action result patterns, ensuring that responses are compatible with ASP.NET Core routing and serialization.