-
-
Notifications
You must be signed in to change notification settings - Fork 549
Expand file tree
/
Copy pathErrorMessages.cs
More file actions
2684 lines (2227 loc) · 187 KB
/
ErrorMessages.cs
File metadata and controls
2684 lines (2227 loc) · 187 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information.
namespace WixToolset.Data
{
using System;
using System.Collections.Generic;
using System.Resources;
public static class ErrorMessages
{
public static Message ActionCircularDependency(SourceLineNumber sourceLineNumbers, string sequenceTableName, string actionName1, string actionName2)
{
return Message(sourceLineNumbers, Ids.ActionCircularDependency, "The {0} table contains an action '{1}' that is scheduled to come before or after action '{2}', which is also scheduled to come before or after action '{1}'. Please remove this circular dependency by changing the Before or After attribute for one of the actions.", sequenceTableName, actionName1, actionName2);
}
public static Message ActionCollision(SourceLineNumber sourceLineNumbers, string sequenceTableName, string actionName)
{
return Message(sourceLineNumbers, Ids.ActionCollision, "The {0} table contains an action '{1}' that is declared in two different locations. Please remove one of the actions or set the Overridable='yes' attribute on one of their elements.", sequenceTableName, actionName);
}
public static Message ActionCollision2(SourceLineNumber sourceLineNumbers)
{
return Message(sourceLineNumbers, Ids.ActionCollision2, "The location of the action related to previous error.");
}
public static Message ActionScheduledRelativeToItself(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string attributeValue)
{
return Message(sourceLineNumbers, Ids.ActionScheduledRelativeToItself, "The {0}/@{1} attribute's value '{2}' is invalid because it would make this action dependent upon itself. Please change the value to the name of a different action.", elementName, attributeName, attributeValue);
}
public static Message ActionScheduledRelativeToTerminationAction(SourceLineNumber sourceLineNumbers, string sequenceTableName, string actionName1, string actionName2)
{
return Message(sourceLineNumbers, Ids.ActionScheduledRelativeToTerminationAction, "The {0} table contains an action '{1}' that is scheduled to come before or after action '{2}', which is a special action which only occurs when the installer terminates. These special actions can be identified by their negative sequence numbers. Please schedule the action '{1}' to come before or after a different action.", sequenceTableName, actionName1, actionName2);
}
public static Message ActionScheduledRelativeToTerminationAction2(SourceLineNumber sourceLineNumbers)
{
return Message(sourceLineNumbers, Ids.ActionScheduledRelativeToTerminationAction2, "The location of the special termination action related to previous error(s).");
}
public static Message AdditionalArgumentUnexpected(string argument)
{
return Message(null, Ids.AdditionalArgumentUnexpected, "Additional argument '{0}' was unexpected. Remove the argument and add the '-?' switch for more information.", argument);
}
public static Message AdminImageRequired(string productCode)
{
return Message(null, Ids.AdminImageRequired, "Source information is required for the product '{0}'. If you ran torch.exe with both target and updated .msi files, you must first perform an administrative installation of both .msi files then pass -a when running torch.exe.", productCode);
}
public static Message AdvertiseStateMustMatch(SourceLineNumber sourceLineNumbers, string advertiseState, string parentAdvertiseState)
{
return Message(sourceLineNumbers, Ids.AdvertiseStateMustMatch, "The advertise state of this element: '{0}', does not match the advertise state set on the parent element: '{1}'.", advertiseState, parentAdvertiseState);
}
public static Message AppIdIncompatibleAdvertiseState(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string value, string parentValue)
{
return Message(sourceLineNumbers, Ids.AppIdIncompatibleAdvertiseState, "The {0}/@(1) attribute's value, '{2}' does not match the advertise state on its parent element: '{3}'. (Note: AppIds nested under Fragment, Module, or Package elements must be advertised.)", elementName, attributeName, value, parentValue);
}
public static Message BaselineRequired()
{
return Message(null, Ids.BaselineRequired, "No baseline was specified for one of the transforms specified. A baseline is required for all transforms in a patch.");
}
public static Message BinderFileManagerMissingFile(SourceLineNumber sourceLineNumbers, string exceptionMessage)
{
return Message(sourceLineNumbers, Ids.BinderFileManagerMissingFile, "{0}", exceptionMessage);
}
public static Message BothUpgradeCodesRequired()
{
return Message(null, Ids.BothUpgradeCodesRequired, "Both the target and updated package authoring must define the Package/@UpgradeCode attribute if the transform validates the UpgradeCode (default). Either define the Package/@UpgradeCode attribute in both the target and updated authoring, or set the Validate/@UpgradeCode attribute to 'no' in the patch authoring.");
}
public static Message BundleTooNew(string bundleExecutable, long bundleVersion)
{
return Message(null, Ids.BundleTooNew, "Unable to read bundle executable '{0}', because this bundle was created with a newer version of WiX (bundle version '{1}'). You must use a newer version of WiX in order to read this bundle.", bundleExecutable, bundleVersion);
}
public static Message CabExtractionFailed(string cabName, string directoryName)
{
return Message(null, Ids.CabExtractionFailed, "Failed to extract cab '{0}' to directory '{1}'. This is most likely due to a lack of available disk space on the destination drive.", cabName, directoryName);
}
public static Message CabExtractionFailed(string cabName, string mergeModulePath, string directoryName)
{
return Message(null, Ids.CabExtractionFailed, "Failed to extract cab '{0}' from merge module '{1}' to directory '{2}'. This is most likely due to a lack of available disk space on the destination drive.", cabName, mergeModulePath, directoryName);
}
public static Message CabFileDoesNotExist(string cabName, string mergeModulePath, string directoryName)
{
return Message(null, Ids.CabFileDoesNotExist, "Attempted to extract cab '{0}' from merge module '{1}' to directory '{2}'. The cab file was not found. This usually means that you have a merge module without a cabinet inside it.", cabName, mergeModulePath, directoryName);
}
public static Message CannotAuthorSpecialProperties(SourceLineNumber sourceLineNumbers, string propertyName)
{
return Message(sourceLineNumbers, Ids.CannotAuthorSpecialProperties, "The {0} property was specified. Special MSI properties cannot be authored. Use the attributes on the Property element instead.", propertyName);
}
public static Message CannotDefaultComponentId(SourceLineNumber sourceLineNumbers)
{
return Message(sourceLineNumbers, Ids.CannotDefaultComponentId, "The Component/@Id attribute was not found; it is required when there is no valid keypath to use as the default id value.");
}
public static Message CannotDefaultMismatchedAdvertiseStates(SourceLineNumber sourceLineNumbers)
{
return Message(sourceLineNumbers, Ids.CannotDefaultMismatchedAdvertiseStates, "MIME element cannot be marked as the default when its advertise state differs from its parent element. Ensure that the advertise state of the MIME element matches its parents element or remove the Mime/@Advertise attribute completely.");
}
public static Message CannotFindFile(SourceLineNumber sourceLineNumbers, string fileId, string fileName, string filePath)
{
return Message(sourceLineNumbers, Ids.CannotFindFile, "The file with id '{0}' and name '{1}' could not be found with source path: '{2}'.", fileId, fileName, filePath);
}
public static Message CanNotHaveTwoParents(SourceLineNumber sourceLineNumbers, string directorySearch, string parentAttribute, string parentElement)
{
return Message(sourceLineNumbers, Ids.CanNotHaveTwoParents, "The DirectorySearchRef {0} can not have a Parent attribute {1} and also be nested under parent element {2}", directorySearch, parentAttribute, parentElement);
}
public static Message CannotOpenMergeModule(SourceLineNumber sourceLineNumbers, string mergeModuleIdentifier, string mergeModuleFile)
{
return Message(sourceLineNumbers, Ids.CannotOpenMergeModule, "Cannot open the merge module '{0}' from file '{1}'.", mergeModuleIdentifier, mergeModuleFile);
}
public static Message CannotReundefineVariable(SourceLineNumber sourceLineNumbers, string variableName)
{
return Message(sourceLineNumbers, Ids.CannotReundefineVariable, "The variable '{0}' cannot be undefined because its already undefined.", variableName);
}
public static Message CheckBoxValueOnlyValidWithCheckBox(SourceLineNumber sourceLineNumbers, string elementName, string controlType)
{
return Message(sourceLineNumbers, Ids.CheckBoxValueOnlyValidWithCheckBox, "A {0} element was specified with Type='{1}' and a CheckBoxValue. Check box values can only be specified with Type='CheckBox'.", elementName, controlType);
}
public static Message CircularSearchReference(string chain)
{
return Message(null, Ids.CircularSearchReference, "A circular reference of search ordering constraints was detected: {0}. Search ordering references must form a directed acyclic graph.", chain);
}
public static Message CommandLineCommandRequired()
{
return Message(null, Ids.CommandLineCommandRequired, "A command is required. Add -h for list of available subcommands.");
}
public static Message CommandLineCommandRequired(string command)
{
return Message(null, Ids.CommandLineCommandRequired, "A subcommand is required for the \"{0}\" command. Add -h for list of available commands.", command);
}
public static Message ComponentExpectedFeature(SourceLineNumber sourceLineNumbers, string component, string type, string target)
{
return Message(sourceLineNumbers, Ids.ComponentExpectedFeature, "The component '{0}' is not assigned to a feature. The component's {1} '{2}' requires it to be assigned to at least one feature.", component, type, target);
}
public static Message ComponentMultipleKeyPaths(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string value, string fileElementName, string registryElementName, string odbcDataSourceElementName)
{
return Message(sourceLineNumbers, Ids.ComponentMultipleKeyPaths, "The {0} element has multiple key paths set. The key path may only be set to '{2}' in extension elements that support it or one of the following locations: {0}/@{1}, {3}/@{1}, {4}/@{1}, or {5}/@{1}.", elementName, attributeName, value, fileElementName, registryElementName, odbcDataSourceElementName);
}
public static Message ComponentReferencedTwice(SourceLineNumber sourceLineNumbers, string crefChildId)
{
return Message(sourceLineNumbers, Ids.ComponentReferencedTwice, "Component {0} cannot be contained in a Module twice.", crefChildId);
}
public static Message ConditionExpected(SourceLineNumber sourceLineNumbers, string elementName)
{
return Message(sourceLineNumbers, Ids.ConditionExpected, "The {0} element's inner text cannot be an empty string or completely whitespace. If you don't want a condition, then simply remove the entire {0} element.", elementName);
}
public static Message CorruptFileFormat(string path, string format)
{
return Message(null, Ids.CorruptFileFormat, "Attempted to load corrupt file from path: {0}. The file with format {1} contained unexpected content. Ensure the correct path was provided and that the file has not been incorrectly modified.", path, format.ToLowerInvariant());
}
public static Message CouldNotDetermineProductCodeFromTransformSummaryInfo()
{
return Message(null, Ids.CouldNotDetermineProductCodeFromTransformSummaryInfo, "Could not determine ProductCode from transform summary information.");
}
public static Message CreateCabAddFileFailed()
{
return Message(null, Ids.CreateCabAddFileFailed, "An error (E_FAIL) was returned while creating a CAB file. The most common cause of this error is attempting to create a CAB file larger than 2GB. You can reduce the size of your installation package, use a higher compression level, or split your files into more than one CAB file.");
}
public static Message CreateCabInsufficientDiskSpace()
{
return Message(null, Ids.CreateCabInsufficientDiskSpace, "An error (ERROR_DISK_FULL) was returned while creating a CAB file. This means you have insufficient disk space. Clear disk space and try again.");
}
public static Message CubeFileNotFound(string cubeFile)
{
return Message(null, Ids.CubeFileNotFound, "The cube file '{0}' cannot be found. This file is required for MSI validation.", cubeFile);
}
public static Message CustomActionMultipleSources(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string attributeName1, string attributeName2, string attributeName3, string attributeName4, string attributeName5)
{
return Message(sourceLineNumbers, Ids.CustomActionMultipleSources, "The {0}/@{1} attribute cannot coexist with a previously specified attribute on this element. The {0} element may only have one of the following source attributes specified at a time: {2}, {3}, {4}, {5}, or {6}.", elementName, attributeName, attributeName1, attributeName2, attributeName3, attributeName4, attributeName5);
}
public static Message CustomActionMultipleTargets(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string attributeName1, string attributeName2, string attributeName3, string attributeName4, string attributeName5, string attributeName6, string attributeName7)
{
return Message(sourceLineNumbers, Ids.CustomActionMultipleTargets, "The {0}/@{1} attribute cannot coexist with a previously specified attribute on this element. The {0} element may only have one of the following target attributes specified at a time: {2}, {3}, {4}, {5}, {6}, {7}, or {8}.", elementName, attributeName, attributeName1, attributeName2, attributeName3, attributeName4, attributeName5, attributeName6, attributeName7);
}
public static Message CustomActionSequencedInModule(SourceLineNumber sourceLineNumbers, string sequenceTableName, string actionName)
{
return Message(sourceLineNumbers, Ids.CustomActionSequencedInModule, "The {0} table contains a custom action '{1}' that has a sequence number specified. The Sequence attribute is not allowed for custom actions in a merge module. Please remove the action or use the Before or After attributes to specify where this action should be sequenced relative to another action.", sequenceTableName, actionName);
}
public static Message CustomTableIllegalColumnWidth(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, int value)
{
return Message(sourceLineNumbers, Ids.CustomTableIllegalColumnWidth, "The {0}/@{1} attribute's value, '{2}', is not a valid column width. Valid column widths are 2 or 4.", elementName, attributeName, value);
}
public static Message CustomTableMissingPrimaryKey(SourceLineNumber sourceLineNumbers)
{
return Message(sourceLineNumbers, Ids.CustomTableMissingPrimaryKey, "The CustomTable is missing a Column element with the PrimaryKey attribute set to 'yes'. At least one column must be marked as the primary key.");
}
public static Message CustomTableNameTooLong(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string value)
{
return Message(sourceLineNumbers, Ids.CustomTableNameTooLong, "The {0}/@{1} attribute's value, '{2}', is too long for a table name. It cannot be more than than 31 characters long.", elementName, attributeName, value);
}
public static Message DatabaseSchemaMismatch(SourceLineNumber sourceLineNumbers, string tableName)
{
return Message(sourceLineNumbers, Ids.DatabaseSchemaMismatch, "The table definition of '{0}' in the target database does not match the table definition in the updated database. A transform requires that the target database schema match the updated database schema.", tableName);
}
public static Message DirectoryPathRequired(string parameter)
{
return Message(null, Ids.DirectoryPathRequired, "The parameter '{0}' must be followed by a directory path.", parameter);
}
public static Message DisallowedMsiProperty(SourceLineNumber sourceLineNumbers, string property, string illegalValueList)
{
return Message(sourceLineNumbers, Ids.DisallowedMsiProperty, "The '{0}' MsiProperty is controlled by the bootstrapper and cannot be authored. (Illegal properties are: {1}.) Remove the MsiProperty element.", property, illegalValueList);
}
public static Message DuplicateCabinetName(SourceLineNumber sourceLineNumbers, string cabinetName)
{
return Message(sourceLineNumbers, Ids.DuplicateCabinetName, "Duplicate cabinet name '{0}' found.", cabinetName);
}
public static Message DuplicateCabinetName2(SourceLineNumber sourceLineNumbers, string cabinetName)
{
return Message(sourceLineNumbers, Ids.DuplicateCabinetName2, "Duplicate cabinet name '{0}' error related to previous error.", cabinetName);
}
public static Message DuplicateCommandLineOptionInExtension(string arg)
{
return Message(null, Ids.DuplicateCommandLineOptionInExtension, "The command line option '{0}' has already been loaded by another Heat extension.", arg);
}
public static Message DuplicateComponentGuids(SourceLineNumber sourceLineNumbers, string componentId, string guid, string type, string keyPath)
{
return Message(sourceLineNumbers, Ids.DuplicateComponentGuids, "Component/@Id='{0}' with {2} '{3}' has a @Guid value '{1}' that duplicates another component in this package. It is recommended to give each component its own unique GUID.", componentId, guid, type, keyPath);
}
public static Message DuplicateContextValue(SourceLineNumber sourceLineNumbers, string contextValue)
{
return Message(sourceLineNumbers, Ids.DuplicateContextValue, "The context value '{0}' was duplicated. Context values must be distinct.", contextValue);
}
public static Message DuplicatedUiLocalization(SourceLineNumber sourceLineNumbers, string controlName, string dialogName)
{
return Message(sourceLineNumbers, Ids.DuplicatedUiLocalization, "The localization for control {0} in dialog {1} is duplicated. Only one localization per control is allowed.", controlName, dialogName);
}
public static Message DuplicatedUiLocalization(SourceLineNumber sourceLineNumbers, string dialogName)
{
return Message(sourceLineNumbers, Ids.DuplicatedUiLocalization, "The localization for dialog {0} is duplicated. Only one localization per dialog is allowed.", dialogName);
}
public static Message DuplicateExtensionPreprocessorType(string extension, string variablePrefix, string collidingExtension)
{
return Message(null, Ids.DuplicateExtensionPreprocessorType, "The extension '{0}' uses the same preprocessor variable prefix, '{1}', as previously loaded extension '{2}'. Please remove one of the extensions or rename the prefix to avoid the collision.", extension, variablePrefix, collidingExtension);
}
public static Message DuplicateExtensionTable(string extension, string tableName)
{
return Message(null, Ids.DuplicateExtensionTable, "The extension '{0}' contains a definition for table '{1}' that collides with a previously loaded table definition. Please remove one of the conflicting extensions or rename one of the tables to avoid the collision.", extension, tableName);
}
public static Message DuplicateExtensionXmlSchemaNamespace(string extension, string extensionXmlSchemaNamespace, string collidingExtension)
{
return Message(null, Ids.DuplicateExtensionXmlSchemaNamespace, "The extension '{0}' uses the same xml schema namespace, '{1}', as previously loaded extension '{2}'. Please either remove one of the extensions or rename the xml schema namespace to avoid the collision.", extension, extensionXmlSchemaNamespace, collidingExtension);
}
public static Message DuplicateFileId(string fileId)
{
return Message(null, Ids.DuplicateFileId, "Multiple files with ID '{0}' exist. Windows Installer does not support file IDs that differ only by case. Change the file IDs to be unique.", fileId);
}
public static Message DuplicateLocalizationIdentifier(SourceLineNumber sourceLineNumbers, string localizationId)
{
return Message(sourceLineNumbers, Ids.DuplicateLocalizationIdentifier, "The localization identifier '{0}' has been duplicated in multiple locations. Please resolve the conflict.", localizationId);
}
public static Message DuplicateModuleCaseInsensitiveFileIdentifier(SourceLineNumber sourceLineNumbers, string moduleId, string fileId1, string fileId2)
{
return Message(sourceLineNumbers, Ids.DuplicateModuleCaseInsensitiveFileIdentifier, "The merge module '{0}' contains 2 or more file identifiers that only differ by case: '{1}' and '{2}'. The WiX toolset extracts merge module files to the file system using these identifiers. Since most file systems are not case-sensitive a collision is likely. Please contact the owner of the merge module for a fix.", moduleId, fileId1, fileId2);
}
public static Message DuplicateModuleFileIdentifier(SourceLineNumber sourceLineNumbers, string moduleId, string fileId)
{
return Message(sourceLineNumbers, Ids.DuplicateModuleFileIdentifier, "The merge module '{0}' contains a file identifier, '{1}', that is duplicated either in another merge module or in a File/@Id attribute. File identifiers must be unique. Please change one of the file identifiers to a different value.", moduleId, fileId);
}
public static Message DuplicatePrimaryKey(SourceLineNumber sourceLineNumbers, string primaryKey, string tableName)
{
return Message(sourceLineNumbers, Ids.DuplicatePrimaryKey, "The primary key '{0}' is duplicated in table '{1}'. Please remove one of the entries or rename a part of the primary key to avoid the collision.", primaryKey, tableName);
}
public static Message DuplicateProviderDependencyKey(string providerKey, string packageId)
{
return Message(null, Ids.DuplicateProviderDependencyKey, "The provider dependency key '{0}' was already imported from the package with Id '{1}'. Please remove the Provides element with the key '{0}' from the package authoring.", providerKey, packageId);
}
public static Message DuplicateSourcesForOutput(string sourceList, string outputFile)
{
return Message(null, Ids.DuplicateSourcesForOutput, "Multiple source files ({0}) have resulted in the same output file '{1}'. This is likely because the source files only differ in extension or path. Rename the source files to avoid this problem.", sourceList, outputFile);
}
public static Message DuplicateTransform(string transform)
{
return Message(null, Ids.DuplicateTransform, "The transform {0} was included twice on the command line. Each transform can be applied to a patch only once.", transform);
}
public static Message DuplicateVariableDefinition(string variableName, string variableValue, string variableCollidingValue)
{
return Message(null, Ids.DuplicateVariableDefinition, "The variable '{0}' with value '{1}' was previously declared with value '{2}'.", variableName, variableValue, variableCollidingValue);
}
public static Message ExampleGuid(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string value)
{
return Message(sourceLineNumbers, Ids.ExampleGuid, "The {0}/@{1} attribute's value, '{2}', is not a legal Guid value. A Guid needs to be generated and put in place of '{2}' in the source file.", elementName, attributeName, value);
}
public static Message ExpectedArgument(string argument)
{
return Message(null, Ids.ExpectedArgument, "{0} is expected to be followed by a value. See -? for additional detail.", argument);
}
public static Message ExpectedAttribute(SourceLineNumber sourceLineNumbers, string elementName, string attributeName)
{
return Message(sourceLineNumbers, Ids.ExpectedAttribute, "The {0}/@{1} attribute was not found; it is required.", elementName, attributeName);
}
public static Message ExpectedAttribute(SourceLineNumber sourceLineNumbers, string elementName, string attribute1Name, string attribute2Name, bool eitherOr)
{
return Message(sourceLineNumbers, Ids.ExpectedAttribute, "The {0} element must have a value for exactly one of the {1} or {2} attributes.", elementName, attribute1Name, attribute2Name, eitherOr);
}
public static Message ExpectedAttribute(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string otherAttributeName)
{
return Message(sourceLineNumbers, Ids.ExpectedAttribute, "The {0}/@{1} attribute was not found; it is required when attribute {2} is specified.", elementName, attributeName, otherAttributeName);
}
public static Message ExpectedAttribute(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string otherAttributeName, string otherAttributeValue)
{
return Message(sourceLineNumbers, Ids.ExpectedAttribute, "The {0}/@{1} attribute was not found; it is required when attribute {2} has a value of '{3}'.", elementName, attributeName, otherAttributeName, otherAttributeValue);
}
public static Message ExpectedAttribute(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string otherAttributeName, string otherAttributeValue, bool otherAttributeValueUnless)
{
return Message(sourceLineNumbers, Ids.ExpectedAttribute, "The {0}/@{1} attribute was not found; it is required unless the attribute {2} has a value of '{3}'.", elementName, attributeName, otherAttributeName, otherAttributeValue, otherAttributeValueUnless);
}
public static Message ExpectedAttributeInElementOrParent(SourceLineNumber sourceLineNumbers, string elementName, string attributeName)
{
return Message(sourceLineNumbers, Ids.ExpectedAttributeInElementOrParent, "The {0}/@{1} attribute was not found or empty; it is required unless it is specified in the parent element.", elementName, attributeName);
}
public static Message ExpectedAttributeInElementOrParent(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string parentElementName)
{
return Message(sourceLineNumbers, Ids.ExpectedAttributeInElementOrParent, "The {0}/@{1} attribute was not found or empty; it is required, or it can be specified in the parent {2} element.", elementName, attributeName, parentElementName);
}
public static Message ExpectedAttributeInElementOrParent(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string parentElementName, string parentAttributeName)
{
return Message(sourceLineNumbers, Ids.ExpectedAttributeInElementOrParent, "The {0}/@{1} attribute was not found or empty; it is required, or it can be specified in the parent {2}/@{3} attribute.", elementName, attributeName, parentElementName, parentAttributeName);
}
public static Message ExpectedAttributeWithValueWithOtherAttribute(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string attributeName2)
{
return Message(sourceLineNumbers, Ids.ExpectedAttributeWithValueWithOtherAttribute, "The {0}/@{1} attribute is required to have a value when attribute {2} is present.", elementName, attributeName, attributeName2);
}
public static Message ExpectedAttributeOrElement(SourceLineNumber sourceLineNumbers, string parentElement, string attribute, string childElement)
{
return Message(sourceLineNumbers, Ids.ExpectedAttributeOrElement, "Element '{0}' missing attribute '{1}' or child element '{2}'. Exactly one of those is required.", parentElement, attribute, childElement);
}
public static Message ExpectedAttributeOrElementWithOtherAttribute(SourceLineNumber sourceLineNumbers, string parentElement, string attribute, string childElement, string otherAttribute)
{
return Message(sourceLineNumbers, Ids.ExpectedAttributeOrElementWithOtherAttribute, "Element '{0}' missing attribute '{1}' or child element '{2}'. Exactly one of those is required when attribute '{3}' is specified.", parentElement, attribute, childElement, otherAttribute);
}
public static Message ExpectedAttributeOrElementWithOtherAttribute(SourceLineNumber sourceLineNumbers, string parentElement, string attribute, string childElement, string otherAttribute, string otherAttributeValue)
{
return Message(sourceLineNumbers, Ids.ExpectedAttributeOrElementWithOtherAttribute, "Element '{0}' missing attribute '{1}' or child element '{2}'. Exactly one of those is required when attribute '{3}' is specified with value '{4}'.", parentElement, attribute, childElement, otherAttribute, otherAttributeValue);
}
public static Message ExpectedAttributeOrElementWithoutOtherAttribute(SourceLineNumber sourceLineNumbers, string parentElement, string attribute, string childElement, string otherAttribute)
{
return Message(sourceLineNumbers, Ids.ExpectedAttributeOrElementWithoutOtherAttribute, "Element '{0}' missing attribute '{1}' or child element '{2}'. Exactly one of those is required when attribute '{3}' is not specified.", parentElement, attribute, childElement, otherAttribute);
}
public static Message ExpectedAttributes(SourceLineNumber sourceLineNumbers, string elementName, string attributeName1, string attributeName2)
{
return Message(sourceLineNumbers, Ids.ExpectedAttributes, "The {0} element's {1} or {2} attribute was not found; one of these is required.", elementName, attributeName1, attributeName2);
}
public static Message ExpectedAttributes(SourceLineNumber sourceLineNumbers, string elementName, string attributeName1, string attributeName2, string attributeName3)
{
return Message(sourceLineNumbers, Ids.ExpectedAttributes, "The {0} element's {1}, {2}, or {3} attribute was not found; one of these is required.", elementName, attributeName1, attributeName2, attributeName3);
}
public static Message ExpectedAttributes(SourceLineNumber sourceLineNumbers, string elementName, string attributeName1, string attributeName2, string attributeName3, string attributeName4)
{
return Message(sourceLineNumbers, Ids.ExpectedAttributes, "The {0} element's {1}, {2}, {3}, or {4} attribute was not found; one of these is required.", elementName, attributeName1, attributeName2, attributeName3, attributeName4);
}
public static Message ExpectedAttributes(SourceLineNumber sourceLineNumbers, string elementName, string attributeName1, string attributeName2, string attributeName3, string attributeName4, string attributeName5)
{
return Message(sourceLineNumbers, Ids.ExpectedAttributes, "The {0} element's {1}, {2}, {3}, {4}, or {5} attribute was not found; one of these is required.", elementName, attributeName1, attributeName2, attributeName3, attributeName4, attributeName5);
}
public static Message ExpectedAttributes(SourceLineNumber sourceLineNumbers, string elementName, string attributeName1, string attributeName2, string attributeName3, string attributeName4, string attributeName5, string attributeName6)
{
return Message(sourceLineNumbers, Ids.ExpectedAttributes, "The {0} element's {1}, {2}, {3}, {4}, {5}, or {6} attribute was not found; one of these is required.", elementName, attributeName1, attributeName2, attributeName3, attributeName4, attributeName5, attributeName6);
}
public static Message ExpectedAttributes(SourceLineNumber sourceLineNumbers, string elementName, string attributeName1, string attributeName2, string attributeName3, string attributeName4, string attributeName5, string attributeName6, string attributeName7)
{
return Message(sourceLineNumbers, Ids.ExpectedAttributes, "The {0} element's {1}, {2}, {3}, {4}, {5}, {6}, or {7} attribute was not found; one of these is required.", elementName, attributeName1, attributeName2, attributeName3, attributeName4, attributeName5, attributeName6, attributeName7);
}
public static Message ExpectedAttributesWithOtherAttribute(SourceLineNumber sourceLineNumbers, string elementName, string attributeName1, string attributeName2)
{
return Message(sourceLineNumbers, Ids.ExpectedAttributesWithOtherAttribute, "The {0} element's {1} or {2} attribute was not found; at least one of these attributes must be specified.", elementName, attributeName1, attributeName2);
}
public static Message ExpectedAttributesWithOtherAttribute(SourceLineNumber sourceLineNumbers, string elementName, string attributeName1, string attributeName2, string otherAttributeName)
{
return Message(sourceLineNumbers, Ids.ExpectedAttributesWithOtherAttribute, "The {0} element's {1} or {2} attribute was not found; one of these is required when attribute {3} is present.", elementName, attributeName1, attributeName2, otherAttributeName);
}
public static Message ExpectedAttributesWithOtherAttribute(SourceLineNumber sourceLineNumbers, string elementName, string attributeName1, string attributeName2, string otherAttributeName, string otherAttributeValue)
{
return Message(sourceLineNumbers, Ids.ExpectedAttributesWithOtherAttribute, "The {0} element's {1} or {2} attribute was not found; one of these is required when attribute {3} has a value of '{4}'.", elementName, attributeName1, attributeName2, otherAttributeName, otherAttributeValue);
}
public static Message ExpectedAttributesWithoutOtherAttribute(SourceLineNumber sourceLineNumbers, string elementName, string attributeName1, string attributeName2, string otherAttributeName)
{
return Message(sourceLineNumbers, Ids.ExpectedAttributesWithoutOtherAttribute, "The {0} element's {1} or {2} attribute was not found; one of these is required without attribute {3} present.", elementName, attributeName1, attributeName2, otherAttributeName);
}
public static Message ExpectedAttributeWhenElementNotUnderElement(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string parentElementName)
{
return Message(sourceLineNumbers, Ids.ExpectedAttributeWhenElementNotUnderElement, "The '{0}/@{1}' attribute was not found; it is required when element '{0}' is not nested under a '{2}' element.", elementName, attributeName, parentElementName);
}
public static Message ExpectedAttributeWithElement(SourceLineNumber sourceLineNumbers, string elementName, string attribute, string childElementName)
{
return Message(sourceLineNumbers, Ids.ExpectedAttributeWithElement, "The {0} element must have attribute '{1}' when child element '{2}' is present.", elementName, attribute, childElementName);
}
public static Message ExpectedAttributeWithoutOtherAttribute(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string otherAttributeName)
{
return Message(sourceLineNumbers, Ids.ExpectedAttributeWithoutOtherAttributes, "The {0} element's {1} attribute was not found; it is required without attribute {2} present.", elementName, attributeName, otherAttributeName);
}
public static Message ExpectedAttributeWithoutOtherAttributes(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string otherAttributeName1, string otherAttributeName2)
{
return Message(sourceLineNumbers, Ids.ExpectedAttributeWithoutOtherAttributes, "The {0} element's {1} attribute was not found; it is required without attribute {2} or {3} present.", elementName, attributeName, otherAttributeName1, otherAttributeName2);
}
public static Message ExpectedBinaryCategory(SourceLineNumber sourceLineNumbers)
{
return Message(sourceLineNumbers, Ids.ExpectedBinaryCategory, "The Column element specifies a binary column but does not have the correct Category specified. Windows Installer requires binary columns to specify their category as binary. Please set the Category attribute's value to 'Binary'.");
}
public static Message ExpectedClientPatchIdInWixMsp()
{
return Message(null, Ids.ExpectedClientPatchIdInWixMsp, "The WixMsp is missing the client patch ID. Recompile the patch source files with the latest WiX toolset.");
}
public static Message ExpectedDecompiler(string identifier)
{
return Message(null, Ids.ExpectedDecompiler, "No decompiler was provided. {0} requires a decompiler.", identifier);
}
public static Message ExpectedDirectory(string directory)
{
return Message(null, Ids.ExpectedDirectory, "The directory '{0}' could not be found.", directory);
}
public static Message ExpectedDirectoryGotFile(string option, string path)
{
return Message(null, Ids.ExpectedDirectoryGotFile, "The {0} option requires a directory, but the provided path is a file: {1}", option, path);
}
public static Message ExpectedElement(SourceLineNumber sourceLineNumbers, string elementName)
{
return Message(sourceLineNumbers, Ids.ExpectedElement, "A {0} element must have at least one child element.", elementName);
}
public static Message ExpectedElement(SourceLineNumber sourceLineNumbers, string elementName, string childName)
{
return Message(sourceLineNumbers, Ids.ExpectedElement, "A {0} element must have at least one child element of type {1}.", elementName, childName);
}
public static Message ExpectedElement(SourceLineNumber sourceLineNumbers, string elementName, string childName1, string childName2)
{
return Message(sourceLineNumbers, Ids.ExpectedElement, "A {0} element must have at least one child element of type {1} or {2}.", elementName, childName1, childName2);
}
public static Message ExpectedElement(SourceLineNumber sourceLineNumbers, string elementName, string childName1, string childName2, string childName3)
{
return Message(sourceLineNumbers, Ids.ExpectedElement, "A {0} element must have at least one child element of type {1}, {2}, or {3}.", elementName, childName1, childName2, childName3);
}
public static Message ExpectedElement(SourceLineNumber sourceLineNumbers, string elementName, string childName1, string childName2, string childName3, string childName4)
{
return Message(sourceLineNumbers, Ids.ExpectedElement, "A {0} element must have at least one child element of type {1}, {2}, {3}, or {4}.", elementName, childName1, childName2, childName3, childName4);
}
public static Message ExpectedEndElement(SourceLineNumber sourceLineNumbers, string elementName)
{
return Message(sourceLineNumbers, Ids.ExpectedEndElement, "The end element matching the '{0}' start element was not found.", elementName);
}
public static Message ExpectedEndforeach(SourceLineNumber sourceLineNumbers)
{
return Message(sourceLineNumbers, Ids.ExpectedEndforeach, "A <?foreach?> statement was found that had no matching <?endforeach?>.");
}
public static Message ExpectedExpressionAfterNot(SourceLineNumber sourceLineNumbers, string expression)
{
return Message(sourceLineNumbers, Ids.ExpectedExpressionAfterNot, "Expecting an argument for 'NOT' in expression '{0}'.", expression);
}
public static Message ExpectedFileGotDirectory(string option, string path)
{
return Message(null, Ids.ExpectedFileGotDirectory, "The {0} option requires a file, but the provided path is a directory: {1}", option, path);
}
public static Message ExpectedMediaCabinet(SourceLineNumber sourceLineNumbers, string fileId, int diskId)
{
return Message(sourceLineNumbers, Ids.ExpectedMediaCabinet, "The file '{0}' should be compressed but is not part of a compressed media. Files will be compressed if either the File/@Compressed or Package/@Compressed attributes are set to 'yes'. This can be fixed by setting the Media/@Cabinet attribute for media '{1}'.", fileId, diskId);
}
public static Message ExpectedMediaRowsInWixMsp()
{
return Message(null, Ids.ExpectedMediaRowsInWixMsp, "The WixMsp has no media rows defined.");
}
public static Message ExpectedParentWithAttribute(SourceLineNumber sourceLineNumbers, string parentElement, string attribute, string grandparentElement)
{
return Message(sourceLineNumbers, Ids.ExpectedParentWithAttribute, "When the {0}/@{1} attribute is specified, the {0} element must be nested under a {2} element.", parentElement, attribute, grandparentElement);
}
public static Message ExpectedPatchIdInWixMsp()
{
return Message(null, Ids.ExpectedPatchIdInWixMsp, "The WixMsp is missing the patch ID.");
}
public static Message ExpectedRowInPatchCreationPackage(string tableName)
{
return Message(null, Ids.ExpectedRowInPatchCreationPackage, "Could not find a row in the '{0}' table for this patch creation package. Patch creation packages must contain at least one row in the '{0}' table.", tableName);
}
public static Message ExpectedSignedCabinetName(SourceLineNumber sourceLineNumbers)
{
return Message(sourceLineNumbers, Ids.ExpectedSignedCabinetName, "The Media/@Cabinet attribute was not found; it is required when this element contains a DigitalSignature child element. This is because Windows Installer can only verify the digital signatures of external cabinets. Please either remove the DigitalSignature element or specify a valid external cabinet name via the Cabinet attribute.");
}
public static Message ExpectedTableInMergeModule(string identifier)
{
return Message(null, Ids.ExpectedTableInMergeModule, "The table '{0}' was expected but was missing.", identifier);
}
public static Message ExpectedVariable(SourceLineNumber sourceLineNumbers, string expression)
{
return Message(sourceLineNumbers, Ids.ExpectedVariable, "A required variable was missing in the expression '{0}'.", expression);
}
public static Message ExpectedBindVariableValue(string variableId)
{
return Message(null, Ids.ExpectedBindVariableValue, "The bind variable '{0}' was declared without a value. Please specify a value for the variable.", variableId);
}
public static Message FamilyNameTooLong(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string value, int length)
{
return Message(sourceLineNumbers, Ids.FamilyNameTooLong, "The {0}/@{1} attribute's value, '{2}', is {3} characters long. This is too long for a family name because the maximum allowed length is 8 characters long.", elementName, attributeName, value, length);
}
public static Message FeatureCannotFavorAndDisallowAdvertise(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string value, string otherAttributeName, string otherValue)
{
return Message(sourceLineNumbers, Ids.FeatureCannotFavorAndDisallowAdvertise, "The {0}/@{1} attribute's value, '{2}', cannot coexist with the {3} attribute's value of '{4}'. These options would ask the installer to disallow the advertised state for this feature while at the same time favoring it.", elementName, attributeName, value, otherAttributeName, otherValue);
}
public static Message FeatureCannotFollowParentAndFavorLocalOrSource(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string otherAttributeName, string otherValue)
{
return Message(sourceLineNumbers, Ids.FeatureCannotFollowParentAndFavorLocalOrSource, "The {0}/@{1} attribute cannot be specified if the {2} attribute's value is '{3}'. These options would ask the installer to force this feature to follow the parent installation state and simultaneously favor a particular installation state just for this feature.", elementName, attributeName, otherAttributeName, otherValue);
}
public static Message FeatureConfigurableDirectoryNotUppercase(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string value)
{
return Message(sourceLineNumbers, Ids.FeatureConfigurableDirectoryNotUppercase, "The {0}/@{1} attribute's value, '{2}', contains lowercase characters. Since this directory is user-configurable, it needs to be a public property. This means the value must be completely uppercase.", elementName, attributeName, value);
}
public static Message FeatureNameTooLong(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string attributeValue)
{
return Message(sourceLineNumbers, Ids.FeatureNameTooLong, "The {0}/@{1} attribute with value '{2}', is too long for a feature name. Due to limitations in the Windows Installer, feature names cannot be longer than 38 characters in length.", elementName, attributeName, attributeValue);
}
public static Message FileIdentifierNotFound(SourceLineNumber sourceLineNumbers, string fileIdentifier)
{
return Message(sourceLineNumbers, Ids.FileIdentifierNotFound, "The file row with identifier '{0}' could not be found.", fileIdentifier);
}
public static Message FileInUse(SourceLineNumber sourceLineNumbers, string file)
{
return Message(sourceLineNumbers, Ids.FileInUse, "The process can not access the file '{0}' because it is being used by another process.", file);
}
public static Message FileNotFound(SourceLineNumber sourceLineNumbers, string file)
{
return Message(sourceLineNumbers, Ids.FileNotFound, "Cannot find the file '{0}'.", file);
}
public static Message FileNotFound(SourceLineNumber sourceLineNumbers, string file, string fileType)
{
return Message(sourceLineNumbers, Ids.FileNotFound, "Cannot find the {0} file '{1}'.", fileType, file);
}
public static Message FileNotFound(SourceLineNumber sourceLineNumbers, string file, string fileType, IEnumerable<string> checkedPaths)
{
var combinedCheckedPaths = String.Join(", ", checkedPaths);
var fileTypePrefix = String.IsNullOrEmpty(fileType) ? String.Empty : fileType + " ";
return Message(sourceLineNumbers, Ids.FileNotFound, "Cannot find the {0}file '{1}'. The following paths were checked: {2}", fileTypePrefix, file, combinedCheckedPaths);
}
public static Message FileOrDirectoryPathRequired(string parameter)
{
return Message(null, Ids.FileOrDirectoryPathRequired, "The parameter '{0}' must be followed by a file or directory path. To specify a directory path the string must end with a backslash, for example: \"C:\\Path\\\".", parameter);
}
public static Message FilePathRequired(string filePurpose)
{
return Message(null, Ids.FilePathRequired, "The path to the {0} is required.", filePurpose);
}
public static Message FilePathRequired(string parameter, string filePurpose)
{
return Message(null, Ids.FilePathRequired, "The parameter '{0}' must be followed by a file path for the {1}.", parameter, filePurpose);
}
public static Message FileTooLarge(SourceLineNumber sourceLineNumbers, string fileName)
{
return Message(sourceLineNumbers, Ids.FileTooLarge, "'{0}' is too large, file size must be less than 2147483648.", fileName);
}
public static Message FileWriteError(string path, string error)
{
return Message(null, Ids.FileWriteError, "Error writing to the path: '{0}'. Error message: '{1}'", path, error);
}
public static Message FinishCabFailed()
{
return Message(null, Ids.FinishCabFailed, "An error (E_FAIL) was returned while finalizing a CAB file. This most commonly happens when creating a CAB file with more than 65535 files in it or a compressed size greater than 2GB. Either reduce the number of files in your installation package or split your installation package's files into more than one CAB file using the Media element.");
}
public static Message FullTempDirectory(string prefix, string directory)
{
return Message(null, Ids.FullTempDirectory, "Unable to create temporary file. A common cause is that too many files that have names beginning with '{0}' are present. Delete any unneeded files in the '{1}' directory and try again.", prefix, directory);
}
public static Message GACAssemblyIdentityWarning(SourceLineNumber sourceLineNumbers, string fileName, string assemblyName)
{
return Message(sourceLineNumbers, Ids.GACAssemblyIdentityWarning, "The destination name of file '{0}' does not match its assembly name '{1}' in your authoring. This will cause an installation failure for this assembly, because it will be installed to the Global Assembly Cache. To fix this error, update File/@Name of file '{0}' to be the actual name of the assembly.", fileName, assemblyName);
}
public static Message GacAssemblyNoStrongName(SourceLineNumber sourceLineNumbers, string assemblyName, string componentName)
{
return Message(sourceLineNumbers, Ids.GacAssemblyNoStrongName, "Assembly {0} in component {1} has no strong name and has been marked to be placed in the GAC. All assemblies installed to the GAC must have a valid strong name.", assemblyName, componentName);
}
public static Message GenericReadNotAllowed(SourceLineNumber sourceLineNumbers)
{
return Message(sourceLineNumbers, Ids.GenericReadNotAllowed, "Permission elements cannot have GenericRead as the only permission specified. Include at least one other permission.");
}
public static Message GuidContainsLowercaseLetters(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string value)
{
return Message(sourceLineNumbers, Ids.GuidContainsLowercaseLetters, "The {0}/@{1} attribute's value, '{2}', is a mixed-case guid. All letters in a guid value should be uppercase.", elementName, attributeName, value);
}
public static Message HarvestSourceNotSpecified()
{
return Message(null, Ids.HarvestSourceNotSpecified, "A harvest source must be specified after the harvest type and can be followed by harvester arguments.");
}
public static Message HarvestTypeNotFound()
{
return Message(null, Ids.HarvestTypeNotFound, "The harvest type was not found in the list of loaded Heat extensions.");
}
public static Message HarvestTypeNotFound(string harvestType)
{
return Message(null, Ids.HarvestTypeNotFound, "The harvest type '{0}' was specified. Harvest types cannot start with a '-'. Remove the '-' to specify a valid harvest type.", harvestType);
}
public static Message IdentifierNotFound(string type, string identifier)
{
return Message(null, Ids.IdentifierNotFound, "An expected identifier ('{1}', of type '{0}') was not found.", type, identifier);
}
public static Message IdentifierTooLongError(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string value, int maxLength)
{
return Message(sourceLineNumbers, Ids.IdentifierTooLongError, "The {0}/@{1} attribute's value, '{2}', is too long. {0}/@{1} attribute's must be {3} characters long or less.", elementName, attributeName, value, maxLength);
}
public static Message IllegalAttributeExceptOnElement(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string expectedElementName)
{
return Message(sourceLineNumbers, Ids.IllegalAttributeExceptOnElement, "The {1} attribute can only be specified on the {2} element.", elementName, attributeName, expectedElementName);
}
public static Message IllegalAttributeInMergeModule(SourceLineNumber sourceLineNumbers, string elementName, string attributeName)
{
return Message(sourceLineNumbers, Ids.IllegalAttributeInMergeModule, "The {0}/@{1} attribute cannot be specified in a merge module.", elementName, attributeName);
}
public static Message IllegalAttributeValue(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string value, params string[] legalValues)
{
return Message(sourceLineNumbers, Ids.IllegalAttributeValue, "The {0}/@{1} attribute's value, '{2}', is not one of the legal options: '{3}'.", elementName, attributeName, value, String.Join(", ", legalValues));
}
public static Message IllegalAttributeValueWhenNested(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string attrivuteValue, string parentElementName)
{
return Message(sourceLineNumbers, Ids.IllegalAttributeValueWhenNested, "The {0}/@{1} attribute value, '{2}', cannot be specified when the {0} element is nested underneath a {3} element.", elementName, attributeName, attrivuteValue, parentElementName);
}
public static Message IllegalAttributeValueWithIllegalList(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string value, string illegalValueList)
{
return Message(sourceLineNumbers, Ids.IllegalAttributeValueWithIllegalList, "The {0}/@{1} attribute's value, '{2}', is one of the illegal options: {3}.", elementName, attributeName, value, illegalValueList);
}
public static Message IllegalAttributeValueWithLegalList(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string value, string legalValueList)
{
return Message(sourceLineNumbers, Ids.IllegalAttributeValueWithLegalList, "The {0}/@{1} attribute's value, '{2}', is not one of the legal options: {3}.", elementName, attributeName, value, legalValueList);
}
public static Message IllegalAttributeValueWithOtherAttribute(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string attributeValue, string otherAttributeName)
{
return Message(sourceLineNumbers, Ids.IllegalAttributeValueWithOtherAttribute, "The {0}/@{1} attribute's value, '{2}', cannot be specified with attribute {3} present.", elementName, attributeName, attributeValue, otherAttributeName);
}
public static Message IllegalAttributeValueWithOtherAttribute(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string attributeValue, string otherAttributeName, string otherAttributeValue)
{
return Message(sourceLineNumbers, Ids.IllegalAttributeValueWithOtherAttribute, "The {0}/@{1} attribute's value, '{2}', cannot be specified with attribute {3} present with value '{4}'.", elementName, attributeName, attributeValue, otherAttributeName, otherAttributeValue);
}
public static Message IllegalAttributeValueWithoutOtherAttribute(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string attributeValue, string otherAttributeName, string otherAttributeValue)
{
return Message(sourceLineNumbers, Ids.IllegalAttributeValueWithoutOtherAttribute, "The {0}/@{1} attribute's value, '{2}', can only be specified with attribute {3} present with value '{4}'.", elementName, attributeName, attributeValue, otherAttributeName, otherAttributeValue);
}
public static Message IllegalAttributeValueWithoutOtherAttribute(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string attributeValue, string otherAttributeName)
{
return Message(sourceLineNumbers, Ids.IllegalAttributeValueWithoutOtherAttribute, "The {0}/@{1} attribute's value, '{2}', cannot be specified without attribute {3} present.", elementName, attributeName, attributeValue, otherAttributeName);
}
public static Message IllegalAttributeWhenAdvertised(SourceLineNumber sourceLineNumbers, string elementName, string attributeName)
{
return Message(sourceLineNumbers, Ids.IllegalAttributeWhenAdvertised, "The {0}/@{1} attribute cannot be specified because the element is advertised.", elementName, attributeName);
}
public static Message IllegalAttributeWhenNested(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string parentElement)
{
return Message(sourceLineNumbers, Ids.IllegalAttributeWhenNested, "The {0}/@{1} attribute cannot be specified when the {0} element is nested underneath a {2} element. If this {0} is a member of a ComponentGroup where ComponentGroup/@{1} is set, then the {0}/@{1} attribute should be removed.", elementName, attributeName, parentElement);
}
public static Message IllegalAttributeWithInnerText(SourceLineNumber sourceLineNumbers, string elementName, string attributeName)
{
return Message(sourceLineNumbers, Ids.IllegalAttributeWithInnerText, "The {0}/@{1} attribute cannot be specified when the element has body text as well. Specify either the attribute or the body, but not both.", elementName, attributeName);
}
public static Message IllegalAttributeWithOtherAttribute(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string otherAttributeName)
{
return Message(sourceLineNumbers, Ids.IllegalAttributeWithOtherAttribute, "The {0}/@{1} attribute cannot be specified when attribute {2} is present.", elementName, attributeName, otherAttributeName);
}
public static Message IllegalAttributeWithOtherAttribute(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string otherAttributeName, string otherAttributeValue)
{
return Message(sourceLineNumbers, Ids.IllegalAttributeWithOtherAttribute, "The {0}/@{1} attribute cannot be specified when attribute {2} is present with value '{3}'.", elementName, attributeName, otherAttributeName, otherAttributeValue);
}
public static Message IllegalAttributeWithOtherAttributes(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string otherAttributeName1, string otherAttributeName2)
{
return Message(sourceLineNumbers, Ids.IllegalAttributeWithOtherAttributes, "The {0}/@{1} attribute cannot be specified when attribute {2} or {3} is also present.", elementName, attributeName, otherAttributeName1, otherAttributeName2);
}
public static Message IllegalAttributeWithOtherAttributes(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string otherAttributeName1, string otherAttributeName2, string otherAttributeName3)
{
return Message(sourceLineNumbers, Ids.IllegalAttributeWithOtherAttributes, "The {0}/@{1} attribute cannot be specified when attribute {2}, {3}, or {4} is also present.", elementName, attributeName, otherAttributeName1, otherAttributeName2, otherAttributeName3);
}
public static Message IllegalAttributeWithOtherAttributes(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string otherAttributeName1, string otherAttributeName2, string otherAttributeName3, string otherAttributeName4)
{
return Message(sourceLineNumbers, Ids.IllegalAttributeWithOtherAttributes, "The {0}/@{1} attribute cannot be specified when attribute {2}, {3}, {4}, or {5} is also present.", elementName, attributeName, otherAttributeName1, otherAttributeName2, otherAttributeName3, otherAttributeName4);
}
public static Message IllegalAttributeWithoutOtherAttributes(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string otherAttributeName)
{
return Message(sourceLineNumbers, Ids.IllegalAttributeWithoutOtherAttributes, "The {0}/@{1} attribute can only be specified with the following attribute {2} present.", elementName, attributeName, otherAttributeName);
}
public static Message IllegalAttributeWithoutOtherAttributes(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string otherAttributeName1, string otherAttributeName2)
{
return Message(sourceLineNumbers, Ids.IllegalAttributeWithoutOtherAttributes, "The {0}/@{1} attribute can only be specified with one of the following attributes: {2} or {3} present.", elementName, attributeName, otherAttributeName1, otherAttributeName2);
}
public static Message IllegalAttributeWithoutOtherAttributes(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string otherAttributeName1, string otherAttributeName2, string otherAttributeValue, bool uniquifier)
{
return Message(sourceLineNumbers, Ids.IllegalAttributeWithoutOtherAttributes, "The {0}/@{1} attribute can only be specified with one of the following attributes: {2} or {3} present with value '{4}'.", elementName, attributeName, otherAttributeName1, otherAttributeName2, otherAttributeValue, uniquifier);
}
public static Message IllegalAttributeWithoutOtherAttributes(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string otherAttributeName1, string otherAttributeName2, string otherAttributeName3)
{
return Message(sourceLineNumbers, Ids.IllegalAttributeWithoutOtherAttributes, "The {0}/@{1} attribute can only be specified with one of the following attributes: {2}, {3}, or {4} present.", elementName, attributeName, otherAttributeName1, otherAttributeName2, otherAttributeName3);
}
public static Message IllegalAttributeWithoutOtherAttributes(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string otherAttributeName1, string otherAttributeName2, string otherAttributeName3, string otherAttributeName4)
{
return Message(sourceLineNumbers, Ids.IllegalAttributeWithoutOtherAttributes, "The {0}/@{1} attribute can only be specified with one of the following attributes: {2}, {3}, {4}, or {5} present.", elementName, attributeName, otherAttributeName1, otherAttributeName2, otherAttributeName3, otherAttributeName4);
}
public static Message IllegalBinderClassName()
{
return Message(null, Ids.IllegalBinderClassName, "Illegal binder class name specified for -binder command line option.");
}
public static Message IllegalCabbingThreadCount(string numThreads)
{
return Message(null, Ids.IllegalCabbingThreadCount, "Illegal number of threads to create cabinets: '{0}' for -ct <N> command line option. Specify the number of threads to use like -ct 2.", numThreads);
}
public static Message IllegalCharactersInPath(string pathName)
{
return Message(null, Ids.IllegalCharactersInPath, "Illegal characters in path '{0}'. Ensure you provided a valid path to the file.", pathName);
}
public static Message IllegalCodepage(int codepage)
{
return Message(null, Ids.IllegalCodepage, "The code page '{0}' is not a valid Windows code page. Update the database's code page by modifying one of the following attributes: Package/@Codepage, Module/@Codepage, Patch/@Codepage, or WixLocalization/@Codepage.", codepage);
}
public static Message IllegalCodepage(SourceLineNumber sourceLineNumbers, int codepage)
{
return Message(sourceLineNumbers, Ids.IllegalCodepage, "The code page '{0}' is not a valid Windows code page. Update the database's code page by modifying one of the following attributes: Package/@Codepage, Module/@Codepage, Patch/@Codepage, or WixLocalization/@Codepage.", codepage);
}
public static Message IllegalCodepageAttribute(SourceLineNumber sourceLineNumbers, string codepage, string elementName, string attributeName)
{
return Message(sourceLineNumbers, Ids.IllegalCodepageAttribute, "The code page '{0}' is not a valid Windows code page. Please check the {1}/@{2} attribute value in your source file.", codepage, elementName, attributeName);
}
public static Message IllegalColumnName(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string value)
{
return Message(sourceLineNumbers, Ids.IllegalColumnName, "The {0}/@{1} attribute's value, '{2}', is not a legal column name. It will collide with the sentinel values used in the _TransformView table.", elementName, attributeName, value);
}
public static Message IllegalCommandLineArgumentValue(string arg, string value, IEnumerable<string> validValues)
{
var combinedValidValues = String.Join(", ", validValues);
return Message(null, Ids.IllegalCommandLineArgumentValue, "The argument {0} value '{1}' is invalid. Use one of the following values {2}", arg, value, combinedValidValues);
}
public static Message IllegalComponentWithAutoGeneratedGuid(SourceLineNumber sourceLineNumbers)
{
return Message(sourceLineNumbers, Ids.IllegalComponentWithAutoGeneratedGuid, "The Component/@Guid attribute's value '*' is not valid for this component because it does not meet the criteria for having an automatically generated guid. Components using a Directory as a KeyPath or containing ODBCDataSource child elements cannot use an automatically generated guid. Make sure your component doesn't have a Directory as the KeyPath and move any ODBCDataSource child elements to components with explicit component guids.");
}
public static Message IllegalComponentWithAutoGeneratedGuid(SourceLineNumber sourceLineNumbers, bool registryKeyPath)
{
return Message(sourceLineNumbers, Ids.IllegalComponentWithAutoGeneratedGuid, "The Component/@Guid attribute's value '*' is not valid for this component because it does not meet the criteria for having an automatically generated guid. Components with registry keypaths and files cannot use an automatically generated guid. Create multiple components, each with one file and/or one registry value keypath, to use automatically generated guids.", registryKeyPath);
}
public static Message IllegalCompressionLevel(SourceLineNumber sourceLineNumbers, string compressionLevel)
{
return Message(sourceLineNumbers, Ids.IllegalCompressionLevel, "The compression level '{0}' is not valid. Valid values are 'none', 'low', 'medium', 'high', and 'mszip'.", compressionLevel);
}
public static Message IllegalDefineStatement(SourceLineNumber sourceLineNumbers, string defineStatement)
{
return Message(sourceLineNumbers, Ids.IllegalDefineStatement, "The define statement '<?define {0}?>' is not well-formed. Define statements should be in the form <?define variableName = \"variable value\"?>.", defineStatement);
}
public static Message IllegalEmptyAttributeValue(SourceLineNumber sourceLineNumbers, string elementName, string attributeName)
{
return Message(sourceLineNumbers, Ids.IllegalEmptyAttributeValue, "The {0}/@{1} attribute's value cannot be an empty string. If a value is not required, simply remove the entire attribute.", elementName, attributeName);
}
public static Message IllegalEmptyAttributeValue(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string defaultValue)
{
return Message(sourceLineNumbers, Ids.IllegalEmptyAttributeValue, "The {0}/@{1} attribute's value cannot be an empty string. To use the default value \"{2}\", simply remove the entire attribute.", elementName, attributeName, defaultValue);
}
public static Message IllegalEnvironmentVariable(string environmentVariable, string value)
{
return Message(null, Ids.IllegalEnvironmentVariable, "The {0} environment variable is set to an invalid value of '{1}'.", environmentVariable, value);
}
public static Message IllegalFamilyName(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string value)
{
return Message(sourceLineNumbers, Ids.IllegalFamilyName, "The {0}/@{1} attribute's value, '{2}', contains illegal characters for a family name. Legal values include letters, numbers, and underscores.", elementName, attributeName, value);
}
public static Message IllegalFileCompressionAttributes(SourceLineNumber sourceLineNumbers)
{
return Message(sourceLineNumbers, Ids.IllegalFileCompressionAttributes, "Cannot have both the MsidbFileAttributesCompressed and MsidbFileAttributesNoncompressed options set in a file attributes column.");
}
public static Message IllegalForeach(SourceLineNumber sourceLineNumbers, string foreachStatement)
{
return Message(sourceLineNumbers, Ids.IllegalForeach, "The foreach statement '{0}' is illegal. The proper format for foreach is <?foreach varName in valueList?>.", foreachStatement);
}
public static Message IllegalGeneratedGuidComponentUnversionedKeypath(SourceLineNumber sourceLineNumbers)
{
return Message(sourceLineNumbers, Ids.IllegalGeneratedGuidComponentUnversionedKeypath, "The Component/@Guid attribute's value '*' is not valid for this component because it does not meet the criteria for having an automatically generated guid. Components with more than one file cannot use an automatically generated guid unless a versioned file is the keypath and the other files are unversioned. This component's keypath is not versioned. Create multiple components to use automatically generated guids.");
}
public static Message IllegalGeneratedGuidComponentVersionedNonkeypath(SourceLineNumber sourceLineNumbers)
{
return Message(sourceLineNumbers, Ids.IllegalGeneratedGuidComponentVersionedNonkeypath, "The Component/@Guid attribute's value '*' is not valid for this component because it does not meet the criteria for having an automatically generated guid. Components with more than one file cannot use an automatically generated guid unless a versioned file is the keypath and the other files are unversioned. This component has a non-keypath file that is versioned. Create multiple components to use automatically generated guids.");
}
public static Message IllegalGuidValue(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string value)
{
return Message(sourceLineNumbers, Ids.IllegalGuidValue, "The {0}/@{1} attribute's value, '{2}', is not a legal guid value.", elementName, attributeName, value);
}
public static Message IllegalIdentifier(SourceLineNumber sourceLineNumbers, string elementName, string value)
{
return Message(sourceLineNumbers, Ids.IllegalIdentifier, "The {0} element's value, '{1}', is not a legal identifier. Identifiers may contain ASCII characters A-Z, a-z, digits, underscores (_), or periods (.). Every identifier must begin with either a letter or an underscore.", elementName, value);
}
public static Message IllegalIdentifier(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, int disambiguator)
{
return Message(sourceLineNumbers, Ids.IllegalIdentifier, "The {0}/@{1} attribute's value is not a legal identifier. Identifiers may contain ASCII characters A-Z, a-z, digits, underscores (_), or periods (.). Every identifier must begin with either a letter or an underscore.", elementName, attributeName, disambiguator);
}
public static Message IllegalIdentifier(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string value)
{
return Message(sourceLineNumbers, Ids.IllegalIdentifier, "The {0}/@{1} attribute's value, '{2}', is not a legal identifier. Identifiers may contain ASCII characters A-Z, a-z, digits, underscores (_), or periods (.). Every identifier must begin with either a letter or an underscore.", elementName, attributeName, value);
}
public static Message IllegalIdentifier(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string value, string identifier)
{
return Message(sourceLineNumbers, Ids.IllegalIdentifier, "The {0}/@{1} attribute's value '{2}' contains an illegal identifier '{3}'. Identifiers may contain ASCII characters A-Z, a-z, digits, underscores (_), or periods (.). Every identifier must begin with either a letter or an underscore.", elementName, attributeName, value, identifier);
}
public static Message IllegalIdentifierLooksLikeFormatted(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string value)
{
return Message(sourceLineNumbers, Ids.IllegalIdentifierLooksLikeFormatted, "The {0}/@{1} attribute's value, '{2}', is not a legal identifier. The {0}/@{1} attribute does not support formatted string values, such as property names enclosed in brackets ([LIKETHIS]). The value must be the identifier of another element, such as the Directory/@Id attribute value.", elementName, attributeName, value);
}
public static Message IllegalInlineLocVariable(SourceLineNumber sourceLineNumbers, string variableName, string variableValue)
{
return Message(sourceLineNumbers, Ids.IllegalInlineLocVariable, "The localization variable '{0}' specifies an illegal inline default value of '{1}'. Localization variables cannot specify default values inline, instead the value should be specified in a WiX localization (.wxl) file.", variableName, variableValue);
}
public static Message IllegalIntegerInExpression(SourceLineNumber sourceLineNumbers, string expression)
{
return Message(sourceLineNumbers, Ids.IllegalIntegerInExpression, "An illegal number was found in the expression '{0}'.", expression);
}
public static Message IllegalIntegerValue(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string value)
{
return Message(sourceLineNumbers, Ids.IllegalIntegerValue, "The {0}/@{1} attribute's value, '{2}', is not a legal integer value. Legal integer values are from -2,147,483,648 to 2,147,483,647.", elementName, attributeName, value);
}
public static Message IllegalLongFilename(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string value)
{
return Message(sourceLineNumbers, Ids.IllegalLongFilename, "The {0}/@{1} attribute's value, '{2}', is not a valid filename because it contains illegal characters. Legal filenames contain no more than 260 characters and must contain at least one non-period character. Any character except for the follow may be used: \\ ? | > < : / * \".", elementName, attributeName, value);
}
public static Message IllegalLongFilename(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string value, string filename)
{
return Message(sourceLineNumbers, Ids.IllegalLongFilename, "The {0}/@{1} attribute's value '{2}' contains a invalid filename '{3}'. Legal filenames contain no more than 260 characters and must contain at least one non-period character. Any character except for the follow may be used: \\ ? | > < : / * \".", elementName, attributeName, value, filename);
}
public static Message IllegalLongValue(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string value)
{