@joebigelow / wix-1 / commits / bfe5ab76

Add platform-specific CAs and compiler extension.

https://github.com/wixtoolset/issues/issues/5933

Bob Arnson committed Jan 30, 2022 at 17:02 UTC bfe5ab76b5ecc1a21078534e6fba90d12cfd3c00
16 files changed +195 -140
src/ext/DirectX/ca/directx.def
+1 -1
@@ -1,7 +1,7 @@
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
3
4 -LIBRARY "directxca"
4 +LIBRARY "dxca"
5
6 EXPORTS
7 WixQueryDirectXCaps
src/ext/DirectX/ca/directxca.vcxproj
+1 -1
@@ -33,7 +33,7 @@
33 <ProjectGuid>{76542B28-0FFD-47D3-AD6A-D0F20FA875AC}</ProjectGuid>
34 <ConfigurationType>DynamicLibrary</ConfigurationType>
35 <CharacterSet>Unicode</CharacterSet>
36 - <TargetName>directxca</TargetName>
36 + <TargetName>dxca</TargetName>
37 <ProjectModuleDefinitionFile>directx.def</ProjectModuleDefinitionFile>
38 <Description>WiX Toolset DirectX CustomAction</Description>
39 </PropertyGroup>
src/ext/DirectX/test/WixToolsetTest.DirectX/DirectXExtensionFixture.cs
+3 -2
@@ -16,10 +16,11 @@ namespace WixToolsetTest.DirectX
16 var folder = TestData.Get(@"TestData\UsingPixelShaderVersion");
17 var build = new Builder(folder, typeof(DirectXExtensionFactory), new[] { folder });
18
19 - var results = build.BuildAndQuery(Build, "CustomAction");
19 + var results = build.BuildAndQuery(Build, "CustomAction", "Binary");
20 WixAssert.CompareLineByLine(new[]
21 {
22 - "CustomAction:WixQueryDirectXCaps\t65\tDirectXCA\tWixQueryDirectXCaps\t",
22 + "Binary:Wix4DXCA_X86\t[Binary data]",
23 + "CustomAction:Wix4QueryDirectXCaps_X86\t65\tWix4DXCA_X86\tWixQueryDirectXCaps\t",
24 }, results);
25 }
26
src/ext/DirectX/test/WixToolsetTest.DirectX/TestData/UsingPixelShaderVersion/Package.wxs
+1 -1
@@ -1,5 +1,5 @@
1 <Wix xmlns="http://wixtoolset.org/schemas/v4/wxs">
2 - <Package Name="MsiPackage" Language="1033" Version="1.0.0.0" Manufacturer="Example Corporation" UpgradeCode="047730a5-30fe-4a62-a520-da9381b8226a" InstallerVersion="200">
2 + <Package Name="MsiPackage" Language="1033" Version="1.0.0.0" Manufacturer="Example Corporation" UpgradeCode="047730a5-30fe-4a62-a520-da9381b8226a">
3 <MajorUpgrade DowngradeErrorMessage="!(loc.DowngradeError)" />
4
5 <Feature Id="ProductFeature" Title="!(loc.FeatureTitle)">
src/ext/DirectX/test/WixToolsetTest.DirectX/TestData/UsingPixelShaderVersion/PackageComponents.wxs
+3 -2
@@ -1,7 +1,8 @@
1 <?xml version="1.0" encoding="utf-8"?>
2 -<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs">
2 +<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs" xmlns:directx="http://wixtoolset.org/schemas/v4/wxs/directx">
3 <Fragment>
4 - <PropertyRef Id="WIX_DIRECTX_PIXELSHADERVERSION" />
4 + <directx:GetCapabilities />
5 +
6 <ComponentGroup Id="ProductComponents" Directory="INSTALLFOLDER">
7 <Component>
8 <File Source="example.txt" />
src/ext/DirectX/wixext/DirectXCompiler.cs new
+70
@@ -0,0 +1,70 @@
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 +
3 +namespace WixToolset.DirectX
4 +{
5 + using System;
6 + using System.Collections.Generic;
7 + using System.Xml.Linq;
8 + using WixToolset.Data;
9 + using WixToolset.Extensibility;
10 + using WixToolset.Extensibility.Data;
11 +
12 + /// <summary>
13 + /// The compiler for the WiX Toolset DirectX Extension.
14 + /// </summary>
15 + public sealed class DirectXCompiler : BaseCompilerExtension
16 + {
17 + public override XNamespace Namespace => "http://wixtoolset.org/schemas/v4/wxs/directx";
18 +
19 + /// <summary>
20 + /// Processes an element for the Compiler.
21 + /// </summary>
22 + /// <param name="parentElement">Parent element of element to process.</param>
23 + /// <param name="element">Element to process.</param>
24 + /// <param name="context">Extra information about the context in which this element is being parsed.</param>
25 + public override void ParseElement(Intermediate intermediate, IntermediateSection section, XElement parentElement, XElement element, IDictionary<string, string> context)
26 + {
27 + switch (parentElement.Name.LocalName)
28 + {
29 + case "Fragment":
30 + case "Module":
31 + case "Package":
32 + case "UI":
33 + this.AddCustomActionReference(intermediate, section, element, parentElement);
34 + break;
35 + default:
36 + this.ParseHelper.UnexpectedElement(parentElement, element);
37 + break;
38 + }
39 + }
40 +
41 + private void AddCustomActionReference(Intermediate intermediate, IntermediateSection section, XElement element, XElement parentElement)
42 + {
43 + var sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(element);
44 +
45 + switch (element.Name.LocalName)
46 + {
47 + case "GetCapabilities":
48 + this.ParseHelper.CreateCustomActionReference(sourceLineNumbers, section, "Wix4QueryDirectXCaps", this.Context.Platform, CustomActionPlatforms.X86 | CustomActionPlatforms.X64 | CustomActionPlatforms.ARM64);
49 + break;
50 + default:
51 + this.ParseHelper.UnexpectedElement(parentElement, element);
52 + break;
53 + }
54 +
55 + foreach (var attrib in element.Attributes())
56 + {
57 + if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace)
58 + {
59 + // no attributes today
60 + }
61 + else
62 + {
63 + this.ParseHelper.ParseExtensionAttribute(this.Context.Extensions, intermediate, section, element, attrib);
64 + }
65 + }
66 +
67 + this.ParseHelper.ParseForExtensionElements(this.Context.Extensions, intermediate, section, element);
68 + }
69 + }
70 +}
src/ext/DirectX/wixext/DirectXExtensionFactory.cs
+1
@@ -11,6 +11,7 @@ namespace WixToolset.DirectX
11 protected override IReadOnlyCollection<Type> ExtensionTypes => new[]
12 {
13 typeof(DirectXExtensionData),
14 + typeof(DirectXCompiler),
15 };
16 }
17 }
src/ext/DirectX/wixlib/DirectXExtension.wxs deleted
-33
@@ -1,33 +0,0 @@
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 -
3 -
4 -<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs">
5 - <?include caerr.wxi ?>
6 -
7 - <!-- DirectX Custom Action DLL Definitions -->
8 - <Fragment>
9 - <Binary Id="DirectXCA" SourceFile="directxca.dll" />
10 - </Fragment>
11 -
12 - <Fragment>
13 - <CustomAction Id="WixQueryDirectXCaps" DllEntry="WixQueryDirectXCaps" Return="ignore" BinaryRef="DirectXCA" />
14 -
15 - <InstallUISequence>
16 - <Custom Action="WixQueryDirectXCaps" Before="LaunchConditions" Overridable="yes" Condition="VersionNT &gt; 400" />
17 - </InstallUISequence>
18 -
19 - <InstallExecuteSequence>
20 - <Custom Action="WixQueryDirectXCaps" Before="LaunchConditions" Overridable="yes" Condition="VersionNT &gt; 400" />
21 - </InstallExecuteSequence>
22 - </Fragment>
23 -
24 - <Fragment>
25 - <Property Id="WIX_DIRECTX_VERTEXSHADERVERSION" Secure="yes" Value="NotSet" />
26 - <CustomActionRef Id="WixQueryDirectXCaps" />
27 - </Fragment>
28 -
29 - <Fragment>
30 - <Property Id="WIX_DIRECTX_PIXELSHADERVERSION" Secure="yes" Value="NotSet" />
31 - <CustomActionRef Id="WixQueryDirectXCaps" />
32 - </Fragment>
33 -</Wix>
src/ext/DirectX/wixlib/DirectXExtension_Platform.wxi new
+23
@@ -0,0 +1,23 @@
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 +
3 +
4 +<Include xmlns="http://wixtoolset.org/schemas/v4/wxs">
5 + <?include ..\..\caDecor.wxi ?>
6 +
7 + <!-- DirectX Custom Action DLL Definitions -->
8 + <Fragment>
9 + <Binary Id="$(var.Prefix)DXCA$(var.Suffix)" SourceFile="!(bindpath.$(var.platform))dxca.dll" />
10 + </Fragment>
11 +
12 + <Fragment>
13 + <CustomAction Id="$(var.Prefix)QueryDirectXCaps$(var.Suffix)" DllEntry="WixQueryDirectXCaps" Return="ignore" BinaryRef="$(var.Prefix)DXCA$(var.Suffix)" />
14 +
15 + <InstallUISequence>
16 + <Custom Action="$(var.Prefix)QueryDirectXCaps$(var.Suffix)" Before="LaunchConditions" Overridable="yes" />
17 + </InstallUISequence>
18 +
19 + <InstallExecuteSequence>
20 + <Custom Action="$(var.Prefix)QueryDirectXCaps$(var.Suffix)" Before="LaunchConditions" Overridable="yes" />
21 + </InstallExecuteSequence>
22 + </Fragment>
23 +</Include>
src/ext/DirectX/wixlib/DirectXExtension_arm64.wxs new
+7
@@ -0,0 +1,7 @@
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 +
3 +
4 +<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs">
5 + <?define platform=arm64 ?>
6 + <?include DirectXExtension_Platform.wxi ?>
7 +</Wix>
src/ext/DirectX/wixlib/DirectXExtension_x64.wxs new
+7
@@ -0,0 +1,7 @@
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 +
3 +
4 +<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs">
5 + <?define platform=x64 ?>
6 + <?include DirectXExtension_Platform.wxi ?>
7 +</Wix>
src/ext/DirectX/wixlib/DirectXExtension_x86.wxs new
+7
@@ -0,0 +1,7 @@
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 +
3 +
4 +<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs">
5 + <?define platform=x86 ?>
6 + <?include DirectXExtension_Platform.wxi ?>
7 +</Wix>
src/ext/DirectX/wixlib/caerr.wxi deleted
-96
@@ -1,96 +0,0 @@
1 -<Include xmlns="http://wixtoolset.org/schemas/v4/wxs">
2 - <?define msierrSecureObjectsFailedCreateSD = 25520?>
3 - <?define msierrSecureObjectsFailedSet = 25521?>
4 - <?define msierrSecureObjectsUnknownType = 25522?>
5 - <?define msierrXmlFileFailedRead = 25530?>
6 - <?define msierrXmlFileFailedOpen = 25531?>
7 - <?define msierrXmlFileFailedSelect = 25532?>
8 - <?define msierrXmlFileFailedSave = 25533?>
9 - <?define msierrXmlConfigFailedRead = 25540?>
10 - <?define msierrXmlConfigFailedOpen = 25541?>
11 - <?define msierrXmlConfigFailedSelect = 25542?>
12 - <?define msierrXmlConfigFailedSave = 25543?>
13 - <?define msierrFirewallCannotConnect = 25580?>
14 - <?define msierrIISCannotConnect = 26001?>
15 - <?define msierrIISFailedReadWebSite = 26002?>
16 - <?define msierrIISFailedReadWebDirs = 26003?>
17 - <?define msierrIISFailedReadVDirs = 26004?>
18 - <?define msierrIISFailedReadFilters = 26005?>
19 - <?define msierrIISFailedReadAppPool = 26006?>
20 - <?define msierrIISFailedReadMimeMap = 26007?>
21 - <?define msierrIISFailedReadProp = 26008?>
22 - <?define msierrIISFailedReadWebSvcExt = 26009?>
23 - <?define msierrIISFailedReadWebError = 26010?>
24 - <?define msierrIISFailedReadHttpHeader = 26011?>
25 - <?define msierrIISFailedSchedTransaction = 26031?>
26 - <?define msierrIISFailedSchedInstallWebs = 26032?>
27 - <?define msierrIISFailedSchedInstallWebDirs = 26033?>
28 - <?define msierrIISFailedSchedInstallVDirs = 26034?>
29 - <?define msierrIISFailedSchedInstallFilters = 26035?>
30 - <?define msierrIISFailedSchedInstallAppPool = 26036?>
31 - <?define msierrIISFailedSchedInstallProp = 26037?>
32 - <?define msierrIISFailedSchedInstallWebSvcExt = 26038?>
33 - <?define msierrIISFailedSchedUninstallWebs = 26051?>
34 - <?define msierrIISFailedSchedUninstallWebDirs = 26052?>
35 - <?define msierrIISFailedSchedUninstallVDirs = 26053?>
36 - <?define msierrIISFailedSchedUninstallFilters = 26054?>
37 - <?define msierrIISFailedSchedUninstallAppPool = 26055?>
38 - <?define msierrIISFailedSchedUninstallProp = 26056?>
39 - <?define msierrIISFailedSchedUninstallWebSvcExt = 26057?>
40 - <?define msierrIISFailedStartTransaction = 26101?>
41 - <?define msierrIISFailedOpenKey = 26102?>
42 - <?define msierrIISFailedCreateKey = 26103?>
43 - <?define msierrIISFailedWriteData = 26104?>
44 - <?define msierrIISFailedCreateApp = 26105?>
45 - <?define msierrIISFailedDeleteKey = 26106?>
46 - <?define msierrIISFailedDeleteApp = 26107?>
47 - <?define msierrIISFailedDeleteValue = 26108?>
48 - <?define msierrIISFailedCommitInUse = 26109?>
49 - <?define msierrSQLFailedCreateDatabase = 26201?>
50 - <?define msierrSQLFailedDropDatabase = 26202?>
51 - <?define msierrSQLFailedConnectDatabase = 26203?>
52 - <?define msierrSQLFailedExecString = 26204?>
53 - <?define msierrSQLDatabaseAlreadyExists = 26205?>
54 - <?define msierrPERFMONFailedRegisterDLL = 26251?>
55 - <?define msierrPERFMONFailedUnregisterDLL = 26252?>
56 - <?define msierrInstallPerfCounterData = 26253?>
57 - <?define msierrUninstallPerfCounterData = 26254?>
58 - <?define msierrSMBFailedCreate = 26301?>
59 - <?define msierrSMBFailedDrop = 26302?>
60 - <?define msierrCERTFailedOpen = 26351?>
61 - <?define msierrCERTFailedAdd = 26352?>
62 - <?define msierrUSRFailedUserCreate = 26401?>
63 - <?define msierrUSRFailedUserCreatePswd = 26402?>
64 - <?define msierrUSRFailedUserGroupAdd = 26403?>
65 - <?define msierrUSRFailedUserCreateExists = 26404?>
66 - <?define msierrUSRFailedGrantLogonAsService = 26405?>
67 - <?define msierrDependencyMissingDependencies = 26451?>
68 - <?define msierrDependencyHasDependents = 26452?>
69 - <?define msierrDotNetRuntimeRequired = 27000?>
70 - <?define msierrComPlusCannotConnect = 28001?>
71 - <?define msierrComPlusPartitionReadFailed = 28002?>
72 - <?define msierrComPlusPartitionRoleReadFailed = 28003?>
73 - <?define msierrComPlusUserInPartitionRoleReadFailed = 28004?>
74 - <?define msierrComPlusPartitionUserReadFailed = 28005?>
75 - <?define msierrComPlusApplicationReadFailed = 28006?>
76 - <?define msierrComPlusApplicationRoleReadFailed = 28007?>
77 - <?define msierrComPlusUserInApplicationRoleReadFailed = 28008?>
78 - <?define msierrComPlusAssembliesReadFailed = 28009?>
79 - <?define msierrComPlusSubscriptionReadFailed = 28010?>
80 - <?define msierrComPlusPartitionDependency = 28011?>
81 - <?define msierrComPlusPartitionNotFound = 28012?>
82 - <?define msierrComPlusPartitionIdConflict = 28013?>
83 - <?define msierrComPlusPartitionNameConflict = 28014?>
84 - <?define msierrComPlusApplicationDependency = 28015?>
85 - <?define msierrComPlusApplicationNotFound = 28016?>
86 - <?define msierrComPlusApplicationIdConflict = 28017?>
87 - <?define msierrComPlusApplicationNameConflict = 28018?>
88 - <?define msierrComPlusApplicationRoleDependency = 28019?>
89 - <?define msierrComPlusApplicationRoleNotFound = 28020?>
90 - <?define msierrComPlusApplicationRoleConflict = 28021?>
91 - <?define msierrComPlusAssemblyDependency = 28022?>
92 - <?define msierrComPlusSubscriptionIdConflict = 28023?>
93 - <?define msierrComPlusSubscriptionNameConflict = 28024?>
94 - <?define msierrComPlusFailedLookupNames = 28025?>
95 - <?define msierrMsmqCannotConnect = 28101?>
96 -</Include>
\ No newline at end of file
src/ext/DirectX/wixlib/directx.wixproj
+9 -1
@@ -6,7 +6,15 @@
6 </PropertyGroup>
7
8 <ItemGroup>
9 - <ProjectReference Include="..\ca\directxca.vcxproj" ReferenceOutputAssembly="false" />
9 + <BindInputPaths Include="$(OutputPath)x86" BindName='x86' />
10 + <BindInputPaths Include="$(OutputPath)x64" BindName='x64' />
11 + <BindInputPaths Include="$(OutputPath)arm64" BindName='arm64' />
12 + </ItemGroup>
13 +
14 + <ItemGroup>
15 + <ProjectReference Include="..\ca\directxca.vcxproj" Properties="Platform=x86" />
16 + <ProjectReference Include="..\ca\directxca.vcxproj" Properties="Platform=x64" />
17 + <ProjectReference Include="..\ca\directxca.vcxproj" Properties="Platform=ARM64" />
18 </ItemGroup>
19
20 <ItemGroup>
src/wix/WixToolset.Converters/WixConverter.cs
+11 -3
@@ -56,6 +56,7 @@ namespace WixToolset.Converters
56 private static readonly XNamespace Wix3Namespace = "http://schemas.microsoft.com/wix/2006/wi";
57 private static readonly XNamespace WixBalNamespace = "http://wixtoolset.org/schemas/v4/wxs/bal";
58 private static readonly XNamespace WixDependencyNamespace = "http://wixtoolset.org/schemas/v4/wxs/dependency";
59 + private static readonly XNamespace WixDirectXNamespace = "http://wixtoolset.org/schemas/v4/wxs/directx";
60 private static readonly XNamespace WixFirewallNamespace = "http://wixtoolset.org/schemas/v4/wxs/firewall";
61 private static readonly XNamespace WixUiNamespace = "http://wixtoolset.org/schemas/v4/wxs/ui";
62 private static readonly XNamespace WixUtilNamespace = "http://wixtoolset.org/schemas/v4/wxs/util";
@@ -94,6 +95,7 @@ namespace WixToolset.Converters
95 private static readonly XName FileElementName = WixNamespace + "File";
96 private static readonly XName FragmentElementName = WixNamespace + "Fragment";
97 private static readonly XName FirewallRemoteAddressElementName = WixFirewallNamespace + "RemoteAddress";
98 + private static readonly XName GetCapabilitiesElementName = WixFirewallNamespace + "GetCapabilities";
99 private static readonly XName LaunchElementName = WixNamespace + "Launch";
100 private static readonly XName LevelElementName = WixNamespace + "Level";
101 private static readonly XName ExePackageElementName = WixNamespace + "ExePackage";
@@ -455,11 +457,11 @@ namespace WixToolset.Converters
457 {
458 text.Value = text.Value.Trim();
459 }
458 - else if (node.NextNode is XCData cdata)
460 + else if (node.NextNode is XCData)
461 {
462 this.EnsurePrecedingWhitespaceRemoved(text, node, ConverterTestType.WhitespacePrecedingNodeWrong);
463 }
462 - else if (node.NextNode is XElement element)
464 + else if (node.NextNode is XElement)
465 {
466 this.EnsurePrecedingWhitespaceCorrect(text, node, level, ConverterTestType.WhitespacePrecedingNodeWrong);
467 }
@@ -503,7 +505,7 @@ namespace WixToolset.Converters
505 {
506 newValue = this.DeprecatedPrefixRegex.Replace(value, "!");
507
506 - if (object.ReferenceEquals(newValue, value))
508 + if (Object.ReferenceEquals(newValue, value))
509 {
510 return false;
511 }
@@ -1439,6 +1441,12 @@ namespace WixToolset.Converters
1441 newNamespaceName = "vs";
1442 replace = false;
1443 break;
1444 + case "WIX_DIRECTX_PIXELSHADERVERSION":
1445 + case "WIX_DIRECTX_VERTEXSHADERVERSION":
1446 + newElementName = "GetCapabilities";
1447 + newNamespace = WixDirectXNamespace;
1448 + newNamespaceName = "directx";
1449 + break;
1450 }
1451
1452 if (!String.IsNullOrEmpty(newElementName)
src/wix/test/WixToolsetTest.Converters/DirectXExtensionFixture.cs new
+51
@@ -0,0 +1,51 @@
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 +
3 +namespace WixToolsetTest.Converters
4 +{
5 + using System;
6 + using System.Xml.Linq;
7 + using WixBuildTools.TestSupport;
8 + using WixToolset.Converters;
9 + using WixToolsetTest.Converters.Mocks;
10 + using Xunit;
11 +
12 + public class DirectXExtensionFixture : BaseConverterFixture
13 + {
14 + [Fact]
15 + public void FixUIRefs()
16 + {
17 + var parse = String.Join(Environment.NewLine,
18 + "<Wix xmlns='http://schemas.microsoft.com/wix/2006/wi'>",
19 + " <Fragment>",
20 + " <PropertyRef Id=\"WIX_DIRECTX_PIXELSHADERVERSION\" />",
21 + " <UI>",
22 + " <PropertyRef Id=\"WIX_DIRECTX_VERTEXSHADERVERSION\" />",
23 + " </UI>",
24 + " </Fragment>",
25 + "</Wix>");
26 +
27 + var expected = new[]
28 + {
29 + "<Wix xmlns=\"http://wixtoolset.org/schemas/v4/wxs\" xmlns:directx=\"http://wixtoolset.org/schemas/v4/wxs/directx\">",
30 + " <Fragment>",
31 + " <directx:GetCapabilities />",
32 + " <UI>",
33 + " <directx:GetCapabilities />",
34 + " </UI>",
35 + " </Fragment>",
36 + "</Wix>"
37 + };
38 +
39 + var document = XDocument.Parse(parse, LoadOptions.PreserveWhitespace | LoadOptions.SetLineInfo);
40 +
41 + var messaging = new MockMessaging();
42 + var converter = new WixConverter(messaging, 2, null, null);
43 +
44 + var errors = converter.ConvertDocument(document);
45 + Assert.Equal(3, errors);
46 +
47 + var actualLines = UnformattedDocumentLines(document);
48 + WixAssert.CompareLineByLine(expected, actualLines);
49 + }
50 + }
51 +}