0

I want to include a Visual C++ redistributable executable in my Wix bundle (for an offline installation).

It is working great when I build the bundle on my PC (with Visual Studio or command line).

My issue is that it is not working as expected when the bundle is generated with Azure build agent. The Azure bundle installation is not working whereas it works when the bundle is generated on my PC. There is no warning or error in the Azure pipeline log.

The bundle is generated, but its size differs from the size of the bundle generated on my PC. The size difference is equal to the size of the Visual C++ redistributable executable. Therefore, it seems that the executable is not included in the bundle when the build is done by Azure build agent.

How can I ensure that the executable is correctly embedded in the Wix bundle when using Azure build agent?

Here is my code snippet:

Bundle.wxs:

<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
  <Bundle>
    <BootstrapperApplicationRef />
    <Chain>
        <ExePackage Id="VisualCppRedistributableX86"
            Cache="no" Compressed="yes" PerMachine="yes" Permanent="yes" Vital="yes"
            InstallCommand="/q /norestart"
            SourceFile="$(sys.SOURCEFILEDIR)OfflineRedist\VC_redist.x86.exe"/>
        <MsiPackage/>
    </Chain>
  </Bundle>
</Wix>

Azure.yml:

- task: MSBuild@1
  displayName: 'Building MyBundle'
  inputs:
    solution: 'MyBundle\MyBundle.wixproj'
    msbuildArguments: '-p:RunWixToolsOutOfProc=true;Configuration=Release;Platfrom=x86'

The command line I use on my PC:

msbuild "MyPath\MyBundle\MyBundle.wixproj" -p:RunWixToolsOutOfProc=true;Configuration=Release;Platfrom=x86

Thank you for your help.

3
  • Start by decompling (using dark.exe) the Azure Pipeline built bundle. Find the VC redist in the files (you'll need to cross-reference with the manifest.xml) and see if that file looks correct. Maybe the file on Azure Pipelines is a zero byte file (or otherwise corrupted). Commented Mar 14, 2022 at 19:52
  • @rob Thank you for your suggestion. Using Dark.exe I was able to extract the bundle, and I found the VC_redist.x86.exe file. Its size is 133 Bytes, instead of 13725768 Bytes when using my PC. It seems that this 133 Bytes file is a “pointer file” (github.com/git-lfs/git-lfs/issues/3128), never heard of it, I can read it with notepad. I modified the Azure pipeline to copy the original VC_redist.x86.exe file in the ArtifactStagingDirectory, and it is the same pointer file of 133 Bytes. But if I download the VC_redist.x86.exe file from the repository, it is the correct size. Commented Mar 15, 2022 at 10:17
  • I found the solution here: stackoverflow.com/a/56838104/8183789 I added the following in my .yml pipeline file: steps: - checkout: self lfs: true Commented Mar 15, 2022 at 12:22

1 Answer 1

0

I found the solution here: stackoverflow.com/a/56838104/8183789

I needed to use large file storage (LFS)

I added the following in my .yml Azure pipeline file:

steps:
- checkout: self
  lfs: true
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.