Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 281
  • Last Modified:

How to know which version of visual studio .net base on source code

I never used visual stuido .net before. Not sure if VS2010 is backward compatible with VS2008 without strange issues.  

1. Just got a bunch of c# source code files containing project files, cs files, dll etc.  How do I know by reading somewhere in the source code files which version of VS was the code  originally written and compiled in?

2. I am deciding whether to buy VS2010 or 2008. If the source code was originally written and compiled in VS2008,  do you have experience with any issues if VS2010 is used to modify and recompile the VS2008 source codes?
0
Heidi_Lee
Asked:
Heidi_Lee
6 Solutions
 
QPRCommented:
If you open a solution/project in VS2010 that was written in a previous version... vs2010 will ask you if you want to upgrade the code to the latest version. You can choose to do so or to carry on using the version it was created in. It is the version of the .NET framework more than the version of visual studio
0
 
Kiran SonawaneProject LeadCommented:
If the source is in VS2010 and if you are trying to open you in VS2008 then visual studio prompt you accordingly.
0
 
AlokJain0412Commented:

from Web Config you can get the many information related to its framework version assemblies version ,
and if you want to check VS version  its always create a solution Icon which is showing its version no

In 2002, all projects use .Net 1.0
In 2003, all projects use .Net 1.1
In 2005, all projects use .Net 2.0
In 2008, all projects use .Net 2.0, 3.0, or 3.5; you can change the version in Project Properties
In 2010, all projects use .Net 2.0, 3.0, 3.5, or 4.0; you can change the version in Project Properties

0
Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

 
chandrasekar1Commented:
Above experts are right, I just explain little more and given my thoughts.

There is no issues with vs 2010, its has backward compatible to previous version framework (2.0,3.0,3.5 and 4.0)
1.       you can check project  framework version by

a.      Open web.config -> check <sectionGroup Version=3.5.0.0> (this means it using Framework 3.5)

b.      Open the project solution file in Notepad, you can able to see the frist two lines refer the Visual studio version used for projet development , like below
Microsoft Visual Studio Solution File, Format Version 10.00
# Visual Studio 2008

Microsoft Visual Studio Solution File, Format Version 11.00
# Visual Studio 2010


2.      Instead of buying VS 2008, you can spend more dollar to get VS 2010, its having many code enchancements with FW 4.0 which makes very easy to use, as well having backward compatible, you can recompile and run the above mentioned framework’s without any issues.
0
 
effesCommented:
I agree. If at all possible get VS 2010 - it's way cooler. I converted a couple of projects from VS 2008 at work and I never ran into any problems.

Btw: you can download Visual Studio 2010 and try it (for 30 days I think). That way you can test wether you have problems with the conversion from 2008.
0
 
eguilhermeCommented:
there is one problem:

if you use the ReportViewer from Microsoft... the VS2010 uses a newer reporting that doesnt support the older ones.. it will ask you to convert, but if its a complex report.. get ready to do lots of fixes
0
 
Jacques Bourgeois (James Burger)PresidentCommented:
It is never a very good idea to buy an older version. It is also a very bad idea to skip a version.

When Microsoft decides to make a change to something in the framework, they do not do it drastically. An application that compiled in version 2008 will always compile in 2010. But it might not in 2012.

Here is how they go about changes.

If you convert a 2008 project to 2010 and there are been changes between the 2 versions, 2010 will accept the old code and give you warnings about the changes, telling you what you need to do to change the code so that it will work in 2012.

As an example, if you open a 2008 project that uses the System.Data.OracleClient namespace, you will get such a warning. But the application will compile.

In 2012, that warning will become an error.

Programmers who stick to 2008 will have big problems when they will switch to 2012 or 2014, because their code won't work anymore in those versions.

Those who load an older project in 2010 have 2 years to prepare.

So the best thing to do with Visual Studio is to always have the last version. Even if it is only the Express version. I know of a lot of wise programmers who are developing in Visual Studio 2008 Professional, but have also installed Visual Studio 2010 Express on their station. They load their 2008 project in Express 2010 from time to time just to be aware of such possible changes in the future.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now