diff options
Diffstat (limited to 'src/WixToolset.Core/CommandLine/BuildCommand.cs')
-rw-r--r-- | src/WixToolset.Core/CommandLine/BuildCommand.cs | 31 |
1 files changed, 12 insertions, 19 deletions
diff --git a/src/WixToolset.Core/CommandLine/BuildCommand.cs b/src/WixToolset.Core/CommandLine/BuildCommand.cs index 87a3cd30..f754c876 100644 --- a/src/WixToolset.Core/CommandLine/BuildCommand.cs +++ b/src/WixToolset.Core/CommandLine/BuildCommand.cs | |||
@@ -331,27 +331,20 @@ namespace WixToolset.Core.CommandLine | |||
331 | 331 | ||
332 | private IEnumerable<Intermediate> LoadLibraries(IEnumerable<string> libraryFiles, ITupleDefinitionCreator creator) | 332 | private IEnumerable<Intermediate> LoadLibraries(IEnumerable<string> libraryFiles, ITupleDefinitionCreator creator) |
333 | { | 333 | { |
334 | var libraries = new List<Intermediate>(); | 334 | try |
335 | |||
336 | foreach (var libraryFile in libraryFiles) | ||
337 | { | 335 | { |
338 | try | 336 | return Intermediate.Load(libraryFiles, creator); |
339 | { | 337 | } |
340 | var library = Intermediate.Load(libraryFile, creator); | 338 | catch (WixCorruptFileException e) |
341 | 339 | { | |
342 | libraries.Add(library); | 340 | this.Messaging.Write(e.Error); |
343 | } | 341 | } |
344 | catch (WixCorruptFileException e) | 342 | catch (WixUnexpectedFileFormatException e) |
345 | { | 343 | { |
346 | this.Messaging.Write(e.Error); | 344 | this.Messaging.Write(e.Error); |
347 | } | ||
348 | catch (WixUnexpectedFileFormatException e) | ||
349 | { | ||
350 | this.Messaging.Write(e.Error); | ||
351 | } | ||
352 | } | 345 | } |
353 | 346 | ||
354 | return libraries; | 347 | return Array.Empty<Intermediate>(); |
355 | } | 348 | } |
356 | 349 | ||
357 | private IEnumerable<Localization> LoadLocalizationFiles(IEnumerable<string> locFiles, IDictionary<string, string> preprocessorVariables) | 350 | private IEnumerable<Localization> LoadLocalizationFiles(IEnumerable<string> locFiles, IDictionary<string, string> preprocessorVariables) |
@@ -437,7 +430,7 @@ namespace WixToolset.Core.CommandLine | |||
437 | public string OutputsFile { get; private set; } | 430 | public string OutputsFile { get; private set; } |
438 | 431 | ||
439 | public string BuiltOutputsFile { get; private set; } | 432 | public string BuiltOutputsFile { get; private set; } |
440 | 433 | ||
441 | public CommandLine(IMessaging messaging) | 434 | public CommandLine(IMessaging messaging) |
442 | { | 435 | { |
443 | this.Messaging = messaging; | 436 | this.Messaging = messaging; |