'Print angular version in the azure build pipeline

I want to print the angular version of the project in the build pipeline. We are using azure devops and yml for the pipepline configurations

I could able to read the "@angular/core" key from root package.json using powershell task but its not the angular version the project is using. So any idea to get the angular version in the pipepline is greatly appreciated



Solution 1:[1]

If you are using Angular CLI, just try to add a command line task or PowerShell task to run the command ng --version

enter image description here

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Andy Li-MSFT