1
votes

I have an instance of TFS 2015 with vNext builds working on my DEV branch. I cloned a working build definition and set the Maps and solution file to the corresponding paths on the Main branch. On the Main branch they fail with the error message: "Could not find a part of the path 'C:\agent4_work\5f9b9727\myTfsProjectName'." This path is not even being created in the _work directory like is when I use the paths for the Dev branch.

Notable similarities between the two builds:

  • The build steps being used in both cases are the NuGet Installer and Visual Studio Build steps.
  • Same code exists in both branches.

Notable differences:

  • Main is the parent branch of DEV
  • Main has an added permission group to deny certain users from checking in. My TFS service account is not a member of this group so I don't that applies.
  • Note: If I change the clone to point to DEV, it doesn't fail.

Can anyone tell me how to solve this mystery? Thanks.
Edit:
I found another difference the working branch has that the Main branch doesn't. enter image description here

I don't remember adding the Project Build Service to the Dev branch. I also don't know why Main did not have this security setting. After I added the same security credential to Main, builds on Main started working. This raises another question: Does one need to add the Project Build Service to every branch as a second step in order to perform TFS builds?

2
Can you share a screenshot of your configuration? - Wouter de Kort♦
@WouterdeKort Do you want to see the build steps, their contents, the users and permissions or something else? - Blanthor
The branch and source mapping - Wouter de Kort♦
@WouterdeKort, when I started looking for a way to create the snapshots of all the settings and scrub them with something, I found the difference between the branches that matters. I have edited the question. - Blanthor

2 Answers

1
votes

Usually, the Build service account should be created and added to code repository automatically when the project is created and it will be inherited in every child folders. So the user does not need to add it to other branches/folders manually. For your case, I'm not sure if the user is removed unexpectedly or any other things happen.

0
votes

Have you set "Items To Build" to correct path? In Build Definition->Process-Items to build screenshot from Build Definition