diff options
author | Sean Hall <r.sean.hall@gmail.com> | 2023-01-15 20:59:56 -0600 |
---|---|---|
committer | Sean Hall <r.sean.hall@gmail.com> | 2023-01-15 22:03:31 -0600 |
commit | ecbaffc08239e061a7dbaa92ff3c72acd53a0bae (patch) | |
tree | f6bf6660fc35b82085388ed489f4160c71ae68e1 /src/ext/Bal/wixext | |
parent | 32024b526d129534b017d4e932f08e6a6f015102 (diff) | |
download | wix-ecbaffc08239e061a7dbaa92ff3c72acd53a0bae.tar.gz wix-ecbaffc08239e061a7dbaa92ff3c72acd53a0bae.tar.bz2 wix-ecbaffc08239e061a7dbaa92ff3c72acd53a0bae.zip |
Write an error when the .NET Core BA is missing the BAFactoryAssembly.
7166
Diffstat (limited to 'src/ext/Bal/wixext')
-rw-r--r-- | src/ext/Bal/wixext/BalBurnBackendExtension.cs | 6 | ||||
-rw-r--r-- | src/ext/Bal/wixext/BalErrors.cs | 6 |
2 files changed, 10 insertions, 2 deletions
diff --git a/src/ext/Bal/wixext/BalBurnBackendExtension.cs b/src/ext/Bal/wixext/BalBurnBackendExtension.cs index a27ff739..be294131 100644 --- a/src/ext/Bal/wixext/BalBurnBackendExtension.cs +++ b/src/ext/Bal/wixext/BalBurnBackendExtension.cs | |||
@@ -121,7 +121,7 @@ namespace WixToolset.Bal | |||
121 | 121 | ||
122 | if (isDNC) | 122 | if (isDNC) |
123 | { | 123 | { |
124 | this.FinalizeBAFactorySymbol(section); | 124 | this.FinalizeBAFactorySymbol(section, baSymbol); |
125 | } | 125 | } |
126 | 126 | ||
127 | if (isIuiBA || isStdBA || isMBA || isDNC) | 127 | if (isIuiBA || isStdBA || isMBA || isDNC) |
@@ -135,11 +135,12 @@ namespace WixToolset.Bal | |||
135 | } | 135 | } |
136 | } | 136 | } |
137 | 137 | ||
138 | private void FinalizeBAFactorySymbol(IntermediateSection section) | 138 | private void FinalizeBAFactorySymbol(IntermediateSection section, WixBootstrapperApplicationDllSymbol baSymbol) |
139 | { | 139 | { |
140 | var factorySymbol = section.Symbols.OfType<WixBalBAFactoryAssemblySymbol>().SingleOrDefault(); | 140 | var factorySymbol = section.Symbols.OfType<WixBalBAFactoryAssemblySymbol>().SingleOrDefault(); |
141 | if (null == factorySymbol) | 141 | if (null == factorySymbol) |
142 | { | 142 | { |
143 | this.Messaging.Write(BalErrors.MissingDNCBAFactoryAssembly(baSymbol.SourceLineNumbers)); | ||
143 | return; | 144 | return; |
144 | } | 145 | } |
145 | 146 | ||
@@ -148,6 +149,7 @@ namespace WixToolset.Bal | |||
148 | .SingleOrDefault(); | 149 | .SingleOrDefault(); |
149 | if (null == factoryPayloadSymbol) | 150 | if (null == factoryPayloadSymbol) |
150 | { | 151 | { |
152 | this.Messaging.Write(BalErrors.MissingDNCBAFactoryAssembly(factorySymbol.SourceLineNumbers)); | ||
151 | return; | 153 | return; |
152 | } | 154 | } |
153 | 155 | ||
diff --git a/src/ext/Bal/wixext/BalErrors.cs b/src/ext/Bal/wixext/BalErrors.cs index cde37143..2548b279 100644 --- a/src/ext/Bal/wixext/BalErrors.cs +++ b/src/ext/Bal/wixext/BalErrors.cs | |||
@@ -43,6 +43,11 @@ namespace WixToolset.Bal | |||
43 | return Message(sourceLineNumbers, Ids.IuibaPrimaryPackageEnableFeatureSelection, "When using WixInternalUIBootstrapperApplication, primary packages must not have feature selection enabled because it interferes with the user selecting feature through the MSI UI."); | 43 | return Message(sourceLineNumbers, Ids.IuibaPrimaryPackageEnableFeatureSelection, "When using WixInternalUIBootstrapperApplication, primary packages must not have feature selection enabled because it interferes with the user selecting feature through the MSI UI."); |
44 | } | 44 | } |
45 | 45 | ||
46 | public static Message MissingDNCBAFactoryAssembly(SourceLineNumber sourceLineNumbers) | ||
47 | { | ||
48 | return Message(sourceLineNumbers, Ids.MissingDNCBAFactoryAssembly, "The BA's entry point DLL must have bal:BAFactoryAssembly=\"yes\" when using the DotNetCoreBootstrapperApplicationHost."); | ||
49 | } | ||
50 | |||
46 | public static Message MissingDNCPrereq() | 51 | public static Message MissingDNCPrereq() |
47 | { | 52 | { |
48 | return Message(null, Ids.MissingDNCPrereq, "There must be at least one package with bal:PrereqPackage=\"yes\" when using the DotNetCoreBootstrapperApplicationHost with SelfContainedDeployment set to \"no\"."); | 53 | return Message(null, Ids.MissingDNCPrereq, "There must be at least one package with bal:PrereqPackage=\"yes\" when using the DotNetCoreBootstrapperApplicationHost with SelfContainedDeployment set to \"no\"."); |
@@ -116,6 +121,7 @@ namespace WixToolset.Bal | |||
116 | IuibaPrimaryPackageEnableFeatureSelection = 6815, | 121 | IuibaPrimaryPackageEnableFeatureSelection = 6815, |
117 | OverridableVariableCollision = 6816, | 122 | OverridableVariableCollision = 6816, |
118 | OverridableVariableCollision2 = 6817, | 123 | OverridableVariableCollision2 = 6817, |
124 | MissingDNCBAFactoryAssembly = 6818, | ||
119 | } | 125 | } |
120 | } | 126 | } |
121 | } | 127 | } |