VSTS: Directory 'd:\a\1\a' is empty. Nothing will be added to build artifact 'drop'

前端 未结 2 1247
南方客
南方客 2021-01-01 10:58

I am making my first build in VSTS and I have had to ask a number of questions on SO. I have now been able to restore nuget packages and build my project but now I have to e

相关标签:
2条回答
  • 2021-01-01 11:13

    First, remove ";" before Properties.EF6 (/t:;Properties.EF6;Sir.Domain).

    Note: If Sir.WebUI dependency on Properties.EF6, Sir.Domain, Sir.EF6 and StandardClassLibrary, you just need to build Sir.WebUI project.

    Secondly, for .Net Core task, change build command to publish and arguments is -o $(build.artifactstagingdirectory)\SIR.

    Thirdly, remove Copy Files task (do not need to copy files to artifact).

    0 讨论(0)
  • 2021-01-01 11:15

    You need to copy and add artifact, so for me I had to add this code to the end of my .yaml file

    - task: CopyFiles@2
      inputs:
        targetFolder: '$(Build.ArtifactStagingDirectory)'    
    
    - task: PublishBuildArtifacts@1    
      displayName: 'Publish Artifact: drop'
      inputs:
        PathtoPublish: '$(build.artifactstagingdirectory)'
    
    0 讨论(0)
提交回复
热议问题