4

I need to install the Visual Studio extension InstallerProjects.vsix in the Azure Piplines to build my .vdproj. But I can't find anything about how to install it.

I tried the following azure-pipelines.yml configuration without success:

stages:
  - stage: Foo
    jobs:
      - job: 'Bar'
        pool:
          vmImage: 'windows-2019'
          demands:
            - msbuild
            - visualstudio
        steps:
          - script: '"C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\IDE\VSIXInstaller.exe" InstallerProjects.vsix'
          - task: VSBuild@1
            inputs:
              solution: ./MyProject.vdproj

Am I able to install extensions in the Pipeline and if yes how?

Thx in advance!

Lukas Kirner
  • 3,989
  • 6
  • 23
  • 30
  • You need to tell the agent where to download that .vsix file. Otherwise, it won't work. – Lex Li Mar 20 '20 at 14:56
  • I have the file in the repo – Lukas Kirner Mar 20 '20 at 14:57
  • Then check the agent log and see what's written there. You should always try to use a custom agent to iron out issues, and then switch to Microsoft's agent. – Lex Li Mar 20 '20 at 15:00
  • I'm not able to configure that. But the microsoft Agent takes infinite time to run the `script` step – Lukas Kirner Mar 20 '20 at 15:03
  • You probably forgot /q, https://weblog.west-wind.com/posts/2016/Mar/01/Registering-and-Unregistering-a-VSIX-Extension-from-the-Command-Line – Lex Li Mar 20 '20 at 15:18
  • At first yes but later I tried `/admin` and `/quite` and nothing worked – Lukas Kirner Mar 20 '20 at 15:27
  • @Lukas Kirner Not get your response for several days, would you please share your latest information about this issue? If you have any concern, feel free to share it here. – Hugh Lin Mar 27 '20 at 10:13

1 Answers1

1

For this issue , according to previous case, it is not feasible to install InstallerProjects.vsix extension from the command line in azure devops. If you open the command line as an administrator and execute the installation command locally, it will be successful, but not in azure devops, because we cannot execute the command line as an administrator in the command line task .

AFAIK , building a Visual Studio Installer project in the Azure Devops Pipeline hosted agent is not supported at this moment. As a workaround , you have to configure your own build agent to run the build. Make sure the VS Installer Projects extension is installed on private agent and then you can build the setup project either use command line task with "devenv" or use the "Build VS Installer" task. You can refer to this case for details.

In addition , there is an open feature request in Developer Community about this. You could vote that suggestion ticket and share your comment there. A contributor in this uservoice proposed a solution using third-party extensions, you can also refer to it.

Hugh Lin
  • 17,829
  • 2
  • 21
  • 25