views:

222

answers:

5

I have no desire to install 2005 on my laptop, but I do often like to work at home. I am formulating a process to enable me to check out the 2005 project, back up the solution and project files - these are all that change - and convert the solution to 2008. I then back up the 2008 solution and project files, and commence work.

To commit my work, I compare old and new 2008 solution and project files, and manually effect any changes on the 2005 solution and project files. This rarely happens, and when it does, 98% of the time it is adding, renaming, or removing a simple class or an ASP.NET page with code behind and designer file. Then I replace the 2008 solution and project files with the updated 2005 ones, and commit the solution.

Am I missing anything?

A: 

Why don't you create two seperate projects, one for vs2005 and one for vs2008?

Wimmel
I have to commit changes to the core 2005 repository, but you may have a point - if I change a project file in 2008, I can echo that change in the 2005 project file.
ProfK
+1  A: 

You should use only Visual Studio 2008, because it has the Multi-Targeting feature and thus allows you to work on .net 2.0 applications (1.1 is not supported) without converting them to a VS 2008 solution

Check out this post by ScottGu for more details about this issue.

Andreas Grech
My colleagues are still using 2005 only, so if I commit a 2008 project file change, the main code base will be broken.
ProfK
Your colleagues need to change.
Dave Markle
This isn't correct. Is using VS 2008 you must convert to a VS 2008 solution format, even if you're targeting .net 2.0.
Ian Suttle
A: 

it's possible to work in framework 1.1 in visual studio 2008

http://tech.einaregilsson.com/2008/01/15/developing-aspnet-1-1-in-visual-studio-2008/

A: 

Why don't you just use two different solution files, one for 2005, one for 2008?

+1  A: 

We maintain multiple project files - one for each VS version. If we're adding classes to any particular version quite often those do need to be replicated to other versions as you've mentioned.

We're also taking care to use compilation directives like "#if DotNet35" to "hide" areas of code that may exist in say 2008 but are too new for 2005. This is useful if you're dealing with a shared library used in both 2005 and 2008 projects.

Regarding the answer about multi-targeting, that won't be of much help as VS2k8 still requires the solution file to be in the 2k8 format. It would simply ensure the end result, aka what get's compiled, is able to target a specific version of the framework.

Ian Suttle