Jan
27
2013

Visual Studio 2010 – How to convert visual studio 2010 solution to 2008

In this article we are going to learn to convert visual studio 2010 solution to 2008.

But why we need to convert from higher version lo lower version of visual studio? The same question was in my mind when we first encountered with the problem.

When we first started the project it was using Visual Studio 2008 on .net framework 2.0. Recently we started using vs 2010 and migrated vs 2008 solution to vs2010 but with a different branch and we even started developing new plugins in this new branch. We are quite happy with this new branch. Now we have two branches one is in vs2008 and other is in vs2010.

For some reasons, now we wanted to move some newly developed projects in vs2010 branch to vs2008. There is a support in vs2010 to upgrade solution/projects from vs2008 to vs2010 very easily, but not vice versa. This is achievable through vs2010 IDE. But there is no support to move projects from vs2010 to vs2008.

After a lot of search I found a way to achieve this. Here are the steps to move projects from Visual Studio 2010 to Visual Studio 2008. There are two ways to convert VS2010 solution to VS2008 or 2005.

Steps to convert visual studio 2010 solution to 2008 or 2005

convert visual studio 2010 solution to 2008/05
convert visual studio 2010 solution to 2008/05
  1. Make changes in Solution(.sln) convert visual studio 2010 solution to 2008
    1. Open a solution (.sln) file in any text editor. File will look like –
      Microsoft Visual Studio Solution File, Format Version 11.00
      # Visual Studio 2010
      Project(“{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}”) = “SampleSolution”, “SampleSolutionSampleSolution.csproj”, “{C6FB9BD5-616E-4E1B-B623-73F78F893A36}”
      EndProject
      Global
                 GlobalSection(SolutionConfigurationPlatforms) = preSolution
                             Debug|x86 = Debug|x86
                             Release|x86 = Release|x86
                 EndGlobalSection
                 GlobalSection(ProjectConfigurationPlatforms) = postSolution
                             {C6FB9BD5-616E-4E1B-B623-73F78F893A36}.Debug|x86.ActiveCfg = Debug|x86
                             {C6FB9BD5-616E-4E1B-B623-73F78F893A36}.Debug|x86.Build.0 = Debug|x86
                             {C6FB9BD5-616E-4E1B-B623-73F78F893A36}.Release|x86.ActiveCfg = Release|x86
                             {C6FB9BD5-616E-4E1B-B623-73F78F893A36}.Release|x86.Build.0 = Release|x86
                 EndGlobalSection
                 GlobalSection(SolutionProperties) = preSolution
                             HideSolutionNode = FALSE
                 EndGlobalSection
      EndGlobal

    2. Now, replace above highlighted lines with following lines –
               
      Microsoft Visual Studio Solution File, Format Version 10.00
      # Visual Studio 2008

    3. Save this solution file. Now you can open it in vs2008.

  2. Make changes in Project Files (.csproj/.vbproj) to convert visual studio 2010 solution to 2008
    1. Open your project file (.csproj/.vbproj) in any text editor.
    2. Once opened, find out following line –
      <Project ToolsVersion=”4.0″ DefaultTargets=”Build” xmlns=”http://schemas.microsoft.com/developer/msbuild/2003″>

    3. And replace above line with following line –
      <Project ToolsVersion=”3.5″ DefaultTargets=”Build” xmlns=”http://schemas.microsoft.com/developer/msbuild/2003″>

    4. That’s it. Now you can open your solution in 2008.

I hope you enjoyed the article and you are now able to convert visual studio 2010 solution to 2008 or 2005. If you find this article helpful, then could you please share the article on your social media?

More articles for your interest –

About the Author: Ashish Ramteke

Ashish Ramteke is a Software Professional, Part time blogger and founder of C# Tutorials, a popular blog on C#.Net. Ashish is having 6 years of work experience and an engineering degree in Computer Science and Engg.

1 Comment+ Add Comment

  • Have you ever considered about including a little bit more than just your articles? I mean, what you say is valuable and all. However think of if you added some great photos or video clips to give your posts more, “pop”! Your content is excellent but with images and videos, this blog could undeniably be one of the greatest in its niche. Wonderful blog!
    Cool blog! Is your theme custom made or did you download it from somewhere? A design like yours with a few simple tweeks would really make my blog stand out. Please let me know where you got your theme. Thanks a lot

    klädbutiker

Leave a comment