Install Visual Studio extension (.vsix) in Azure Pipelines (CI)

Viewed 1019

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!

1 Answers

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.

Related