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

Unexpected work needed to sign WiX built outputs in V4 when using MSBuild project files #8

Closed
BMurri opened this issue Dec 4, 2022 · 3 comments
Labels
triage To be reviewed by FireGiant

Comments

@BMurri
Copy link

BMurri commented Dec 4, 2022

HeatWave Version

0.9.0.5

Visual Studio Version

17.4.2

Repro Steps

  1. Create various WiX v3 projects in a solution
  2. Add various <Sign*> targets to a Directory.Build.targets file in the solution's directory. Verify that they work (for product, bundle, and CA projects). Clean the solution.
  3. Convert all WiX projects to v4 and build the solution.

Actual Result

None of the WiX Product output assets are signed, nor are any of the Bundle assets signed.

Note that, if the signing targets were found inside of the WixProj file, they would have to be moved to exist AFTER the Wix Sdk's sdk.targets file, which cannot be done when using the Project/@SDK usage (you have to instead use the dual Import/@project@Sdk usage as described in Expected Result).

I'm pretty sure that if you "abused" the .props/.targets system by putting the empty signing targets in the .props file instead of the .targets file, absolutely none of this would have quit working/been needed to restore functionality.

Expected Result

Expected that signing would continue to work.

Note that I was able to restore signing by following the following steps:

  1. Move the following 6 signing targets from Directory.Build.Targets to Directory.Build.WixSigning.targets: SignMsm, SignCabs, SignMsi, SignContainers, SignBundleEngine, SignBundle
  2. Change each WixProj file from:
<Project Sdk="WixToolset.Sdk/4.0.0-preview.1">
...
</Project>

to:

<Project>
  <Import Project="Sdk.props" Sdk="WixToolset.Sdk" Version="4.0.0-preview.1" />
...
  <Import Project="Sdk.targets" Sdk="WixToolset.Sdk" Version="4.0.0-preview.1" />
  <Import Project="$([MSBuild]::GetPathOfFileAbove('Directory.Build.WixSigning.targets', '$(MSBuildThisFileDirectory)../'))" />
</Project>
@BMurri BMurri added the triage To be reviewed by FireGiant label Dec 4, 2022
@BMurri
Copy link
Author

BMurri commented Dec 4, 2022

This could be useful in understanding the file inclusion order in MSBuild.

@BMurri
Copy link
Author

BMurri commented Dec 4, 2022

Since this is an SDK issue, is this a WiX issue instead?

@BMurri
Copy link
Author

BMurri commented Dec 4, 2022

This appears to be addressed by wixtoolset/issues#7038

@BMurri BMurri closed this as completed Dec 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
triage To be reviewed by FireGiant
Projects
None yet
Development

No branches or pull requests

1 participant