How do I add additional .net frameworks to my Visual Studio? Is there a possiblility ?

Abirami Vijayakumar 21 Reputation points
2021-11-12T12:52:19.66+00:00

148874-additional-information.png

I would like to add .net 5.0 as well along with the current framework. Is there a chance ?

Developer technologies C#
{count} votes

Accepted answer
  1. Bruce (SqlWork.com) 77,686 Reputation points Volunteer Moderator
    2021-11-12T16:13:30.72+00:00

    You just download the sdk

    https://dotnet.microsoft.com/download/dotnet/5.0

    You can see which sdk are installed with

    dotnet —list-sdks

    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Karen Payne MVP 35,586 Reputation points Volunteer Moderator
    2021-11-12T14:15:34.94+00:00

    If you have not, download older Frameworks like .NET Core 5. Then you should have .NET Framework as an option. If .NET Core 5 does not show up but is installed use the following for the .csproj file for instance for a class project.

    <Project Sdk="Microsoft.NET.Sdk">
    
      <PropertyGroup>
       <LangVersion>9.0</LangVersion>
       <TargetFramework>net5.0</TargetFramework>
      </PropertyGroup>
    
    </Project>
    

    Note I have tried this as I don't have VS2022 but have been using .NET Core 6 in VS2019 and figured the reverse would work in VS2022

    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.