[wix-users] Bundle Signing Failing on invalid SignTargetPath

Davidsen, Zac (Zachary) T ZTDAVIDSEN at beckman.com
Wed Mar 16 06:16:06 PDT 2022


If you didn't already know about this, it might be useful to look at a binary log of the build (https://msbuildlog.com/).  My first guess would be that you have some package or other build extension that's setting things in a way that WiX doesn't expect, but either way, binary logs are pretty good at giving you the info to find where things are getting set incorrectly.

Zac

-----Original Message-----
From: wix-users <wix-users-bounces at lists.wixtoolset.org> On Behalf Of Coryat, Jim via wix-users
Sent: Tuesday, March 15, 2022 2:47 PM
To: WiX Toolset Users Mailing List <wix-users at lists.wixtoolset.org>
Cc: Coryat, Jim <Jim.Coryat at softprocorp.com>
Subject: [wix-users] Bundle Signing Failing on invalid SignTargetPath

Pulling out what hair I have left on this one.

Setup a bundle to include dot net 4.8 and a wix installer msi that already existed.

After hunting around and reviewing the wix2010.targets file I deduced all I should have to do is add the <SignOutput>true</SignOutput> to the bundle wixproj file.  I did this and it invokes the targets necessary for signing, however what is happening is that the input parameter is getting a value of the path of the target bundle to sign, duplicated with a semi-colon separating them.  The property is SignTargetPath which looks like it gets explicitly set Around line 305 in wix2010.targets file.

  <ItemGroup>
    <SignTargetPath Include="$(TargetPath)" Condition=" '$(OutputType)' == 'Bundle' AND '$(SignOutput)' == 'true' AND '$(SuppressLayout)' != 'true' " />
  </ItemGroup>

Walking backwards from this is where the value of TargetPath is set:

  <PropertyGroup>
    <!-- Example, c:\MyProjects\MySetup\bin\debug\ -->
    <!--
    Condition intentionally omitted on this one, because it causes problems
    when we pick up the value of an environment variable named TargetDir
    -->
    <TargetDir Condition="'$(OutDir)' != ''">$([System.IO.Path]::GetFullPath(`$([System.IO.Path]::Combine(`$(MSBuildProjectDirectory)`, `$(OutDir)`))`))</TargetDir>
    <TargetPdbDir Condition=" '$(PdbOutputPath)'!='' ">$([System.IO.Path]::GetFullPath(`$([System.IO.Path]::Combine(`$(MSBuildProjectDirectory)`, `$(PdbOutputPath)`))`))</TargetPdbDir>

    <!-- Example, C:\MyProjects\MySetup\bin\debug\MySetup.msi -->
    <TargetPath Condition=" '$(TargetPath)' == '' ">$(TargetDir)$(TargetFileName)</TargetPath>
    <TargetPdbPath Condition=" '$(TargetPdbPath)' == '' ">$(TargetPdbDir)$(TargetPdbName)</TargetPdbPath>
  </PropertyGroup>

I'm not seeing where the SignTargetPath is getting set this way. Here is the log snippet specifically for this:

Target "GetContainersToSign" in file "C:\dev\ExchangePlatform3\Sources\3rdParty\Wix\v3.14\Sdk\wix2010.targets" from project "C:\dev\ExchangePlatform3\Sources\Setup\SPX\ClientSetup\ClientBundle\ClientBundle.wixproj" (target "Signing" depends on it):
Building target "GetContainersToSign" completely.
Output file "obj\Debug\ClientBundle.wixproj.Signed.txt" does not exist.
Done building target "GetContainersToSign" in project "ClientBundle.wixproj".
Target "InternalSignContainers" skipped, due to false condition; ( '@(SignContainers)' != '' ) was evaluated as ( '' != '' ).
Target "PrepareForBuild" skipped. Previously built successfully.
Target "ResolveWixExtensionReferences" skipped. Previously built successfully.
Target "CompileAndLink" skipped. Previously built successfully.
Target "InternalSignContainers" skipped, due to false condition; ( '@(SignContainers)' != '' ) was evaluated as ( '' != '' ).
Target "InscribeBundleEngine" in file "C:\dev\ExchangePlatform3\Sources\3rdParty\Wix\v3.14\Sdk\wix2010.targets" from project "C:\dev\ExchangePlatform3\Sources\Setup\SPX\ClientSetup\ClientBundle\ClientBundle.wixproj" (target "Signing" depends on it):
Building target "InscribeBundleEngine" completely.
Output file "obj\Debug\ClientBundle.wixproj.Signed.txt" does not exist.
Using "Insignia" task from assembly "C:\dev\ExchangePlatform3\Sources\3rdParty\Wix\v3.14\Bin\WixTasks.dll".
Task "Insignia"
  Task Parameter:OutputFile=obj\Debug\SoftPro360Client.exe
C:\dev\ExchangePlatform3\Sources\3rdParty\Wix\v3.14\Sdk\wix2010.targets(2176,9): error MSB4094: "C:\dev\ExchangePlatform3\Layouts\Debug\SPX\AgentClient\SoftPro360Client.exe;C:\dev\ExchangePlatform3\Layouts\Debug\SPX\AgentClient\SoftPro360Client.exe" is an invalid value for the "BundleFile" parameter of the "Insignia" task. Multiple items cannot be passed into a parameter of type "Microsoft.Build.Framework.ITaskItem". [C:\dev\ExchangePlatform3\Sources\Setup\SPX\ClientSetup\ClientBundle\ClientBundle.wixproj]
Done executing task "Insignia" -- FAILED.
Done building target "InscribeBundleEngine" in project "ClientBundle.wixproj" -- FAILED.

________________________________
NOTICE: The information contained in this message is proprietary and/or confidential and may be privileged. If you are not the intended recipient of this communication, you are hereby notified to: (i) delete the message and all copies; (ii) do not disclose, distribute or use the message in any manner; and (iii) notify the sender immediately.



____________________________________________________________________
WiX Toolset Users Mailing List provided by FireGiant https://urldefense.proofpoint.com/v2/url?u=http-3A__www.firegiant.com_&d=DwICAg&c=9mghv0deYPYDGP-W745IEdQLV1kHpn4XJRvR6xMRXtA&r=Hblpuym5RtUs_4R6qwcviv7o1-X2VNe9YBkPtiuw4mw&m=DizS_yuF4Xm_o61TfWJO-x1P-mjKx0UAPMecCmBRzOQ85FXaC4GAq0JILtxd-dYi&s=me-8_WFKNuZxTyozJVWCmi9rn-cBDh2pTp0u_OOoyaI&e=
Please be advised that this email may contain confidential information. If you are not the intended recipient, please notify us by email by replying to the sender and delete this message. The sender disclaims that the content of this email constitutes an offer to enter into, or the acceptance of, any agreement; provided that the foregoing does not invalidate the binding effect of any digital or other electronic reproduction of a manual signature that is included in any attachment.



More information about the wix-users mailing list