0
votes

My solution consists of multiple projects, I'm trying to build a single project among that solution using MSBuild and trying to generate an .exe file and publish an artifact in Azure DevOps. I tried to build the specific project using MSBuild task on Azure pipelines but it was throwing and it is throwing an error 'MSBuild.exe' exited with code '1'.

I've tried using My hosted agent and used windows command prompt for building the specific project but unable to generate an artifact with the .exe file .

Is there any way to build a specific project in a solution using MSBuild task or from the Command Prompt using Azure Hosted agent in Azure DevOps.

1
Ideally MSBuild should work. Can you please share the screenshot of the setup as well here?Vijayanath Viswanathan
@VijayanathViswanathan Thanks, for your answer. I was able to build a project based on the information provided by you.Vishnu
@HughLin-MSFT Thanks for checking.Vishnu
@Vishnu If this answer is helpful to you, you can accept the answer which can also benefit for others who has same puzzle with you and we could archive this thread. Thanks.Hugh Lin

1 Answers

1
votes

In the project textbox you have to select a certain .csproj file to build or you can supply a pattern, like **/*.csproj for all csproj files in all sub folders. Azure Devops MsBuild step with project set to *.csproj