a·gen·tic a·gil·i·ty

Convert Legacy Projects and ASP.NET MVC Apps to SDK-Style with Confidence

TL;DR; Upgrading legacy .NET projects to SDK-style makes your codebase easier to maintain, improves build and CI/CD integration, and prepares you for future .NET upgrades. Converting class libraries is straightforward and highly recommended, while web apps require more care and are best handled with the MSBuild.SDK.SystemWeb package if you want SDK-style; otherwise, you can leave them in the old format. Start by converting class libraries now to simplify your engineering system and reduce technical debt.

Published on
5 minute read
Image
https://nkdagility.com/resources/2mdv7QE2nIt
Subscribe

I’ve been working with a customer who, like many, is stuck in the past. They were on Team Foundation Version Control (TFVC), and the backbone of their application is .NET 4.5. This creates real problems for modern engineering practices because many new tools just won’t work, so I am moving to Git, and as part of that looking to ensure that their setup is future ready. I also need to do something with all those peskie legacy DLLs that are scattered around the solution. One of the key upgrades I was looking at is moving to SDK-style projects. This is a big deal because it’s the future of .NET development, and it’s a lot easier to work with than the old project format.

The good news: you can move to SDK-style projects even if you’re targeting older .NET versions.

For the Azure DevOps Migration Tools, a contributor did the upgrade, and the capabilities are outstanding:

Additional reasons to move to SDK-style projects:

The Azure DevOps Migration Tools combine class libraries and executables, with a mix of .NET 4.8.1, netstandard2.0, and net8.0 – they all have to interoperate smoothly.

SDK-style .csproj files simplify your build system, cut the clutter, and prepare you for future upgrades. Here’s the pragmatic reality: Microsoft does not officially support converting classic ASP.NET MVC/WebForms projects to SDK-style. Class libraries? Straightforward. Web apps? That takes discipline, skill, and a willingness to dive into the details. With the right approach, you can absolutely get this working and keep IIS Express debugging alive.

Let’s break it down with radical clarity.

Class Library Conversion – No-Brainer

Class libraries are the easy win. They have minimal impact on code but make it massively easier to organise and maintain.

In my experience, the “right-click on project” → Upgrade option in Visual Studio also works well.

ASP.NET MVC/WebForms Conversion – Tread Carefully

This is where it gets tricky. There’s no official support for MVC/WebForms in SDK projects, and it’s like wrestling a bear to get it all working.

There are two practical approaches:

Why this works:

Keep an eye on MSBuild.SDK.SystemWeb on GitHub for updates.

2. Manual Tweaks Without External SDK

Recommendation: Don’t waste time fighting Visual Studio. Use SystemWeb SDK if you want a sustainable setup.

Debugging Survival Guide

Debugging can be a pain, and in complex apps, it’s still hit-or-miss. But here’s what typically works:

If you get the “RunCommand not set” error, add <RunCommand> and <RunArguments> in your .csproj. This tells Visual Studio how to launch IIS Express.

If you see the “Debugging Release build” warning, go to Project > Build and uncheck “Optimize code” in Debug. Also, confirm <Optimize>false</Optimize> is set in the .csproj and do a full clean and rebuild.

If you’re attaching to a running process, enable “Suppress JIT optimization on module load” in the Visual Studio debugging options. This will let you step through code without the headache of optimized binaries.

Finally, check that your PDB files are loaded. Open the Modules window during debugging and make sure the symbols are picked up from your output directory. Without them, breakpoints won’t bind, and you’re debugging blind.

Known Limitations

Some things just won’t come back. The “Web” tab in the project properties is gone, but you can configure everything you need using the .csproj and launchSettings.

Out-of-the-box publish won’t work because it expects a .NET 5+ project. You’ll need to script your own publish steps to get the bits into the right place.

If needed, you can leave web apps in the old format and just convert the class libraries. That’s a pragmatic call if you’re not planning to touch System.Web long-term.

Final Recommendations

Here’s where it all comes together. These are the pragmatic, no-nonsense calls you should make after working through the conversion process.

The point of this work isn’t to show off modern .csproj files. It’s to make your engineering system simpler, more maintainable, and ready for what’s next.

Smart Classifications

Each classification [Concepts, Categories, & Tags] was assigned using AI-powered semantic analysis and scored across relevance, depth, and alignment. Final decisions? Still human. Always traceable. Hover to see how it applies.

Subscribe

Connect with Martin Hinshelwood

If you've made it this far, it's worth connecting with our principal consultant and coach, Martin Hinshelwood, for a 30-minute 'ask me anything' call.

Our Happy Clients​

We partner with businesses across diverse industries, including finance, insurance, healthcare, pharmaceuticals, technology, engineering, transportation, hospitality, entertainment, legal, government, and military sectors.​

Healthgrades Logo

Healthgrades

CR2

Microsoft Logo

Microsoft

Slicedbread Logo

Slicedbread

Higher Education Statistics Agency Logo

Higher Education Statistics Agency

SuperControl Logo

SuperControl

Slaughter and May Logo

Slaughter and May

Philips Logo

Philips

Xceptor - Process and Data Automation Logo

Xceptor - Process and Data Automation

Emerson Process Management Logo

Emerson Process Management

Hubtel Ghana Logo

Hubtel Ghana

Schlumberger Logo

Schlumberger

Trayport Logo

Trayport

Workday Logo

Workday

Bistech Logo

Bistech

NIT A/S

Cognizant Microsoft Business Group (MBG) Logo

Cognizant Microsoft Business Group (MBG)

Teleplan Logo

Teleplan

Washington Department of Enterprise Services Logo

Washington Department of Enterprise Services

Department of Work and Pensions (UK) Logo

Department of Work and Pensions (UK)

Nottingham County Council Logo

Nottingham County Council

Royal Air Force Logo

Royal Air Force

Washington Department of Transport Logo

Washington Department of Transport

Ghana Police Service Logo

Ghana Police Service

MacDonald Humfrey (Automation) Ltd. Logo

MacDonald Humfrey (Automation) Ltd.

Big Data for Humans Logo

Big Data for Humans

YearUp.org Logo

YearUp.org

NIT A/S

Kongsberg Maritime Logo

Kongsberg Maritime

Slicedbread Logo

Slicedbread