aboutsummaryrefslogtreecommitdiff
path: root/src/wix/WixToolset.Core/Compile/CompilerPayload.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/wix/WixToolset.Core/Compile/CompilerPayload.cs')
-rw-r--r--src/wix/WixToolset.Core/Compile/CompilerPayload.cs13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/wix/WixToolset.Core/Compile/CompilerPayload.cs b/src/wix/WixToolset.Core/Compile/CompilerPayload.cs
index 98ab1579..a83f1d8b 100644
--- a/src/wix/WixToolset.Core/Compile/CompilerPayload.cs
+++ b/src/wix/WixToolset.Core/Compile/CompilerPayload.cs
@@ -247,13 +247,12 @@ namespace WixToolset.Core
247 { 247 {
248 this.CalculateAndVerifyFields(); 248 this.CalculateAndVerifyFields();
249 this.GenerateIdFromFilename(); 249 this.GenerateIdFromFilename();
250 this.GenerateIdFromPrefix("ppy");
251 } 250 }
252 251
253 public void FinishCompilingPayload() 252 public void FinishCompilingPayload(string parentId)
254 { 253 {
255 this.CalculateAndVerifyFields(); 254 this.CalculateAndVerifyFields();
256 this.GenerateIdFromPrefix("pay"); 255 this.GenerateIdFromPrefix("pay", parentId);
257 } 256 }
258 257
259 private void GenerateIdFromFilename() 258 private void GenerateIdFromFilename()
@@ -268,14 +267,18 @@ namespace WixToolset.Core
268 { 267 {
269 this.Id = this.Core.CreateIdentifierFromFilename(Path.GetFileName(this.SourceFile)); 268 this.Id = this.Core.CreateIdentifierFromFilename(Path.GetFileName(this.SourceFile));
270 } 269 }
270 else // if Name and SourceFile were not specified an error was already reported.
271 {
272 this.Id = Identifier.Invalid;
273 }
271 } 274 }
272 } 275 }
273 276
274 private void GenerateIdFromPrefix(string prefix) 277 private void GenerateIdFromPrefix(string prefix, string parentId)
275 { 278 {
276 if (this.Id == null) 279 if (this.Id == null)
277 { 280 {
278 this.Id = this.Core.CreateIdentifier(prefix, this.SourceFile?.ToUpperInvariant() ?? String.Empty); 281 this.Id = this.Core.CreateIdentifier(prefix, parentId, this.SourceFile?.ToUpperInvariant() ?? this.Name?.ToUpperInvariant());
279 } 282 }
280 } 283 }
281 284