Kiran Kumar
Kiran Kumar

Reputation: 71

Can .NET 5 Runtime run .NET 3.1 application?

I have an exe built using .NET Core 3.1. If the installer is run on a system that has .NET 5 runtime installed, it is still prompting the user to install .NET Core 3.1. How to make this exe run on a system just having .NET 5 runtime installed?

Upvotes: 1

Views: 505

Answers (1)

MD. RAKIB HASAN
MD. RAKIB HASAN

Reputation: 3946

You cannot run a .NET 3.1 app on the .NET 5 runtime. A 3.1 app requires that you install the runtime for .NET 3.1 as well. Major version changes indicate a new runtime (e.g. .NET Core 2 requires the .NET Core 2.x runtime, .NET Core 3 requires the .NET Core 3.x runtime).

Note that you can write code for an app that runs on both .NET 3.1 and .NET 5 but they are compiled separately, produce separate binaries and dependencies and the appropriate version would need to be deployed onto the target machine based upon the runtime that is installed.

.NET and .NET Core official support policy

Upvotes: 1

Related Questions