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 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"



<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.



Comments (11)

  1. Ciantic says:

    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.


  2. mousio says:

    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"

  3. Remy BURNEY says:

    Worked for me as well.

    I had a line like :

    <Import Project="$(MSBuildExtensionsPath)MicrosoftVisualStudiov10.0WebApplicationsMicrosoft.WebApplication.targets" />

    changed by :

    <Import Project="$(MSBuildExtensionsPath)MicrosoftVisualStudiov9.0WebApplicationsMicrosoft.WebApplication.targets" />

    And look also inside *.csproj.user files.

  4. ManiX says:

    Worked for Me, Thanks a lot

  5. Xavier Averbouch says:

    great! it worked fine for me!

  6. rajinn says:

    how can you open them in the notepad++ it keeps giving me "null null null null"! tnx

  7. Abhi says:

    It worked for me also..

    You can open it in notepad also and make necessary changes.

  8. AV says:

    It worked for me also..

    You can open it in notepad also and make necessary changes.

  9. Neha says:

    Thanks!!!!! Worked For Me..

  10. surya says:

    Good work ….!

  11. Divya says:

    How to use Ajax properties in MSVN 2008.

    Its showing error as property not supported

Skip to main content