I am very new CI/CD domain of Aure Dev Ops. So I Created a test ASP.NET MVC application. I checkedin the application in git repo at visual studio online.
My build pipeline is working fine, but the ms build configuration of where my published files will be, seems to be not found.
here is my msbuild configuration in my yml file:
msbuildArgs: '/p:DeployOnBuild=true /p:WebPublishMethod=Package /p:PackageAsSingleFile=true /p:SkipInvalidConfigurations=true /p:PackageLocation="$(build.artifactStagingDirectory)"'
And in my release pipeline, I am using a copy task with the following yml
steps:
- task: CopyFiles@2
  displayName: 'Copy Files to: $(Build.ArtifactStagingDirectory)/deploy'
  inputs:
    SourceFolder: '$(build.artifactStagingDirectory)'
    TargetFolder: '$(Build.ArtifactStagingDirectory)/deploy'
and this is the error I get when I try to deploy the release:
 ##[error]Unhandled: Not found SourceFolder: D:\a\r1\a\$(build.artifactStagingDirectory)