.NET Core 3+ Requiring .NET Core 2?

Nathon Dalton 1 Reputation point
2022-02-24T21:50:35.66+00:00

I have a team of engineers that were working on upgrading projects away from .NET Core 2.x to 3+, due to 2.x falling out of support. However, what we're finding is that even though the projects specify .NET Core 3.x, the projects won't run on our servers without 2.x installed and the handler in the system.webServer specifies the module as "AspNetCoreModuleV2".

If you're running .NET Core 3+ on IIS, does it still require .NET Core 2.x to be installed on the server?

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
4,560 questions
{count} votes

3 answers

Sort by: Most helpful
  1. Bruce (SqlWork.com) 65,311 Reputation points
    2022-02-25T21:33:09.993+00:00

    fix implies that the deployed code is built on 2.*

    .net core 3.1 code will not run on .net 2.* runtime. there is no fallback support.

    the hosting bundle contains the module and runtime. the current bundle installs the module and net 6.0 runtime. you would then add the 3.1 runtime support if you wanted to support an older runtime.

    as you need to upgrade to net 6.0 by December, I'd install the current hosting bundle, so you are ready.

    on the build machine, check the bin folder. the compiled code should in:

    bin\Release\netcoreapp3.1

    folder.

    1 person found this answer helpful.
    0 comments No comments

  2. Bruce (SqlWork.com) 65,311 Reputation points
    2022-02-25T16:18:53.327+00:00

    You don’t need core 2 installed to run 3.1. Did you upgrade the hosting service on the servers? 3.1 requires the newer hosting service. Also did you install the 3.1 runtime on the server?

    Note: 3.1 support ends in December. You should just upgrade to net 6

    0 comments No comments

  3. Nathon Dalton 1 Reputation point
    2022-02-25T19:00:12.777+00:00

    Thanks for the responses! I'm trying to get an engineer to track down the error so I can post it here. The team thinks it wasn't working due to .NET Core 3.1 not being installed on the server. However, the part that gives me pause is the fix. With the project fully upgraded to 3.1, reinstalling 2.x (2.2 I believe) on the server caused the APIs to instantly start working again. That leads me to think the issue has to be one of the following.

    • The project wasn't fully upgraded off of .NET Core 2.2
    • IIS forces some dependency on .NET Core 2.x (AspNetCoreV2 module?)
    • If .NET Core 3.1 isn't installed, the server fails back to .NET Core 2.x?

    I'll update again once I get the error message.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.