aboutsummaryrefslogtreecommitdiff
path: root/src/WixToolset.Core/LinkerErrors.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/WixToolset.Core/LinkerErrors.cs')
-rw-r--r--src/WixToolset.Core/LinkerErrors.cs48
1 files changed, 48 insertions, 0 deletions
diff --git a/src/WixToolset.Core/LinkerErrors.cs b/src/WixToolset.Core/LinkerErrors.cs
new file mode 100644
index 00000000..7ce8c00e
--- /dev/null
+++ b/src/WixToolset.Core/LinkerErrors.cs
@@ -0,0 +1,48 @@
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.Core
4{
5 using WixToolset.Data;
6
7 internal static class LinkerErrors
8 {
9 public static Message OrphanedPayload(SourceLineNumber sourceLineNumbers, string payloadId)
10 {
11 return Message(sourceLineNumbers, Ids.OrphanedPayload, "Found orphaned Payload '{0}'. Make sure to reference it from a Package, the BootstrapperApplication, or the Bundle or move it into its own Fragment so it only gets linked in when actually used.", payloadId);
12 }
13
14 public static Message PackageInMultipleContainers(SourceLineNumber sourceLineNumbers, string packageId, string containerId1, string containerId2)
15 {
16 return Message(sourceLineNumbers, Ids.PackageInMultipleContainers, "The Package '{0}' is referenced from multiple containers - Container '{1}' and Container '{2}'. This is not currently supported.", packageId, containerId1, containerId2);
17 }
18
19 public static Message PayloadSharedWithBA(SourceLineNumber sourceLineNumbers, string payloadId)
20 {
21 return Message(sourceLineNumbers, Ids.PayloadSharedWithBA, "The Payload '{0}' is shared with the BootstrapperApplication. This is not currently supported.", payloadId);
22 }
23
24 public static Message UnscheduledChainPackage(SourceLineNumber sourceLineNumbers, string packageId)
25 {
26 return Message(sourceLineNumbers, Ids.UnscheduledChainPackage, "Found orphaned Package '{0}'. Make sure to reference it from the Chain or move it into its own Fragment so it only gets linked in when actually used.", packageId);
27 }
28
29 public static Message UnscheduledRollbackBoundary(SourceLineNumber sourceLineNumbers, string rollbackBoundaryId)
30 {
31 return Message(sourceLineNumbers, Ids.UnscheduledRollbackBoundary, "Found orphaned RollbackBoundary '{0}'. Make sure to reference it from the Chain or move it into its own Fragment so it only gets linked in when actually used.", rollbackBoundaryId);
32 }
33
34 private static Message Message(SourceLineNumber sourceLineNumber, Ids id, string format, params object[] args)
35 {
36 return new Message(sourceLineNumber, MessageLevel.Error, (int)id, format, args);
37 }
38
39 public enum Ids
40 {
41 OrphanedPayload = 7000,
42 PackageInMultipleContainers = 7001,
43 PayloadSharedWithBA = 7002,
44 UnscheduledChainPackage = 7003,
45 UnscheduledRollbackBoundary = 7004,
46 } // last available is 7099. 7100 is WindowsInstallerBackendWarnings.
47 }
48}