Rick Strahl's Weblog  

Wind, waves, code and everything in between...
.NET • C# • Markdown • WPF • All Things Web
Contact   •   Articles   •   Products   •   Support   •   Advertise
Sponsored by:
West Wind WebSurge - Rest Client and Http Load Testing for Windows

Moving Projects/Solutions between Orcas and Visual Studio 2005


:P
On this page:

With Orcas supporting multi-targeting it'll be common to work in Orcas with .NET 2.0 projects. But when you take a VS 2005 project/solution and open it in Orcas it wants to update to an Orcas solution and projects. Which is fine if you're working on your own thing, but if you share around projects and solutions you might find that you actually would like to keep your projects in VS 2005 format so those that only have VS 2005 can open them.

I figured this would be a problem since Orcas explicitly asks to update your projects to the Orcas project types.  But to my surprise I found that an Orcas Project files (2.0 targeted at least) work just fine in Visual Studio 2005 which makes sending off projects to VS 2005 users at least possible.

So I took a look to see what's actually different in the project formats. I looked at several different projects - a Web Application Project, and several Class Library projects that had been ported to Orcas and have been modified over the last few months. All of these projects could be opened with Visual Studio individually.

Sticking the project file into Beyond Compare to see what's different yields only a couple of small version number changes a few apparently optional additional attributes:

Surprising all the 'upgrade' fuss that Orcas makes huh? <s> So project files pretty much work two-way. Even if you open a project in Visual Studio 2005 and save it it leaves the above version changes alone so if you go back to Orcas it just opens without popping up the upgrade dialog again.

Cool!

Now the Solution file is a different story however. An Orcas Solution file will not open in Visual Studio 2005. What's odd is that it appears that Orcas is actually REMOVING content from the file rather than adding new features to it:

So Solution files can't go back and forth only forward to Orcas. That's not a huge deal as it's relatively easy to recreate a solution file if necessary or even easier to just keep around a second copy of a solution file for VS 2005 if necessary. Solution setting usually don't change to frequently anyway.

However, it's also really, really easy to fix the solution file (at least for the 3 or 4 solutions I tried), by simply changing the headers back to VS 2005 format (ie. change the version to 9.00 and Visual Studio 2005) and you're back in business with VS 2005.

Of course if you start adding Framework 3.5 to your project there's no going back. I think this will be a far more common scenario, but while playing around with Orcas right now the 2.0 targeting is a really nice way to familiarize yourself with Orcas. I know I've been using Orcas almost exclusively for the last couple of months for 2.0 coding and it's worked out great.

Looks like Microsoft really got this right: Making it easy to move between versions. If you remember all the pain that went with upgrading to .NET 2.0 (especially ASP.NET 2.0) Orcas and even .NET 3.5 is going to be a relative painless path by comparison.

Right on!

Posted in Visual Studio  Visual Studio  

The Voices of Reason


 

Josh Stodola
July 27, 2007

# re: Moving Projects/Solutions between Orcas and Visual Studio 2005

Definitely good to hear. The ASP.NET 2.0 conversion was a nightmare to say the least. And because of that I was initially fearful of the new Orcas release, but reading this makes me much more willing to give it a shot, and probably sooner than later.

Ryan Ternier
July 27, 2007

# re: Moving Projects/Solutions between Orcas and Visual Studio 2005

This is good to hear, however it's too bad about solution editing :(

Our main solution deals with 33 projects, 8 Web application projects. I really wanted to test this out in a major environment to see how it functioned and worked with it, and hopeuflly use it while the rest of my team uses VS 2005. I don't see this happening :(

Rick Strahl
July 27, 2007

# re: Moving Projects/Solutions between Orcas and Visual Studio 2005

Ryan can't you just create a copied Solution for Orcas and work off that or use a local copy that doesn't update into source control? That should work easily as long as you don't need to add anything into the Solution and that you can do manually if necessary.

The change to the solution file is just 2 things: the version number and the Visual Studio name so if you keep a master copy in 2005 you can always easily get your changes updated and switched into Orcas.

I basically now use Orcas and whenever I need to distribute fix the solution file for 2005 which takes only a minute.

Ryan Ternier
July 27, 2007

# re: Moving Projects/Solutions between Orcas and Visual Studio 2005

Rick, Thanks for the reply. I'll try that.

I always like playing with new stuff.. new toys... new things...

Yoav Zobel
August 08, 2007

# re: Moving Projects/Solutions between Orcas and Visual Studio 2005

Thanks for this great tip.
Note that this does not work on C++ or CLI projects (vcproj), since the upgraded projects cannot be opened in VS2005.

StevenIBSI
August 23, 2007

# re: Moving Projects/Solutions between Orcas and Visual Studio 2005

The first time I tried this approach I was getting the vbproj files which had been converted in vs 2008 to prompt for conversion when loaded back in vs 2005. I started over with clean vbproj and sln files and copied the sln file before upgrading (i.e. SolutionName.SLN to Solutionname2008.SLN). After that I was able to open the original sln file in 2005 with the upgraded 2008 vbproj files and seems good now.

Thanks

StevenHarman.net
September 28, 2007

# Multi-Targeting VS2005 and VS2008 Web Application Projects, a Gotcha!

Multi-Targeting VS2005 and VS2008 Web Application Projects, a Gotcha!

Scott Dorman
September 30, 2007

# Visual Studio 2008 Multi-targeting

Visual Studio 2008 Multi-targeting

Sami Poimala
December 08, 2007

# re: Moving Projects/Solutions between Orcas and Visual Studio 2005

Actually there shouldn't be any problem adding Framework 3.5 assemblies to the projects as they are just that - assemblies. VS 2005 will compile against them just fine.

Rick Strahl
December 09, 2007

# re: Moving Projects/Solutions between Orcas and Visual Studio 2005

Well it's a problem if you don't have .NET 3.5 installed and the assemblies don't exist in the GAC <g>...

graye
December 30, 2007

# re: Moving Projects/Solutions between Orcas and Visual Studio 2005

I've just completed a utility that will allow you to convert between VS2005 and VS2008 projects. (It just edits the solution and project files... no other conversion is done).

I'd consider it an "advanced beta", but folks are welcome to take a look at the VB2008 source code.

http://home.hot.rr.com/graye/Temp/ProjectConverter.zip

Oleg
January 08, 2008

# re: Moving Projects/Solutions between Orcas and Visual Studio 2005

Hi graye, It is very usefule utility, could you give me solution for VS2005?

Thank you :-)

graye
April 18, 2008

# re: Moving Projects/Solutions between Orcas and Visual Studio 2005

The ProjectConveter utility is now complete: http://home.hot.rr.com/graye/Articles/ProjectConverter.htm

Javier
February 06, 2009

# re: Moving Projects/Solutions between Orcas and Visual Studio 2005

Project converter is no a valid link any more :( Even google cache has lost it!

West Wind  © Rick Strahl, West Wind Technologies, 2005 - 2024