I have a set of NuGet libraries that are made available to the developers within my organization via an internal repo. The libraries have a dependency graph that looks like this:
Project A depends on Project B depends on Project C which depends on Project D
This all works very nicely for the developers who are using the libraries, but when I update Project D, I have to then proceed to update the package references in the projects that depend on each other. This involves a commit to the project, waiting for it to build and update the NuGet repo with the new library/version. After that I update the package dependencies in the next project up the line and so on.
This isn't too different from the way that Microsoft has their runtime libraries setup. For example, the Microsoft.Extensions.Configuration
library depends on the Microsoft.Extensions.Configuration.Abstractions
library. The difference is that Microsoft is taking project references instead of package references. In their case, I guess I'm not sure how they end up creating multiple NuGet packages from the two different projects since it's not specified in the project file.
It feels like there should be a better way. I'm considering writing a script to handle this, but I've heard of tools in other platforms that do this kind of work. Is there anything for .NET? How does Microsoft handle this for the .NET framework?
I was going to delete this question, but then it occurred to me that someone else might have the same problem.
Turns out that this is not a problem. I suppose this is a problem with having too much experience. When publishing NuGet packages in the past, I used to have to reference the dependent NuGet packages as package references. At some point, Visual Studio got smart and realized that project references are pointing at projects that are publishing NuGet packages. When that happens, it automatically changes the references from a project reference to a package reference.
This means that the packages contain the references to other packages even though in Visual Studio the projects contain project references. This a really great!