I am trying to create a .msi installer package with wix for my dektop app in azure devops using yaml scripting. Below is the msbuild task created for the same:
- task: MSBuild@1
inputs:
solution: '**/*.wixproj'
# platform: 'Any CPU'
configuration: 'Release'
msbuildArguments: '/p:Configuration=Release/p:ProductCode=${product_code} /p:UpgradeCode=${upgrade_code}/t:Clean;Rebuild'
clean: true
Below is the error i'm getting during the pipeline build:
Error MSB3441: Cannot get assembly name for "..\MyProject\bin\Release\MyProject.exe". Could not load file or assembly 'MyProject.exe' or one of its dependencies. The system cannot find the path specified.
Thanks in advance.
We had this problem too. Our solution was to remove the Installer project from the Solution file, continue building the other projects in the solution using the standard MSBuild
task and then add script
tasks to the pipeline to generate the MSI:
pool:
vmImage: windows-latest
steps:
- script: .\Tools\Wix\candle.exe -nologo Foobar.wxs -out Foobar.wixobj -ext WixUIExtension
displayName: 'Compile Wix file'
- script: .\Tools\Wix\light.exe -nologo Foobar.wixobj -out Foobar.msi -ext WixUIExtension
displayName: 'Create MSI file'
Note that our build is based on the windows-latest
image which includes WiX Toolset; see the list of all included tools here.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With