Tip: Upgrading VS2008 projects to VS2010

Many of us are upgrading our projects to Visual Studio 2010 nowadays. You start Visual Studio 2010, load the project and the conversion wizard pops up. You click finish, try to compile and get a bunch of errors. Oh no!

The fact is that what Visual Studio version you are using is totally irrelevant to the code. If you are using .Net 2.0, 3.0 or 3.5 then the code should not change and Visual Studio 2010 should be able to execute it. But it doesn’t… Why? Because the conversion wizard is defect. Actually only the solution and project files needs to be changed, but the wizard often attempts to change a whole lot of code as well.

The solution is very simple: Convert the solution, but only keep the new solution and project files.

Step by step guide:

  1. Copy your project to a new folder.
  2. Open the new copy in VS2010 and let VS2010 convert it for you.
  3. Close VS2010.
  4. Copy all converted solution and project files to their corresponding place in the original folder. Files are *.sln, *.csproj, *.vbproj.
  5. Now open the original folder in VS2010 and everything will work just fine.

Alternatively if you are connected to a source repository like TFS, SVN or GIT then you can use the original code folder and then undo changes to all files except solution and project files.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Discover more from Tedds blog

Subscribe now to keep reading and get access to the full archive.

Continue reading