Question

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?

Was it helpful?

Solution

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.

OTHER TIPS

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

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.

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/

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

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow