Le réseau pour les développeurs > Forums - Accueil > Visual C++ General > Downgrade vcproj and solution files from VS2008 to VS2005 projects/solution.
Poser une questionPoser une question
 

TraitéeDowngrade vcproj and solution files from VS2008 to VS2005 projects/solution.

  • lundi 5 mai 2008 09:42Srirang Médailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateur
     
    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.

Réponses

  • mardi 6 mai 2008 01:57nobugzMVP, ModérateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateur
     Traitée
    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.
  • vendredi 9 mai 2008 09:51Yan-Fei Wei Médailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateur
     Traitée

    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!

     

Toutes les réponses

  • mardi 6 mai 2008 01:57nobugzMVP, ModérateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateur
     Traitée
    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.
  • mardi 6 mai 2008 08:50Srirang Médailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateur
     
    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.
  • vendredi 9 mai 2008 09:51Yan-Fei Wei Médailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateur
     Traitée

    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!

     

  • vendredi 15 août 2008 04:31githin Médailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateur
     
    is there any program already available to do so?

    Kindly provide the link if so.

    Thanks in advance
  • mardi 23 juin 2009 21:25knockNrod Médailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateur
     

    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.