Код: Выделить всё
trigger:
- development
pool:
vmImage: 'windows-latest'
variables:
solution: '**/*.sln'
buildPlatform: 'Any CPU'
buildConfiguration: 'Test'
steps:
- task: NuGetToolInstaller@1
- task: NuGetCommand@2
inputs:
restoreSolution: '$(solution)'
- task: Npm@1
inputs:
command: 'install'
workingDir: 'frontend'
- task: Npm@1
inputs:
command: 'custom'
workingDir: 'frontend'
customCommand: 'run build-test'
- task: Npm@1
inputs:
command: 'install'
workingDir: 'admin-frontend'
- task: Npm@1
inputs:
command: 'custom'
workingDir: 'admin-frontend'
customCommand: 'run build-test'
- task: VSBuild@1
inputs:
solution: '$(solution)'
msbuildArgs: '/p:DeployOnBuild=true /p:WebPublishMethod=Package /p:PackageAsSingleFile=true /p:SkipInvalidConfigurations=true /p:DesktopBuildPackageLocation="$(build.artifactStagingDirectory)\WebApp.zip" /p:DeployIisAppPath="Default Web Site"'
platform: '$(buildPlatform)'
configuration: '$(buildConfiguration)'
msbuildArchitecture: 'x64'
createLogFile: true
logFileVerbosity: 'diagnostic'
- task: PublishPipelineArtifact@1
inputs:
targetPath: '$(Pipeline.Workspace)'
artifact: 'Web-Project-Test'

Как вы можете видеть, на npm ушло огромное количество времени, и я думаю, что будет механизм кэширования, но я не знаю, как правильно изменить файл YAMl, полностью удалить npm шаг установки или нет?
Подробнее здесь: https://stackoverflow.com/questions/671 ... 30-minutes