summaryrefslogtreecommitdiff
path: root/src/ext/Bal/wixext/BalErrors.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/ext/Bal/wixext/BalErrors.cs')
-rw-r--r--src/ext/Bal/wixext/BalErrors.cs61
1 files changed, 61 insertions, 0 deletions
diff --git a/src/ext/Bal/wixext/BalErrors.cs b/src/ext/Bal/wixext/BalErrors.cs
new file mode 100644
index 00000000..bc0186c1
--- /dev/null
+++ b/src/ext/Bal/wixext/BalErrors.cs
@@ -0,0 +1,61 @@
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 MissingDNCPrereq()
22 {
23 return Message(null, Ids.MissingDNCPrereq, "There must be at least one PrereqPackage when using the DotNetCoreBootstrapperApplicationHost with SelfContainedDeployment set to \"no\".");
24 }
25
26 public static Message MissingMBAPrereq()
27 {
28 return Message(null, Ids.MissingMBAPrereq, "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.");
29 }
30
31 public static Message MultipleBAFunctions(SourceLineNumber sourceLineNumbers)
32 {
33 return Message(sourceLineNumbers, Ids.MultipleBAFunctions, "WixStandardBootstrapperApplication doesn't support multiple BAFunctions DLLs.");
34 }
35
36 public static Message MultiplePrereqLicenses(SourceLineNumber sourceLineNumbers)
37 {
38 return Message(sourceLineNumbers, Ids.MultiplePrereqLicenses, "There may only be one package in the bundle that has either the PrereqLicenseFile attribute or the PrereqLicenseUrl attribute.");
39 }
40
41 private static Message Message(SourceLineNumber sourceLineNumber, Ids id, string format, params object[] args)
42 {
43 return new Message(sourceLineNumber, MessageLevel.Error, (int)id, format, args);
44 }
45
46 private static Message Message(SourceLineNumber sourceLineNumber, Ids id, ResourceManager resourceManager, string resourceName, params object[] args)
47 {
48 return new Message(sourceLineNumber, MessageLevel.Error, (int)id, resourceManager, resourceName, args);
49 }
50
51 public enum Ids
52 {
53 AttributeRequiresPrereqPackage = 6801,
54 MissingMBAPrereq = 6802,
55 MultiplePrereqLicenses = 6803,
56 MultipleBAFunctions = 6804,
57 BAFunctionsPayloadRequiredInUXContainer = 6805,
58 MissingDNCPrereq = 6806,
59 }
60 }
61}