Thursday, 22 August 2013

Get TFS Build Server to obtain stylecop.settings file in root folder

Get TFS Build Server to obtain stylecop.settings file in root folder

We have a number of TFS projects in a single collection.
Each TFS project has a number of Visual Studio Solutions, with each sln
file in it's own folder.
Each TFS project has a project-specific StyleCop.settings files in the
root of the TFS project.
However, when we create a build for each solution, we get the build to
only obtain the folder containing the solution (as recommended by
Microsoft, to improve build performance). Therefore, we miss out on the
StyleCop.settings file in the TFS project root.
Therefore, my question is:
How can I apply my settings file to the building of a solution, and meet
the following criteria
All StyleCop.settings files must be stored in source control.
The number of StyleCop.settings files must be kept to a minimum (ideally
no more than 1 per TFS project).
Only the solution folder should be downloaded from TFS on a build.
Appendix 1. Folder structure
For reference/clarity, here is an example of the folder structure I've
described above. A TFS build will only check out the Application1 or
Application2 folder (depending on which application it builds).
C:\Source\
TfsProject1\
stylecop.settings
Application1\
Application1.sln
Application2\
Application2.sln

No comments:

Post a Comment