3

I tried to copy a project's properties to use in another project as instructed in the stackoverflow question Visual Studio: can I copy a project's properties to use in another project? but it does not work. When I open the created PropertySheet it seems that nothing is copied to it from the original property settings. The above link seems to be for VS 2008 but now I am using 2013. What might be the fault.

Community
  • 1
  • 1
Samitha Chathuranga
  • 1,689
  • 5
  • 30
  • 57
  • Possible duplication. http://stackoverflow.com/questions/6386098/visual-studio-can-i-copy-a-projects-properties-to-use-in-another-project – nevra Mar 16 '15 at 15:29
  • And please don't report this question as Possible duplication with http://stackoverflow.com/questions/6386098/visual-studio-can-i-copy-a-projects-properties-to-use-in-another-project as I have already included that into my question as this my question is asked related to that linked question of which the accepted answer seems to be not valid now – Samitha Chathuranga Mar 16 '15 at 15:37

1 Answers1

1

Caveat: Tested only on a relatively basic C++ project. But it worked!

  1. Right click on your source project (in the solution explorer)
  2. Unload project
  3. Right click on your destination project and unload that as well.
  4. Right click on each project and Edit {project}.vcxproj. The projects' configuration files can now be edited. (Yes you could also just find the file and edit it directly)
  5. Copy/replace elements from the source to the destination.
  6. Reload both projects. They should reload withut problems.

Tips:

  • If the reload did not work then copy/replace in pieces instead of the entire project to isolate the problem.
  • Don't replace the "ItemGroup" and the "Globals" PropertyGroup because these (XML) elements identify the projects in the context of the solution. But you should be able to copy/paste everything below these elements from the source .vcxproj file to the destination one without problems.
  • Try this on two "empty" projects before proceeding to your magnum opus. And definitely make a backup of your projects before trying this. (you are reading all of this before starting, right? Of course you are...)

This solution works better than others I have seen because it sets and unsets settings completely. It's a total replacement, not just an additive one.

ssimm
  • 1,908
  • 3
  • 16
  • 36
Ilya
  • 125
  • 5