aboutsummaryrefslogtreecommitdiff
path: root/src/WixToolset.Core
diff options
context:
space:
mode:
authorBob Arnson <bob@joyofsetup.com>2018-08-23 20:13:34 -0400
committerBob Arnson <bob@joyofsetup.com>2018-08-23 20:13:34 -0400
commit7972bb567d3957868ea531dded384f38385c81c6 (patch)
tree73cb33a553399e42e9956aba954129b07792e5d7 /src/WixToolset.Core
parente5674bda26dff606c4961e4dc26c6fb19e925a5c (diff)
downloadwix-7972bb567d3957868ea531dded384f38385c81c6.tar.gz
wix-7972bb567d3957868ea531dded384f38385c81c6.tar.bz2
wix-7972bb567d3957868ea531dded384f38385c81c6.zip
Actually handle context-less Classes.
Diffstat (limited to 'src/WixToolset.Core')
-rw-r--r--src/WixToolset.Core/Compiler.cs35
1 files changed, 16 insertions, 19 deletions
diff --git a/src/WixToolset.Core/Compiler.cs b/src/WixToolset.Core/Compiler.cs
index a4c289f7..bbe21b1c 100644
--- a/src/WixToolset.Core/Compiler.cs
+++ b/src/WixToolset.Core/Compiler.cs
@@ -992,7 +992,7 @@ namespace WixToolset.Core
992 bool class32bit = false; 992 bool class32bit = false;
993 string classId = null; 993 string classId = null;
994 YesNoType classAdvertise = YesNoType.NotSet; 994 YesNoType classAdvertise = YesNoType.NotSet;
995 string[] contexts = null; 995 string[] contexts = new string[0];
996 string formattedContextString = null; 996 string formattedContextString = null;
997 bool control = false; 997 bool control = false;
998 string defaultInprocHandler = null; 998 string defaultInprocHandler = null;
@@ -1097,27 +1097,24 @@ namespace WixToolset.Core
1097 } 1097 }
1098 1098
1099 HashSet<string> uniqueContexts = new HashSet<string>(); 1099 HashSet<string> uniqueContexts = new HashSet<string>();
1100 if (contexts != null) 1100 foreach (string context in contexts)
1101 { 1101 {
1102 foreach (string context in contexts) 1102 if (uniqueContexts.Contains(context))
1103 { 1103 {
1104 if (uniqueContexts.Contains(context)) 1104 this.Core.Write(ErrorMessages.DuplicateContextValue(sourceLineNumbers, context));
1105 { 1105 }
1106 this.Core.Write(ErrorMessages.DuplicateContextValue(sourceLineNumbers, context)); 1106 else
1107 } 1107 {
1108 else 1108 uniqueContexts.Add(context);
1109 { 1109 }
1110 uniqueContexts.Add(context);
1111 }
1112 1110
1113 if (context.EndsWith("32", StringComparison.Ordinal)) 1111 if (context.EndsWith("32", StringComparison.Ordinal))
1114 { 1112 {
1115 class32bit = true; 1113 class32bit = true;
1116 } 1114 }
1117 else 1115 else
1118 { 1116 {
1119 class16bit = true; 1117 class16bit = true;
1120 }
1121 } 1118 }
1122 } 1119 }
1123 1120