I am trying to build my angular solution using MsBuilds.
Following is my code snippet
> <Exec Command="npm install" WorkingDirectory="$(SolutionRoot)\Dev\AngularUI" />
> <Exec Command="npm install -g @angular/cli" WorkingDirectory="$(SolutionRoot)\Dev\AngularUI" />
> <Exec Command="ng build --prod" WorkingDirectory="$(SolutionRoot)\Dev\AngularUI" />
While the npm i
command works fine , i get the error 'ng' is not recognized as an internal or external command
on the ng build --prod
command.
I try to run the same commands from cmd and it works fine from the same build account as well.