Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual Studio "Target framework" missing

I am trying to compile my .NET Standard class library project with .NET Framework 4.5.2. However, as you can see in my screenshot, version 4.5.2 is not shown in the offered list of target frameworks:

enter image description here

Furthermore, when I click Install other frameworks..., I am still not given the option of choosing 4.5.2.

I am using Visual Studio Community Edition.

like image 430
famle Avatar asked Jun 22 '18 11:06

famle


People also ask

How do I add a target framework in Visual Studio 2012?

Either right-click on your project in the Solution Explorer and select Properties -> Application , or select Properties from the main toolbar in Visual Studio, and select the Application tab. You should be able to select the target framework.

How do I find framework in Visual Studio?

Open Visual Studio Developer Command Prompt or Visual Studio Developer PowerShell and enter clrver . For .NET Framework 4.5 and later versions, don't use the Environment.Version property to detect the version of the CLR. Instead, query the registry as described in Detect .NET Framework 4.5 and later versions.

What is target framework in Visual Studio?

In Visual Studio, you can specify the version of . NET that you want your project to target. Framework targeting helps guarantee that the application uses only functionality that is available in the specified framework version.


1 Answers

You created the wrong project type. You created a .Net Standard Class Library

enter image description here

but you need to create a normal Class Library under Windows Desktop in the new project template

enter image description here

like image 146
magicandre1981 Avatar answered Nov 09 '22 05:11

magicandre1981