Department of InformatiX
Microsoft .NET Micro Framework Tools & Resources

Not only is the solution conversion wizard unable to convert your 2.x projects, but you can't load them into the Visual Studio at all! Let's see how to overcome it without the need of creating a completely new project.

Manual upgrade

Project files

To make your project at least openable, very simple change in a text file is needed:

  1. Locate the project file (it has a .csproj extension).
  2. Open it in Notepad (or your favorite text editor). To do this from Explorer, right click on the file and select Open With.... If it is submenu and you see a Notepad in it, click on it and continue with the next step. If it is a submenu and there is no Notepad item there, select Choose Default Program... from the submenu. Finally, the Open With dialog box should be shown. Expand Other programs section and choose Notepad. Uncheck the Always use selected program to open this kind of file option.
    Open With dialog
  3. You will see an XML, like this one:
    <Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <PropertyGroup> <AssemblyName>Sebi's Game</AssemblyName> <OutputType>Exe</OutputType> <RootNamespace>SPŠST.DMP.SebisGame</RootNamespace> <ProjectTypeGuids>{b69e392-b931-443c-abe7-7e7b65f2a37f};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids> <ProductVersion>8.0.50727</ProductVersion> <SchemaVersion>2.0</SchemaVersion> <ProjectGuid>{0530A5AA-3097-41A5-A77A-C84365B55E4C} </ProjectGuid> <TinyCLR_ClientOnly>true</TinyCLR_ClientOnly> <TargetFrameworkVersion>v2.0</TargetFrameworkVersion> </PropertyGroup> ...
  4. Two changes are needed: first, add a ToolsVersion="3.5" attribute to the Project element, and change the TargetFrameworkVersion value to v3.0. So the final XML should look like this:
    <Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5"> <PropertyGroup> <AssemblyName>Sebi's Game</AssemblyName> <OutputType>Exe</OutputType> <RootNamespace>SPŠST.DMP.SebisGame</RootNamespace> <ProjectTypeGuids>{b69e392-b931-443c-abe7-7e7b65f2a37f};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids> <ProductVersion>8.0.50727</ProductVersion> <SchemaVersion>2.0</SchemaVersion> <ProjectGuid>{0530A5AA-3097-41A5-A77A-C84365B55E4C} </ProjectGuid> <TinyCLR_ClientOnly>true</TinyCLR_ClientOnly> <TargetFrameworkVersion>v3.0</TargetFrameworkVersion> </PropertyGroup> ...
  5. And that's all! Save the file and you can open the project in the Visual Studio 2008. It won't try to convert it anymore.
  6. You should check a framework's change log for breaking changes and update your files accordingly. Also you might need to add, remove or correct referenced assemblies.

Solution files

If you use solutions, Visual Studio would still try to convert them, although now it will succeed. However, if you want to skip this step, you can "upgrade" your solution files yourself too.

Open the .sln file in Notepad (or your favorite text editor) just like in the previous case. This time, however, you will see plain text starting with these lines:
  Microsoft Visual Studio Solution File, Format Version 9.00 # Visual Studio 2005

Just change it to:
Microsoft Visual Studio Solution File, Format Version 10.00 # Visual Studio 2008

(remove any empty lines at the beginning) and save the file.

Now it should have the icon with digit 9 in a box, and you should be able to open it as usual, without any wizards.

Automated upgrade

Despite the fact that the manual upgrade steps are quite easy to do, it still requires your time, especially if you have several projects to convert. So here is a little tool (ZIP, 35 kB), on which you can drag any solution or project files and it will automatically do conversions for all projects in the solution(s) using the steps above.

Moreover, the tool scans all the project files and tries to do these updates:

Modified files are being backuped. Enjoy!

Comments
Comment Eric T. 1/25/2016 11:26:33 PM
Your project type Guids are wrong, they're missing a 0 in the first segment. The correct ProjectGuids is b69e3092-b931-443c-abe7-7e7b65f2a37f
Sign in using Live ID to be able to post comments.