1
votes

I have some Libraries added in my TFS 2010 project in a Lib folder. Each time I check In a dll in the Lib folder, all the build that reference that Lib folder trig automatically (more than 20 Build).

I can use the ***NO_CI*** to prevent that. But I prefer to have something automatic. Is it possible to have an event handler on TFS to prevent that.

Ex. If the check in is on that folder, do not scan all the CI Build Workspaces to trig the build.

3
The Lib folder contain third party Assemblies. It is referenced in many build definition Workspace. What I want is only the Check In elsewhere of that Lib folder trig Build. I don't want to change all CI build to manual. If I modify the Build Template all the Build will be triggered. I want something like the "NO_CI" but automatically managed if the check in is on a specific folder on my TFS projectsSyll

3 Answers

3
votes

The workspace mapping in the build definitions defines which files/folders are part of that build. You can use cloaked folders to explicitly exclude folders from the workspace.

However, the workspace mapping is used for 2 purposes: to determine which files get downloaded to the build server as part of the build, and to determine which files trigger CI/Rolling/Gated builds.

If you exclude folders from the workspace (e.g. using cloaked folders) it will stop the builds from being triggered but it will also stop those files from being downloaded as part of the build.

If you want to have a build download a certain folder as part of the build but not have builds triggered by check-ins to that folder I don't believe it is possible without customizing the build workflow.

1
votes

When you include a folder in a workspace, you're saying that changes to that folder affect your project. This is the same for changes to shared source code as for shared binary. If it changes, then the affected applications should be built (and their automated tests should be run) so taht it can be determined whether the changed files have broken anything.

1
votes

Make sure each library in the lib folder has it's own folder + version folders beneath

lib
  EntityFramework
    4.1
      EntityFramework.dll     
    4.2
      EntityFramework.dll

Then modify your builds to only reference specific folders for the library a project references.

It takes a lot of work to setup builds, but will ensure the build only triggers when a file needed for the build is changed.

Alternatively a copy of each library in the projects directory, which you could manage with a package manager like NuGet or OpenWrap