Visual C++ Developer Center > Visual C++ Forums > Visual C++ General > Downgrade vcproj and solution files from VS2008 to VS2005 projects/solution.
Ask a questionAsk a question
 

AnswerDowngrade vcproj and solution files from VS2008 to VS2005 projects/solution.

  • Monday, May 05, 2008 9:42 AMSrirang Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Hi,

    We are looking at an automated way to generate VS2005 VC++ project files from there VS2008 counterparts. I wanted to know if Visual Studio provides any tools for this. If not a tool, does the VS2008 IDE provides any API in its SDK to accomplish such a thing?

    As mentioned in the subject, we basically want to downgrade a VS2008 project file to a VS2005 project file. The same needs to be done for solution files as well. I read several posts about this issue. But all of them that I read dealt with C# projects (csproj files).

    I wanted to know if there is anything specially available for VC++ projects.

    Also, there are certain attributes that I would like to change when doing the downgrade. Currently this is being accomplished with a simple .NET application that treats the projects as bare XML files and do the modifications using the .NET XML library.

    Is there a more elegant way to do this?

    Any pointers related to this would be helpful.

    Thank you.

    Regards,
    Srirang.

Answers

  • Tuesday, May 06, 2008 1:57 AMnobugzMVP, ModeratorUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer
    It's pretty easy to do by hand, should be easy to write a small program:
    - change Version from "9.00" to "8.00"
    - drop TargetFrameworkVersion attribute
    - drop RandomizedBaseAddress and DataExecutionPrevention attributes from VCLinkerTool tool element
    - drop VCWebDeployment tool element
    - drop MinFrameworkVersion in AssemblyReference element

    Use Windiff on a converted VS2005 project if I missed anything.
  • Friday, May 09, 2008 9:51 AMYan-Fei Wei Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer

    Hi,

     

    When Visual Studio 2005 is released, we can’t know the solution/project file format in future Visual Studio versions. Thus, as far as I know, Visual Studio doesn’t have built-in capability to convert solution/project files of high version to corresponding low version format.

     

    Nobugz has given a good solution, and you can write a utility to do that.

     

    Thanks!

     

All Replies

  • Tuesday, May 06, 2008 1:57 AMnobugzMVP, ModeratorUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer
    It's pretty easy to do by hand, should be easy to write a small program:
    - change Version from "9.00" to "8.00"
    - drop TargetFrameworkVersion attribute
    - drop RandomizedBaseAddress and DataExecutionPrevention attributes from VCLinkerTool tool element
    - drop VCWebDeployment tool element
    - drop MinFrameworkVersion in AssemblyReference element

    Use Windiff on a converted VS2005 project if I missed anything.
  • Tuesday, May 06, 2008 8:50 AMSrirang Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    We are doing the same thing. We have a small .NET application which operates upon the project files using the XML libraries.

    I just wanted to know whether Visual Studio by itself has any mechanism for downgrade, similar to the way it does the upgrade by itself.

    Anyways, thank you for the listing, I had missed out a couple of points.

    Regards.
  • Friday, May 09, 2008 9:51 AMYan-Fei Wei Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer

    Hi,

     

    When Visual Studio 2005 is released, we can’t know the solution/project file format in future Visual Studio versions. Thus, as far as I know, Visual Studio doesn’t have built-in capability to convert solution/project files of high version to corresponding low version format.

     

    Nobugz has given a good solution, and you can write a utility to do that.

     

    Thanks!

     

  • Friday, August 15, 2008 4:31 AMgithin Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    is there any program already available to do so?

    Kindly provide the link if so.

    Thanks in advance
  • Tuesday, June 23, 2009 9:25 PMknockNrod Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

    Hi,

     

    When Visual Studio 2005 is released, we can’t know the solution/project file format in future Visual Studio versions. Thus, as far as I know, Visual Studio doesn’t have built-in capability to convert solution/project files of high version to corresponding low version format.

     

    Nobugz has given a good solution, and you can write a utility to do that.

     

    Thanks!

     

     

     

    I'm confused:  It's impossible, but it's easy?  If creating a simple utility to convert using the recommendation from Nobugz is easy, is there any reason this "utility" couldn't be added to a drop-down menu item under Tools?  If that's the case, then why can't _you_ do it, call it an export wizard, and release it with VS 2008?  VS 2010?

    If you can't do that, then can you either stop releasing VS every two years?  Or perhaps you could allow the user to create a VS2005 project with VS 2008 or 2010?  Seriously, two years is too fast for corporate America to keep up with here, guys.  (I'm politely assuming that the rest of the world is more affluent and smarter than Mexico, Canada, US and everyone in South and Central America.) 

    There's going to be overlap.  Only, your marketing guys do a pretty good job of making older versions of your software unavailable when a new release is out.  This makes it nearly impossible for existing shops to keep up -- every time they hire a new employee, everyone in the shop has to buy an immediate upgrade.  That's not really a tennable solution.