Search code examples
tfstfsbuild

How to get all the projects from the Build on TFS Template?


I have a Default TFS build Template, and I need to be able to get all the paths of the Projects from the Solution that is being built.

I have a variable called BuildSettings that is of the type: Microsoft.TeamFoundation.Build.Workflow.Activities.BuildSettings()

I thought that BuildSettings.ProjectsToBuild would do it, but it only returns the path of the solution. How can I do to get the paths of all the projects inside the solution?

Thank you!


Solution

  • You will need to Get the solution file, open it, and iterate through the projects to get that information. TF Build just passes the solution to MS Build and has no direct knowledge of the projects...