简体   繁体   中英

VSTS - build one of many projects from solution

I want to centralize in a same VisualStudio solution a lot of projects: - API.Core (library class) - API.Mobile (.NET Core project) - API.Web (.NET Core project) - Database (SQL Server Database Project) - Functions (Azure Functions)

For each project except the library classes, I want to configure a build definition but I'd like to trigger the build if and only if I changed a portion of code of a project. Ex: I made some modifications in API.Web => so I want the build definition of API.Web to trigger only and not the others.

Is it possible ?

When setting up CI, you can setup a Path filter. this will result in the build only triggering when files are changed in that specific path 在此处输入图片说明

The simple way is using multiple build definitions, each build definition for a project.

Then as Remco said that, set the Path filters for each project in the build definition, then specify the corresponding project file or /t:{project} msbuild argument to just build the related project.

For example,

Build definition name: BuildDefForAPICore

Path filter: the path for API.Core project folder

Choose API.Core.csproj file in Visual Studio Build task.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM