Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I find the .NET version used in an existing project?

Tags:

.net

version

I am expected to continue development on a C#/ASP.NET project that has changed hands multiple times, and no one person is sure which version of .NET is being used.

Is there something (perhaps an option in Project properties or elsewhere) that tells me which version of .NET the project uses?

EDIT :

The project's hosted on a remote server (an ancient one!) which runs on Windows Server 2003, and uses Visual Studio 2005. I checked the Web.config file, and under <system.web>, I found <compilation debug="true"> but no entry for targetFramework !
Does the existence of this entry depend on the .NET version too? Is this 2.x or older?

like image 776
SNag Avatar asked Jan 18 '13 12:01

SNag


People also ask

How can I tell what version of .NET is on a project?

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.

Which .NET core version is my project?

Checking the Version of Your . Open your project's source folder and, in the address bar, type "cmd" and press Enter. It will open the command prompt with the project path. Execute the following command: dotnet --version . It will display your project's current SDK version,i.e., 2.1.

What version of .NET is current?

NET Framework 4.8. To determine the installed . NET version, use the following Release DWORD: 528449 (Windows 11 and Windows Server 2022)


2 Answers

The tag in the project file is <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>.

Alternatively under project properties: enter image description here

If it is a web application, you can find it under Web.config: <compilation targetFramework="4.0">

like image 66
khellang Avatar answered Oct 19 '22 05:10

khellang


Check Your Web Config file.

In webconfig under <system.web>

<httpRuntime targetFramework="4.5" />
<compilation debug="false" targetFramework="4.5" />

this targetFramework is version

like image 22
Harshit Tailor Avatar answered Oct 19 '22 05:10

Harshit Tailor