Visual Studio: can I copy a project's properties to use in another project?

前端 未结 4 2059
野的像风
野的像风 2020-12-01 01:05

I\'ve added several directories, libraries such as matlab, opencv, etc to compile my current C file in Visual Studio project.

All my upcoming projects will require t

4条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-12-01 01:36

    I am using AtmelStudio 6.1, which is built on Visual Studio 2010 (I believe), and yet doesn't have any Property Manager that I can find. So, the hackish system I use is:

    1. close (or at least unload via the contextual menu) the project whose configuration you want to modify
    2. open its .cproj file (which is XML) in any text editor (VS works nicely),
    3. MAKE A BACKUP COPY OF IT SOMEWHERE ELSE JUST IN CASE,
    4. open the .cproj file of the project whose configuration data you want to copy,
    5. look for the configuration data you want. Configurations are inside of PropertyGroup tags; for example, in my case it looks like

       
      

      for the configuration named "Preprocess only". Copy from the beginning of that tag until the end of the corresponding

       
      

      tag.

    6. Paste the block into the destination .cproj, just after other

      
      

      tag. Make sure that the name of the configuration is unique in this file. Save.

    You're finished. Now open the project normally in VS and you'll be able to select the added configuration.

提交回复
热议问题