0

My project structure

The image above shows my Hello World project structure. I am trying to build the Setup-HelloWorld-x86.vdproj in Azure Pipeline in Self-Hosted Windows Agent (which is nothing but my local machine) by using the command line script task like shown in below image.

enter image description here

But I get the following error.

enter image description here

Kindly help me to build this Setup-HelloWorld-x86.vdproj

  • Hi @Tharunavignesh J, How about the issue? Does the answer below resolved your question? If not, would you please let me know the latest information about this issue? – Vito Liu Oct 09 '20 at 09:45
  • @VitoLiu-MSFT your answer below did not solve the issue. The solution was to run the azure agent under proper account. Earlier my azure agent was running under some Network Service account, then I change it to my local account, then this cmd worked properly. – Tharunavignesh J Oct 12 '20 at 08:27
  • Hi @Tharunavignesh J, Would you mind sharing your answers and accepting it below? It could help other community members who get the same issues and we could archive this thread, thanks – Vito Liu Oct 15 '20 at 09:33
  • Just an FYI, you can always set the system.debug variable to true to see extra debug messages for your error. – Lenard Bartha Jan 04 '23 at 06:08

2 Answers2

0

If you want to run the project via cmd devenv, you can refer to this doc.

As a workaround, you can install the extension Build VS Installer and use the task DutchWorkz - Build VS Installer(s) to build Visual Studio Installer Project in Azure Pipelines.

You can specify to build .sln or .vdproj to generate .msi file(s) in Task-mode option.

enter image description here

Update1

Thanks Tharunavignesh J for sharing.

The solution was to run the azure agent under proper account. Earlier my azure agent was running under some Network Service account, then I change it to the local account, then this cmd worked properly.

Vito Liu
  • 7,525
  • 1
  • 8
  • 17
  • The [Build VS Installer](https://marketplace.visualstudio.com/items?itemName=dutchworkz.BuildInstaller) didn't work for me either in the Azure Pipelines agent pool or my custom agent pool. Anyways thanks for answering. – Tharunavignesh J Oct 12 '20 at 08:22
  • if you look at [Q&A](https://marketplace.visualstudio.com/items?itemName=dutchworkz.BuildInstaller&ssr=false#qna) I have even asked a question there, but no reply came. So I decided that Build VS Installer is no use for me. – Tharunavignesh J Oct 12 '20 at 08:30
  • Hi @TharunavigneshJ, Thanks for your sharing, you could add your answer and accept it. In this case, others could directly find the useful solution. Thanks. – Vito Liu Oct 12 '20 at 08:32
  • Hi @TharunavigneshJ, I have edited the answer and added your solution, you could check it. Thanks. – Vito Liu Oct 14 '20 at 09:11
  • Hi @Vito Liu-MSFT, The azure agent must run under proper account, then it will work. Build VS Installer is a waste. – Tharunavignesh J Jan 20 '21 at 07:18
  • How did you change the agent account? – Lenard Bartha Jan 04 '23 at 06:08
0

This other stack overflow link helped me get my visual studio installer project compiled with Azure DevOps pipelines. It is using yaml configuration instead of classic, but same steps / commands apply to both:

YAML Script for building Visual Studio Installer Projects using Azure DevOps

Basically the steps are:

  • Setup your variables to point to the tools
  • Download Nuget packages for your solution
  • Disable Out Of Process Builds command executed
  • Script task with the command line arguments to build your solution
Lenard Bartha
  • 348
  • 1
  • 9