Geeks With Blogs

News

View Étienne Tremblay's profile on LinkedIn
ET's VS and TFS World Fascinating tidbits about VS and TFS and .NET (well I hope...)

Hey all,

I've seen a few things going around about this so I'd like to put in my .02c too.

When opening a VS2005 solution in VS2008 their will be an upgrade wizard that will show up.  If you go through the wizard and 'upgrade' the solution/project here is what happens: at the top of solution you just opened the first line will change from

 

Microsoft Visual Studio Solution File, Format Version 9.00

to

Microsoft Visual Studio Solution File, Format Version 10.00

 

That's it, nothing else gets change and you *.vbproj or *.csproj are not affect or modified.  So here is what I recommend you do, make a copy of the SLN file in your working folder can call it something with 2008 in it like Mysolution2008.sln.  Then open with the wizard and upgrade.  Then add to TFS/VSS/SVN/etc and you now can work in either 2005 or 2008 with this file or make the copy and open in notepad.  Make the change I just described (9 to 10) save and then open in VS2008.  Same result it just depends if you want to go through a wizard.

This is great news for most folks that are wondering if then can keep their asset working in both 2005 and 2008.  It's a little awkward but at least you keep every member on your team working with the tool they have.

Oh and there is another solution, you can open a brand new solution in VS2008 and add all you proj file to it.  That also works but if you have a very large SLN it might take more time to do this then copy and edit a 9 to a 10.  Up to you.

 

Update: If you want more in-dept info please consult DJ Park's blog How to use solutions and projects between Visual Studio 2005 and 2008 and as always, open and edit SLN files outside the IDE at your own risk.  Those tips have worked for me.

 

Cheers,

ET

Technorati Tags: ,,
Posted on Friday, November 23, 2007 3:12 AM Visual Studio Team System | Back to top


Comments on this post: The difference between VS2005 and VS2008 Solution files

# re: The difference between VS2005 and VS2008 Solution files
Requesting Gravatar...
Salut Etienne,
I looked at the changes performed by the conversion wizard, and the csproj files that have WF code (and I suspect WPF, although I haven't tried yet) are adversely affected. After conversion, the csproj includes a different Msbuild targets file, which won't compile anymore under VS2005.
-Pat
Left by Patrice on Nov 26, 2007 12:07 AM

# re: The difference between VS2005 and VS2008 Solution files
Requesting Gravatar...
Hi Pat,

What you are seeing is by design. The VS2008 project upgrade wizard searches for an import of "Microsoft.WinFX.targets". If this import is found, the following things happen:
1) The Microsoft.WinFX.targets import is removed
2) The ToolsVersion is upgraded to (at least) v3.0, which will cause Microsoft.Common.targets to import Microsoft.WinFX.targets.
3) Any .xaml files in the project are given two additional pieces of metadata ("Generator" is set to "MSBuild:Compile" and "SubType" is set to "Designer").
4) If there is no ProjectTypeGuids property, one is added so that project is flavored with the WPF flavor.

These steps are necessary to ensure that VS2005 WPF projects get the full benefit of the new WPF features in VS2008. That the resulting upgraded project can no longer be opened in VS2005 is a known limitation.

Andrew Jenner
Left by Andrew Jenner on Nov 27, 2007 8:57 AM

# re: The difference between VS2005 and VS2008 Solution files
Requesting Gravatar...
I migrated Windows application C# project files built using VS2005 to VS2008. After migration I saved VS2008 solution file separately. When I tried opening VS2005 solution file using VS2005 IDE got nice replay "The selected file is a solution file, but was created by a newer version of this application and cannot be opened."

I tried comparing 2005 and 2008 project files and noticed there few extra elements/tags added to support 2008 IDE, theoretically 2005 should work. I don't know why the above error is.
Left by Pavan Kumar on Mar 14, 2008 4:12 PM

# re: The difference between VS2005 and VS2008 Solution files
Requesting Gravatar...
So are you opening the migrated solution file or the original 05 file. What you need to do is make a copy of the original first. Then open rename the copy to blah08.sln an open that one. If you want to revert to 05 then open the original non upgrade one. That should work fine.

Cheers,

ET
Left by ET on Mar 16, 2008 11:49 AM

# re: The difference between VS2005 and VS2008 Solution files
Requesting Gravatar...
I've got a ProjectConveter utility that will convert solution files between VS2005 and VS2008: http://home.hot.rr.com/graye/Articles/ProjectConverter.htm
Left by graye on Apr 18, 2008 7:13 PM

# re: The difference between VS2005 and VS2008 Solution files
Requesting Gravatar...
The main difference between VS 2008 and VS 2005 is, earlier concept uses MicroSoft Framework 3.5 and later uses MicroSoft Framework 2.0.
Left by Saibaba CH M H on Aug 23, 2008 4:08 AM

# re: The difference between VS2005 and VS2008 Solution files
Requesting Gravatar...
The VS2008 project upgrade wizard searches for an import of "Microsoft.WinFX.targets". If this import is found, the following things happen:
1) The Microsoft.WinFX.targets import is removed
2) The ToolsVersion is upgraded to (at least) v3.0, which will cause Microsoft.Common.targets to import Microsoft.WinFX.targets.
3) Any .xaml files in the project are given two additional pieces of metadata ("Generator" is set to "MSBuild:Compile" and "SubType" is set to "Designer").
4) If there is no ProjectTypeGuids property, one is added so that project is flavored with the WPF flavor.

Left by srinivas vuppala on Sep 13, 2008 11:05 AM

# re: The difference between VS2005 and VS2008 Solution files
Requesting Gravatar...
Thanks for the details Srinivas.

Cheers,

ET
Left by ET on Sep 15, 2008 8:44 AM

Your comment:
 (will show your gravatar)


Copyright © Etienne Tremblay | Powered by: GeeksWithBlogs.net