Click here to Skip to main content
Click here to Skip to main content

Whidbey to Everett Project Converter (Visual Studio 2005 to Visual Studio 2003)

, 7 Jun 2006
Rate this:
Please Sign up or sign in to vote.
This article describes how to convert a Visual Studio 2005 project into a Visual Studio 2003 compatible format
Sample Image - WhidbeyProjectConverter.jpg

Introduction

This article demonstrates how to convert a Visual Studio 2005 project to a compatible 2003 format. The motivation behind this article was twofold. First, I wanted to compile in both .NET v1.1 and .NET v2.0 and secondly, I only wanted to maintain one project file, mainly Visual Studio 2005.

There is an open source project named MSBEE from the Microsoft team that works well to compile to .NET 1.1 from a .NET 2.0 project, but it doesn't support building within Visual Studio 2005, you have to go to a command line prompt and run msbuild. You also will not get the same warnings, intellisense, etc. in Visual Studio 2005 as you would with Visual Studio 2003. That's the main reason why the team didn't support building to .NET 1.1 from within the IDE.

A solution that I see a lot of floating around the Internet is to maintain two project files. One for both Visual Studio 2003 and Visual Studio 2005. Although this works, it is cumbersome and difficult to maintain two identical project files when add, removes, etc. are performed on the files in the project. The main reason why I badly wanted MSBEE to work from within the IDE was to avoid having to maintain these two project files.

So along came the Whidbey project converter. Now I only maintain and work from within Visual Studio 2005, and export my changes to the Visual Studio 2003 format, bring up the everett IDE and compile to .NET 1.1 very easily, with debugging and intellisense support. No more maintenance nightmares, and it all works so well, as opposed to a build hack from within Visual Studio 2005. A large portion of this code came from Jeff Key. I couldn't get his original source to work, because he built it to the Visual Studio 2005 beta1 release specifications. I fixed it to work with the latest and greatest, and am sharing it here if it can be of any help to you as well as it was for me.

Background

This article is an extension of Jeff Key's original work. You can download it here.

Vision

Add direct support from within Visual Studio as an AddIn.
Subversion support ties in with SvnRev and makefiles.

Updated 2006-05-30

I've completed an overhaul of the Whidbey project converter, including some bug fixes that came to my attention after I published the article.

I added command line support to allow it to work in a build environment. The motivation behind that feature is better support for continuous build integration. A little story will do this a little justice. I'm Joe, the developer using Visual Studio 2005. I add/remove some files to/from my project and commit the changes to my repository. Cruise Control .NET (ccnet) automatically notices the changes, updates the local working folder and builds the project, and all would seem well in Joe's life and team, but it is not. If Joe has a substantial project, it has to reference a few other assemblies to build correctly. Let's assume Joe builds his projects and copies the resultant *.dlls to a common directory that all his other projects reference, let's say c:\dev\common\assembly\v1.1. And that's great, it works. With that reference comes a hardlink in the Visual Studio 2005 project file to that local directory on Joe's machine, which probably will not be like the one on the ccnet servers. So how do we fix it so everybody is happy and Joe doesn't notice a thing.

First of all, I have to admit that after installing ccnet and taking the time to learn how to transform an existing Visual Studio 2003 project file into a NAnt build file, I fell in love with NAnt. NAnt supports both v1.1, v2.0, cf, etc. but the biggest boon is in the VSConvert.xsl file you use to transform the project. It's possible to change the hardlinked paths to the dependant assemblies. In my case, I change them to an environment variable LIB_11 and LIB_20 and the project builds flawlessly and doesn't change the pre-existing Visual Studio 2003 project file, so Joe's happy with that. But let's be practical about this, who in her/his right mind is going to want to go to the command prompt whenever they change their project contents by one or more files? Not me. That was problem one with grace land, the second was that the VSConvert.xsl I found on the Web was only for Visual Studio 2003 project files. Where's the solution to all of this? WPC to the rescue. Now not only can it transform Visual Studio 2005 projects, it can create Makefiles to trigger re-building nant.build when it's out of date and it can also perform the XSL transform on the Visual Studio 2003 project for you into a nant.build file. And, you can customize the XSL transform to perform the way you want it to in your own build environment. BTW, I have nothing against msbuild, I just believe from experience that NAnt performs better with ccnet.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

