I'm new in Azure Devops. I want to install Desktop App Converter (DAC) to Azure Devops to make possible auto convert msi file to window store appx. Note, DAC is also window store application. First I've create powershell script (see below) that must do two steps:
Installs DAC converter using add-appxpackage command
Generate appx package based on msi file using DesktopAppConverter.exe call
It worked fine for me: DesktopAppConverter was installed and package was generated.
On Aure Devops I've created build pipeline with powershell task. This task execute the same actions as I've on my local machine. For job executing I've used Microsoft-hosted agent.
My YAML is:
# .NET Desktop
trigger:
- master
pool:
vmImage: 'windows-latest'
variables:
solution: '**/*.sln'
buildPlatform: 'Any CPU'
buildConfiguration: 'Release'
steps:
- task: PowerShell@2
inputs:
filePath: 'convert.ps1'
Powershell script convert.ps1
add-appxpackage -path Microsoft.DesktopAppConverter_2.1.4.0_x64__8wekyb3d8bbwe.Appx
DesktopAppConverter.exe -Installer MyApplication.msi -Destination Appx05 -PackageName "MyCompany.MyApplication" -Publisher "CN=12345678-1234-1234-1234-123456789012" -PackagePublisherDisplayName "MyCompany" -PackageDisplayName "MyApplication" -Version 1.0.14.0 -MakeAppx -Verbose
Execution of add-appxpackage has no error. On executing DesktopAppConverter.exe having such error:
DesktopAppConverter.exe : The term 'DesktopAppConverter.exe' is not
recognized as the name of a cmdlet, function, script file, or operable
program. Check the spelling of the name, or if a path was included,
verify that the path is
correct and try again.
Base on this message it's possible to say that DAC was not installed in fact. Also, there is no Desktop App Converter package in powershell command Get-Appxpackage output.
I've also created the sampe pipeline and executed it using self-hosted agent, executing agent on my PC. DAC was installed and executed.
So, on the current step I've got the main question: is it possible to install DAC using Microsoft-hosted agent ? I haven't see any reason why it's couldn't be possible. Azure Pipeline provides me a virtual machine during job executing period (and than vm instance discarded). So In theory I could do everything with it and install appx as well. I've successfully installed program on Microsoft-hosted agent's VM. Why I couldn't do it with appx from store ?
Also I've got some other questions. I'm sure DAC was not installed. That means it was problem during installation. When I've installed on my PC and having a problem, I've seen an error message in console window. I haven't seen eny errors on failed DAC install on Azure (but it was one error on system couldn't find DAC executing file). I've not find any errors about failed installation in eventlogs and logs files as well. So, why I couldn't see any error although DAC was not installed ? The other thing is: the steps above I've done on Microsoft Azure devops that Microsoft provides for free trial. When I've try to do the same steps on our production Azure devpos, there where no error on both install DAC step and execute DAC step (appx was not generated).