https://github.com/damianczer/azure-devops-msbuild-auto
Optimization for Azure Pipeline bases on MSBuild. Ready-made script can be added in DevOps Pipeline step. Very useful when you don't have automatic CI/CD.
https://github.com/damianczer/azure-devops-msbuild-auto
azure-devops azure-pipeline msbuild powershell
Last synced: 1 day ago
JSON representation
Optimization for Azure Pipeline bases on MSBuild. Ready-made script can be added in DevOps Pipeline step. Very useful when you don't have automatic CI/CD.
- Host: GitHub
- URL: https://github.com/damianczer/azure-devops-msbuild-auto
- Owner: damianczer
- License: mit
- Created: 2024-07-11T13:15:55.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2025-04-29T18:30:30.000Z (10 days ago)
- Last Synced: 2025-05-08T02:53:47.389Z (1 day ago)
- Topics: azure-devops, azure-pipeline, msbuild, powershell
- Language: PowerShell
- Homepage:
- Size: 42 KB
- Stars: 9
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Azure DevOps Pipeline Boost - replace for Docker Containers? (replace for not properly configured CI/CD)


**Author:** [Damian Czerwiński](https://github.com/damianczer/)
**Technology:**
PowerShell - https://learn.microsoft.com/en-us/powershell/
MSBuild - https://learn.microsoft.com/en-us/visualstudio/msbuild/?view=vs-2022
Azure DevOps & Pipeline - https://learn.microsoft.com/en-us/azure/devops/pipelines/get-started/what-is-azure-pipelines?view=azure-devops
CI/CD - https://learn.microsoft.com/en-us/azure/devops/pipelines/architectures/devops-pipelines-baseline-architecture?view=azure-devops
Script optimizes **CI/CD** and improves software delivery performance. **MsBuild** accepts as input a soluition file, which can contain up to hundreds of projects, this means that every attempt to deliver a software package to some host has to end with building the entire solution?
Even if I have a small change in one project?
Well, no!
The script detects what changes have occurred compared to the indicated branch, example: we are working on a **feature branch** - then we create a **pull request to the develop** and **from the develop we push(build)** the package to the server. So, the develop will compare to the **master** and build selected projects from the solution - those that need rebuilding. As it turns out, it speeds up the work a lot.
This solution has its conditions - **the main application may be in legacy projects where CI/CD does not work according to the art and there is no budget for its configuration**.
Is just an example of a solution - it can be customized for the specifics of the project.
Do you have a **BIG** solution?
More than **100** projects?
Don't you use **Docker Containers** or **CI/CD** and have to build the whole solution?
Does it take a lot of time to build the entire solution through **Pipeline Azure DevOps**?
Are you waiting more than **20 minutes** even the changes were minimal?Here is the Solution!
Before:

After:

(Almost 20 minutes less)
Step Configuration:

Pipeline Variables:

MSBuild Configuration:

Call **MSBuild** inside **Build.proj** with our global variable (list of changed projects) instead of Solution File (.sln):

If your deployment method allows you to _"copy only changed files/projects/.dlls"_ -> **let's do it!** Don't build the whole soloution, build what has changed! If the projects are dependent on each other - references will be built! This is just a proposal for a solution/optimization of software delivery to the client server.
Enjoy!