Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

TeamCity Trigger Build when specific c# Project is changed

I have a Solution like so, repo'd in Git:

AwesomeSln
---Web.csproj
---Services.csproj
---Core.csproj
---UnitTests.csproj
---SDK.csproj

Most of the solution is Web, and the CI is handled by Azure. Tests run, web is published, wutevz.

But the SDK Project is a related NuGet package that offers help consuming this web project. The NuGet for this company is set up using TeamCity.

So what I'd like to do, is have TeamCity trigger a NuGet build if there is a change to the SDK Project. But not whenever any willy-nilly checkin' happens.

Any way to trigger a NuGet build only if one specific project changed?

like image 583
Suamere Avatar asked Nov 17 '25 03:11

Suamere


1 Answers

How are you currently triggering builds? I would assume you have a VCS Trigger in place. If so, then just add rules to only build the project you are interested in and ignore the rest.

Assuming each of the projects you listed is in its own directory, something like this should do it:

+:SDK/**

On the VCS Trigger dialog box, you have to show advanced options and then enter the rule where it says "Trigger rules:"

like image 52
CoderDennis Avatar answered Nov 18 '25 18:11

CoderDennis