Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

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

Posted on 2011-09-20
7
Medium Priority
?
275 Views
Last Modified: 2012-05-12
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
Comment
Question by:Heidi_Lee
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
7 Comments
 
LVL 29

Assisted Solution

by:QPR
QPR earned 80 total points
ID: 36571608
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
 
LVL 17

Assisted Solution

by:sonawanekiran
sonawanekiran earned 80 total points
ID: 36571664
If the source is in VS2010 and if you are trying to open you in VS2008 then visual studio prompt you accordingly.
0
 
LVL 5

Assisted Solution

by:AlokJain0412
AlokJain0412 earned 80 total points
ID: 36571689

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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 3

Assisted Solution

by:chandrasekar1
chandrasekar1 earned 80 total points
ID: 36571811
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
 
LVL 6

Expert Comment

by:effes
ID: 36571857
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
 
LVL 10

Assisted Solution

by:eguilherme
eguilherme earned 80 total points
ID: 36574421
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
 
LVL 40

Accepted Solution

by:
Jacques Bourgeois (James Burger) earned 100 total points
ID: 36575076
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

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…

636 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question