Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 567169
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T13:03:17+00:00 2026-05-13T13:03:17+00:00

Scenario I have a Library that contains Projects A, B, and C. I have

  • 0

Scenario

I have a Library that contains Projects A, B, and C.

I have two solutions. Solution 1 includes a copy of Project A, and Solution 2 includes a copy of Projects A and B.


When I build Solution 1, here’s what should happen:

alt text


When I build Solution 2, here’s what should happen:

alt text


How can I do this?

Is this something I could automate with a version control system or off-the-shelf file syncing software? Or do I need to roll my own solution?

If I do build my own solution, I have some thoughts on how it could work, but I’d appreciate any input you may have:

  • Could be a simple console app with a command-line switch for specifying the “source solution”, for example:

    c:\Program Files\Library Syncronizer\LibSync.exe /solution:Solution 1
    
  • XML file used to register active solutions that contain library projects. Possible format:

    <solutions>
      <solution>
        <name>Solution1</name>
        <path>c:\...\Projects\Solution 1</path>
      </solution>
      <solution>
        <name>Solution2</name>
        <path>c:\...\Projects\Solution 2</path>
      </solution>
      <!-- more solutions -->
    </solutions>
    
  • Program would do the following:

    • Read in source solution
    • Determine what library projects it has
    • Copy the folders for those projects to the library
    • Loop through each solution in the XML file (except the source)
    • Copy the folders for all library projects as necessary
    • Perhaps some backup operation could also occur, just in case the syncing process overwrites something important.

This sounds relatively simple in concept, but this may have serious unintended consequences I’m not thinking of. Hopefully someone will warn me if it does 🙂


Update – What is my motivation for copying project folders?

In a word – Version Control.

If I keep the library projects in a separate folder and only link to them in my various solutions (rather than physically locate the folders in my solution folders), my version control repository ends up not containing the source code to my library projects. So, if I update to “three version ago”, and I need to make a minor change to one of my library methods, the code is not there.

My workaround for this has been to add tags to the revisions in my library’s repository that say things like “Solution 1 – Version 2.5.3”, but this is pretty clunky. And things get really awkward if I’m working on “three version ago of” of Solution 1 and the current version of Solution 2. Now, Solution 2 will be pointing to an old version of the library projects, which makes it potentially impossible to work with and test until I’m done working on the old version of Solution 1.

If I were working with copies instead, all solutions would contain the library source code in their repositories, and I could go back to it easily any time I need to.

I should note here that I’ve been using Tortoise HG (Mercurial) for version control.

Anyway, I’m open to any solution to this problem. It doesn’t have to involve copying project folders around–that’s just the only thing I could think of to ensure that all my version control repositories are complete, stand-alone packages.


Update 2

First of all, just a note. I’m using Mercurial (TortoiseHG) for version control, not SVN. I could change if absolutely necessary, but I really prefer Mercurial.

Based on responses so far, I’ve decided to do away with the “bi-directional copying” idea, and go back to referencing my library projects. Here’s a new diagram:

alt text

I continue to have the same goals, however:

  1. Latest version of each solution is using latest library code
  2. One solution/application per repository
  3. Each repository contains all source code, including library projects
  4. Everything is as automated as possible to minimize the risk of mistakes

Goal #1 is taken care of automatically by referencing the library projects instead of using copies, and Goal #2 is just a matter of how my set up my repositories, but Goals #3 and #4 remain elusive.

With Mercurial, there is a subrepositories feature that seems like it would handle my situation, but as the documentation indicates, this is still considered experimental/risky.

For the moment, I’m thinking a good workaround might be to just store backup copies of the library projects in my Solution folders. When I say “backup copies”, I mean that literally. I would still be referencing the library projects–the copies would be solely for the purpose of ensuring all source code ends up in my repository (Goal #3). To satisfy Goal #4, these backups could be automated using a post-build event in studio.

I welcome your thoughts on any of this.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T13:03:17+00:00Added an answer on May 13, 2026 at 1:03 pm

    This sounds exactly like what the sub repository support in mercurial is for. If project A and project B, etc. are are separate repositories you can can make them sub-repos within Solutions 1 and 2. The .hgsub files in 1 and 2 are versioned themselves and point to specific revisions within A, B, and C, so you can always build with the same version in each Solution, but need not keep them in lock-step. Moving changes back from the solutions to the libraries becomes easy, and if desired, branchable.

    Don’t let the “beta in 1.3” mention on that wiki page fool you. Mercurial is up to 1.4.2 now and subrepos are staying as they are.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I don't understand svn merge. Here's the scenario: We have a branch that contains
Common scenario: I have a library that uses other libraries. For example, a math
My Scenario I have a class library that is going to be called from
Scenario: You have an ASP.Net webpage that should display the next image in a
Here's the scenario: I have a Python script that is called from a browser
Here is the scenario: I have successfully bound two objects from a native ObjC
I have a web page that contains two lists (Unorders lists), I have to
Beginner level question Scenario: Have simple string cocantation tool, that I might expand later
Ok, i have simple scenario: have two pages: login and welcome pages. im using
Scenario I have two wrappers around Microsoft Office, one for 2003 and one for

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.