0

I have a project in TFS that has 2 solution files in the folder. One is for the website, the other is for a web API:

Project Name
Project Name / Main
Project Name / Main / Shared Project Folder 1
Project Name / Main / Shared Project Folder 2
Project Name / Main / Website Folder
Project Name / Main / WebApi Folder
Project Name / Main / Website.sln
Project Name / Main / WebAPI.sln

This structure is because the 2 solutions have a couple of shared projects.

TeamCity (version 9) is detecting the check in and building the Website & API, regardless of which solution files have been changed.

Is there a way to configure TeamCity to detect the projects that have changed and run the appropriate builds?

Thanks in advance.

Karl Gjertsen
  • 4,690
  • 8
  • 41
  • 64

1 Answers1

1

Not familiar with TC9 (I use TC8) but I'd say create two build configurations:

  • Build Configuration A (Website)

    This one would have build steps to build Website.sln only

  • Build Configuration B (WebApi)

    This one would have build steps to build WeApi.sln only

Then for config A add a VCS trigger with a trigger rule like this:

+:WebSite/**
+:WebSite.sln

Then for config B add a VCS trigger

+:WebApi/** +:WebApi.sln

Build config A will only be triggered when changes in Website folder or Website.sln itself are detected.

Build config B will only be triggered when changes in WebApi folder or WebApi.sln itself are detected.

donhector
  • 875
  • 1
  • 10
  • 21