[wix-users] Bundle Signing Failing on invalid SignTargetPath

Edwin Castro egcastr at gmail.com
Wed Mar 16 09:40:53 PDT 2022


My guess is the AssignCultures target may be involved.

    <!-- Set the sign target items, if we're signing output. -->
    <CreateItem
      Include="@(_TargetPathItems)"
      Condition=" '$(SignOutput)' == 'true' AND '$(SuppressLayout)' !=
'true' ">
      <Output TaskParameter="Include"
              ItemName="SignTargetPath"/>
    </CreateItem>

I haven't checked to see if AssignCultures could possibly be invoked for a
Bundle project.

Have you used msbuild -verbosity:diagnostic to build your project? That
will provide way too much information but should help figure out how/when
the Items are created.

--
Edwin G. Castro

On Tue, Mar 15, 2022 at 11:48 AM Coryat, Jim via wix-users <
wix-users at lists.wixtoolset.org> wrote:

> 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
> http://www.firegiant.com/
>



More information about the wix-users mailing list