Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Cloning Projects

Cloning Projects

Scheduled Pinned Locked Moved C / C++ / MFC
csharpvisual-studiosysadmin
7 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    Andy202
    wrote on last edited by
    #1

    Using Visual Studio 2005 with Client and Server projects, I would now like to clone the client project several times - all within the same solution. This is to keep all the include/libs and other project setting the same. In the past I just added a new project and copied the code in and redone all the other project settings. Are they another way to do this. Renaming just causes problems Many thanks, Andy.

    M 1 Reply Last reply
    0
    • A Andy202

      Using Visual Studio 2005 with Client and Server projects, I would now like to clone the client project several times - all within the same solution. This is to keep all the include/libs and other project setting the same. In the past I just added a new project and copied the code in and redone all the other project settings. Are they another way to do this. Renaming just causes problems Many thanks, Andy.

      M Offline
      M Offline
      Mark Salsbery
      wrote on last edited by
      #2

      Andy202 wrote:

      Renaming just causes problems

      I personally just copy the project (.prj) file (using Windows Explorer), rename it, open the file in a text editor, and do all the renaming there (the project file is XML). Then the new project can be added to a solution in the IDE, where the project files from the cloned project can be removed. Mark

      Mark Salsbery Microsoft MVP - Visual C++ :java:

      L 1 Reply Last reply
      0
      • M Mark Salsbery

        Andy202 wrote:

        Renaming just causes problems

        I personally just copy the project (.prj) file (using Windows Explorer), rename it, open the file in a text editor, and do all the renaming there (the project file is XML). Then the new project can be added to a solution in the IDE, where the project files from the cloned project can be removed. Mark

        Mark Salsbery Microsoft MVP - Visual C++ :java:

        L Offline
        L Offline
        led mike
        wrote on last edited by
        #3

        Hey Mark, what's the context for this need? Why do I need a cloned project in the same solution? Or even at all?

        led mike

        M 1 Reply Last reply
        0
        • L led mike

          Hey Mark, what's the context for this need? Why do I need a cloned project in the same solution? Or even at all?

          led mike

          M Offline
          M Offline
          Mark Salsbery
          wrote on last edited by
          #4

          I've done it making plugin modules so I don't have to set up duplicate settings for new module projects. Just a copy of an existing project folder is easy, but renaming just the project file name still leaves the old project name in the project settings XML.

          Mark Salsbery Microsoft MVP - Visual C++ :java:

          G 1 Reply Last reply
          0
          • M Mark Salsbery

            I've done it making plugin modules so I don't have to set up duplicate settings for new module projects. Just a copy of an existing project folder is easy, but renaming just the project file name still leaves the old project name in the project settings XML.

            Mark Salsbery Microsoft MVP - Visual C++ :java:

            G Offline
            G Offline
            Gary R Wheeler
            wrote on last edited by
            #5

            One thing to watch is there's a GUID in the project file that links it to the solution. When you copy the project file, you need to generate a new GUID so that the new, cloned project has a different GUID from it's predecessor.

            Software Zen: delete this;
            Fold With Us![^]

            M 1 Reply Last reply
            0
            • G Gary R Wheeler

              One thing to watch is there's a GUID in the project file that links it to the solution. When you copy the project file, you need to generate a new GUID so that the new, cloned project has a different GUID from it's predecessor.

              Software Zen: delete this;
              Fold With Us![^]

              M Offline
              M Offline
              Mark Salsbery
              wrote on last edited by
              #6

              Good to know! Thanks Gary! Mark

              Mark Salsbery Microsoft MVP - Visual C++ :java:

              G 1 Reply Last reply
              0
              • M Mark Salsbery

                Good to know! Thanks Gary! Mark

                Mark Salsbery Microsoft MVP - Visual C++ :java:

                G Offline
                G Offline
                Gary R Wheeler
                wrote on last edited by
                #7

                You're welcome. I had to reverse-engineer the Visual Studio project and solution file formats a while back in order to automate our product branching process. I still don't understand it completely, but I found an approach that works for what we need.

                Software Zen: delete this;
                Fold With Us![^]

                1 Reply Last reply
                0
                Reply
                • Reply as topic
                Log in to reply
                • Oldest to Newest
                • Newest to Oldest
                • Most Votes


                • Login

                • Don't have an account? Register

                • Login or register to search.
                • First post
                  Last post
                0
                • Categories
                • Recent
                • Tags
                • Popular
                • World
                • Users
                • Groups