We Inherited a .NET Codebase Nobody Understands: Where Do We Start

July 14, 2026

Your first sixty days on an inherited .NET codebase should produce an understanding of the system, not a plan for it. The two usual instincts, rewriting right away or freezing everything until you understand it all, both fail in predictable ways.

A rewrite gets estimated from the documented requirements instead of what the system actually does, so it repeats the original's bugs and misses its edge cases. A freeze means months with nothing delivered, and the organization runs out of patience before the team understands anything.

Hold off on judging the architecture

A codebase that has run in production for years usually works better than it looks.

The naming is inconsistent. The architecture doesn't match any textbook pattern. A stored procedure does work that belongs in the application. And it's running, and something it does is valuable enough that the organization keeps paying to keep it alive.

For the first sixty days, focus on what the system does and what depends on it. You can answer both. Any judgment about code quality before you've answered them can be wrong in either direction.

Get it running locally first

It sounds basic, and on an inherited system it routinely takes a week. Every snag you hit tells you something about the codebase before you've read a line of it.

You'll usually run into:

  • Connection strings and configuration values that only exist on a production server
  • A database schema that no longer matches what the code expects
  • A service that can only be reached from the production network
  • Build steps that live in one person's shell history
  • Hard-coded paths, machine names or certificate references

Write each one down as you fix it. That list is the start of your deployment documentation, and you'll never have a better chance to put it together carefully.

Trace workflows, not files

Once it runs, follow what a user does instead of reading the code top to bottom.

Trace each main path from start to finish: log in, submit the main form, run the main report, trigger each integration. Follow each request through every layer to the database and back.

That gives you a map of what the system does before you have a map of how it's built, and it gives everything you read afterward something to hang on. Without it, you end up knowing a lot about individual pieces with no idea how they connect, and that's when changes get dangerous.

Find where the risk is

Some parts of a codebase carry much more risk than others. Spend your effort where the risk is, not where the mess is.

Where the business-critical logic lives. Billing, external integrations and anything that changes data in a way you can't undo. The business notices failures here immediately, so these areas limit what you can safely change.

Where messy code meets planned work. Messy code you won't be changing doesn't slow you down. Messy code in a module that's growing, an integration being extended or a component the next project depends on is what your roadmap will pay for.

What tests exist. On an inherited legacy system, often few or none. Whatever does exist is worth knowing about. The previous team wrote tests where they were least confident, which points straight at the places the system has surprised people before.

What runs on a schedule. Scheduled tasks, jobs and services are the pieces most likely to be missing from the handover and most likely to depend on running in a particular order.

Rules for the first 60 days

Don't propose a rewrite yet. It might turn out to be the right call, but you can't make the case accurately yet. Rewrites proposed before a team understands the current system underestimate the scope and bring back bugs that took years to find the first time.

Don't update packages or change the target framework until you understand how deployment and testing work. Dependency changes in a legacy codebase have side effects you won't see coming, and without tests you'll find them in production.

Don't assume code that looks wrong is wrong. There's often a reason you can't see without the history: a vendor quirk, a compliance requirement, an incident three years ago. Write it down, figure out why it's there and change it later.

Do make small, low-risk changes. A complete freeze is its own risk. Shipping something small proves the deployment process works and that your team can change the system, and you want to know that before an urgent change comes along.

What you should have at day sixty

You should understand the system well enough to make good decisions, and have it written down.

Document as you go: deployment steps, outside dependencies and their credentials, business logic in stored procedures, integrations with known quirks and the areas the previous team clearly avoided.

By day sixty, your team should be able to walk someone through how the system behaves, name the two or three things that most need to change and explain why each one matters to the business. That's what a modernization plan should be built on: what the system needs, not how its code reads.


Working through a problem like this?

Describe the system and where it's stuck. I'll tell you what the work actually involves.

Get in touch