Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WiX Builds are broken with recent update to virtual environments #4582

Closed
1 of 7 tasks
svnscha opened this issue Nov 24, 2021 · 10 comments
Closed
1 of 7 tasks

WiX Builds are broken with recent update to virtual environments #4582

svnscha opened this issue Nov 24, 2021 · 10 comments

Comments

@svnscha
Copy link

svnscha commented Nov 24, 2021

Description

Our WiX setup builds are suddenly broken. The build system is reporting that the following file is missing:

  • C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Microsoft\WiX\v3.x\Wix.targets

Recently WiX was updated - is the Visual Studio extension missing/broken now?

Virtual environments affected

  • Ubuntu 18.04
  • Ubuntu 20.04
  • macOS 10.15
  • macOS 11
  • Windows Server 2016
  • Windows Server 2019
  • Windows Server 2022

Image version and build link

Agent name: 'Azure Pipelines 2'
Agent machine name: 'WIN-3155C9SFUN7'
Current agent version: '2.195.0'
Operating System
Virtual Environment
Virtual Environment Provisioner
Current image version: '20211122.1'

Is it regression?

no

Expected behavior

I expect the build to complete successfully.

Actual behavior

The build breaks because of recently missing files in the build environment.

Repro steps

Build a WiX Setup project using Visual Studio.

@al-cheb
Copy link
Contributor

al-cheb commented Nov 24, 2021

@svnscha , Please take a look at #4419

@bstr413
Copy link

bstr413 commented Nov 24, 2021

Can confirm that this is an issue. Switching the agent to windows-2022 or windows-latest is a workaround for this issue.

@dibir-magomedsaygitov
Copy link
Contributor

Closing this issue as a duplicate of #4419

@svnscha
Copy link
Author

svnscha commented Nov 25, 2021

The comments in issue #4419 indeed helped. But the actual fix is changing the *.wixproj file as mentioned by someone in that thread.

<Import Project="$(WixTargetsPath)" Condition=" '$(WixTargetsPath)' != ''" />
  <Import Project="$(MSBuildExtensionsPath32)\Microsoft\WiX\v3.x\Wix.targets" Condition=" '$(WixTargetsPath)' == '' AND Exists('$(MSBuildExtensionsPath32)\Microsoft\WiX\v3.x\Wix.targets') "/>
  <Target Name="EnsureWixToolsetInstalled" Condition=" '$(WixTargetsImported)' != 'true' ">
     <Error Text="The WiX Toolset v3.11 (or newer) build tools must be installed to build this project. To download the WiX Toolset, see http://wixtoolset.org/releases/" />
  </Target>

For reference, the required change and windows-2019 still works with that, too.

@AlmightyFuzz
Copy link

@dibir-magomedsaygitov I don't think this is a duplicate of #4419 because adding the Wix tools to the windows-2022 vm image should not have broken the windows-2019 vm image.

@al-cheb
Copy link
Contributor

al-cheb commented Nov 25, 2021

@AlmightyFuzz , This #4448 PR affected all Windows Server 2016,2019,2022 images.

@AlmightyFuzz
Copy link

AlmightyFuzz commented Nov 25, 2021

@al-cheb Why? The pull request title suggests it should only affect 2022? The #4419 issue also says that it should only affect 2022.

Because of this change our builds on windows-2019 are now failing.

@al-cheb
Copy link
Contributor

al-cheb commented Nov 25, 2021

@al-cheb Why? The pull request title suggests it should only affect 2022? The #4419 issue also says that it should only affect 2022.

Because of this change our builds on windows-2019 are now failing.

It's a single script for all images - https://github.com/barnson/virtual-environments/blob/main/images/win/scripts/Installers/Install-Wix.ps1

@AlmightyFuzz
Copy link

I understand what has changed now, as part of the update to the windows-2022 image you have removed the Wix Toolset Studio 2019 Extension from the windows-2019 image. See win-2019 readme changes

If the script is used by all images then shouldn't a Test-IsWin22 check have been added to that script file rather than removing something that was already installed on the vm image that people were already using and relying on?

@Gallimathias
Copy link

Adjusting the files has not helped us at the moment. We are now running the script that @barnson removed again manually in the CI process.

Warning. This could extend every build by at least 20 minutes.

This issue cost us today and the next day's a lot of time 😑

Have to remove the test call because file is not there

Choco-Install -PackageName wixtoolset -ArgumentList "--force"

if (Test-IsWin19)
{
    $extensionUrl = "https://wixtoolset.gallerycdn.vsassets.io/extensions/wixtoolset/wixtoolsetvisualstudio2019extension/1.0.0.4/1563296438961/Votive2019.vsix"
    $VSver = "2019"
}
else
{
    throw "Invalid version of Visual Studio is found. 2019 are required"
}

$extensionName = "Votive$VSver.vsix"

#Installing VS extension 'Wix Toolset Visual Studio Extension'
Install-VsixExtension -Url $extensionUrl -Name $extensionName -VSversion $VSver

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants