I am using TFS 2017 to build a solution that has three projects linked to it. Two of the projects are located elsewhere in TFS. When I build the main project which depends on the other two projects I get errors because the other two projects are not being build. How can I force TFS to build all dependent projects?
1 Answers
With Visual Studio Build task you could either build the whole solution by select .sln
or only build MSBuild project (.*proj) files.
If you select the .proj
file in the build task, for building three different projects, you also need to add three tasks.
In your case, since you have selected .sln
file, TFS will auto build the whole solution including all projects under it. But in the workspace mappings, you need to make sure that you Map all folders that contain files that your build process requires. For example, if you add another project, you might have to add another mapping to the workspace.
So it would not be automatically done by scanning the dependencies of the solution. You have to also add Folder B mappings in the get sources of the definition.
- Besides if this is a CI build, in most cases you should make sure that these mappings match the filter settings of your CI trigger on the Triggers tab.
- For more information on how to optimize a TFVC workspace, see Optimize your workspace.