意外的属性路径到发布 [英] Unexpected property pathtoPublish
本文介绍了意外的属性路径到发布的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
I am trying to implement a task to publish the copied files.
- task: PublishBuildArtifacts@1
inputs:
pathtoPublish: '..\out2'
displayName: 'Publish Artifact: drop'
但是智能告诉我
unexpected property pathtoPublish
无论如何我尝试保存时都会得到
When I try to save anyway I get
Could not queue the build because there were validation errors or warnings. /azure-pipelines.yml (Line: 41, Col: 10): Unexpected value '' /azure-pipelines.yml (Line: 42, Col: 3): Unexpected value 'pathtoPublish'
奇怪的是,Intellisense也表明
Strangely Intellisense also indicates an issue with
inputs:
错误是
Incorrect type. Expected "object"
[更新]
Yan建议缩进2个空格会有所帮助,但会引发一些新问题
Indenting 2 spaces as suggested by Yan helps, but raises some new issues
[更新]
我更改为
- task: PublishBuildArtifacts@1
inputs:
PathtoPublish: '..\out2'
ArtifactName: drop'
并能够保存YAML 运行时会提示错误
and was able to save the YAML When it runs it gives the error
Publishing build artifacts failed with an error: Not found PathtoPublish: C:\Users\kgreed\Downloads\vsts-agent-win-x64-2.147.1\_work\1\out2
推荐答案
pathtoPublish应该缩进:
pathtoPublish should be indented:
- task: PublishBuildArtifacts@1
inputs:
pathtoPublish: '..\out2'
ArtifactName: drop
这篇关于意外的属性路径到发布的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文