Search code examples
.netvisual-studiomigrationvisual-studio-2012projects-and-solutions

What determines if Visual Studio 2012 needs to "migrate" a Visual Studio 2010 projecT?


I have an open source project that is primarily developed using MonoDevelop. I went to test it in Visual Studio 2010 and everything worked fine there. Then, I went to test it in Visual Studio 2012 and it did a "silent" migration of my project and solution.

Unlike Visual Studio 2010, it didn't display any warnings about a migration being needed. Instead, it just did the migration and spew out a migration report. It also reset my project to using .Net 2.0, where before it was set to use 4.0.. (easy to change, but still). After this migration, it works in Visual Studio 2010 fine and doesn't attempt a migration.

However, my question is what determines that it even needs to do a migration? At my work we have a Visual Studio 2010 project that works flawlessly in Visual Studio 2012 without any migration(the project file isn't even marked as modified afterwards) though. What's the difference here?


Solution

  • At the very least VS2012 will update your solution file with lines like this:

    Microsoft Visual Studio Solution File, Format Version 12.00
    # Visual Studio 2012
    

    As for the rest of your solution/projects, what gets "migrated" depends on a number of factors - if you have SP1 for VS2010 then you will have far better interoparebility between the two editions of VS. The big stand-out is database projects (.dbproj files become .sqlproj), regular class libraries should open fine in either edition.

    Here is a quite comprehensive MSDN blog post discussing it: Visual Studio 2012 New Features: Compatibility (aka Project Round-Tripping)