Reputation: 11151
I am learning how to use GIT more effectively. When I browse projects on GitHub, it seems like each project is it's own repository. However, in .NET, you often need to add references to assemblies in each project. Those assemblies are often the result of another project in your solution. In other words, a solution is often made up of multiple projects.
I know that you can put a solution and all of its projects in a single repository. However, if you wanted to split each project into it's own repository, how would you reference the output (i.e. an assembly) of one of these other projects?
Upvotes: 1
Views: 525
Reputation: 125640
You'd use a Package Manager. For .NET it's mostly NuGet.
NuGet is the package manager for .NET. The NuGet client tools provide the ability to produce and consume packages. The NuGet Gallery is the central package repository used by all package authors and consumers.
Each repository would produce and publish a package with the dlls it builds. Other repositories would consume these packages to get access to the dlls.
If the packages are not supposed to be public you can run your own NuGet server, e.g. within your organization. You can also use services like VSTS to host your packages and only allow people with proper access to reference and download them. See Get started with NuGet Package Management in VSTS and TFS.
You could also use other NuGet clients, e.g. Paket, which even though written in F# can be used in any .NET project.
Upvotes: 3