Reputation: 83
We were trying to build a pipeline using MS Hosted agent with vmImage (vs2017-win2016) for a .net application, but build id is failing with following errors..Any ideas? Now, same source code successfully builds on On-premise build server & since we are now using Azure Devops to create build pipeline using MS Hosted agent, its failing.
This is the only build error we are getting right now. Any valuable comments or inputs highly appreciated.
Error details are as below:
Error analysis Build solution (VSBuild) - VSBuild Task
C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin\Microsoft.Common.CurrentVersion.targets(5165,5): Error MSB3073: The command "copy "D:\a\1\s\Modules\HP.AMI.Modules.VirtualHeadEnd\ResponseTemplates*.xml" C:\AMI\Templates " exited with code 1.
Upvotes: 0
Views: 1913
Reputation: 76660
Build failing while creating Azure Build pipeline - Error MSB3073 - VSBuild Task
When you got the MSBuild error MSB3073, that means the path of the custom command line or custom target in your project is not correct. You need to check the path of that command line.
According the comment you replied, you have post-build event command line:
copy "$(ProjectDir)ResponseTemplates*.xml" C:\AMI\Templates
When you execute this command line without existing folder C:\AMI\Templates
, the copy command will report an error of Error MSB3073. Because the target folder cannot be found.
To resolve this issue, we just need to add another post-build event command line to create the folder before the copy command line, like:
md C:\AMI\Templates
copy "$(ProjectDir)TextTemplate1.txt" "C:\AMI\Templates"
Now, we could build it with hosted agent vmImage (vs2017-win2016):
Upvotes: 1