Resolved VS 2019 is not showing .net framework 5.0

Anonymous

Well-known member
Joined
Sep 29, 2020
Messages
84
Programming Experience
Beginner
In my organisation. we use VS 2019 version 16.11.21. When I clicked on API template or even ASP.net MVC Core web app, it only shows 3.1(out of support). I know now .net 5.0 is also out of support but in CS 2019, .net 6.0 is not working. When I tried changing the target framework to 5.0 from properties and ran the web app, it gave me the following error.


C#:
"HTTP Error 500.31 - Failed to load ASP.NET Core runtime
Common solutions to this issue:
The specified version of Microsoft.NetCore.App or Microsoft.AspNetCore.App was not found.

My home VS has Version 16.11.25. It shows me .net 5.0.
I have to create a API. Should I create the API in .net 3.1? Would it be a issue if I choose this version? But I don''t seem to have any other option.
 
If .NET 5 is not showing as an option then either it was never installed or has been removed, so you need to install it. Run the VS installer and check the individual components and make sure that .NET 5 is checked.

I would also recommend updating VS if you can. The latest version is 16.11.32.

BTW, VS 2022 is required for .NET 6 and above, so you probably ought to be upgrading to that if you want to target a supported version of .NET Core. VS 2019 is OK for .NET Framework and playing with .NET Core but, unless a client specifically requires it, you certainly shouldn't be creating new apps that target anything earlier than .NET 6 nowadays. You should also encourage such clients to update if at all possible.
 
In my organisation. we use VS 2019 version 16.11.21. When I clicked on API template or even ASP.net MVC Core web app, it only shows 3.1(out of support). I know now .net 5.0 is also out of support but in CS 2019, .net 6.0 is not working. When I tried changing the target framework to 5.0 from properties and ran the web app, it gave me the following error.


C#:
"HTTP Error 500.31 - Failed to load ASP.NET Core runtime
Common solutions to this issue:
The specified version of Microsoft.NetCore.App or Microsoft.AspNetCore.App was not found.

My home VS has Version 16.11.25. It shows me .net 5.0.
I have to create a API. Should I create the API in .net 3.1? Would it be a issue if I choose this version? But I don''t seem to have any other option.

Just a thought, even though if im not able to change the framework and other configuration settings, i guess the deployment team can change that according to the requirements, is that correct? I can just give them the code and they can make configuration settings as per their wish.
 
Just a thought, even though if im not able to change the framework and other configuration settings, i guess the deployment team can change that according to the requirements, is that correct?

(This is classic throw it over the wall to Ops thinking that they original DevOps concept was meant to eliminate. It's sad that all DevOps ended up doing was just changing the job title of "Build Engineer" to "DevOps Developer".)

It depends.

If you build self contained rather than framework dependent, then no because you packaged all the framework binaries asking with your code.

If you do build framework dependent, do you expect the deployment team to check the documentatiin to see if there are any breaking changes between .NET (Core) versions, check if your code is affected by those breaking changes, to modify your dependencies configuration file to point to a new version of the framework, AND do a full regression test to verify that everything still works correctly? I wouldn't.
 

Latest posts

Back
Top Bottom