简体   繁体   中英

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

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!

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM