How to deal with dependency across different solutions
I have two solutions A and B and they hold own repositories (GitLab). These solutions are running well on TeamCity, including build and tests. Now due to requirment, both of them need to reference to a shared solution C, which has its own repository as well. In visual studio, we could add existing projects from C into A and B., followed by build and run.
Unfortunately, the TeamCity build tasks for A and B starts complains as follows, because it does not manage to understand the referenced projects located in C.
"The project file "C_project1.csproj" was not found"
"The project file "C_project2.csproj" was not found"
I would be very appreciated if anyone offers any comment / idea to address this issue and handle this scenerio in TeamCity.
Please sign in to leave a comment.
Hi Meng,
it will depend on how you reference the projects. If it has to be compiled, then the usual solution will be to add a shared VCS Root, with checkout rules to separate both projects into their own directories, then ensure that the project references reference them properly. How to do this will depend on your project set up, though.
Another usual solution is to simply have C as a separate build, have it be built itself, and publish it as a library, then pick up the library as an artifact dependency.
Hi Denis,
Thanks very much for your comments. I think the second solution sounds more feasible to our projects. Because in future, there would be more project reference to the shared project C.
I am a complete freshman in team city and continuous integration & deployment. Could you please provide more details or links regarding the following, which would helps to dig inside and even search topic on Google.
Very appreciated for your time.
Regards,
Meng