Tuesday, June 05, 2012

You've heard about the new Round Tripping feature in VS2012? Well it's not always rainbows and unicorn horns (usually, but not always)...

The Ultimate Visual Studio Tips and Tricks Blog - Visual Studio 2012 Compatibility (aka Project Round-Tripping)

Now that Visual Studio 2012 is pretty well baked I thought it would be good to start revisiting some of my favorite features again and introduce new ones. Since project round-tripping is one of my most favorite features I thought we would start with it.

The Dark Ages

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 for a long, long time. 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 Information Age

Visual Studio 2012 changes the game. You can now create projects in Visual Studio 2010 with Service Pack 1 then open those projects in Visual Studio 2012 and THEN open the project up again in VS2010 SP1. This works the other way, too! You can create projects in VS2012 (targeting Framework version 4 or less) then open the project in VS2010 SP1 and THEN open it up in VS2012 again. In other words, we now have project round-tripping capability so you can work with the latest features but still keep the solution compatible with team members using an older version of Visual Studio.

...

The Fine Print

As you probably guessed by now this doesn’t work with every project type and there are some limitations based on the project type you use. For the full list of project types and limitations you can go here:

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

SNAGHTML32cbc645..."

Visual Studio 2012 RC Compatibility

"To take advantage of the full functionality of Visual Studio 2012 RC, you might need to upgrade certain types of solutions, projects, files, or other assets that were created in previous versions of Visual Studio. If you created your assets in Visual Studio 2010 with Service Pack 1 (SP1), many of them will load and run in Visual Studio 2012 RC without any further action on your part. For information about why you must have Visual Studio 2010 with SP1 to migrate seamlessly and continue to use those assets in both that version and Visual Studio 2012 RC, see Round-tripping with Visual Studio 11.

If you open an asset that requires modification, the Review Project and Solution Changes dialog box appears and places the asset into one of the following categories:

  • Changes needed. You must modify these assets before you can open them in Visual Studio 2012 RC. After the assets are changed, you will still be able to open them in Visual Studio 2010 with SP1, and the project behavior will not change.

  • Upgrade needed. You must upgrade these assets before you can open them in Visual Studio 2012 RC. After you upgrade, you might not be able to open them in previous versions. For more information about specific cross-version compatibility, see the following sections.

  • Unsupported projects. You can't open these assets in Visual Studio 2012 RC. You must use a version of Visual Studio that supports this type of asset.

Note

If you are trying to open a project type for which the associated product isn't installed, an error might state that the project type isn't supported. The project type will appear in the Review Project and Solution Changes dialog box under the heading Unsupported projects. To resolve this issue, in Windows Programs and Features, choose Visual Studio, choose Change, choose Repair, and then install the missing product.

If your team uses both Visual Studio 2010 with SP1 and Visual Studio 2012 RC, you can continue to collaborate with your team members on projects and files in both versions if your app doesn’t require functionality that's specific to Visual Studio 2012 RC. For example, you can create projects and files in Visual Studio 2010 with SP1, open them in Visual Studio 2012 RC, and then open them again in Visual Studio 2010 with SP1 as long as you don't add features that require Visual Studio 2012 RC. You can also create projects and files in Visual Studio 2012 RC and open them in Visual Studio 2010 with SP1 as long as they don't require functionality that's specific to Visual Studio 2012 RC.

Caution

If a project requires features that are specific to Visual Studio 2012 RC, you can't open that project in a previous version. For example, an error appears if you try to use an earlier version of Visual Studio to open a project that targets the .NET Framework 4.5 RC. Furthermore, you can enable language features such as Visual Basic Iterators and Visual Basic Core in Visual Studio 2012 RC, but those projects might not build correctly in earlier versions of Visual Studio.

...

image"

Actually this feature is awesome and in most cases will just work. In most cases, it's going to make moving to VS 2012 much easier than VS2005/2008/2010 was. When it doesn't it's likely a case that makes sense due to the platform, deprecated feature, etc. For example, there's no Setup and Deployment Project support in VS 2012. Also the slightly more edge case Project types are not yet supported in VS 2012, like Windows Phone, etc. (WHAT? No Windows Phone dev in VS2012! AAAHHH!!! Guys, we're still in the RC stage, all these Project types will come in the near future... Same thing happened last release)

No comments: