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
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
Just to note that we use the NuGet package StyleCop.MsBuild to integrate StyleCop into TFS - it is not installed directly on each machine, so any solution relying on that is out :)
In your build template Xaml file, edit and add a new "Download File" activity. In this activity mention the source location as the stylecop server location and the destination as your "sourcesdirectory" or where you want it to be. This will ensure that the file is downloaded during each build regardless of which solution.
You don't have to maintain additional msbuild files for this purpose.