Search code examples
.net.net-coremigrationasp.net-core-2.1asp.net-core-3.1

Can you run a .NET Core 2.2 application alongside .NET 3.1?


Are you able to run .NET Core 2.2 applications alongside .NET Core 3.1 applications?

I vaguely remember that the .NET 3.1 installer removes deprecated versions (e.g. .NET 2.2).

The web server has some applications that are .NET 2.2, and I'm hoping you can upgrade them one at a time to .NET 3.1.


Solution

  • Yes.

    You can install multiple version of the .NET Core Runtime side-by-side. The YOURAPP.runtimeconfig.json next to your applicaiton's main dll determines which version is used.

    You can also use Self-Conained Deployments (SCD) to completely isolate your app's runtime dependency, but a 3.1 IIS module is required to be installed in your IIS for 3.1.