[SOLVED] .NET Core backwards compatibly issue

Table of Contents

Issue

I have an ASP.NET core website that is targeting .NET 5. I have installed the lastest hosting bundle and from what I read, this should work, but I have the following error in the event log:

Could not find 'aspnetcorev2_inprocess.dll'. Exception message:
It was not possible to find any compatible framework version
The framework 'Microsoft.AspNetCore.App', version '5.0.0' (x64) was not found.
  - The following frameworks were found:
      2.1.18 at [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
      2.1.30 at [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
      3.1.4 at [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
      3.1.22 at [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
      6.0.1 at [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]

Solution

There is incompatibility between major versions of .net core. For example .net 5 and .net 6.

I haven’t found the official relevant documentation for the time being, but it’s not difficult to understand this problem. If it is compatible, existing projects do not need to be migrated. Project migration solves the compatibility problem.

Migration from Asp.Net Core 5.0 to 6.0 — Real project


Recommendation

Install the special version sdk will solve your issue.

Answered By – Jason Pan

Answer Checked By – Senaida (BugsFixing Volunteer)

Leave a Reply

Your email address will not be published. Required fields are marked *