Pregunta

I have the following set of projects in TeamCity: dependency graph in TeamCity

I need to create a dev branch for DataAccess for project WebAppX. But WebAppY must keep the reference to the production branch of DataAccess. If I use nuget to manage my dependencies, what is the best way to have WebAppX update the package while keeping WebAppY in the same package?

Right now I'm using submodules to solve the issue instead of using Nuget. So I have a repository with a the binaries of DataAccess that gets included as a submodules in WebAppX and WebAppY. It seems easier to control the version of my dependencies this way. But I would like to use NuGet and leverage the facilities TeamCity offers.

What is the better approach for dealing with shared dependencies?

¿Fue útil?

Solución

TeamCity will let you set up dependency build chains, so that when Commons has a code change, it builds and then triggers a build in Data Access, and so on.

As for NuGet though, you just need to specify what version or version ranges of your dependency that your app can support. For example, DataAccess versions 2.x may support Commons from majors 1 & 2: [1.0,3.0)

I have not done this with NuGet, but have with Maven, which is very similar. When the build completes successfully, then TeamCity deploys the artifacts to the Maven repository, which I'm using Artifactory for. Maven + TeamCity will let you trigger a build when a declared dependency changes, and I would expect that they would have the same functionality for NuGet but that's just a guess.

I'm hoping that gets you pointed in the right direction.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top