imGreg
imGreg

Reputation: 900

Prevent tfs build error caused by projects in different tfs projects

I have 2 projects on tfs. One tfs project with the main sln and the other tfs project contains a bunch of sub csproj. I called the one sub csproj into the main project then checked in. After a couple minutes I get a build error on tfs saying that the sub project is missing. I look closely at the path its going to in the log error on tfs and it is clearly not where the project is stored(it is checking within the current tfs project for the file).

Is there a way to config tfs to know where to look for the files or do I have to move the the project to the same tfs project or get the dll and put it into the sln?

i.e.

TFS project A -> Solution1 -> Added Project 1    
TFS project B -> Project 1

Project1 in TFS A is on TFS under TFS B

Upvotes: 0

Views: 79

Answers (1)

Giulio Vian
Giulio Vian

Reputation: 8353

Assuming you are using classic TFS version control (TFVC), the answer is yes. You simply need to setup a proper mapping in your build definition. From Visual Studio, Edit your Build Definition, select the Source Settings tab: there you can add as many mapping you want and the layout for build can be different from the layout in Version Control. This documentation page has all details and option, not that it may use the old term Workspaces instead of Source Settings.

Upvotes: 2

Related Questions