Allow MsiProperty/@Value to be an empty string.
Fixes https://github.com/wixtoolset/issues/issues/7798.
Bob Arnson committed
Feb 17, 2024 at 17:56 UTC
a38b07af45eb36cc13fcd2546ac45e6f769e4d6f
5 files changed
+13
-2
src/test/burn/TestData/VariableTests/BundleA/BundleA.wxs
+1
@@ -8,6 +8,7 @@
8
<MsiPackage Id="PackageA" SourceFile="$(var.PackageA.TargetPath)">
9
<MsiProperty Name="INSTALLLOCATION" Value="[INSTALLLOCATION]" />
10
<MsiProperty Name="LICENSEKEY" Value="[LICENSEKEY]" />
11
+ <MsiProperty Name="BLANKPROPERTY" Value="" />
12
</MsiPackage>
13
</PackageGroup>
14
src/test/burn/WixToolsetTest.BurnE2E/VariableTests.cs
+1
-1
@@ -30,7 +30,7 @@ namespace WixToolsetTest.BurnE2E
30
// Burn logging its command line.
31
Assert.True(LogVerifier.MessageInLogFile(logFilePath, "InstallLocation=nothingtoseehere licensekey=*****"));
32
// Burn logging the MSI install command line.
33
- Assert.True(LogVerifier.MessageInLogFile(logFilePath, "INSTALLLOCATION=\"nothingtoseehere\" LICENSEKEY=\"*****\""));
33
+ Assert.True(LogVerifier.MessageInLogFile(logFilePath, "INSTALLLOCATION=\"nothingtoseehere\" LICENSEKEY=\"*****\" BLANKPROPERTY=\"\""));
34
Assert.False(LogVerifier.MessageInLogFile(logFilePath, "supersecretkey"));
35
}
36
src/wix/WixToolset.Core/Compiler_Bundle.cs
+1
-1
@@ -3340,7 +3340,7 @@ namespace WixToolset.Core
3340
name = this.Core.GetAttributeMsiPropertyNameValue(sourceLineNumbers, attrib);
3341
break;
3342
case "Value":
3343
- value = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
3343
+ value = this.Core.GetAttributeValue(sourceLineNumbers, attrib, EmptyRule.CanBeEmpty);
3344
break;
3345
case "Condition":
3346
condition = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
src/wix/test/WixToolsetTest.CoreIntegration/BundleFixture.cs
+9
@@ -177,6 +177,15 @@ namespace WixToolsetTest.CoreIntegration
177
{
178
"<Payload Id='test.msi' FilePath='test.msi' FileSize='*' Hash='*' Packaging='embedded' SourcePath='a0' Container='WixAttachedContainer' />",
179
}, msiPayloads);
180
+
181
+ var msiProperties = extractResult.GetManifestTestXmlLines("/burn:BurnManifest/burn:Chain/burn:MsiPackage[@Id='test.msi']/burn:MsiProperty", ignoreAttributesByElementName);
182
+ WixAssert.CompareLineByLine(new[]
183
+ {
184
+ "<MsiProperty Id='TEST' Value='1' />",
185
+ "<MsiProperty Id='TESTBLANK' Value='' />",
186
+ "<MsiProperty Id='ARPSYSTEMCOMPONENT' Value='1' />",
187
+ "<MsiProperty Id='MSIFASTINSTALL' Value='7' />",
188
+ }, msiProperties);
189
}
190
191
var manifestResource = new Resource(ResourceType.Manifest, "#1", 1033);
src/wix/test/WixToolsetTest.CoreIntegration/TestData/SimpleBundle/Bundle.wxs
+1
@@ -6,6 +6,7 @@
6
<Chain>
7
<MsiPackage SourceFile="test.msi">
8
<MsiProperty Name="TEST" Value="1" />
9
+ <MsiProperty Name="TESTBLANK" Value="" />
10
</MsiPackage>
11
</Chain>
12
</Bundle>