15

I have a completed C# Visual Studio project but I am not able to open it due to version issue of the Visual Studios.

I have tried using VS2005 and VS2010, but both are unable to open the project.

I met errors while converting the project in VS2010 as well.

Is there any file which I could locate the version of VS used?

__

EDIT:

Thank you for the advices.

I have look through my csproj file as advised:

<?xml version="1.0" encoding="utf-8"?> <Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">

From what I see, the VS ver. used is most likely to be 2003 ver.

Please correct me if I am wrong.

  • Possible duplicate of [What controls the ProductVersion setting in .csproj files?](http://stackoverflow.com/questions/1299492/what-controls-the-productversion-setting-in-csproj-files) – KyleMit Nov 13 '15 at 15:26

5 Answers5

30

Look for the value in the <ProductVersion> tag in your project's csproj file.

Here's a table with each product name and its corresponding version:

+---------------------------+---------------+-----------+----------------+
|       Product name        |   Codename    | Version # | .NET Framework | 
+---------------------------+---------------+-----------+----------------+
| Visual Studio 4.0         | N/A           | 4.0.*     | N/A            |
| Visual Studio 97          | Boston        | 5.0.*     | N/A            |
| Visual Studio 6.0         | Aspen         | 6.0.*     | N/A            |
| Visual Studio .NET (2002) | Rainier       | 7.0.*     | 1              |
| Visual Studio .NET 2003   | Everett       | 7.1.*     | 1.1            |
| Visual Studio 2005        | Whidbey       | 8.0.*     | 2.0, 3.0       |
| Visual Studio 2008        | Orcas         | 9.0.*     | 2.0, 3.0, 3.5  |
| Visual Studio 2010        | Dev10/Rosario | 10.0.*    | 2.0 – 4.0      |
| Visual Studio 2012        | Dev11         | 11.0.*    | 2.0 – 4.5.2    |
| Visual Studio 2013        | Dev12         | 12.0.*    | 2.0 – 4.5.2    |
| Visual Studio 2015        | Dev14         | 14.0.*    | 2.0 – 4.6      |
+---------------------------+---------------+-----------+----------------+
Nick Jones
  • 4,395
  • 6
  • 33
  • 44
NeerajH
  • 331
  • 2
  • 6
  • 2
    I don't believe this answer is complete. ProductVersion in an upgraded csproj that I have modified using VS2015 Pro Update3 is 9.0.30729. ProductVersion in a brand new SL5 application, created using VS2015 Pro Update3 is 8.0.50727. According to the table above, I would expect 14.0.something in both cases, wouldn't I? – Montgomery 'monty' Jones Aug 17 '16 at 10:33
7

Open up the .sln file in a text editor such as notepad. The version should be in the first few lines following a "#" symbol.

JKor
  • 3,822
  • 3
  • 28
  • 36
1

The beginning of a project file looks like this:

<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">   <PropertyGroup>
    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
    <Platform Condition=" '$(Platform)' == '' ">x86</Platform>
    <ProductVersion>8.0.30703</ProductVersion>

Either the ToolsVersion attribute or ProductVersion tag should lead you to the version of Visual Studio.

Ben Voigt
  • 277,958
  • 43
  • 419
  • 720
  • I have the same *.csproj file like your answer, so could you tell me what's your Visual Studio version? Thank you. – meadlai Jul 13 '16 at 02:50
1

To add to Ben's answer, you can take a look at project types, in the same csproj file, they will look like this:

<ProjectTypeGuids>{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>

It's possible that the project you are trying to open is using some project type that you don't have installed (like web deployment project or a version of MVC higher than what you have etc.) You can google each of teh GUID's in the ProjectTypeGuids to see what's missing.

Andrey
  • 20,487
  • 26
  • 108
  • 176
-1

Open the csproj file with notepad. There should be a line in there.

You are correct. It's Visual Studio 2003.

Bryan Naegele
  • 660
  • 3
  • 10