Visual Studio 2010 and 2008 mixed development environment possible? - visual-studio-2010

We are looking at migrating to Visual Studio 2010. Is it possible for some developers to use Visual Studio 2010 and other to use 2008 on the same solution/projects? How will it affect our VSTF builds (VSTF Server 2008)?

You only need to have a separate solution file for each version of Visual Studio for this to work. Project files will work on both VS2008 and VS2010 once converted.
What you need to do is to make a copy of your original VS2008 solution file. I find it easiest to give the copy a name that ends in _VS2008.sln to show that this is for VS2008. Once you have your xxx_VS2008.sln file tucked away next to your original sln-file you can open the original and have it converted to VS2010. When done you can rename the converted file to end with _VS2010 so anyone still working in VS2008 won't open it from their recent projects in Visual Studio and wonder what is going on.
We did this when we went from 2005 to 2008 and we are doing the same now when we are going from 2008 to 2010. Worked fine the first time and so far it has been working for VS2010 for almost a week now without any of our developers reporting problems with it.

once project converted by vs2010 it connot be just opened in vs2008 because vs2010 changes tool version in solution/project files. So you need to maintain two versions of solution/project files.

You will need to have separate solution/project files for 2008 and 2010 as these have different formats - hence the conversion wizard - but you will be able to share other source code files from a common location. Also, bear in mind that you will also have to restrict your target framework to 3.5 or lower to accommodate VS2008.

Related

How to work in VS2015 with 2008 sln project without conversion

Is there any way that I can use the latest IDE (VS2015) to work with my old solution project but i don't wish to upgrade my project?
Unfortunately, you cannot do this. The format of project and solution files was changed in VS 2010, so the furthest back you could possibly go with VS 2015 would be to VS 2010.* And that wouldn't help you any for cross-compatibility, since VS 2008 can't open VS 2010 project files.
You have no real choice but to allow the IDE to convert your solution and project files to the latest version. However, this will not delete your old VS 2008 project/solution files. They will still be in the solution directory, and will still work for opening the solution in VS 2008. The new project/solution files will open the solution in VS 2015.
This was a very common strategy employed by open-source projects before recent versions of Visual Studio implemented cross-compatibility. They would just have multiple versions of project and solution files for each supported version of Visual Studio.
The only disadvantage with this is that changes you make to one version of a project or solution file don't propagate to the others automatically. But this isn't really that big of a deal, since once a project is reasonably mature, the project and solution files don't change very often.
* In fact, VS 2015 interoperates smoothly with project/solution files from VS 2013, VS 2012, and VS 2010 SP1. It can create and modify project files for any of these versions. See MSDN: Porting, Migrating, and Upgrading Visual Studio Projects (for Visual Studio 2015)

Visual Studio 2010 is unable to open project

I used Visual Studio 2010 to develop a web application. I formatted my machine and installed Visual Studio 2010 Professional. When I try to open old projects, I get an error saying:
The selected file is a solution file, but was created by a newer version of this application and cannot be opened.
I do not remember the version of visual studio 2010 I used the first time.
Can anyone tell me which version came after the professional edition?
Make sure VS2010 is updated to the latest service pack, otherwise check to see if the project was actually made in VS2012/13 in which case you will need to create a new VS2010 solution and rebuild it from your existing projects.
Open the .sln file in a text editor. In the beginning there is a marker which tells the VS version it is meant for. For VS 2010 it should look like that:
Microsoft Visual Studio Solution File, Format Version 11.00
# Visual Studio 2010
You should be able to change these values without any problems. As far as I know the file format did not change.
EDIT
Considering the comment of Dumisani: of course you need to target .net 4.0 and make sure no features of .net 4.5 are used!
Chances are you had a service pack installed that you are missing with a clean installation.

Convert solution to the latest version

