I have solution contains multi projects, and I'm trying to build Azure devops pipeline on single project (.csproj), when build I have this error.
##[error]C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(5574,5): Error MSB3073: The command "XCOPY /Y D:\a\1\s\XXX\XXX\bin\Release\XXX.dll UndefinedNuget\lib\net40" exited with code 4.
and this is my azure-pipelines.yml file
trigger:
- Sprint47
pool:
vmImage: 'windows-latest'
variables:
solution: '**/*.sln'
buildPlatform: 'AnyCPU'
buildConfiguration: 'Release'
steps:
- task: VSBuild@1
inputs:
solution: 'XXX\XXX\XXX.csproj'
msbuildArgs: '/p:Configuration=Release /p:Platform=AnyCPU /p:DeployOnBuild=true /p:WebPublishMethod=Package /p:PackageAsSingleFile=true /p:SkipInvalidConfigurations=true /p:PackageLocation="$(build.artifactStagingDirectory)"'
platform: 'AnyCPU'
configuration: 'Release'
- task: VSTest@2
inputs:
platform: '$(buildPlatform)'
configuration: '$(buildConfiguration)'
- task: PublishBuildArtifacts@1
How I can solve this problem.