andrewcates
Web Developer myspace
United States United States
Its a passion, why else would we be doing this? Everyday it feels like gold fever, wouldn't you agree? With the boom of the internet and an ever decreasing world, programming today feels a lot like the wild wild west of the past. Its so wide open, filled with tremendous opportunities. Its more than a passion, its a forming of the ideas that later generations will use.
 
With over ten years experience, I've earned the right to say that. The majority of my career has focused on enterprise application development. I earned my BS in CS from UCI, hi everybody. My fondest memories as a child was working with the 8mhz IBM AT my daddy brought home for us. Yeah, I'm a geek, and proud of it. We're at the forefront of something huge, enjoy it.

Comments and Discussions

 
GeneralVS 2002<->2003<->2005<->2008 converter PinmemberTorontoSkidder3-Mar-09 14:43 
Question2008 to 2003? PinmemberxMetalDetectorx23-Sep-08 7:40 
GeneralConsider renaming tool Pinmemberjoe@kgsi.com10-Dec-07 3:16 
Question.sln vs .csproj PinmemberYNorman12-Nov-07 3:57 
GeneralDependent projects PinmemberTariq H24-Oct-07 20:40 
Generaloh no Pinmemberuray6-Aug-07 22:52 
GeneralRe: oh no Pinmemberuray6-Aug-07 22:55 
GeneralThanks and things to consider Pinmember-Dy26-Apr-07 23:40 
GeneralWhidbey to Everett Project Converter (VS2005 to VS2003) PinmemberJasgT7-Mar-07 12:50 
QuestionGoing Opposite Way? PinmemberSteveC-A928-Dec-06 9:03 
AnswerRe: Going Opposite Way? PinmemberRoj16-May-07 21:53 
QuestionVB.Net 2005 to VB.Net 2003 ? How to ? Pinmemberkvaradk5-Dec-06 23:08 
QuestionCan u please upload .EXE or 2003 Project Files. ? PinmemberD G Jadeja15-Nov-06 23:30 
GeneralRe: Can u please upload .EXE or 2003 Project Files. ? Pinmemberglenneroo13-Dec-06 5:50 
AnswerRe: Can u please upload .EXE or 2003 Project Files. ? Pinmemberfractl18-Dec-06 11:00 
GeneralRe: Can u please upload .EXE or 2003 Project Files. ? Pinmembersomedeadcat26-Apr-07 13:27 
GeneralVB Support Pinmembernetclectic9-Oct-06 3:35 
GeneralRe: VB Support Pinmemberrun149212-Oct-06 8:12 
GeneralRe: VB Support PinmemberDanilo Corallo26-Oct-06 5:58 
GeneralRe: VB Support PinmemberEGD Eric13-Mar-08 15:42 
General>>> Supports C# projects only &lt;&lt;< Pinmemberk0a1a25-Jul-06 5:12 
GeneralProject &amp;quot;&amp;quot; is invalid: the output type is not set. [modified] PinmemberMark Nijhof21-Jul-06 14:47 
QuestionAny plans to include VB.NET in project??? Pinmemberwasha12-Jun-06 8:31 
GeneralBinary version PinmemberJoe Mason7-Jun-06 8:04 
GeneralRe: Binary version Pinmemberc4tes7-Jun-06 9:15 
GeneralRe: Binary version PinmemberJoe Mason7-Jun-06 9:20 
GeneralRe: Binary version Pinmemberc4tes7-Jun-06 10:21 
GeneralRe: Binary version Pinmembercrazydave226-Jul-06 20:37 
GeneralRe: Binary version Pinmembercrazydave2213-Jul-06 19:53 
GeneralRe: Binary version [modified] Pinmemberdontknowitall15-Jul-06 11:03 
QuestionWhat about C++? PinmemberOlav Langeland30-May-06 2:13 
GeneralOh No! PinmemberMahesh Sapre29-May-06 23:49 
GeneralRe: Oh No! PinmemberWilliam F12-Jun-06 3:33 
GeneralRe: Oh No! Pinmembertechno_adi13-Jun-06 4:22 
GeneralRe: Oh No! PinmemberSaurabh P19-Oct-06 14:53 
anyone with a solution yet. I have the same problem
GeneralRe: Oh No! Pinmemberbohrer9-Dec-06 4:11 
GeneralRe: Oh No! Pinmemberfractl18-Dec-06 11:03 
GeneralThanks! PinmemberRodrigo Dias28-May-06 22:29 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

| Advertise | Privacy | Mobile
Web04 | 2.8.140827.1 | Last Updated 7 Jun 2006
Article Copyright 2006 by andrewcates
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid