Visual Studio 11 Developer Preview - Project Backward Compatibility (Round-Tripping)

 

[ NOTE:  This post has been depricated.  The new, updated post can be found here:

http://blogs.msdn.com/b/zainnab/archive/2012/06/05/visual-studio-2012-compatibility-aka-project-round-tripping.aspx ]

 

image

 

UPDATE 3/8/2012:  As of the Beta this does not work with all project types.  Most notably web projects are not supported currently for this feature.  For more information on what is supported and what isn't look here:

http://msdn.microsoft.com/en-us/library/hh266747(v=VS.110).aspx

 

Probably one of the most welcome new features in VS11DP is the new project backward compatibility feature also known as project round tripping.  Let’s dig into the details.

 

The Old Days

In all prior incarnations of Visual Studio if you had an older version, VS2008 for example, and opened up the project in a newer version, VS2010 in this case, you had the option to convert the project.  If you did the conversion it was a one-way trip.  You couldn’t open the project again in VS2008 if you tried to go back.  This has been the source of a lot of pain and suffering for developers who have to work with multiple versions of Visual Studio.  We want the cool features of the latest IDE but still want others on our team to be able to open the solution in the older version of Visual Studio when they get the files from source control.

 

The New, Happy Days

You can now create projects in Visual Studio 2010 with Service Pack 1 then open those projects in Visual Studio 11 Developer Preview and THEN open the project up again in VS2010SP1.  In other words, we now have full project round-tripping capability so you can work with the latest features but still keep the solution compatible with and older version of Visual Studio. 

 

Putting it to the Test

Here are the steps you can take to test this for yourself:

  1. Create a project with Visual Studio 2010 with Service Pack 1 and put in a little sample code.
  2. Save and close the solution.
  3. Open the solution (CTRL + SHIFT + O) in Visual Studio 11 Developer Preview and add some more code.  Notice there is no longer a prompt to convert the project that appears.
  4. Save the close the solution.
  5. Open the project up again in VS2010SP1 and bask in the glory of project round-tripping.

 

Limitations / Observations

  • I know this works with Visual Studio 2010 Service Pack 1 but haven’t tested VS2010 with out the service pack.  I believe it will not work unless you have the service pack but am checking with the team.
  • You can’t use this feature with versions older than VS2010.
  • When you use any feature specific to the new version of Visual Studio, like changing the Framework to the latest version, then the project cannot be opened in the prior version.  I just changed the framework version from 4.0 to 4.5 for a project and saved it without many any other change and was not able to open the solution in VS2010.