aboutsummaryrefslogtreecommitdiff
path: root/src/wixext/BalErrors.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/wixext/BalErrors.cs')
-rw-r--r--src/wixext/BalErrors.cs55
1 files changed, 55 insertions, 0 deletions
diff --git a/src/wixext/BalErrors.cs b/src/wixext/BalErrors.cs
new file mode 100644
index 00000000..5591ae1d
--- /dev/null
+++ b/src/wixext/BalErrors.cs
@@ -0,0 +1,55 @@
1// 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.
2
3namespace WixToolset.Bal
4{
5 using System;
6 using System.Resources;
7 using WixToolset.Data;
8
9 public static class BalErrors
10 {
11 public static Message AttributeRequiresPrereqPackage(SourceLineNumber sourceLineNumbers, string elementName, string attributeName)
12 {
13 return Message(sourceLineNumbers, Ids.AttributeRequiresPrereqPackage, "When the {0}/@{1} attribute is specified, the {0}/@PrereqPackage attribute must be set to \"yes\".", elementName, attributeName);
14 }
15
16 public static Message BAFunctionsPayloadRequiredInUXContainer(SourceLineNumber sourceLineNumbers)
17 {
18 return Message(sourceLineNumbers, Ids.BAFunctionsPayloadRequiredInUXContainer, "The BAFunctions DLL Payload element must be located inside the BootstrapperApplication container.");
19 }
20
21 public static Message MissingPrereq()
22 {
23 return Message(null, Ids.MissingPrereq, "There must be at least one PrereqPackage when using the ManagedBootstrapperApplicationHost.\nThis is typically done by using the WixNetFxExtension and referencing one of the NetFxAsPrereq package groups.");
24 }
25
26 public static Message MultipleBAFunctions(SourceLineNumber sourceLineNumbers)
27 {
28 return Message(sourceLineNumbers, Ids.MultipleBAFunctions, "WixStandardBootstrapperApplication doesn't support multiple BAFunctions DLLs.");
29 }
30
31 public static Message MultiplePrereqLicenses(SourceLineNumber sourceLineNumbers)
32 {
33 return Message(sourceLineNumbers, Ids.MultiplePrereqLicenses, "There may only be one package in the bundle that has either the PrereqLicenseFile attribute or the PrereqLicenseUrl attribute.");
34 }
35
36 private static Message Message(SourceLineNumber sourceLineNumber, Ids id, string format, params object[] args)
37 {
38 return new Message(sourceLineNumber, MessageLevel.Error, (int)id, format, args);
39 }
40
41 private static Message Message(SourceLineNumber sourceLineNumber, Ids id, ResourceManager resourceManager, string resourceName, params object[] args)
42 {
43 return new Message(sourceLineNumber, MessageLevel.Error, (int)id, resourceManager, resourceName, args);
44 }
45
46 public enum Ids
47 {
48 AttributeRequiresPrereqPackage = 6801,
49 MissingPrereq = 6802,
50 MultiplePrereqLicenses = 6803,
51 MultipleBAFunctions = 6804,
52 BAFunctionsPayloadRequiredInUXContainer = 6805,
53 }
54 }
55}