Audit a .NET 8 solution before upgrading: inventory SDKs, target frameworks, NuGet packages, Dockerfiles and CI pipelines for .NET 10.
You cannot upgrade a system safely if you do not know its exact starting state. Larkfield Insurance runs three core applications: Larkfield.Claims.Api, Larkfield.Portal, and Larkfield.Billing.Worker. Before you touch project files or edit code, you must inventory every installed Software Development Kit (SDK), active Target Framework Moniker (TFM), outdated NuGet package, container image, and Continuous Integration and Continuous Deployment (CI/CD) pipeline.
Previous lesson: .NET 8 End of Support: Why and When to Move to .NET 10 | Next lesson: Upgrade .NET 8 Projects to .NET 10: SDK, TFM and Packages
Before checking your projects, inspect the machine environment where builds take place. The .NET CLI provides built-in discovery commands that require no extra tooling.
Run these three commands in your terminal to see which SDKs and runtimes exist on your development machine or build server:
bashCopy
The output reveals whether you have the .NET 10 SDK installed alongside your existing .NET 8 tools. Multiple SDKs can live side by side without conflict.
Next, locate any global.json files in your repository. A global.json file pins the exact SDK version used by the CLI. If a repository root pins a .NET 8 SDK, the CLI keeps using it, and any project that targets net10.0 fails to build with error NETSDK1045 until you update that file.
bashCopy
If Larkfield Insurance has a global.json file in its root directory, inspect its contents:
jsonCopy
Common Mistake: Pinning a patch version in global.json and forgetting it exists. When developers install the .NET 10 SDK, their CLI continues to invoke the pinned .NET 8 SDK, creating confusion about why new features fail to compile.
A solution often contains dozens of projects. Some may target net8.0, while older shared libraries might still target netstandard2.0 or even net6.0. You must catalog every TFM in the repository.
Think of this audit like inspecting the architectural blueprints of a building before renovating: you need to verify which walls are load-bearing before you swing a hammer.
Run this shell command from the root of your repository to extract and count every target framework across all project and property files:
bashCopy
A typical output for Larkfield Insurance looks like this:
textCopy
Notice if your solution uses Directory.Build.props. If your team defines <TargetFramework> centrally inside Directory.Build.props, you can update all projects in one place. However, you must also verify whether individual .csproj files override that property locally.
Pro Tip: If an internal class library targets netstandard2.0, it can remain on netstandard2.0 while consuming projects move to .NET 10. You do not need to upgrade every library immediately if it contains no runtime-specific dependencies.
Dependencies present the highest risk during any enterprise migration. A third-party library that lacks support for .NET 10 can block your upgrade path.
The .NET CLI contains native package auditing tools. Run these commands from your solution folder:
bashCopy
The --outdated flag lists every package that has a newer version available on NuGet.
The --vulnerable --include-transitive flag inspects your entire dependency graph, including indirect dependencies pulled in by other libraries.
The --deprecated flag alerts you to packages that maintainers have abandoned or marked out of support.
Pro Tip: Check whether your solution uses Central Package Management by looking for a Directory.Packages.props file. If enabled, package versions are governed in a single XML file instead of scattered throughout individual .csproj files.
Pay close attention to internal corporate packages. If Larkfield.Claims.Api consumes a shared internal package named Larkfield.Common.Logging that strictly targets net8.0, that package must be recompiled or multi-targeted before your API can upgrade.
Code changes represent only half of an upgrade. Container configurations and automation scripts must match the new runtime target.
Search your repository for Docker base images:
bashCopy
In the Larkfield solution, Larkfield.Claims.Api uses an ASP.NET Core base image:
dockerfileCopy
Take note of two container facts for later: the base image tag 8.0 and any custom OS packages installed with package managers.
Next, scan your CI/CD workflow files. In GitHub Actions, search for the actions/setup-dotnet step across .github/workflows/:
yamlCopy
If your build agent is pinned to 8.0.x, your pipeline will fail immediately when you push code that requires the .NET 10 SDK.
Finally, verify your hosting environments. If your services run on Azure App Service, AWS ECS, or Kubernetes, identify where the target runtime version is configured so you can plan the environment update alongside the deployment.
The older .NET Upgrade Assistant tool is officially deprecated. Microsoft now directs teams toward the GitHub Copilot modernization agent for assisted code assessment.
You can invoke this agent inside your development environment:
@Modernize in Copilot Chat.@upgrade in the chat window.The modernization agent performs several structured steps:
.github/upgrades/ folder in your repository.Common Mistake: Treating automated modernization output as production-ready code without review. The GitHub Copilot modernization agent is a helper, not an automatic guarantee. You must still build, review every diff, run integration tests, and verify performance yourself.
Quick Challenge: Open your terminal in an existing .NET 8 repository and run dotnet list package --vulnerable --include-transitive. Note any transitive dependencies flagged with known vulnerabilities so you can prioritize them during package updates.
Perform a read-only assessment of your repository. Execute the following steps in order and save the results to a tracking document:
bashCopy
bashCopy
bashCopy
bashCopy
bashCopy
Collect these findings into a migration inventory checklist. You will use this checklist to track your progress as you modify project files and build configurations.
In the next lesson, Upgrade .NET 8 Projects to .NET 10: SDK, TFM and Packages, you will update the project files, switch the TFM to net10.0, and configure package dependencies.
Was this lesson helpful?