aboutsummaryrefslogtreecommitdiff
path: root/src/WixToolset.Core/CommandLine
diff options
context:
space:
mode:
Diffstat (limited to 'src/WixToolset.Core/CommandLine')
-rw-r--r--src/WixToolset.Core/CommandLine/BuildCommand.cs6
-rw-r--r--src/WixToolset.Core/CommandLine/CompileCommand.cs6
2 files changed, 6 insertions, 6 deletions
diff --git a/src/WixToolset.Core/CommandLine/BuildCommand.cs b/src/WixToolset.Core/CommandLine/BuildCommand.cs
index b83aaec4..7e6ddd64 100644
--- a/src/WixToolset.Core/CommandLine/BuildCommand.cs
+++ b/src/WixToolset.Core/CommandLine/BuildCommand.cs
@@ -377,18 +377,18 @@ namespace WixToolset.Core.CommandLine
377 context.SourcePath = sourcePath; 377 context.SourcePath = sourcePath;
378 context.Variables = preprocessorVariables; 378 context.Variables = preprocessorVariables;
379 379
380 XDocument document = null; 380 IPreprocessResult result = null;
381 try 381 try
382 { 382 {
383 var preprocessor = this.ServiceProvider.GetService<IPreprocessor>(); 383 var preprocessor = this.ServiceProvider.GetService<IPreprocessor>();
384 document = preprocessor.Preprocess(context); 384 result = preprocessor.Preprocess(context);
385 } 385 }
386 catch (WixException e) 386 catch (WixException e)
387 { 387 {
388 this.Messaging.Write(e.Error); 388 this.Messaging.Write(e.Error);
389 } 389 }
390 390
391 return document; 391 return result?.Document;
392 } 392 }
393 393
394 private class CommandLine 394 private class CommandLine
diff --git a/src/WixToolset.Core/CommandLine/CompileCommand.cs b/src/WixToolset.Core/CommandLine/CompileCommand.cs
index 69e35cab..bc37ee8c 100644
--- a/src/WixToolset.Core/CommandLine/CompileCommand.cs
+++ b/src/WixToolset.Core/CommandLine/CompileCommand.cs
@@ -63,11 +63,11 @@ namespace WixToolset.Core.CommandLine
63 context.SourcePath = sourceFile.SourcePath; 63 context.SourcePath = sourceFile.SourcePath;
64 context.Variables = this.PreprocessorVariables; 64 context.Variables = this.PreprocessorVariables;
65 65
66 XDocument document = null; 66 IPreprocessResult result = null;
67 try 67 try
68 { 68 {
69 var preprocessor = this.ServiceProvider.GetService<IPreprocessor>(); 69 var preprocessor = this.ServiceProvider.GetService<IPreprocessor>();
70 document = preprocessor.Preprocess(context); 70 result = preprocessor.Preprocess(context);
71 } 71 }
72 catch (WixException e) 72 catch (WixException e)
73 { 73 {
@@ -83,7 +83,7 @@ namespace WixToolset.Core.CommandLine
83 compileContext.Extensions = this.ExtensionManager.Create<ICompilerExtension>(); 83 compileContext.Extensions = this.ExtensionManager.Create<ICompilerExtension>();
84 compileContext.OutputPath = sourceFile.OutputPath; 84 compileContext.OutputPath = sourceFile.OutputPath;
85 compileContext.Platform = this.Platform; 85 compileContext.Platform = this.Platform;
86 compileContext.Source = document; 86 compileContext.Source = result?.Document;
87 87
88 var compiler = this.ServiceProvider.GetService<ICompiler>(); 88 var compiler = this.ServiceProvider.GetService<ICompiler>();
89 var intermediate = compiler.Compile(compileContext); 89 var intermediate = compiler.Compile(compileContext);