0
votes

I'm creating automated builds using gated check ins. But we have a few projects that are referencing other web applications outside of the source directory. So we have a project called 'PolicyRating.sln', which is in our 'Client' folder in source control. It's referencing 5 other projects in our 'CoreFramework' project collection, when I try to deploy it out to our QA server, it's unable to find the referenced projects on the build server. It can't find the project files. Is there a way to build a project that references other projects outside the source directory? I'm using TFS 2013

1

1 Answers

0
votes

If you're using TFVC, you'll need to map a workspace that contains all of those projects.

From https://msdn.microsoft.com/en-us/library/ms181716.aspx:

On the Source Settings tab:

TFVC: In the Working folders table, specify the version-control folders that contain the files that your build process requires.

Tip To ensure that your build process functions correctly and to improve performance, include all folders, and only these folders, that contain files that your build process requires. See Work with build workspaces.

If everything is split up across multiple team project collections, you will not be able to do this easily: Project Collections are intended to be totally isolated from one another and are intended for situations where you want code, work items, test cases, builds, and so forth to be separate from one another.

You can still accomplish it by using the TFS API, but it's not going to necessarily be straightforward.

Another option would be to use binary references, and turn the binary references into NuGet packages. You'd still need to set up a build/packaging/publishing process in the other team project collection, however. That would require you to set up a separate build controller and build agent, since you cannot share build resources across team project collections.

If you're using Git and the application is split up across multiple repositories, you can use submodules.

Ultimately, if you have shared code split across team project collections, the best choice is to consolidate them into a single team project collection.