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.
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?