2

Alrighty then. I've got a question regarding references in visual studio. Our dev team is moving from TFS to Git at the moment everything is littered in project references. This makes it kind of hard to break our TFS team project into many independent Git repos. I'll give you an example.

We've got a few libraries that are referenced in many solutions via project reference. These libraries all have their own solution. So this is what we've got:

Solution1 -ProjectInSolution1(This project belongs to Solution1 and references Library1) -Library1(is referenced from another solution in TFS source control) Solution2 -ProjectInSolution2(This project belongs to Solution2 and references Library1) -Library1(is referenced from another solution in TFS source control)

Now, it would be best if I could let Solution1, Solution2 and the Solution that contains Library1 all have their own git repos. But that is not possible while using project references. So my question is: How would you go about breaking this into many repos? Would you maybe use Nuget to create a package for the shared library? If so, doesn't using Nuget packages bring a lot of maintenance overhead?

Daniel P.
  • 373
  • 1
  • 3
  • 5
  • I have a separate repository for each one of the above and it works fine from within Visual Studio. Every repo gets its own changes and i see no problem at all. – e4rthdog Mar 31 '14 at 02:55
  • But how does that work when you clone one repo that needs the shared library? Don't the project references all get messed up since they are all relative to the solution? Do you use submodules? – Daniel P. Mar 31 '14 at 08:07
  • No i dont use submodules..I will answer and try to tell you how i am doing it.. – e4rthdog Mar 31 '14 at 08:47

1 Answers1

0

I have on library called _LIBRARIES.

In there i have 6 separate projects that are my libraries + 1 Test project for all of them.

All my other projects are referencing this directory.

In order not to mess my solution files i keep the structure only the same. For example in all the machines that need to develop the solutions that depend on each other, i have the same folder.

In order to keep the same structure i have an empty repository with the directories i need. Because git does not add empty directories, i issue a touch command in every directory:

touch .gitkeep

On a new machine i first clone my "structure repository" and then i clone my other needed solutions.

So nothing is messed up and Visual Studio is "gitting" ok.

e4rthdog
  • 5,103
  • 4
  • 40
  • 89