Only run WindowsInstallerValidation when WixBuild runs
Fixes 6853
Rob Mensching committed
Oct 4, 2022 at 21:34 UTC
c1ce02b0c5534d2218ac9405cdc1b375b30d756c
1 file changed
+4
-2
src/wix/WixToolset.Sdk/tools/wix.targets
+4
-2
@@ -663,7 +663,9 @@
663
664
RunAsSeparateProcess="$(RunWixToolsOutOfProc)"
665
ToolExe="$(WixToolExe)"
666
- ToolPath="$(WixToolDir)" />
666
+ ToolPath="$(WixToolDir)">
667
+ <Output TaskParameter="ExitCode" PropertyName="_WixBuildExitCode" />
668
+ </WixBuild>
669
670
<ItemGroup>
671
<_WixBuildOutputFile Include="$(IntermediateOutputPath)%(CultureGroup.OutputFolder)$(TargetFileName)" />
@@ -673,7 +675,7 @@
675
<Target
676
Name="WindowsInstallerValidation"
677
DependsOnTargets="CoreCompile"
676
- Condition=" ('$(OutputType)' == 'Package' or '$(OutputType)' == 'Module') and '$(SuppressValidation)'!='true' ">
678
+ Condition=" '$(_WixBuildExitCode)' != '' and '$(SuppressValidation)' != 'true' and ('$(OutputType)' == 'Package' or '$(OutputType)' == 'Module') ">
679
<WindowsInstallerValidation
680
DatabaseFile="$(IntermediateOutputPath)%(CultureGroup.OutputFolder)$(TargetFileName)"
681
WixpdbFile="$(IntermediateOutputPath)%(CultureGroup.OutputFolder)$(TargetPdbFileName)"