I am practicing Microsoft net framework training kit. The problem is that the solution/projects were made by Visual Studio 2008. I use Visual Studio 2012.
The projects are unavailable.
I want to modify the solution file and project files. Just worry about messing up them.
Another snapshot:
How to modify them by editor then I can load them with visual studio 2012?
Visual Studio should do update the projects and solutions for you. In my experience, it only shows unavailable when the project is located in a different location than where the solution file is looking for it. Perhaps you recently changed the name or copied only some of the files?
At the very least you should be able to remove the unavailable projects and re-add the original projects. They'll be converted as they're added.
Convert it to 2010 first, then convert it to 2012. It is the particular case. It could be the project was written in 2008 but faied in 2012.

Running Visual Studio 2005, 2008, and 2010 on same system

I have around 50 projects in Visual Studio 2005 that I am building a new development machine for and I'd like to slowly move those projects to VS 2008 but also have 2010 available for select new projects.
Can this work? Are there any gotchas for this sort of setup? Any general advice for running multiple versions of Visual Studio on the same system would be greatly appreciated. Specifically related to managing a controlled migration of projects to new versions but being able to selectively keep some on old versions.
I've got 7.1, 8, and 9 installed at the same time (well, and VB part of 6 as well) and I've not really had a problem opening projects file in the wrong version. The Visual Studio Solution files is "associated" with a particular version even if they all have the same extension of .sln, as you can see from its little icon. Microsoft Visual Studio Version Selector seems to handle individual project files (.vcproj) fine as well.
The only thing I've had is the individual source code files not opening up in the latest version like I want, but that's easily fixed with the click of a little button in VS Opions.
Microsoft have this to say:
Visual Studio supports the installation of Visual Studio .NET 2002, 2003, ... on the same computer.
In general, you should install the earliest release of Visual Studio first, and then install subsequent versions of Visual Studio in the order in which they were released.
Make sure when you open up the 2005 files you're doing it in 2005. To open them in another would require a conversion which would render them incompatible with the older compiler set-up. To aid this, structure whatever workspace you're using into 2005, 2008, and 2010 so as to minimize accidental chance of this.
Second, when you double click to open the projects, it will invariably attempt to open them with 2010. You'll have to start with VS#### instead of the solution/project unless you're in the 2010 workspace.
I have VC6, VB6, VS 2008, and VS2010 RC installed on Windows Vista. I cannot double click on the VC6 dsp files without VS2010 opening and asking to perform the conversion. The 2008 C# projects open in 2008 as long as I use the solution file. The 2008 project file opens in 2010 instead of 2008 even though the version selector is the default program. Most of the time I try to remember to open the desired version of Visual Studio and then open the project.
You can mitigate some of these issues by changing the default program associations in the control panel or the registry.
Update: This setup works on Windows 7 x64, with the addition of VS2013.
Yes it can work. I'm not sure if you have to install them in a particular order... but install them in order of the versions... 2005, 2008, 2010. Should be good to go.
I can't speak for 2010, but I have run 2005 and 2008 at the same time on my system without any fuss.
And I made the double-click mistake that wheaties warns about more than once :(
I have VS2005 & VS2008 running without any issues. I have had problems when working with betas, express editions & am assuming you don't have them.
I would say refrain from making too many changes to the setup of these editions, it should be fine.
I also had the same doubt. I work at my company which is still on VS 2008 and I want to personally use the VS 2010 and not risk the 2008. I installed the 2010 and it worked fine with the 2008. Just make sure you note the projects that are in 2005 and open them with the same accordingly.
The reason why it works is simple: if you open your solution file in Notepad, you'll see which version of VS is related to your project.

Is it possible to use VS2010 on a VS2008 Solution w/o upgrading?

I'm working on a small team project, and would like to play around with VS2010 without forcing the entire team to. I would be fine maintaining 2 project files if there was some sort of script or app to help do so.
I suspect not.
Based on history (never been possible before) and checking out a couple of solution files, one from 2008:
Microsoft Visual Studio Solution File, Format Version 10.00
# Visual Studio 2008
and one from 2010:
Microsoft Visual Studio Solution File, Format Version 11.00
# Visual Studio 10
this seems likely to continue. The project files also contain a version, so you can't just use a different solution with the same projects.
On the other hand, VS2010 will support .NET 2, 3, 3.5 and 4.0, so you can upgrade VS without changing the target environment.

Resources