Quantcast
Channel: Active questions tagged nuget-package - Stack Overflow
Viewing all articles
Browse latest Browse all 3116

Only create Nuget package if project has changed

$
0
0

Given a solution containing both a Web Api project, an Api Client Project, and an assembly project containing shared Dto objects as follows:

  • Solution
    • Web Api Project
    • Shared Dto Project
    • Api Client Project
    • Unit Tests

I have an Azure Devops build pipeline to build and test all of the projects. Within that build pipeline, I have a step that creates 2 Nuget packages for the Api Client and the Shared Dto projects.

However, I don't need to create new packages all of the time, say I only added a unit test or fixed a bug in the Web Api project, I don't want to create new Nuget packages (or worry about bumping the Package version) if nothing in the Api Client Project (or its dependencies) has changed, but I do still want to regression test it.

I thought that perhaps I could do this by having multiple build pipelines, one for the Web Api project, and others for the Api Client & Shared projects, then use path filters to trigger the appropriate builds.

Are there any other ways to achieve this? Whats the best practice? I don't want to have to maintain more build definitions than I need.


Viewing all articles
Browse latest Browse all 3116

Trending Articles