diff options
| author | Rob Mensching <rob@firegiant.com> | 2023-02-14 16:24:43 -0800 |
|---|---|---|
| committer | Rob Mensching <rob@firegiant.com> | 2023-02-21 23:31:32 -0700 |
| commit | d97ca048b45077484d068580eb9ae0b231d77009 (patch) | |
| tree | c7dbe0582a74bd91b56cabfb2bbffabd6d7c612e /src | |
| parent | 29e5b6d8a61dc2722a426a77cda1b2d6eabff11f (diff) | |
| download | wix-d97ca048b45077484d068580eb9ae0b231d77009.tar.gz wix-d97ca048b45077484d068580eb9ae0b231d77009.tar.bz2 wix-d97ca048b45077484d068580eb9ae0b231d77009.zip | |
Display errors for all missing files when building a bound wixlib
Diffstat (limited to 'src')
| -rw-r--r-- | src/wix/WixToolset.Core/Librarian.cs | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/src/wix/WixToolset.Core/Librarian.cs b/src/wix/WixToolset.Core/Librarian.cs index 1f366d55..f6357c6c 100644 --- a/src/wix/WixToolset.Core/Librarian.cs +++ b/src/wix/WixToolset.Core/Librarian.cs | |||
| @@ -65,6 +65,11 @@ namespace WixToolset.Core | |||
| 65 | 65 | ||
| 66 | trackedFiles = this.ResolveFilePathsToEmbed(context, sections); | 66 | trackedFiles = this.ResolveFilePathsToEmbed(context, sections); |
| 67 | 67 | ||
| 68 | if (this.Messaging.EncounteredError) | ||
| 69 | { | ||
| 70 | return null; | ||
| 71 | } | ||
| 72 | |||
| 68 | foreach (var section in sections) | 73 | foreach (var section in sections) |
| 69 | { | 74 | { |
| 70 | section.AssignToLibrary(context.LibraryId); | 75 | section.AssignToLibrary(context.LibraryId); |
| @@ -116,18 +121,18 @@ namespace WixToolset.Core | |||
| 116 | { | 121 | { |
| 117 | var resolution = variableResolver.ResolveVariables(symbol.SourceLineNumbers, pathField.Path); | 122 | var resolution = variableResolver.ResolveVariables(symbol.SourceLineNumbers, pathField.Path); |
| 118 | 123 | ||
| 119 | var file = this.FileResolver.ResolveFile(resolution.Value, context.Extensions, bindPaths, symbol.SourceLineNumbers, symbol.Definition); | 124 | try |
| 120 | |||
| 121 | if (!String.IsNullOrEmpty(file)) | ||
| 122 | { | 125 | { |
| 126 | var file = this.FileResolver.ResolveFile(resolution.Value, context.Extensions, bindPaths, symbol.SourceLineNumbers, symbol.Definition); | ||
| 127 | |||
| 123 | // File was successfully resolved so track the embedded index as the embedded file index. | 128 | // File was successfully resolved so track the embedded index as the embedded file index. |
| 124 | field.Set(new IntermediateFieldPathValue { Embed = true, Path = file }); | 129 | field.Set(new IntermediateFieldPathValue { Embed = true, Path = file }); |
| 125 | 130 | ||
| 126 | trackedFiles.Add(this.LayoutServices.TrackFile(file, TrackedFileType.Input, symbol.SourceLineNumbers)); | 131 | trackedFiles.Add(this.LayoutServices.TrackFile(file, TrackedFileType.Input, symbol.SourceLineNumbers)); |
| 127 | } | 132 | } |
| 128 | else | 133 | catch (WixException e) |
| 129 | { | 134 | { |
| 130 | this.Messaging.Write(ErrorMessages.FileNotFound(symbol.SourceLineNumbers, pathField.Path, symbol.Definition.Name)); | 135 | this.Messaging.Write(e.Error); |
| 131 | } | 136 | } |
| 132 | } | 137 | } |
| 133 | } | 138 | } |
