From 25602a3e613f09794599d24e0c796d3295a22197 Mon Sep 17 00:00:00 2001 From: Bob Arnson Date: Tue, 23 Jun 2020 23:26:22 -0400 Subject: Reference Media if DiskId is specified. --- src/WixToolset.Core/Compiler.cs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/WixToolset.Core/Compiler.cs') diff --git a/src/WixToolset.Core/Compiler.cs b/src/WixToolset.Core/Compiler.cs index e2a5721e..56f6322a 100644 --- a/src/WixToolset.Core/Compiler.cs +++ b/src/WixToolset.Core/Compiler.cs @@ -5728,11 +5728,6 @@ namespace WixToolset.Core id = this.Core.CreateIdentifier("fil", directoryId, name ?? shortName); } - if (!this.compilingModule && CompilerConstants.IntegerNotSet == diskId) - { - diskId = 1; // default to first Media - } - if (null != defaultVersion && null != companionFile) { this.Core.Write(ErrorMessages.IllegalAttributeWithOtherAttribute(sourceLineNumbers, node.Name.LocalName, "DefaultVersion", "CompanionFile", companionFile)); @@ -5914,6 +5909,11 @@ namespace WixToolset.Core } } + if (CompilerConstants.IntegerNotSet != diskId) + { + this.Core.CreateSimpleReference(sourceLineNumbers, TupleDefinitions.Media, diskId.ToString(CultureInfo.InvariantCulture.NumberFormat)); + } + // If this component does not have a companion file this file is a possible keypath. possibleKeyPath = null; if (null == companionFile) -- cgit v1.2.3-55-g6feb