.netazure-devopscombuild-pipelineaddin-express

How to Deploy a .NET ADX COM Add-in Project on Azure with a Proper Build Pipeline Setup


I am working on a .NET ADX COM Add-in project and need to deploy it using Azure DevOps.

I'm having trouble figuring out the correct steps to ensure that the Add-in Express (ADX) dependencies are included in the build pipeline and properly installed on the build agent. Could someone provide a detailed guide on how to achieve this?

Here's what I have so far:

Project Details:

Pipeline Configuration:

Issues Encountered:

The build pipeline cannot find the Add-in Express DLLs. Unsure how to ensure Add-in Express is available and correctly configured on the build agent.

Current Pipeline YAML:

trigger:
  - feature/my-branch

pool:
  vmImage: 'windows-latest'

variables:
  solution: '**/*.sln'
  buildPlatform: 'Any CPU'
  buildConfiguration: 'Release'

steps:
- task: UseDotNet@2
  inputs:
    packageType: 'sdk'
    version: '5.0.x'

- task: NuGetToolInstaller@1

- task: NuGetCommand@2
  inputs:
    restoreSolution: '$(solution)'

- script: |
    echo "Listing directories and permissions:"
    ls -l
  displayName: 'List Directories'

- script: |
    mkdir C:\Build\Dependencies
    copy "C:\Program Files (x86)\Add-in Express\Add-in Express for .NET\Bin\AddinExpress.MSO.2005.dll" C:\Build\Dependencies
  displayName: 'Copy Add-in Express DLL'

- task: VSBuild@1
  inputs:
    solution: '$(solution)'
    platform: '$(buildPlatform)'
    configuration: '$(buildConfiguration)'

- task: VSTest@2
  inputs:
    platform: '$(buildPlatform)'
    configuration: '$(buildConfiguration)'

Questions:

Any guidance or examples of a successful pipeline setup for this type of project would be greatly appreciated. Thank you!


Solution

  • In the Microsoft hosted agent, the Add-in Express is not installed. You can check the software list of it here. So, the path "C:\Program Files (x86)\Add-in Express\Add-in Express for .NET\Bin\AddinExpress.MSO.2005.dll" is not there on the Microsoft hosted agent.

    In this case, I would suggest you use the self-hosted agent instead of the Microsoft hosted agent. Then you can manually configure and install the Add-in Express to your agent. You can configure the self-hosted agent on the machine where you build the project locally.

    This can make sure the Add-in Express is available on the Azure DevOps build agent.

    After you configured the self-hosted agent, change the

    pool:
      vmImage: 'windows-latest'
    

    to

    pool:
      name: 'default'  #your pool name