Delen via


Convert VS2010 Projects back to VS2008 ones…

Long time no blogs. been busy on works, also mostly twittering and plurking except blogging. time to write something.

Before going further, be caution that this is just personal-experience know-how writing, and use at your own risk.

Being testing Visual Studio 2010 beta 1, I am writing some projects under it, also using TFS 2010 beta 1 for source control. when you do this like me, you should experience same problems like me. that is, when you want to hand out your project to your team members, you’ll have to force your team to upgrade to VSTS 2010 beta 1, or you’ll have to manually convert all your vsts 2010 projects/solutions back to vsts2008 ones for exchangeability. when you have tens of projects that compose a solution, it will be tidy to manually create projects and reset the source relationships for vsts2008 again.

so here is the idea, using file-wide string-replacing to convert vsts2010 project/solution files back to vsts2008 ones. I’ve tried it on my own and proved worked. the pre-requisites are that, you only have class library projects, console projects as well as asp.net web projects.

so, here are the necessary replacing strings you need to go through. use editors that support file-wide string-replacement (like Notepad++) to do this. don’t replace those in vsts 2010 or vsts 2008 since you are mainly manipulate solution (.sln) and project (.csproj or .vbproj) files.

for all your project and source files, do the following (find first line and replace to second line):

TargetFrameworkMoniker = ".NETFramework,Version=v2.0"
TargetFramework = "3.5"

# Visual Studio 10
# Visual Studio 2008

Microsoft Visual Studio Solution File, Format Version 11.00
Microsoft Visual Studio Solution File, Format Version 10.00

<Project ToolsVersion="4.0"
<Project ToolsVersion="3.5"

<ProductVersion>10.0.20506</ProductVersion>
<ProductVersion>9.0.30729</ProductVersion>

\VisualStudio\v10.0\
\VisualStudio\v9.0\

<Import Project="$(MSBuildToolsPath)\Workflow.Targets" />
<Import Project="$(MSBuildExtensionsPath)\Microsoft\Windows Workflow Foundation\v3.5\Workflow.Targets" />

This worked on my solutions, you can try to see if it fit to your cases.

 

FYI.

Technorati Tags: microsoft,visual studio,2008,2010,project,solution,convert

Comments

  • Anonymous
    September 25, 2009
    Worked here as well, though I didn't have that many lines to change. Also if someone else is doing this, look also inside *.csproj.user files. Thanks.

  • Anonymous
    February 24, 2010
    Your posting is much appreciated; thank you. It worked here also, but the second string to replace was "# Visual Studio 2010" instead of "# Visual Studio 10"

  • Anonymous
    July 18, 2010
    The comment has been removed

  • Anonymous
    September 28, 2010
    Worked for Me, Thanks a lot

  • Anonymous
    November 28, 2010
    great! it worked fine for me!

  • Anonymous
    November 29, 2010
    how can you open them in the notepad++ it keeps giving me "null null null null"! tnx

  • Anonymous
    February 28, 2011
    It worked for me also.. You can open it in notepad also and make necessary changes.

  • Anonymous
    February 28, 2011
    It worked for me also.. You can open it in notepad also and make necessary changes.

  • Anonymous
    June 20, 2011
    Thanks!!!!! Worked For Me..

  • Anonymous
    May 13, 2014
    Good work ....!

  • Anonymous
    November 27, 2014
    How to use Ajax properties in MSVN 2008. Its showing error as property not supported