migrating-mvc-logging

Migrate ASP.NET MVC logging and diagnostics to ASP.NET Core with ILogger<T>.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires Microsoft.Extensions.Logging, Microsoft.Extensions.Logging.Console, Microsoft.Extensions.Diagnostics.HealthChecks, and includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill addresses the challenge of migrating ASP.NET MVC logging and diagnostics to the equivalent features in ASP.NET Core, ensuring a smooth transition and improved logging capabilities.

Core Features & Use Cases

  • Migration to Core Logging: Transforms legacy logging patterns to ASP.NET Core's built-in logging.
  • Error Handling Middleware: Implements robust error handling and health checks.
  • Use Case: Suitable for projects transitioning from ASP.NET MVC to ASP.NET Core, aiming to leverage modern logging and diagnostics features.

Quick Start

Run the skill to begin the migration process for your ASP.NET MVC application's logging and diagnostics.

Frequently Asked Questions about migrating-mvc-logging

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

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

Migrating ASP.NET MVC logging to ASP.NET Core involves transforming legacy patterns like System.Diagnostics.Trace, log4net, NLog, and ELMAH to use ASP.NET Core's built-in ILogger<T> and related logging providers.

Can I migrate customErrors configuration when moving to ASP.NET Core?

Yes, migrating customErrors configuration is supported by implementing robust error handling middleware to replace legacy error page configurations during the ASP.NET Core transition.

Does this ASP.NET Core migration support Serilog and NLog frameworks?

Yes, the migration supports transitioning legacy logging frameworks including Serilog, NLog, log4net, and ELMAH to ASP.NET Core's built-in logging architecture.

What is the best way to add health checks after migrating ASP.NET MVC diagnostics?

Implementing health checks in ASP.NET Core uses Microsoft.Extensions.Diagnostics.HealthChecks to replace legacy diagnostics, ensuring robust error handling and modern monitoring capabilities.

Do I need Microsoft.Extensions.Logging to migrate legacy ASP.NET MVC logging?

Yes, Microsoft.Extensions.Logging and Microsoft.Extensions.Logging.Console are required dependencies to transform legacy logging patterns into ASP.NET Core's built-in logging providers.

Why use ILogger<T> when transitioning from System.Diagnostics.Trace in ASP.NET Core?

ILogger<T> provides structured logging, dependency injection, and configurable log levels in ASP.NET Core, replacing the limited System.Diagnostics.Trace patterns from legacy ASP.NET MVC applications.