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.