From 3d49b0591a6fa2dc88c8df8915959959f81f4471 Mon Sep 17 00:00:00 2001 From: Rob Mensching Date: Fri, 2 Nov 2018 23:43:19 -0700 Subject: Update to DecompileResult move to XDocument Fixes wixtoolset/issues#5896 --- src/WixToolset.Core/CommandLine/DecompileCommand.cs | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'src/WixToolset.Core') diff --git a/src/WixToolset.Core/CommandLine/DecompileCommand.cs b/src/WixToolset.Core/CommandLine/DecompileCommand.cs index 87cead80..3aa750c8 100644 --- a/src/WixToolset.Core/CommandLine/DecompileCommand.cs +++ b/src/WixToolset.Core/CommandLine/DecompileCommand.cs @@ -3,8 +3,8 @@ namespace WixToolset.Core.CommandLine { using System; - using System.Collections.Generic; using System.IO; + using System.Xml.Linq; using WixToolset.Data; using WixToolset.Extensibility; using WixToolset.Extensibility.Data; @@ -29,10 +29,6 @@ namespace WixToolset.Core.CommandLine public IMessaging Messaging { get; } - private IEnumerable SourceFiles { get; } - - private string OutputPath { get; } - public int Execute() { if (this.commandLine.ShowHelp) @@ -52,6 +48,11 @@ namespace WixToolset.Core.CommandLine { var decompiler = this.ServiceProvider.GetService(); var result = decompiler.Decompile(context); + + if (!this.Messaging.EncounteredError) + { + result.Document.Save(context.OutputPath, SaveOptions.OmitDuplicateNamespaces); + } } catch (WixException e) { -- cgit v1.2.3-55-g6feb