aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSean Hall <r.sean.hall@gmail.com>2018-12-16 17:21:36 -0600
committerSean Hall <r.sean.hall@gmail.com>2018-12-16 17:26:16 -0600
commitaec6e9a4b21accd2e8aeb2cb36ad1cdc8f308f79 (patch)
tree4ebc8374ad56b99f00b8d09328e9baed3f2081d6
parent4818bb24e8f7f22345f90393239ce92129238ecc (diff)
downloadwix-aec6e9a4b21accd2e8aeb2cb36ad1cdc8f308f79.tar.gz
wix-aec6e9a4b21accd2e8aeb2cb36ad1cdc8f308f79.tar.bz2
wix-aec6e9a4b21accd2e8aeb2cb36ad1cdc8f308f79.zip
Integrate into latest v4.
Still needs TupleDefinitions and Messages.
-rw-r--r--Iis.wixext.sln57
-rw-r--r--appveyor.cmd13
-rw-r--r--appveyor.yml29
-rw-r--r--nuget.config16
-rw-r--r--src/Cpp.Build.props100
-rw-r--r--src/Directory.Build.props29
-rw-r--r--src/FindLocalWix.props8
-rw-r--r--src/ca/dllmain.cpp26
-rw-r--r--src/ca/iisca.cpp3
-rw-r--r--src/ca/iisca.def7
-rw-r--r--src/ca/iisca.vcxproj70
-rw-r--r--src/ca/packages.config6
-rw-r--r--src/ca/precomp.h13
-rw-r--r--src/test/WixToolsetTest.Iis/IisExtensionFixture.cs32
-rw-r--r--src/test/WixToolsetTest.Iis/TestData/UsingIis/Package.en-us.wxl11
-rw-r--r--src/test/WixToolsetTest.Iis/TestData/UsingIis/Package.wxs22
-rw-r--r--src/test/WixToolsetTest.Iis/TestData/UsingIis/PackageComponents.wxs15
-rw-r--r--src/test/WixToolsetTest.Iis/TestData/UsingIis/example.txt1
-rw-r--r--src/test/WixToolsetTest.Iis/WixToolsetTest.Iis.csproj42
-rw-r--r--src/wixext/IIsCompiler.cs1241
-rw-r--r--src/wixext/IIsDecompiler.cs4
-rw-r--r--src/wixext/IIsExtensionData.cs50
-rw-r--r--src/wixext/IisErrors.cs70
-rw-r--r--src/wixext/IisExtensionFactory.cs18
-rw-r--r--src/wixext/IisWindowsInstallerBackendBinderExtension.cs26
-rw-r--r--src/wixext/WixToolset.Iis.wixext.csproj36
-rw-r--r--src/wixext/WixToolset.Iis.wixext.targets11
-rw-r--r--src/wixext/messages.cs237
-rw-r--r--src/wixlib/IIsExtension_Platform.wxi45
-rw-r--r--src/wixlib/caSuffix.wxi28
-rw-r--r--src/wixlib/caerr.wxi96
-rw-r--r--src/wixlib/iis.v3.ncrunchproject5
-rw-r--r--src/wixlib/iis.wixproj44
-rw-r--r--src/wixlib/packages.config5
-rw-r--r--version.json11
35 files changed, 1494 insertions, 933 deletions
diff --git a/Iis.wixext.sln b/Iis.wixext.sln
new file mode 100644
index 00000000..7757702f
--- /dev/null
+++ b/Iis.wixext.sln
@@ -0,0 +1,57 @@
1
2Microsoft Visual Studio Solution File, Format Version 12.00
3# Visual Studio 15
4VisualStudioVersion = 15.0.28010.2016
5MinimumVisualStudioVersion = 10.0.40219.1
6Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "iisca", "src\ca\iisca.vcxproj", "{CB3FB8C4-14BF-4EA6-9F01-7FB258E5AEF3}"
7EndProject
8Project("{930C7802-8A8C-48F9-8165-68863BCCD9DD}") = "iis", "src\wixlib\iis.wixproj", "{92FE99D2-355D-4F52-A7C1-10EECB4A5BB1}"
9EndProject
10Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WixToolset.Iis.wixext", "src\wixext\WixToolset.Iis.wixext.csproj", "{612029FB-B5D4-4D7E-B794-A0E202BFE493}"
11EndProject
12Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WixToolsetTest.Iis", "src\test\WixToolsetTest.Iis\WixToolsetTest.Iis.csproj", "{E62712D7-31A1-49E4-B1F4-0084FAD14193}"
13EndProject
14Global
15 GlobalSection(SolutionConfigurationPlatforms) = preSolution
16 Debug|Any CPU = Debug|Any CPU
17 Debug|x86 = Debug|x86
18 Release|Any CPU = Release|Any CPU
19 Release|x86 = Release|x86
20 EndGlobalSection
21 GlobalSection(ProjectConfigurationPlatforms) = postSolution
22 {CB3FB8C4-14BF-4EA6-9F01-7FB258E5AEF3}.Debug|Any CPU.ActiveCfg = Debug|Win32
23 {CB3FB8C4-14BF-4EA6-9F01-7FB258E5AEF3}.Debug|x86.ActiveCfg = Debug|Win32
24 {CB3FB8C4-14BF-4EA6-9F01-7FB258E5AEF3}.Debug|x86.Build.0 = Debug|Win32
25 {CB3FB8C4-14BF-4EA6-9F01-7FB258E5AEF3}.Release|Any CPU.ActiveCfg = Release|Win32
26 {CB3FB8C4-14BF-4EA6-9F01-7FB258E5AEF3}.Release|x86.ActiveCfg = Release|Win32
27 {CB3FB8C4-14BF-4EA6-9F01-7FB258E5AEF3}.Release|x86.Build.0 = Release|Win32
28 {92FE99D2-355D-4F52-A7C1-10EECB4A5BB1}.Debug|Any CPU.ActiveCfg = Debug|x86
29 {92FE99D2-355D-4F52-A7C1-10EECB4A5BB1}.Debug|x86.ActiveCfg = Debug|x86
30 {92FE99D2-355D-4F52-A7C1-10EECB4A5BB1}.Debug|x86.Build.0 = Debug|x86
31 {92FE99D2-355D-4F52-A7C1-10EECB4A5BB1}.Release|Any CPU.ActiveCfg = Release|x86
32 {92FE99D2-355D-4F52-A7C1-10EECB4A5BB1}.Release|x86.ActiveCfg = Release|x86
33 {92FE99D2-355D-4F52-A7C1-10EECB4A5BB1}.Release|x86.Build.0 = Release|x86
34 {612029FB-B5D4-4D7E-B794-A0E202BFE493}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
35 {612029FB-B5D4-4D7E-B794-A0E202BFE493}.Debug|Any CPU.Build.0 = Debug|Any CPU
36 {612029FB-B5D4-4D7E-B794-A0E202BFE493}.Debug|x86.ActiveCfg = Debug|Any CPU
37 {612029FB-B5D4-4D7E-B794-A0E202BFE493}.Debug|x86.Build.0 = Debug|Any CPU
38 {612029FB-B5D4-4D7E-B794-A0E202BFE493}.Release|Any CPU.ActiveCfg = Release|Any CPU
39 {612029FB-B5D4-4D7E-B794-A0E202BFE493}.Release|Any CPU.Build.0 = Release|Any CPU
40 {612029FB-B5D4-4D7E-B794-A0E202BFE493}.Release|x86.ActiveCfg = Release|Any CPU
41 {612029FB-B5D4-4D7E-B794-A0E202BFE493}.Release|x86.Build.0 = Release|Any CPU
42 {E62712D7-31A1-49E4-B1F4-0084FAD14193}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
43 {E62712D7-31A1-49E4-B1F4-0084FAD14193}.Debug|Any CPU.Build.0 = Debug|Any CPU
44 {E62712D7-31A1-49E4-B1F4-0084FAD14193}.Debug|x86.ActiveCfg = Debug|Any CPU
45 {E62712D7-31A1-49E4-B1F4-0084FAD14193}.Debug|x86.Build.0 = Debug|Any CPU
46 {E62712D7-31A1-49E4-B1F4-0084FAD14193}.Release|Any CPU.ActiveCfg = Release|Any CPU
47 {E62712D7-31A1-49E4-B1F4-0084FAD14193}.Release|Any CPU.Build.0 = Release|Any CPU
48 {E62712D7-31A1-49E4-B1F4-0084FAD14193}.Release|x86.ActiveCfg = Release|Any CPU
49 {E62712D7-31A1-49E4-B1F4-0084FAD14193}.Release|x86.Build.0 = Release|Any CPU
50 EndGlobalSection
51 GlobalSection(SolutionProperties) = preSolution
52 HideSolutionNode = FALSE
53 EndGlobalSection
54 GlobalSection(ExtensibilityGlobals) = postSolution
55 SolutionGuid = {89256463-14A3-4968-8688-F75EC230B021}
56 EndGlobalSection
57EndGlobal
diff --git a/appveyor.cmd b/appveyor.cmd
new file mode 100644
index 00000000..9b376415
--- /dev/null
+++ b/appveyor.cmd
@@ -0,0 +1,13 @@
1@setlocal
2@pushd %~dp0
3
4nuget restore
5
6msbuild -p:Configuration=Release -t:Restore
7
8rem msbuild -p:Configuration=Release src\test\WixToolsetTest.Iis\WixToolsetTest.Iis.csproj
9
10msbuild -p:Configuration=Release -t:Pack src\wixext\WixToolset.Iis.wixext.csproj
11
12@popd
13@endlocal \ No newline at end of file
diff --git a/appveyor.yml b/appveyor.yml
new file mode 100644
index 00000000..0c74d54b
--- /dev/null
+++ b/appveyor.yml
@@ -0,0 +1,29 @@
1image: Visual Studio 2017
2
3version: 0.0.0.{build}
4configuration: Release
5
6environment:
7 DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
8 DOTNET_CLI_TELEMETRY_OPTOUT: 1
9 NUGET_XMLDOC_MODE: skip
10
11build_script:
12 - appveyor.cmd
13
14pull_requests:
15 do_not_increment_build_number: true
16
17nuget:
18 disable_publish_on_pr: true
19
20skip_tags: true
21
22artifacts:
23- path: build\Release\**\*.nupkg
24 name: nuget
25
26notifications:
27- provider: Slack
28 incoming_webhook:
29 secure: p5xuu+4x2JHfwGDMDe5KcG1k7gZxqYc4jWVwvyNZv5cvkubPD2waJs5yXMAXZNN7Z63/3PWHb7q4KoY/99AjauYa1nZ4c5qYqRPFRBKTHfA=
diff --git a/nuget.config b/nuget.config
new file mode 100644
index 00000000..aaee3228
--- /dev/null
+++ b/nuget.config
@@ -0,0 +1,16 @@
1<?xml version="1.0" encoding="utf-8"?>
2<configuration>
3 <packageSources>
4 <clear />
5 <add key="wixtoolset-data" value="https://ci.appveyor.com/nuget/wixtoolset-data" />
6 <add key="wixtoolset-extensibility" value="https://ci.appveyor.com/nuget/wixtoolset-extensibility" />
7 <add key="wixtoolset-core" value="https://ci.appveyor.com/nuget/wixtoolset-core" />
8 <add key="wixtoolset-core-native" value="https://ci.appveyor.com/nuget/wixtoolset-core-native" />
9 <add key="wixtoolset-dtf" value="https://ci.appveyor.com/nuget/wixtoolset-dtf" />
10 <add key="wixtoolset-dutil" value="https://ci.appveyor.com/nuget/wixtoolset-dutil" />
11 <add key="wixtoolset-wcautil" value="https://ci.appveyor.com/nuget/wixtoolset-wcautil" />
12 <add key="wixtoolset-tools" value="https://ci.appveyor.com/nuget/wixtoolset-tools" />
13 <add key="wixbuildtools" value="https://ci.appveyor.com/nuget/wixbuildtools" />
14 <add key="api.nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" />
15 </packageSources>
16</configuration> \ No newline at end of file
diff --git a/src/Cpp.Build.props b/src/Cpp.Build.props
new file mode 100644
index 00000000..296b36ca
--- /dev/null
+++ b/src/Cpp.Build.props
@@ -0,0 +1,100 @@
1<?xml version="1.0" encoding="utf-8"?>
2<!-- 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. -->
3
4<Project>
5 <PropertyGroup>
6 <Platform Condition=" '$(Platform)' == '' OR '$(Platform)' == 'AnyCPU' ">Win32</Platform>
7 <IntDir>$(BaseIntermediateOutputPath)$(Configuration)\$(Platform)\</IntDir>
8 <OutDir>$(OutputPath)$(Platform)\</OutDir>
9 </PropertyGroup>
10
11 <ItemDefinitionGroup>
12 <ClCompile>
13 <DisableSpecificWarnings>$(DisableSpecificCompilerWarnings)</DisableSpecificWarnings>
14 <WarningLevel>Level4</WarningLevel>
15 <AdditionalIncludeDirectories>$(ProjectDir)inc;$(MSBuildProjectDirectory);$(IntDir);$(SqlCESdkIncludePath);$(ProjectAdditionalIncludeDirectories);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
16 <PreprocessorDefinitions>WIN32;_WINDOWS;_WIN32_MSI=500;_WIN32_WINNT=0x0501;$(ArmPreprocessorDefinitions);$(UnicodePreprocessorDefinitions);_CRT_STDIO_LEGACY_WIDE_SPECIFIERS;_WINSOCK_DEPRECATED_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
17 <PrecompiledHeader>Use</PrecompiledHeader>
18 <PrecompiledHeaderFile>precomp.h</PrecompiledHeaderFile>
19 <CallingConvention>StdCall</CallingConvention>
20 <TreatWarningAsError>true</TreatWarningAsError>
21 <ExceptionHandling>false</ExceptionHandling>
22 <AdditionalOptions>-YlprecompDefine</AdditionalOptions>
23 <AdditionalOptions Condition=" $(PlatformToolset.StartsWith('v14')) ">/Zc:threadSafeInit- %(AdditionalOptions)</AdditionalOptions>
24 <MultiProcessorCompilation Condition=" $(NUMBER_OF_PROCESSORS) &gt; 4 ">true</MultiProcessorCompilation>
25 </ClCompile>
26 <ResourceCompile>
27 <PreprocessorDefinitions>$(ArmPreprocessorDefinitions);%(PreprocessorDefinitions)</PreprocessorDefinitions>
28 <AdditionalIncludeDirectories>$(ProjectAdditionalResourceIncludeDirectories);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
29 </ResourceCompile>
30 <Lib>
31 <AdditionalLibraryDirectories>$(OutDir);$(AdditionalMultiTargetLibraryPath);$(ProjectAdditionalLibraryDirectories);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
32 </Lib>
33 <Link>
34 <SubSystem>$(ProjectSubSystem)</SubSystem>
35 <ModuleDefinitionFile>$(ProjectModuleDefinitionFile)</ModuleDefinitionFile>
36 <NoEntryPoint>$(ResourceOnlyDll)</NoEntryPoint>
37 <GenerateDebugInformation>true</GenerateDebugInformation>
38 <AdditionalDependencies>$(ProjectAdditionalLinkLibraries);advapi32.lib;comdlg32.lib;user32.lib;oleaut32.lib;gdi32.lib;shell32.lib;ole32.lib;version.lib;%(AdditionalDependencies)</AdditionalDependencies>
39 <AdditionalLibraryDirectories>$(OutDir);$(AdditionalMultiTargetLibraryPath);$(ArmLibraryDirectories);$(ProjectAdditionalLinkLibraryDirectories);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
40 <AdditionalOptions Condition=" $(PlatformToolset.StartsWith('v14')) ">/IGNORE:4099 %(AdditionalOptions)</AdditionalOptions>
41 </Link>
42 </ItemDefinitionGroup>
43
44 <ItemDefinitionGroup Condition=" '$(Platform)'=='Win32' and '$(PlatformToolset)'!='v100'">
45 <ClCompile>
46 <EnableEnhancedInstructionSet>NoExtensions</EnableEnhancedInstructionSet>
47 </ClCompile>
48 </ItemDefinitionGroup>
49 <ItemDefinitionGroup Condition=" '$(Platform)'=='arm' ">
50 <ClCompile>
51 <CallingConvention>CDecl</CallingConvention>
52 </ClCompile>
53 </ItemDefinitionGroup>
54 <ItemDefinitionGroup Condition=" '$(ConfigurationType)'=='StaticLibrary' ">
55 <ClCompile>
56 <DebugInformationFormat>OldStyle</DebugInformationFormat>
57 <OmitDefaultLibName>true</OmitDefaultLibName>
58 <IgnoreAllDefaultLibraries>true</IgnoreAllDefaultLibraries>
59 </ClCompile>
60 </ItemDefinitionGroup>
61 <ItemDefinitionGroup Condition=" '$(Configuration)'=='Debug' ">
62 <ClCompile>
63 <Optimization>Disabled</Optimization>
64 <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
65 <PreprocessorDefinitions>_DEBUG;DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
66 <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
67 </ClCompile>
68 </ItemDefinitionGroup>
69 <ItemDefinitionGroup Condition=" '$(Configuration)'=='Debug' and '$(CLRSupport)'=='true' ">
70 <ClCompile>
71 <BasicRuntimeChecks></BasicRuntimeChecks>
72 <RuntimeLibrary>MultiThreadedDebugDll</RuntimeLibrary>
73 </ClCompile>
74 </ItemDefinitionGroup>
75 <ItemDefinitionGroup Condition=" '$(Configuration)'=='Release' ">
76 <ClCompile>
77 <Optimization>MinSpace</Optimization>
78 <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
79 <FunctionLevelLinking>true</FunctionLevelLinking>
80 <IntrinsicFunctions>true</IntrinsicFunctions>
81 <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
82 </ClCompile>
83 <Link>
84 <EnableCOMDATFolding>true</EnableCOMDATFolding>
85 <OptimizeReferences>true</OptimizeReferences>
86 </Link>
87 </ItemDefinitionGroup>
88 <ItemDefinitionGroup Condition=" '$(Configuration)'=='Release' and '$(CLRSupport)'=='true' ">
89 <ClCompile>
90 <BasicRuntimeChecks></BasicRuntimeChecks>
91 <RuntimeLibrary>MultiThreadedDll</RuntimeLibrary>
92 </ClCompile>
93 </ItemDefinitionGroup>
94 <ItemDefinitionGroup Condition=" '$(CLRSupport)'=='true' ">
95 <Link>
96 <KeyFile>$(LinkKeyFile)</KeyFile>
97 <DelaySign>$(LinkDelaySign)</DelaySign>
98 </Link>
99 </ItemDefinitionGroup>
100</Project>
diff --git a/src/Directory.Build.props b/src/Directory.Build.props
new file mode 100644
index 00000000..9eacf3f5
--- /dev/null
+++ b/src/Directory.Build.props
@@ -0,0 +1,29 @@
1<?xml version="1.0" encoding="utf-8"?>
2<!-- 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. -->
3<!--
4 Do NOT modify this file. Update the canonical version in Home\src\Directory.Build.props
5 then update all of the repos.
6-->
7<Project>
8 <PropertyGroup>
9 <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
10 <EnableSourceLink Condition=" '$(NCrunch)' == '1' ">false</EnableSourceLink>
11
12 <ProjectName Condition=" '$(ProjectName)' == '' ">$(MSBuildProjectName)</ProjectName>
13 <BaseOutputPath>$(MSBuildThisFileDirectory)..\build\</BaseOutputPath>
14 <BaseIntermediateOutputPath>$(BaseOutputPath)obj\$(ProjectName)\</BaseIntermediateOutputPath>
15 <OutputPath>$(BaseOutputPath)$(Configuration)\</OutputPath>
16
17 <Authors>WiX Toolset Team</Authors>
18 <Company>WiX Toolset</Company>
19 <Copyright>Copyright (c) .NET Foundation and contributors. All rights reserved.</Copyright>
20 <Product>WiX Toolset</Product>
21 </PropertyGroup>
22
23 <PropertyGroup>
24 <WixToolsetRootFolder>$(MSBuildThisFileDirectory)..\..\</WixToolsetRootFolder>
25 </PropertyGroup>
26
27 <Import Project="Cpp.Build.props" Condition=" '$(MSBuildProjectExtension)'=='.vcxproj' " />
28 <Import Project="Custom.Build.props" Condition=" Exists('Custom.Build.props') " />
29</Project>
diff --git a/src/FindLocalWix.props b/src/FindLocalWix.props
new file mode 100644
index 00000000..a784e352
--- /dev/null
+++ b/src/FindLocalWix.props
@@ -0,0 +1,8 @@
1<?xml version="1.0" encoding="utf-8"?>
2<!-- 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. -->
3
4<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
5 <PropertyGroup>
6 <WixTargetsPath Condition=" '$(Configuration)' == 'Debug' And Exists('$(MSBuildThisFileDirectory)..\..\Tools\README.md') ">$(MSBuildThisFileDirectory)..\..\Tools\build\Debug\net461\wix.targets</WixTargetsPath>
7 </PropertyGroup>
8</Project>
diff --git a/src/ca/dllmain.cpp b/src/ca/dllmain.cpp
new file mode 100644
index 00000000..35ae6d1c
--- /dev/null
+++ b/src/ca/dllmain.cpp
@@ -0,0 +1,26 @@
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#include "precomp.h"
4
5/********************************************************************
6DllMain - standard entry point for all WiX custom actions
7
8********************************************************************/
9extern "C" BOOL WINAPI DllMain(
10 IN HINSTANCE hInst,
11 IN ULONG ulReason,
12 IN LPVOID)
13{
14 switch(ulReason)
15 {
16 case DLL_PROCESS_ATTACH:
17 WcaGlobalInitialize(hInst);
18 break;
19
20 case DLL_PROCESS_DETACH:
21 WcaGlobalFinalize();
22 break;
23 }
24
25 return TRUE;
26}
diff --git a/src/ca/iisca.cpp b/src/ca/iisca.cpp
new file mode 100644
index 00000000..37664a1c
--- /dev/null
+++ b/src/ca/iisca.cpp
@@ -0,0 +1,3 @@
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#include "precomp.h"
diff --git a/src/ca/iisca.def b/src/ca/iisca.def
new file mode 100644
index 00000000..187269e1
--- /dev/null
+++ b/src/ca/iisca.def
@@ -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
4LIBRARY "iisca"
5
6EXPORTS
7
diff --git a/src/ca/iisca.vcxproj b/src/ca/iisca.vcxproj
new file mode 100644
index 00000000..f83268b2
--- /dev/null
+++ b/src/ca/iisca.vcxproj
@@ -0,0 +1,70 @@
1<?xml version="1.0" encoding="utf-8"?>
2<!-- 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. -->
3
4<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
5 <Import Project="..\..\packages\WixToolset.DUtil.4.0.6\build\WixToolset.DUtil.props" Condition="Exists('..\..\packages\WixToolset.DUtil.4.0.6\build\WixToolset.DUtil.props')" />
6 <Import Project="..\..\packages\WixToolset.WcaUtil.4.0.2\build\WixToolset.WcaUtil.props" Condition="Exists('..\..\packages\WixToolset.WcaUtil.4.0.2\build\WixToolset.WcaUtil.props')" />
7
8 <ItemGroup Label="ProjectConfigurations">
9 <ProjectConfiguration Include="Debug|Win32">
10 <Configuration>Debug</Configuration>
11 <Platform>Win32</Platform>
12 </ProjectConfiguration>
13 <ProjectConfiguration Include="Release|Win32">
14 <Configuration>Release</Configuration>
15 <Platform>Win32</Platform>
16 </ProjectConfiguration>
17 </ItemGroup>
18
19 <PropertyGroup Label="Globals">
20 <ProjectGuid>{CB3FB8C4-14BF-4EA6-9F01-7FB258E5AEF3}</ProjectGuid>
21 <ConfigurationType>DynamicLibrary</ConfigurationType>
22 <TargetName>iisca</TargetName>
23 <PlatformToolset>v141</PlatformToolset>
24 <CharacterSet>Unicode</CharacterSet>
25 <ProjectModuleDefinitionFile>iisca.def</ProjectModuleDefinitionFile>
26 <Description>WiX Toolset Iis CustomAction</Description>
27 <WindowsTargetPlatformVersion Condition="'$(WindowsTargetPlatformVersion)' == ''">$([Microsoft.Build.Utilities.ToolLocationHelper]::GetLatestSDKTargetPlatformVersion('Windows', '10.0'))</WindowsTargetPlatformVersion>
28 </PropertyGroup>
29
30 <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
31 <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
32
33 <ImportGroup Label="ExtensionSettings">
34 </ImportGroup>
35
36 <ImportGroup Label="Shared">
37 <Import Project="..\..\packages\Microsoft.VisualStudio.Setup.Configuration.Native.1.14.114\build\native\Microsoft.VisualStudio.Setup.Configuration.Native.targets" Condition="Exists('..\..\packages\Microsoft.VisualStudio.Setup.Configuration.Native.1.14.114\build\native\Microsoft.VisualStudio.Setup.Configuration.Native.targets')" />
38 </ImportGroup>
39
40 <PropertyGroup>
41 <ProjectAdditionalLinkLibraries>msi.lib</ProjectAdditionalLinkLibraries>
42 </PropertyGroup>
43
44 <ItemGroup>
45 <ClCompile Include="dllmain.cpp">
46 <PrecompiledHeader>Create</PrecompiledHeader>
47 </ClCompile>
48 <ClCompile Include="iisca.cpp" />
49 </ItemGroup>
50
51 <ItemGroup>
52 <ClInclude Include="precomp.h" />
53 </ItemGroup>
54
55 <ItemGroup>
56 <None Include="packages.config" />
57 <None Include="iisca.def" />
58 </ItemGroup>
59
60 <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
61
62 <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
63 <PropertyGroup>
64 <ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
65 </PropertyGroup>
66 <Error Condition="!Exists('..\..\packages\Microsoft.VisualStudio.Setup.Configuration.Native.1.14.114\build\native\Microsoft.VisualStudio.Setup.Configuration.Native.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Microsoft.VisualStudio.Setup.Configuration.Native.1.14.114\build\native\Microsoft.VisualStudio.Setup.Configuration.Native.targets'))" />
67 <Error Condition="!Exists('..\..\packages\WixToolset.DUtil.4.0.6\build\WixToolset.DUtil.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\WixToolset.DUtil.4.0.6\build\WixToolset.DUtil.props'))" />
68 <Error Condition="!Exists('..\..\packages\WixToolset.WcaUtil.4.0.2\build\WixToolset.WcaUtil.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\WixToolset.WcaUtil.4.0.2\build\WixToolset.WcaUtil.props'))" />
69 </Target>
70</Project>
diff --git a/src/ca/packages.config b/src/ca/packages.config
new file mode 100644
index 00000000..b74ff5d0
--- /dev/null
+++ b/src/ca/packages.config
@@ -0,0 +1,6 @@
1<?xml version="1.0" encoding="utf-8"?>
2<packages>
3 <package id="Microsoft.VisualStudio.Setup.Configuration.Native" version="1.14.114" targetFramework="native" developmentDependency="true" />
4 <package id="WixToolset.DUtil" version="4.0.6" targetFramework="native" />
5 <package id="WixToolset.WcaUtil" version="4.0.2" targetFramework="native" />
6</packages> \ No newline at end of file
diff --git a/src/ca/precomp.h b/src/ca/precomp.h
new file mode 100644
index 00000000..3edad7ed
--- /dev/null
+++ b/src/ca/precomp.h
@@ -0,0 +1,13 @@
1#pragma once
2// 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.
3
4
5#include <windows.h>
6#include <msiquery.h>
7
8#define MAXUINT USHRT_MAX
9#include <Setup.Configuration.h>
10
11#include "wcautil.h"
12#include "fileutil.h"
13#include "strutil.h"
diff --git a/src/test/WixToolsetTest.Iis/IisExtensionFixture.cs b/src/test/WixToolsetTest.Iis/IisExtensionFixture.cs
new file mode 100644
index 00000000..2adb2e93
--- /dev/null
+++ b/src/test/WixToolsetTest.Iis/IisExtensionFixture.cs
@@ -0,0 +1,32 @@
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 WixToolsetTest.Iis
4{
5 using System.Linq;
6 using WixBuildTools.TestSupport;
7 using WixToolset.Core.TestPackage;
8 using WixToolset.Iis;
9 using Xunit;
10
11 public class IisExtensionFixture
12 {
13 [Fact]
14 public void CanBuildUsingFileShare()
15 {
16 var folder = TestData.Get(@"TestData\UsingIis");
17 var build = new Builder(folder, typeof(IisExtensionFactory), new[] { folder });
18
19 var results = build.BuildAndQuery(Build, "IIsWebAddress");
20 Assert.Equal(new[]
21 {
22 "IIsWebAddress:",
23 }, results.OrderBy(s => s).ToArray());
24 }
25
26 private static void Build(string[] args)
27 {
28 var result = WixRunner.Execute(args)
29 .AssertSuccess();
30 }
31 }
32}
diff --git a/src/test/WixToolsetTest.Iis/TestData/UsingIis/Package.en-us.wxl b/src/test/WixToolsetTest.Iis/TestData/UsingIis/Package.en-us.wxl
new file mode 100644
index 00000000..38c12ac1
--- /dev/null
+++ b/src/test/WixToolsetTest.Iis/TestData/UsingIis/Package.en-us.wxl
@@ -0,0 +1,11 @@
1<?xml version="1.0" encoding="utf-8"?>
2
3<!--
4This file contains the declaration of all the localizable strings.
5-->
6<WixLocalization xmlns="http://wixtoolset.org/schemas/v4/wxl" Culture="en-US">
7
8 <String Id="DowngradeError">A newer version of [ProductName] is already installed.</String>
9 <String Id="FeatureTitle">MsiPackage</String>
10
11</WixLocalization>
diff --git a/src/test/WixToolsetTest.Iis/TestData/UsingIis/Package.wxs b/src/test/WixToolsetTest.Iis/TestData/UsingIis/Package.wxs
new file mode 100644
index 00000000..68ff98fd
--- /dev/null
+++ b/src/test/WixToolsetTest.Iis/TestData/UsingIis/Package.wxs
@@ -0,0 +1,22 @@
1<?xml version="1.0" encoding="utf-8"?>
2<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs">
3 <Product Id="*" Name="MsiPackage" Language="1033" Version="1.0.0.0" Manufacturer="Example Corporation" UpgradeCode="047730a5-30fe-4a62-a520-da9381b8226a">
4 <Package InstallerVersion="200" Compressed="no" InstallScope="perMachine" />
5
6 <MajorUpgrade DowngradeErrorMessage="!(loc.DowngradeError)" />
7 <MediaTemplate />
8
9 <Feature Id="ProductFeature" Title="!(loc.FeatureTitle)">
10 <ComponentGroupRef Id="ProductComponents" />
11 </Feature>
12
13 </Product>
14
15 <Fragment>
16 <Directory Id="TARGETDIR" Name="SourceDir">
17 <Directory Id="ProgramFilesFolder">
18 <Directory Id="INSTALLFOLDER" Name="MsiPackage" />
19 </Directory>
20 </Directory>
21 </Fragment>
22</Wix>
diff --git a/src/test/WixToolsetTest.Iis/TestData/UsingIis/PackageComponents.wxs b/src/test/WixToolsetTest.Iis/TestData/UsingIis/PackageComponents.wxs
new file mode 100644
index 00000000..29c6956d
--- /dev/null
+++ b/src/test/WixToolsetTest.Iis/TestData/UsingIis/PackageComponents.wxs
@@ -0,0 +1,15 @@
1<?xml version="1.0" encoding="utf-8"?>
2<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs"
3 xmlns:iis="http://wixtoolset.org/schemas/v4/wxs/iis">
4 <Fragment>
5 <Property Id="PORT" Value="3062" />
6 <ComponentGroup Id="ProductComponents" Directory="INSTALLFOLDER">
7 <Component>
8 <File Source="example.txt" />
9 <iis:WebSite Id="Test" Description="Test web server" Directory="TestWebSiteProductDirectory" AutoStart="yes" DirProperties="ReadAndExecute" ConfigureIfExists="no" >
10 <iis:WebAddress Id="TestAddress" Port="[PORT]" Secure="no" />
11 </iis:WebSite>
12 </Component>
13 </ComponentGroup>
14 </Fragment>
15</Wix>
diff --git a/src/test/WixToolsetTest.Iis/TestData/UsingIis/example.txt b/src/test/WixToolsetTest.Iis/TestData/UsingIis/example.txt
new file mode 100644
index 00000000..1b4ffe8a
--- /dev/null
+++ b/src/test/WixToolsetTest.Iis/TestData/UsingIis/example.txt
@@ -0,0 +1 @@
This is example.txt. \ No newline at end of file
diff --git a/src/test/WixToolsetTest.Iis/WixToolsetTest.Iis.csproj b/src/test/WixToolsetTest.Iis/WixToolsetTest.Iis.csproj
new file mode 100644
index 00000000..92e3b8b4
--- /dev/null
+++ b/src/test/WixToolsetTest.Iis/WixToolsetTest.Iis.csproj
@@ -0,0 +1,42 @@
1<?xml version="1.0" encoding="utf-8"?>
2<!-- 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. -->
3
4<Project Sdk="Microsoft.NET.Sdk">
5 <PropertyGroup>
6 <TargetFramework>netcoreapp2.1</TargetFramework>
7 <IsPackable>false</IsPackable>
8 </PropertyGroup>
9
10 <PropertyGroup>
11 <NoWarn>NU1701</NoWarn>
12 </PropertyGroup>
13
14 <ItemGroup>
15 <Content Include="TestData\UsingIis\example.txt" CopyToOutputDirectory="PreserveNewest" />
16 <Content Include="TestData\UsingIis\Package.en-us.wxl" CopyToOutputDirectory="PreserveNewest" />
17 <Content Include="TestData\UsingIis\Package.wxs" CopyToOutputDirectory="PreserveNewest" />
18 <Content Include="TestData\UsingIis\PackageComponents.wxs" CopyToOutputDirectory="PreserveNewest" />
19 </ItemGroup>
20
21 <ItemGroup>
22 <ProjectReference Include="..\..\wixext\WixToolset.Iis.wixext.csproj" />
23 </ItemGroup>
24
25 <ItemGroup>
26 <PackageReference Include="WixToolset.Core.TestPackage" Version="4.0.*" Condition=" '$(Configuration)' == 'Release' Or !Exists('$(WixToolsetRootFolder)\Core\README.md') " PrivateAssets="all" />
27 <ProjectReference Include="$(WixToolsetRootFolder)\Core\src\WixToolset.Core.TestPackage\WixToolset.Core.TestPackage.csproj" Condition=" '$(Configuration)' == 'Debug' And Exists('$(WixToolsetRootFolder)\Core\README.md') " />
28 <ProjectReference Include="$(WixToolsetRootFolder)\Core\src\WixToolset.Core\WixToolset.Core.csproj" Condition=" '$(Configuration)' == 'Debug' And Exists('$(WixToolsetRootFolder)\Core\README.md') " />
29 <ProjectReference Include="$(WixToolsetRootFolder)\Core\src\WixToolset.Core.Burn\WixToolset.Core.Burn.csproj" Condition=" '$(Configuration)' == 'Debug' And Exists('$(WixToolsetRootFolder)\Core\README.md') " />
30 <ProjectReference Include="$(WixToolsetRootFolder)\Core\src\WixToolset.Core.WindowsInstaller\WixToolset.Core.WindowsInstaller.csproj" Condition=" '$(Configuration)' == 'Debug' And Exists('$(WixToolsetRootFolder)\Core\README.md') " />
31 </ItemGroup>
32
33 <ItemGroup>
34 <PackageReference Include="WixBuildTools.TestSupport" Version="4.0.*" />
35 </ItemGroup>
36
37 <ItemGroup>
38 <PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.8.0" />
39 <PackageReference Include="xunit" Version="2.4.0" />
40 <PackageReference Include="xunit.runner.visualstudio" Version="2.4.0" />
41 </ItemGroup>
42</Project>
diff --git a/src/wixext/IIsCompiler.cs b/src/wixext/IIsCompiler.cs
index 828d430b..e28435b6 100644
--- a/src/wixext/IIsCompiler.cs
+++ b/src/wixext/IIsCompiler.cs
@@ -1,6 +1,6 @@
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. 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 2
3namespace WixToolset.Extensions 3namespace WixToolset.Iis
4{ 4{
5 using System; 5 using System;
6 using System.Collections.Generic; 6 using System.Collections.Generic;
@@ -12,15 +12,9 @@ namespace WixToolset.Extensions
12 /// <summary> 12 /// <summary>
13 /// The compiler for the WiX Toolset Internet Information Services Extension. 13 /// The compiler for the WiX Toolset Internet Information Services Extension.
14 /// </summary> 14 /// </summary>
15 public sealed class IIsCompiler : CompilerExtension 15 public sealed class IIsCompiler : BaseCompilerExtension
16 { 16 {
17 /// <summary> 17 public override XNamespace Namespace => "http://wixtoolset.org/schemas/v4/wxs/iis";
18 /// Instantiate a new IIsCompiler.
19 /// </summary>
20 public IIsCompiler()
21 {
22 this.Namespace = "http://wixtoolset.org/schemas/v4/wxs/iis";
23 }
24 18
25 /// <summary> 19 /// <summary>
26 /// Types of objects that custom HTTP Headers can be applied to. 20 /// Types of objects that custom HTTP Headers can be applied to.
@@ -65,7 +59,7 @@ namespace WixToolset.Extensions
65 /// <param name="parentElement">Parent element of element to process.</param> 59 /// <param name="parentElement">Parent element of element to process.</param>
66 /// <param name="element">Element to process.</param> 60 /// <param name="element">Element to process.</param>
67 /// <param name="contextValues">Extra information about the context in which this element is being parsed.</param> 61 /// <param name="contextValues">Extra information about the context in which this element is being parsed.</param>
68 public override void ParseElement(XElement parentElement, XElement element, IDictionary<string, string> context) 62 public override void ParseElement(Intermediate intermediate, IntermediateSection section, XElement parentElement, XElement element, IDictionary<string, string> context)
69 { 63 {
70 switch (parentElement.Name.LocalName) 64 switch (parentElement.Name.LocalName)
71 { 65 {
@@ -76,31 +70,31 @@ namespace WixToolset.Extensions
76 switch (element.Name.LocalName) 70 switch (element.Name.LocalName)
77 { 71 {
78 case "Certificate": 72 case "Certificate":
79 this.ParseCertificateElement(element, componentId); 73 this.ParseCertificateElement(intermediate, section, element, componentId);
80 break; 74 break;
81 case "WebAppPool": 75 case "WebAppPool":
82 this.ParseWebAppPoolElement(element, componentId); 76 this.ParseWebAppPoolElement(intermediate, section, element, componentId);
83 break; 77 break;
84 case "WebDir": 78 case "WebDir":
85 this.ParseWebDirElement(element, componentId, null); 79 this.ParseWebDirElement(intermediate, section, element, componentId, null);
86 break; 80 break;
87 case "WebFilter": 81 case "WebFilter":
88 this.ParseWebFilterElement(element, componentId, null); 82 this.ParseWebFilterElement(intermediate, section, element, componentId, null);
89 break; 83 break;
90 case "WebProperty": 84 case "WebProperty":
91 this.ParseWebPropertyElement(element, componentId); 85 this.ParseWebPropertyElement(intermediate, section, element, componentId);
92 break; 86 break;
93 case "WebServiceExtension": 87 case "WebServiceExtension":
94 this.ParseWebServiceExtensionElement(element, componentId); 88 this.ParseWebServiceExtensionElement(intermediate, section, element, componentId);
95 break; 89 break;
96 case "WebSite": 90 case "WebSite":
97 this.ParseWebSiteElement(element, componentId); 91 this.ParseWebSiteElement(intermediate, section, element, componentId);
98 break; 92 break;
99 case "WebVirtualDir": 93 case "WebVirtualDir":
100 this.ParseWebVirtualDirElement(element, componentId, null, null); 94 this.ParseWebVirtualDirElement(intermediate, section, element, componentId, null, null);
101 break; 95 break;
102 default: 96 default:
103 this.Core.UnexpectedElement(parentElement, element); 97 this.ParseHelper.UnexpectedElement(parentElement, element);
104 break; 98 break;
105 } 99 }
106 break; 100 break;
@@ -110,27 +104,27 @@ namespace WixToolset.Extensions
110 switch (element.Name.LocalName) 104 switch (element.Name.LocalName)
111 { 105 {
112 case "WebApplication": 106 case "WebApplication":
113 this.ParseWebApplicationElement(element); 107 this.ParseWebApplicationElement(intermediate, section, element);
114 break; 108 break;
115 case "WebAppPool": 109 case "WebAppPool":
116 this.ParseWebAppPoolElement(element, null); 110 this.ParseWebAppPoolElement(intermediate, section, element, null);
117 break; 111 break;
118 case "WebDirProperties": 112 case "WebDirProperties":
119 this.ParseWebDirPropertiesElement(element); 113 this.ParseWebDirPropertiesElement(intermediate, section, element);
120 break; 114 break;
121 case "WebLog": 115 case "WebLog":
122 this.ParseWebLogElement(element); 116 this.ParseWebLogElement(intermediate, section, element);
123 break; 117 break;
124 case "WebSite": 118 case "WebSite":
125 this.ParseWebSiteElement(element, null); 119 this.ParseWebSiteElement(intermediate, section, element, null);
126 break; 120 break;
127 default: 121 default:
128 this.Core.UnexpectedElement(parentElement, element); 122 this.ParseHelper.UnexpectedElement(parentElement, element);
129 break; 123 break;
130 } 124 }
131 break; 125 break;
132 default: 126 default:
133 this.Core.UnexpectedElement(parentElement, element); 127 this.ParseHelper.UnexpectedElement(parentElement, element);
134 break; 128 break;
135 } 129 }
136 } 130 }
@@ -138,12 +132,12 @@ namespace WixToolset.Extensions
138 /// <summary> 132 /// <summary>
139 /// Parses a certificate element. 133 /// Parses a certificate element.
140 /// </summary> 134 /// </summary>
141 /// <param name="node">Element to parse.</param> 135 /// <param name="element">Element to parse.</param>
142 /// <param name="componentId">Identifier for parent component.</param> 136 /// <param name="componentId">Identifier for parent component.</param>
143 private void ParseCertificateElement(XElement node, string componentId) 137 private void ParseCertificateElement(Intermediate intermediate, IntermediateSection section, XElement element, string componentId)
144 { 138 {
145 SourceLineNumber sourceLineNumbers = Preprocessor.GetSourceLineNumbers(node); 139 SourceLineNumber sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(element);
146 string id = null; 140 Identifier id = null;
147 int attributes = 0; 141 int attributes = 0;
148 string binaryKey = null; 142 string binaryKey = null;
149 string certificatePath = null; 143 string certificatePath = null;
@@ -152,28 +146,28 @@ namespace WixToolset.Extensions
152 int storeLocation = 0; 146 int storeLocation = 0;
153 string storeName = null; 147 string storeName = null;
154 148
155 foreach (XAttribute attrib in node.Attributes()) 149 foreach (XAttribute attrib in element.Attributes())
156 { 150 {
157 if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace) 151 if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace)
158 { 152 {
159 switch (attrib.Name.LocalName) 153 switch (attrib.Name.LocalName)
160 { 154 {
161 case "Id": 155 case "Id":
162 id = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib); 156 id = this.ParseHelper.GetAttributeIdentifier(sourceLineNumbers, attrib);
163 break; 157 break;
164 case "BinaryKey": 158 case "BinaryKey":
165 attributes |= 2; // SCA_CERT_ATTRIBUTE_BINARYDATA 159 attributes |= 2; // SCA_CERT_ATTRIBUTE_BINARYDATA
166 binaryKey = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib); 160 binaryKey = this.ParseHelper.GetAttributeIdentifierValue(sourceLineNumbers, attrib);
167 this.Core.CreateSimpleReference(sourceLineNumbers, "Binary", binaryKey); 161 this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "Binary", binaryKey);
168 break; 162 break;
169 case "CertificatePath": 163 case "CertificatePath":
170 certificatePath = this.Core.GetAttributeValue(sourceLineNumbers, attrib); 164 certificatePath = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib);
171 break; 165 break;
172 case "Name": 166 case "Name":
173 name = this.Core.GetAttributeValue(sourceLineNumbers, attrib); 167 name = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib);
174 break; 168 break;
175 case "Overwrite": 169 case "Overwrite":
176 if (YesNoType.Yes == this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib)) 170 if (YesNoType.Yes == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib))
177 { 171 {
178 attributes |= 4; // SCA_CERT_ATTRIBUTE_OVERWRITE 172 attributes |= 4; // SCA_CERT_ATTRIBUTE_OVERWRITE
179 } 173 }
@@ -183,10 +177,10 @@ namespace WixToolset.Extensions
183 } 177 }
184 break; 178 break;
185 case "PFXPassword": 179 case "PFXPassword":
186 pfxPassword = this.Core.GetAttributeValue(sourceLineNumbers, attrib); 180 pfxPassword = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib);
187 break; 181 break;
188 case "Request": 182 case "Request":
189 if (YesNoType.Yes == this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib)) 183 if (YesNoType.Yes == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib))
190 { 184 {
191 attributes |= 1; // SCA_CERT_ATTRIBUTE_REQUEST 185 attributes |= 1; // SCA_CERT_ATTRIBUTE_REQUEST
192 } 186 }
@@ -196,7 +190,7 @@ namespace WixToolset.Extensions
196 } 190 }
197 break; 191 break;
198 case "StoreLocation": 192 case "StoreLocation":
199 string storeLocationValue = this.Core.GetAttributeValue(sourceLineNumbers, attrib); 193 string storeLocationValue = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib);
200 if (0 < storeLocationValue.Length) 194 if (0 < storeLocationValue.Length)
201 { 195 {
202 switch (storeLocationValue) 196 switch (storeLocationValue)
@@ -209,13 +203,13 @@ namespace WixToolset.Extensions
209 break; 203 break;
210 default: 204 default:
211 storeLocation = -1; 205 storeLocation = -1;
212 this.Core.OnMessage(WixErrors.IllegalAttributeValue(sourceLineNumbers, node.Name.LocalName, "StoreLocation", storeLocationValue, "currentUser", "localMachine")); 206 this.Messaging.Write(ErrorMessages.IllegalAttributeValue(sourceLineNumbers, element.Name.LocalName, "StoreLocation", storeLocationValue, "currentUser", "localMachine"));
213 break; 207 break;
214 } 208 }
215 } 209 }
216 break; 210 break;
217 case "StoreName": 211 case "StoreName":
218 string storeNameValue = this.Core.GetAttributeValue(sourceLineNumbers, attrib); 212 string storeNameValue = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib);
219 if (0 < storeNameValue.Length) 213 if (0 < storeNameValue.Length)
220 { 214 {
221 switch (storeNameValue) 215 switch (storeNameValue)
@@ -243,232 +237,230 @@ namespace WixToolset.Extensions
243 storeName = "TrustedPublisher"; 237 storeName = "TrustedPublisher";
244 break; 238 break;
245 default: 239 default:
246 this.Core.OnMessage(WixErrors.IllegalAttributeValue(sourceLineNumbers, node.Name.LocalName, "StoreName", storeNameValue, "ca", "my", "request", "root", "otherPeople", "trustedPeople", "trustedPublisher")); 240 this.Messaging.Write(ErrorMessages.IllegalAttributeValue(sourceLineNumbers, element.Name.LocalName, "StoreName", storeNameValue, "ca", "my", "request", "root", "otherPeople", "trustedPeople", "trustedPublisher"));
247 break; 241 break;
248 } 242 }
249 } 243 }
250 break; 244 break;
251 default: 245 default:
252 this.Core.UnexpectedAttribute(node, attrib); 246 this.ParseHelper.UnexpectedAttribute(element, attrib);
253 break; 247 break;
254 } 248 }
255 } 249 }
256 else 250 else
257 { 251 {
258 this.Core.ParseExtensionAttribute(node, attrib); 252 this.ParseHelper.ParseExtensionAttribute(this.Context.Extensions, intermediate, section, element, attrib);
259 } 253 }
260 } 254 }
261 255
262 256
263 if (null == id) 257 if (null == id)
264 { 258 {
265 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id")); 259 this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, element.Name.LocalName, "Id"));
266 } 260 }
267 261
268 if (null == name) 262 if (null == name)
269 { 263 {
270 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Name")); 264 this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, element.Name.LocalName, "Name"));
271 } 265 }
272 266
273 if (0 == storeLocation) 267 if (0 == storeLocation)
274 { 268 {
275 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "StoreLocation")); 269 this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, element.Name.LocalName, "StoreLocation"));
276 } 270 }
277 271
278 if (null == storeName) 272 if (null == storeName)
279 { 273 {
280 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "StoreName")); 274 this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, element.Name.LocalName, "StoreName"));
281 } 275 }
282 276
283 if (null != binaryKey && null != certificatePath) 277 if (null != binaryKey && null != certificatePath)
284 { 278 {
285 this.Core.OnMessage(WixErrors.IllegalAttributeWithOtherAttribute(sourceLineNumbers, node.Name.LocalName, "BinaryKey", "CertificatePath", certificatePath)); 279 this.Messaging.Write(ErrorMessages.IllegalAttributeWithOtherAttribute(sourceLineNumbers, element.Name.LocalName, "BinaryKey", "CertificatePath", certificatePath));
286 } 280 }
287 else if (null == binaryKey && null == certificatePath) 281 else if (null == binaryKey && null == certificatePath)
288 { 282 {
289 this.Core.OnMessage(WixErrors.ExpectedAttributes(sourceLineNumbers, node.Name.LocalName, "BinaryKey", "CertificatePath")); 283 this.Messaging.Write(ErrorMessages.ExpectedAttributes(sourceLineNumbers, element.Name.LocalName, "BinaryKey", "CertificatePath"));
290 } 284 }
291 285
292 this.Core.ParseForExtensionElements(node); 286 this.ParseHelper.ParseForExtensionElements(this.Context.Extensions, intermediate, section, element);
293 287
294 // Reference InstallCertificates and UninstallCertificates since nothing will happen without them 288 // Reference InstallCertificates and UninstallCertificates since nothing will happen without them
295 this.Core.CreateSimpleReference(sourceLineNumbers, "CustomAction", "InstallCertificates"); 289 this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "CustomAction", "InstallCertificates");
296 this.Core.CreateSimpleReference(sourceLineNumbers, "CustomAction", "UninstallCertificates"); 290 this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "CustomAction", "UninstallCertificates");
297 this.Core.EnsureTable(sourceLineNumbers, "CertificateHash"); // Certificate CustomActions require the CertificateHash table 291 this.ParseHelper.EnsureTable(section, sourceLineNumbers, "CertificateHash"); // Certificate CustomActions require the CertificateHash table
298 292
299 if (!this.Core.EncounteredError) 293 if (!this.Messaging.EncounteredError)
300 { 294 {
301 Row row = this.Core.CreateRow(sourceLineNumbers, "Certificate"); 295 var row = this.ParseHelper.CreateRow(section, sourceLineNumbers, "Certificate", id);
302 row[0] = id; 296 row.Set(1, componentId);
303 row[1] = componentId; 297 row.Set(2, name);
304 row[2] = name; 298 row.Set(3, storeLocation);
305 row[3] = storeLocation; 299 row.Set(4, storeName);
306 row[4] = storeName; 300 row.Set(5, attributes);
307 row[5] = attributes; 301 row.Set(6, binaryKey);
308 row[6] = binaryKey; 302 row.Set(7, certificatePath);
309 row[7] = certificatePath; 303 row.Set(8, pfxPassword);
310 row[8] = pfxPassword;
311 } 304 }
312 } 305 }
313 306
314 /// <summary> 307 /// <summary>
315 /// Parses a CertificateRef extension element. 308 /// Parses a CertificateRef extension element.
316 /// </summary> 309 /// </summary>
317 /// <param name="node">Element to parse.</param> 310 /// <param name="element">Element to parse.</param>
318 /// <param name="webId">Identifier for parent web site.</param> 311 /// <param name="webId">Identifier for parent web site.</param>
319 private void ParseCertificateRefElement(XElement node, string webId) 312 private void ParseCertificateRefElement(Intermediate intermediate, IntermediateSection section, XElement element, string webId)
320 { 313 {
321 SourceLineNumber sourceLineNumbers = Preprocessor.GetSourceLineNumbers(node); 314 SourceLineNumber sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(element);
322 string id = null; 315 Identifier id = null;
323 316
324 foreach (XAttribute attrib in node.Attributes()) 317 foreach (XAttribute attrib in element.Attributes())
325 { 318 {
326 if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace) 319 if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace)
327 { 320 {
328 switch (attrib.Name.LocalName) 321 switch (attrib.Name.LocalName)
329 { 322 {
330 case "Id": 323 case "Id":
331 id = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib); 324 id = this.ParseHelper.GetAttributeIdentifier(sourceLineNumbers, attrib);
332 this.Core.CreateSimpleReference(sourceLineNumbers, "Certificate", id); 325 this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "Certificate", id.Id);
333 break; 326 break;
334 default: 327 default:
335 this.Core.UnexpectedAttribute(node, attrib); 328 this.ParseHelper.UnexpectedAttribute(element, attrib);
336 break; 329 break;
337 } 330 }
338 } 331 }
339 else 332 else
340 { 333 {
341 this.Core.ParseExtensionAttribute(node, attrib); 334 this.ParseHelper.ParseExtensionAttribute(this.Context.Extensions, intermediate, section, element, attrib);
342 } 335 }
343 } 336 }
344 337
345 if (null == id) 338 if (null == id)
346 { 339 {
347 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id")); 340 this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, element.Name.LocalName, "Id"));
348 } 341 }
349 342
350 this.Core.ParseForExtensionElements(node); 343 this.ParseHelper.ParseForExtensionElements(this.Context.Extensions, intermediate, section, element);
351 344
352 if (!this.Core.EncounteredError) 345 if (!this.Messaging.EncounteredError)
353 { 346 {
354 this.Core.CreateSimpleReference(sourceLineNumbers, "Certificate", id); 347 this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "Certificate", id.Id);
355 348
356 Row row = this.Core.CreateRow(sourceLineNumbers, "IIsWebSiteCertificates"); 349 var row = this.ParseHelper.CreateRow(section, sourceLineNumbers, "IIsWebSiteCertificates");
357 row[0] = webId; 350 row.Set(0, webId);
358 row[1] = id; 351 row.Set(1, id.Id);
359 } 352 }
360 } 353 }
361 354
362 /// <summary> 355 /// <summary>
363 /// Parses a mime map element. 356 /// Parses a mime map element.
364 /// </summary> 357 /// </summary>
365 /// <param name="node">Element to parse.</param> 358 /// <param name="element">Element to parse.</param>
366 /// <param name="parentId">Identifier for parent symbol.</param> 359 /// <param name="parentId">Identifier for parent symbol.</param>
367 /// <param name="parentType">Type that parentId refers to.</param> 360 /// <param name="parentType">Type that parentId refers to.</param>
368 private void ParseMimeMapElement(XElement node, string parentId, MimeMapParentType parentType) 361 private void ParseMimeMapElement(Intermediate intermediate, IntermediateSection section, XElement element, string parentId, MimeMapParentType parentType)
369 { 362 {
370 SourceLineNumber sourceLineNumbers = Preprocessor.GetSourceLineNumbers(node); 363 SourceLineNumber sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(element);
371 string id = null; 364 Identifier id = null;
372 string extension = null; 365 string extension = null;
373 string type = null; 366 string type = null;
374 367
375 foreach (XAttribute attrib in node.Attributes()) 368 foreach (XAttribute attrib in element.Attributes())
376 { 369 {
377 if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace) 370 if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace)
378 { 371 {
379 switch (attrib.Name.LocalName) 372 switch (attrib.Name.LocalName)
380 { 373 {
381 case "Id": 374 case "Id":
382 id = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib); 375 id = this.ParseHelper.GetAttributeIdentifier(sourceLineNumbers, attrib);
383 break; 376 break;
384 case "Extension": 377 case "Extension":
385 extension = this.Core.GetAttributeValue(sourceLineNumbers, attrib); 378 extension = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib);
386 break; 379 break;
387 case "Type": 380 case "Type":
388 type = this.Core.GetAttributeValue(sourceLineNumbers, attrib); 381 type = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib);
389 break; 382 break;
390 default: 383 default:
391 this.Core.UnexpectedAttribute(node, attrib); 384 this.ParseHelper.UnexpectedAttribute(element, attrib);
392 break; 385 break;
393 } 386 }
394 } 387 }
395 else 388 else
396 { 389 {
397 this.Core.ParseExtensionAttribute(node, attrib); 390 this.ParseHelper.ParseExtensionAttribute(this.Context.Extensions, intermediate, section, element, attrib);
398 } 391 }
399 } 392 }
400 393
401 if (null == id) 394 if (null == id)
402 { 395 {
403 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id")); 396 this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, element.Name.LocalName, "Id"));
404 } 397 }
405 398
406 if (null == extension) 399 if (null == extension)
407 { 400 {
408 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Extension")); 401 this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, element.Name.LocalName, "Extension"));
409 } 402 }
410 else if (0 < extension.Length) 403 else if (0 < extension.Length)
411 { 404 {
412 if (!extension.StartsWith(".", StringComparison.Ordinal)) 405 if (!extension.StartsWith(".", StringComparison.Ordinal))
413 { 406 {
414 this.Core.OnMessage(IIsErrors.MimeMapExtensionMissingPeriod(sourceLineNumbers, node.Name.LocalName, "Extension", extension)); 407 this.Messaging.Write(IIsErrors.MimeMapExtensionMissingPeriod(sourceLineNumbers, element.Name.LocalName, "Extension", extension));
415 } 408 }
416 } 409 }
417 410
418 if (null == type) 411 if (null == type)
419 { 412 {
420 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Type")); 413 this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, element.Name.LocalName, "Type"));
421 } 414 }
422 415
423 this.Core.ParseForExtensionElements(node); 416 this.ParseHelper.ParseForExtensionElements(this.Context.Extensions, intermediate, section, element);
424 417
425 if (!this.Core.EncounteredError) 418 if (!this.Messaging.EncounteredError)
426 { 419 {
427 Row row = this.Core.CreateRow(sourceLineNumbers, "IIsMimeMap"); 420 var row = this.ParseHelper.CreateRow(section, sourceLineNumbers, "IIsMimeMap", id);
428 row[0] = id; 421 row.Set(1, (int)parentType);
429 row[1] = (int)parentType; 422 row.Set(2, parentId);
430 row[2] = parentId; 423 row.Set(3, type);
431 row[3] = type; 424 row.Set(4, extension);
432 row[4] = extension;
433 } 425 }
434 } 426 }
435 427
436 /// <summary> 428 /// <summary>
437 /// Parses a recycle time element. 429 /// Parses a recycle time element.
438 /// </summary> 430 /// </summary>
439 /// <param name="node">Element to parse.</param> 431 /// <param name="element">Element to parse.</param>
440 /// <returns>Recycle time value.</returns> 432 /// <returns>Recycle time value.</returns>
441 private string ParseRecycleTimeElement(XElement node) 433 private string ParseRecycleTimeElement(Intermediate intermediate, IntermediateSection section, XElement element)
442 { 434 {
443 SourceLineNumber sourceLineNumbers = Preprocessor.GetSourceLineNumbers(node); 435 SourceLineNumber sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(element);
444 string value = null; 436 string value = null;
445 437
446 foreach (XAttribute attrib in node.Attributes()) 438 foreach (XAttribute attrib in element.Attributes())
447 { 439 {
448 if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace) 440 if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace)
449 { 441 {
450 switch (attrib.Name.LocalName) 442 switch (attrib.Name.LocalName)
451 { 443 {
452 case "Value": 444 case "Value":
453 value = this.Core.GetAttributeValue(sourceLineNumbers, attrib); 445 value = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib);
454 break; 446 break;
455 default: 447 default:
456 this.Core.UnexpectedAttribute(node, attrib); 448 this.ParseHelper.UnexpectedAttribute(element, attrib);
457 break; 449 break;
458 } 450 }
459 } 451 }
460 else 452 else
461 { 453 {
462 this.Core.ParseExtensionAttribute(node, attrib); 454 this.ParseHelper.ParseExtensionAttribute(this.Context.Extensions, intermediate, section, element, attrib);
463 } 455 }
464 } 456 }
465 457
466 if (null == value) 458 if (null == value)
467 { 459 {
468 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Value")); 460 this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, element.Name.LocalName, "Value"));
469 } 461 }
470 462
471 this.Core.ParseForExtensionElements(node); 463 this.ParseHelper.ParseForExtensionElements(this.Context.Extensions, intermediate, section, element);
472 464
473 return value; 465 return value;
474 } 466 }
@@ -476,85 +468,84 @@ namespace WixToolset.Extensions
476 /// <summary> 468 /// <summary>
477 /// Parses a web address element. 469 /// Parses a web address element.
478 /// </summary> 470 /// </summary>
479 /// <param name="node">Element to parse.</param> 471 /// <param name="element">Element to parse.</param>
480 /// <param name="parentWeb">Identifier of parent web site.</param> 472 /// <param name="parentWeb">Identifier of parent web site.</param>
481 /// <returns>Identifier for web address.</returns> 473 /// <returns>Identifier for web address.</returns>
482 private string ParseWebAddressElement(XElement node, string parentWeb) 474 private string ParseWebAddressElement(Intermediate intermediate, IntermediateSection section, XElement element, string parentWeb)
483 { 475 {
484 SourceLineNumber sourceLineNumbers = Preprocessor.GetSourceLineNumbers(node); 476 SourceLineNumber sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(element);
485 string id = null; 477 Identifier id = null;
486 string header = null; 478 string header = null;
487 string ip = null; 479 string ip = null;
488 string port = null; 480 string port = null;
489 bool secure = false; 481 bool secure = false;
490 482
491 foreach (XAttribute attrib in node.Attributes()) 483 foreach (XAttribute attrib in element.Attributes())
492 { 484 {
493 if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace) 485 if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace)
494 { 486 {
495 switch (attrib.Name.LocalName) 487 switch (attrib.Name.LocalName)
496 { 488 {
497 case "Id": 489 case "Id":
498 id = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib); 490 id = this.ParseHelper.GetAttributeIdentifier(sourceLineNumbers, attrib);
499 break; 491 break;
500 case "Header": 492 case "Header":
501 header = this.Core.GetAttributeValue(sourceLineNumbers, attrib); 493 header = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib);
502 break; 494 break;
503 case "IP": 495 case "IP":
504 ip = this.Core.GetAttributeValue(sourceLineNumbers, attrib); 496 ip = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib);
505 break; 497 break;
506 case "Port": 498 case "Port":
507 port = this.Core.GetAttributeValue(sourceLineNumbers, attrib); 499 port = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib);
508 break; 500 break;
509 case "Secure": 501 case "Secure":
510 secure = YesNoType.Yes == this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib); 502 secure = YesNoType.Yes == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib);
511 break; 503 break;
512 default: 504 default:
513 this.Core.UnexpectedAttribute(node, attrib); 505 this.ParseHelper.UnexpectedAttribute(element, attrib);
514 break; 506 break;
515 } 507 }
516 } 508 }
517 else 509 else
518 { 510 {
519 this.Core.ParseExtensionAttribute(node, attrib); 511 this.ParseHelper.ParseExtensionAttribute(this.Context.Extensions, intermediate, section, element, attrib);
520 } 512 }
521 } 513 }
522 514
523 if (null == id) 515 if (null == id)
524 { 516 {
525 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id")); 517 this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, element.Name.LocalName, "Id"));
526 } 518 }
527 519
528 if (null == port) 520 if (null == port)
529 { 521 {
530 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Port")); 522 this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, element.Name.LocalName, "Port"));
531 } 523 }
532 524
533 this.Core.ParseForExtensionElements(node); 525 this.ParseHelper.ParseForExtensionElements(this.Context.Extensions, intermediate, section, element);
534 526
535 if (!this.Core.EncounteredError) 527 if (!this.Messaging.EncounteredError)
536 { 528 {
537 Row row = this.Core.CreateRow(sourceLineNumbers, "IIsWebAddress"); 529 var row = this.ParseHelper.CreateRow(section, sourceLineNumbers, "IIsWebAddress", id);
538 row[0] = id; 530 row.Set(1, parentWeb);
539 row[1] = parentWeb; 531 row.Set(2, ip);
540 row[2] = ip; 532 row.Set(3, port);
541 row[3] = port; 533 row.Set(4, header);
542 row[4] = header; 534 row.Set(5, secure ? 1 : 0);
543 row[5] = secure ? 1 : 0;
544 } 535 }
545 536
546 return id; 537 return id?.Id;
547 } 538 }
548 539
549 /// <summary> 540 /// <summary>
550 /// Parses a web application element. 541 /// Parses a web application element.
551 /// </summary> 542 /// </summary>
552 /// <param name="node">Element to parse.</param> 543 /// <param name="element">Element to parse.</param>
553 /// <returns>Identifier for web application.</returns> 544 /// <returns>Identifier for web application.</returns>
554 private string ParseWebApplicationElement(XElement node) 545 private string ParseWebApplicationElement(Intermediate intermediate, IntermediateSection section, XElement element)
555 { 546 {
556 SourceLineNumber sourceLineNumbers = Preprocessor.GetSourceLineNumbers(node); 547 SourceLineNumber sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(element);
557 string id = null; 548 Identifier id = null;
558 YesNoDefaultType allowSessions = YesNoDefaultType.Default; 549 YesNoDefaultType allowSessions = YesNoDefaultType.Default;
559 string appPool = null; 550 string appPool = null;
560 YesNoDefaultType buffer = YesNoDefaultType.Default; 551 YesNoDefaultType buffer = YesNoDefaultType.Default;
@@ -567,26 +558,26 @@ namespace WixToolset.Extensions
567 int sessionTimeout = CompilerConstants.IntegerNotSet; 558 int sessionTimeout = CompilerConstants.IntegerNotSet;
568 YesNoDefaultType serverDebugging = YesNoDefaultType.Default; 559 YesNoDefaultType serverDebugging = YesNoDefaultType.Default;
569 560
570 foreach (XAttribute attrib in node.Attributes()) 561 foreach (XAttribute attrib in element.Attributes())
571 { 562 {
572 if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace) 563 if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace)
573 { 564 {
574 switch (attrib.Name.LocalName) 565 switch (attrib.Name.LocalName)
575 { 566 {
576 case "Id": 567 case "Id":
577 id = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib); 568 id = this.ParseHelper.GetAttributeIdentifier(sourceLineNumbers, attrib);
578 break; 569 break;
579 case "AllowSessions": 570 case "AllowSessions":
580 allowSessions = this.Core.GetAttributeYesNoDefaultValue(sourceLineNumbers, attrib); 571 allowSessions = this.ParseHelper.GetAttributeYesNoDefaultValue(sourceLineNumbers, attrib);
581 break; 572 break;
582 case "Buffer": 573 case "Buffer":
583 buffer = this.Core.GetAttributeYesNoDefaultValue(sourceLineNumbers, attrib); 574 buffer = this.ParseHelper.GetAttributeYesNoDefaultValue(sourceLineNumbers, attrib);
584 break; 575 break;
585 case "ClientDebugging": 576 case "ClientDebugging":
586 clientDebugging = this.Core.GetAttributeYesNoDefaultValue(sourceLineNumbers, attrib); 577 clientDebugging = this.ParseHelper.GetAttributeYesNoDefaultValue(sourceLineNumbers, attrib);
587 break; 578 break;
588 case "DefaultScript": 579 case "DefaultScript":
589 defaultScript = this.Core.GetAttributeValue(sourceLineNumbers, attrib); 580 defaultScript = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib);
590 if (0 < defaultScript.Length) 581 if (0 < defaultScript.Length)
591 { 582 {
592 switch (defaultScript) 583 switch (defaultScript)
@@ -596,13 +587,13 @@ namespace WixToolset.Extensions
596 // these are valid values 587 // these are valid values
597 break; 588 break;
598 default: 589 default:
599 this.Core.OnMessage(WixErrors.IllegalAttributeValue(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, defaultScript, "JScript", "VBScript")); 590 this.Messaging.Write(ErrorMessages.IllegalAttributeValue(sourceLineNumbers, element.Name.LocalName, attrib.Name.LocalName, defaultScript, "JScript", "VBScript"));
600 break; 591 break;
601 } 592 }
602 } 593 }
603 break; 594 break;
604 case "Isolation": 595 case "Isolation":
605 string isolationValue = this.Core.GetAttributeValue(sourceLineNumbers, attrib); 596 string isolationValue = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib);
606 if (0 < isolationValue.Length) 597 if (0 < isolationValue.Length)
607 { 598 {
608 switch (isolationValue) 599 switch (isolationValue)
@@ -617,143 +608,142 @@ namespace WixToolset.Extensions
617 isolation = 1; 608 isolation = 1;
618 break; 609 break;
619 default: 610 default:
620 this.Core.OnMessage(WixErrors.IllegalAttributeValue(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, isolationValue, "low", "medium", "high")); 611 this.Messaging.Write(ErrorMessages.IllegalAttributeValue(sourceLineNumbers, element.Name.LocalName, attrib.Name.LocalName, isolationValue, "low", "medium", "high"));
621 break; 612 break;
622 } 613 }
623 } 614 }
624 break; 615 break;
625 case "Name": 616 case "Name":
626 name = this.Core.GetAttributeValue(sourceLineNumbers, attrib); 617 name = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib);
627 break; 618 break;
628 case "ParentPaths": 619 case "ParentPaths":
629 parentPaths = this.Core.GetAttributeYesNoDefaultValue(sourceLineNumbers, attrib); 620 parentPaths = this.ParseHelper.GetAttributeYesNoDefaultValue(sourceLineNumbers, attrib);
630 break; 621 break;
631 case "ScriptTimeout": 622 case "ScriptTimeout":
632 scriptTimeout = this.Core.GetAttributeIntegerValue(sourceLineNumbers, attrib, 0, short.MaxValue); 623 scriptTimeout = this.ParseHelper.GetAttributeIntegerValue(sourceLineNumbers, attrib, 0, short.MaxValue);
633 break; 624 break;
634 case "ServerDebugging": 625 case "ServerDebugging":
635 serverDebugging = this.Core.GetAttributeYesNoDefaultValue(sourceLineNumbers, attrib); 626 serverDebugging = this.ParseHelper.GetAttributeYesNoDefaultValue(sourceLineNumbers, attrib);
636 break; 627 break;
637 case "SessionTimeout": 628 case "SessionTimeout":
638 sessionTimeout = this.Core.GetAttributeIntegerValue(sourceLineNumbers, attrib, 0, short.MaxValue); 629 sessionTimeout = this.ParseHelper.GetAttributeIntegerValue(sourceLineNumbers, attrib, 0, short.MaxValue);
639 break; 630 break;
640 case "WebAppPool": 631 case "WebAppPool":
641 appPool = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib); 632 appPool = this.ParseHelper.GetAttributeIdentifierValue(sourceLineNumbers, attrib);
642 this.Core.CreateSimpleReference(sourceLineNumbers, "IIsAppPool", appPool); 633 this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "IIsAppPool", appPool);
643 break; 634 break;
644 default: 635 default:
645 this.Core.UnexpectedAttribute(node, attrib); 636 this.ParseHelper.UnexpectedAttribute(element, attrib);
646 break; 637 break;
647 } 638 }
648 } 639 }
649 else 640 else
650 { 641 {
651 this.Core.ParseExtensionAttribute(node, attrib); 642 this.ParseHelper.ParseExtensionAttribute(this.Context.Extensions, intermediate, section, element, attrib);
652 } 643 }
653 } 644 }
654 645
655 if (null == id) 646 if (null == id)
656 { 647 {
657 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id")); 648 this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, element.Name.LocalName, "Id"));
658 } 649 }
659 650
660 if (null == name) 651 if (null == name)
661 { 652 {
662 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Name")); 653 this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, element.Name.LocalName, "Name"));
663 } 654 }
664 else if (-1 != name.IndexOf("\\", StringComparison.Ordinal)) 655 else if (-1 != name.IndexOf("\\", StringComparison.Ordinal))
665 { 656 {
666 this.Core.OnMessage(IIsErrors.IllegalCharacterInAttributeValue(sourceLineNumbers, node.Name.LocalName, "Name", name, '\\')); 657 this.Messaging.Write(IIsErrors.IllegalCharacterInAttributeValue(sourceLineNumbers, element.Name.LocalName, "Name", name, '\\'));
667 } 658 }
668 659
669 foreach (XElement child in node.Elements()) 660 foreach (XElement child in element.Elements())
670 { 661 {
671 if (this.Namespace == child.Name.Namespace) 662 if (this.Namespace == child.Name.Namespace)
672 { 663 {
673 SourceLineNumber childSourceLineNumbers = Preprocessor.GetSourceLineNumbers(child); 664 SourceLineNumber childSourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(child);
674 switch (child.Name.LocalName) 665 switch (child.Name.LocalName)
675 { 666 {
676 case "WebApplicationExtension": 667 case "WebApplicationExtension":
677 this.ParseWebApplicationExtensionElement(child, id); 668 this.ParseWebApplicationExtensionElement(intermediate, section, child, id?.Id);
678 break; 669 break;
679 default: 670 default:
680 this.Core.UnexpectedElement(node, child); 671 this.ParseHelper.UnexpectedElement(element, child);
681 break; 672 break;
682 } 673 }
683 } 674 }
684 else 675 else
685 { 676 {
686 this.Core.ParseExtensionElement(node, child); 677 this.ParseHelper.ParseExtensionElement(this.Context.Extensions, intermediate, section, element, child);
687 } 678 }
688 } 679 }
689 680
690 if (!this.Core.EncounteredError) 681 if (!this.Messaging.EncounteredError)
691 { 682 {
692 Row row = this.Core.CreateRow(sourceLineNumbers, "IIsWebApplication"); 683 var row = this.ParseHelper.CreateRow(section, sourceLineNumbers, "IIsWebApplication", id);
693 row[0] = id; 684 row.Set(1, name);
694 row[1] = name; 685 row.Set(2, isolation);
695 row[2] = isolation;
696 if (YesNoDefaultType.Default != allowSessions) 686 if (YesNoDefaultType.Default != allowSessions)
697 { 687 {
698 row[3] = YesNoDefaultType.Yes == allowSessions ? 1 : 0; 688 row.Set(3, YesNoDefaultType.Yes == allowSessions ? 1 : 0);
699 } 689 }
700 690
701 if (CompilerConstants.IntegerNotSet != sessionTimeout) 691 if (CompilerConstants.IntegerNotSet != sessionTimeout)
702 { 692 {
703 row[4] = sessionTimeout; 693 row.Set(4, sessionTimeout);
704 } 694 }
705 695
706 if (YesNoDefaultType.Default != buffer) 696 if (YesNoDefaultType.Default != buffer)
707 { 697 {
708 row[5] = YesNoDefaultType.Yes == buffer ? 1 : 0; 698 row.Set(5, YesNoDefaultType.Yes == buffer ? 1 : 0);
709 } 699 }
710 700
711 if (YesNoDefaultType.Default != parentPaths) 701 if (YesNoDefaultType.Default != parentPaths)
712 { 702 {
713 row[6] = YesNoDefaultType.Yes == parentPaths ? 1 : 0; 703 row.Set(6, YesNoDefaultType.Yes == parentPaths ? 1 : 0);
714 } 704 }
715 row[7] = defaultScript; 705 row.Set(7, defaultScript);
716 if (CompilerConstants.IntegerNotSet != scriptTimeout) 706 if (CompilerConstants.IntegerNotSet != scriptTimeout)
717 { 707 {
718 row[8] = scriptTimeout; 708 row.Set(8, scriptTimeout);
719 } 709 }
720 710
721 if (YesNoDefaultType.Default != serverDebugging) 711 if (YesNoDefaultType.Default != serverDebugging)
722 { 712 {
723 row[9] = YesNoDefaultType.Yes == serverDebugging ? 1 : 0; 713 row.Set(9, YesNoDefaultType.Yes == serverDebugging ? 1 : 0);
724 } 714 }
725 715
726 if (YesNoDefaultType.Default != clientDebugging) 716 if (YesNoDefaultType.Default != clientDebugging)
727 { 717 {
728 row[10] = YesNoDefaultType.Yes == clientDebugging ? 1 : 0; 718 row.Set(10, YesNoDefaultType.Yes == clientDebugging ? 1 : 0);
729 } 719 }
730 row[11] = appPool; 720 row.Set(11, appPool);
731 } 721 }
732 722
733 return id; 723 return id?.Id;
734 } 724 }
735 725
736 /// <summary> 726 /// <summary>
737 /// Parses a web application extension element. 727 /// Parses a web application extension element.
738 /// </summary> 728 /// </summary>
739 /// <param name="node">Element to parse.</param> 729 /// <param name="element">Element to parse.</param>
740 /// <param name="application">Identifier for parent web application.</param> 730 /// <param name="application">Identifier for parent web application.</param>
741 private void ParseWebApplicationExtensionElement(XElement node, string application) 731 private void ParseWebApplicationExtensionElement(Intermediate intermediate, IntermediateSection section, XElement element, string application)
742 { 732 {
743 SourceLineNumber sourceLineNumbers = Preprocessor.GetSourceLineNumbers(node); 733 SourceLineNumber sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(element);
744 int attributes = 0; 734 int attributes = 0;
745 string executable = null; 735 string executable = null;
746 string extension = null; 736 string extension = null;
747 string verbs = null; 737 string verbs = null;
748 738
749 foreach (XAttribute attrib in node.Attributes()) 739 foreach (XAttribute attrib in element.Attributes())
750 { 740 {
751 if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace) 741 if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace)
752 { 742 {
753 switch (attrib.Name.LocalName) 743 switch (attrib.Name.LocalName)
754 { 744 {
755 case "CheckPath": 745 case "CheckPath":
756 if (YesNoType.Yes == this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib)) 746 if (YesNoType.Yes == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib))
757 { 747 {
758 attributes |= 4; 748 attributes |= 4;
759 } 749 }
@@ -763,13 +753,13 @@ namespace WixToolset.Extensions
763 } 753 }
764 break; 754 break;
765 case "Executable": 755 case "Executable":
766 executable = this.Core.GetAttributeValue(sourceLineNumbers, attrib); 756 executable = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib);
767 break; 757 break;
768 case "Extension": 758 case "Extension":
769 extension = this.Core.GetAttributeValue(sourceLineNumbers, attrib); 759 extension = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib);
770 break; 760 break;
771 case "Script": 761 case "Script":
772 if (YesNoType.Yes == this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib)) 762 if (YesNoType.Yes == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib))
773 { 763 {
774 attributes |= 1; 764 attributes |= 1;
775 } 765 }
@@ -779,31 +769,31 @@ namespace WixToolset.Extensions
779 } 769 }
780 break; 770 break;
781 case "Verbs": 771 case "Verbs":
782 verbs = this.Core.GetAttributeValue(sourceLineNumbers, attrib); 772 verbs = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib);
783 break; 773 break;
784 default: 774 default:
785 this.Core.UnexpectedAttribute(node, attrib); 775 this.ParseHelper.UnexpectedAttribute(element, attrib);
786 break; 776 break;
787 } 777 }
788 } 778 }
789 else 779 else
790 { 780 {
791 this.Core.ParseExtensionAttribute(node, attrib); 781 this.ParseHelper.ParseExtensionAttribute(this.Context.Extensions, intermediate, section, element, attrib);
792 } 782 }
793 } 783 }
794 784
795 this.Core.ParseForExtensionElements(node); 785 this.ParseHelper.ParseForExtensionElements(this.Context.Extensions, intermediate, section, element);
796 786
797 if (!this.Core.EncounteredError) 787 if (!this.Messaging.EncounteredError)
798 { 788 {
799 Row row = this.Core.CreateRow(sourceLineNumbers, "IIsWebApplicationExtension"); 789 var row = this.ParseHelper.CreateRow(section, sourceLineNumbers, "IIsWebApplicationExtension");
800 row[0] = application; 790 row.Set(0, application);
801 row[1] = extension; 791 row.Set(1, extension);
802 row[2] = verbs; 792 row.Set(2, verbs);
803 row[3] = executable; 793 row.Set(3, executable);
804 if (0 < attributes) 794 if (0 < attributes)
805 { 795 {
806 row[4] = attributes; 796 row.Set(4, attributes);
807 } 797 }
808 } 798 }
809 } 799 }
@@ -811,12 +801,12 @@ namespace WixToolset.Extensions
811 /// <summary> 801 /// <summary>
812 /// Parses web application pool element. 802 /// Parses web application pool element.
813 /// </summary> 803 /// </summary>
814 /// <param name="node">Element to parse.</param> 804 /// <param name="element">Element to parse.</param>
815 /// <param name="componentId">Optional identifier of parent component.</param> 805 /// <param name="componentId">Optional identifier of parent component.</param>
816 private void ParseWebAppPoolElement(XElement node, string componentId) 806 private void ParseWebAppPoolElement(Intermediate intermediate, IntermediateSection section, XElement element, string componentId)
817 { 807 {
818 SourceLineNumber sourceLineNumbers = Preprocessor.GetSourceLineNumbers(node); 808 SourceLineNumber sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(element);
819 string id = null; 809 Identifier id = null;
820 int attributes = 0; 810 int attributes = 0;
821 int cpuAction = CompilerConstants.IntegerNotSet; 811 int cpuAction = CompilerConstants.IntegerNotSet;
822 string cpuMon = null; 812 string cpuMon = null;
@@ -835,22 +825,22 @@ namespace WixToolset.Extensions
835 string user = null; 825 string user = null;
836 int virtualMemory = CompilerConstants.IntegerNotSet; 826 int virtualMemory = CompilerConstants.IntegerNotSet;
837 827
838 foreach (XAttribute attrib in node.Attributes()) 828 foreach (XAttribute attrib in element.Attributes())
839 { 829 {
840 if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace) 830 if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace)
841 { 831 {
842 switch (attrib.Name.LocalName) 832 switch (attrib.Name.LocalName)
843 { 833 {
844 case "Id": 834 case "Id":
845 id = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib); 835 id = this.ParseHelper.GetAttributeIdentifier(sourceLineNumbers, attrib);
846 break; 836 break;
847 case "CpuAction": 837 case "CpuAction":
848 if (null == componentId) 838 if (null == componentId)
849 { 839 {
850 this.Core.OnMessage(IIsErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName)); 840 this.Messaging.Write(IIsErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, element.Name.LocalName, attrib.Name.LocalName));
851 } 841 }
852 842
853 string cpuActionValue = this.Core.GetAttributeValue(sourceLineNumbers, attrib); 843 string cpuActionValue = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib);
854 if (0 < cpuActionValue.Length) 844 if (0 < cpuActionValue.Length)
855 { 845 {
856 switch (cpuActionValue) 846 switch (cpuActionValue)
@@ -862,7 +852,7 @@ namespace WixToolset.Extensions
862 cpuAction = 0; 852 cpuAction = 0;
863 break; 853 break;
864 default: 854 default:
865 this.Core.OnMessage(WixErrors.IllegalAttributeValue(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, cpuActionValue, "shutdown", "none")); 855 this.Messaging.Write(ErrorMessages.IllegalAttributeValue(sourceLineNumbers, element.Name.LocalName, attrib.Name.LocalName, cpuActionValue, "shutdown", "none"));
866 break; 856 break;
867 } 857 }
868 } 858 }
@@ -870,10 +860,10 @@ namespace WixToolset.Extensions
870 case "Identity": 860 case "Identity":
871 if (null == componentId) 861 if (null == componentId)
872 { 862 {
873 this.Core.OnMessage(IIsErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName)); 863 this.Messaging.Write(IIsErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, element.Name.LocalName, attrib.Name.LocalName));
874 } 864 }
875 865
876 string identityValue = this.Core.GetAttributeValue(sourceLineNumbers, attrib); 866 string identityValue = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib);
877 if (0 < identityValue.Length) 867 if (0 < identityValue.Length)
878 { 868 {
879 switch (identityValue) 869 switch (identityValue)
@@ -894,7 +884,7 @@ namespace WixToolset.Extensions
894 attributes |= 0x10; 884 attributes |= 0x10;
895 break; 885 break;
896 default: 886 default:
897 this.Core.OnMessage(WixErrors.IllegalAttributeValue(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, identityValue, "networkService", "localService", "localSystem", "other", "applicationPoolIdentity")); 887 this.Messaging.Write(ErrorMessages.IllegalAttributeValue(sourceLineNumbers, element.Name.LocalName, attrib.Name.LocalName, identityValue, "networkService", "localService", "localSystem", "other", "applicationPoolIdentity"));
898 break; 888 break;
899 } 889 }
900 } 890 }
@@ -902,18 +892,18 @@ namespace WixToolset.Extensions
902 case "IdleTimeout": 892 case "IdleTimeout":
903 if (null == componentId) 893 if (null == componentId)
904 { 894 {
905 this.Core.OnMessage(IIsErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName)); 895 this.Messaging.Write(IIsErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, element.Name.LocalName, attrib.Name.LocalName));
906 } 896 }
907 897
908 idleTimeout = this.Core.GetAttributeIntegerValue(sourceLineNumbers, attrib, 0, short.MaxValue); 898 idleTimeout = this.ParseHelper.GetAttributeIntegerValue(sourceLineNumbers, attrib, 0, short.MaxValue);
909 break; 899 break;
910 case "ManagedPipelineMode": 900 case "ManagedPipelineMode":
911 if (null == componentId) 901 if (null == componentId)
912 { 902 {
913 this.Core.OnMessage(IIsErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName)); 903 this.Messaging.Write(IIsErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, element.Name.LocalName, attrib.Name.LocalName));
914 } 904 }
915 905
916 managedPipelineMode = this.Core.GetAttributeValue(sourceLineNumbers, attrib); 906 managedPipelineMode = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib);
917 907
918 908
919 if (!String.IsNullOrEmpty(managedPipelineMode)) 909 if (!String.IsNullOrEmpty(managedPipelineMode))
@@ -933,9 +923,9 @@ namespace WixToolset.Extensions
933 case "Integrated": 923 case "Integrated":
934 break; 924 break;
935 default: 925 default:
936 if (!this.Core.ContainsProperty(managedPipelineMode)) 926 if (!this.ParseHelper.ContainsProperty(managedPipelineMode))
937 { 927 {
938 this.Core.OnMessage(WixErrors.IllegalAttributeValue(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, managedPipelineMode, "Classic", "Integrated")); 928 this.Messaging.Write(ErrorMessages.IllegalAttributeValue(sourceLineNumbers, element.Name.LocalName, attrib.Name.LocalName, managedPipelineMode, "Classic", "Integrated"));
939 } 929 }
940 break; 930 break;
941 } 931 }
@@ -945,116 +935,116 @@ namespace WixToolset.Extensions
945 case "ManagedRuntimeVersion": 935 case "ManagedRuntimeVersion":
946 if (null == componentId) 936 if (null == componentId)
947 { 937 {
948 this.Core.OnMessage(IIsErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName)); 938 this.Messaging.Write(IIsErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, element.Name.LocalName, attrib.Name.LocalName));
949 } 939 }
950 940
951 managedRuntimeVersion = this.Core.GetAttributeValue(sourceLineNumbers, attrib); 941 managedRuntimeVersion = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib);
952 break; 942 break;
953 case "MaxCpuUsage": 943 case "MaxCpuUsage":
954 if (null == componentId) 944 if (null == componentId)
955 { 945 {
956 this.Core.OnMessage(IIsErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName)); 946 this.Messaging.Write(IIsErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, element.Name.LocalName, attrib.Name.LocalName));
957 } 947 }
958 948
959 maxCpuUsage = this.Core.GetAttributeIntegerValue(sourceLineNumbers, attrib, 0, 100); 949 maxCpuUsage = this.ParseHelper.GetAttributeIntegerValue(sourceLineNumbers, attrib, 0, 100);
960 break; 950 break;
961 case "MaxWorkerProcesses": 951 case "MaxWorkerProcesses":
962 if (null == componentId) 952 if (null == componentId)
963 { 953 {
964 this.Core.OnMessage(IIsErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName)); 954 this.Messaging.Write(IIsErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, element.Name.LocalName, attrib.Name.LocalName));
965 } 955 }
966 956
967 maxWorkerProcs = this.Core.GetAttributeIntegerValue(sourceLineNumbers, attrib, 0, short.MaxValue); 957 maxWorkerProcs = this.ParseHelper.GetAttributeIntegerValue(sourceLineNumbers, attrib, 0, short.MaxValue);
968 break; 958 break;
969 case "Name": 959 case "Name":
970 name = this.Core.GetAttributeValue(sourceLineNumbers, attrib); 960 name = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib);
971 break; 961 break;
972 case "PrivateMemory": 962 case "PrivateMemory":
973 if (null == componentId) 963 if (null == componentId)
974 { 964 {
975 this.Core.OnMessage(IIsErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName)); 965 this.Messaging.Write(IIsErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, element.Name.LocalName, attrib.Name.LocalName));
976 } 966 }
977 967
978 privateMemory = this.Core.GetAttributeIntegerValue(sourceLineNumbers, attrib, 0, 4294967); 968 privateMemory = this.ParseHelper.GetAttributeIntegerValue(sourceLineNumbers, attrib, 0, 4294967);
979 break; 969 break;
980 case "QueueLimit": 970 case "QueueLimit":
981 if (null == componentId) 971 if (null == componentId)
982 { 972 {
983 this.Core.OnMessage(IIsErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName)); 973 this.Messaging.Write(IIsErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, element.Name.LocalName, attrib.Name.LocalName));
984 } 974 }
985 975
986 queueLimit = this.Core.GetAttributeIntegerValue(sourceLineNumbers, attrib, 0, short.MaxValue); 976 queueLimit = this.ParseHelper.GetAttributeIntegerValue(sourceLineNumbers, attrib, 0, short.MaxValue);
987 break; 977 break;
988 case "RecycleMinutes": 978 case "RecycleMinutes":
989 if (null == componentId) 979 if (null == componentId)
990 { 980 {
991 this.Core.OnMessage(IIsErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName)); 981 this.Messaging.Write(IIsErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, element.Name.LocalName, attrib.Name.LocalName));
992 } 982 }
993 983
994 recycleMinutes = this.Core.GetAttributeIntegerValue(sourceLineNumbers, attrib, 0, short.MaxValue); 984 recycleMinutes = this.ParseHelper.GetAttributeIntegerValue(sourceLineNumbers, attrib, 0, short.MaxValue);
995 break; 985 break;
996 case "RecycleRequests": 986 case "RecycleRequests":
997 if (null == componentId) 987 if (null == componentId)
998 { 988 {
999 this.Core.OnMessage(IIsErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName)); 989 this.Messaging.Write(IIsErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, element.Name.LocalName, attrib.Name.LocalName));
1000 } 990 }
1001 991
1002 recycleRequests = this.Core.GetAttributeIntegerValue(sourceLineNumbers, attrib, 0, short.MaxValue); 992 recycleRequests = this.ParseHelper.GetAttributeIntegerValue(sourceLineNumbers, attrib, 0, short.MaxValue);
1003 break; 993 break;
1004 case "RefreshCpu": 994 case "RefreshCpu":
1005 if (null == componentId) 995 if (null == componentId)
1006 { 996 {
1007 this.Core.OnMessage(IIsErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName)); 997 this.Messaging.Write(IIsErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, element.Name.LocalName, attrib.Name.LocalName));
1008 } 998 }
1009 999
1010 refreshCpu = this.Core.GetAttributeIntegerValue(sourceLineNumbers, attrib, 0, int.MaxValue); 1000 refreshCpu = this.ParseHelper.GetAttributeIntegerValue(sourceLineNumbers, attrib, 0, int.MaxValue);
1011 break; 1001 break;
1012 case "User": 1002 case "User":
1013 if (null == componentId) 1003 if (null == componentId)
1014 { 1004 {
1015 this.Core.OnMessage(IIsErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName)); 1005 this.Messaging.Write(IIsErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, element.Name.LocalName, attrib.Name.LocalName));
1016 } 1006 }
1017 1007
1018 user = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib); 1008 user = this.ParseHelper.GetAttributeIdentifierValue(sourceLineNumbers, attrib);
1019 this.Core.CreateSimpleReference(sourceLineNumbers, "User", user); 1009 this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "User", user);
1020 break; 1010 break;
1021 case "VirtualMemory": 1011 case "VirtualMemory":
1022 if (null == componentId) 1012 if (null == componentId)
1023 { 1013 {
1024 this.Core.OnMessage(IIsErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName)); 1014 this.Messaging.Write(IIsErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, element.Name.LocalName, attrib.Name.LocalName));
1025 } 1015 }
1026 1016
1027 virtualMemory = this.Core.GetAttributeIntegerValue(sourceLineNumbers, attrib, 0, 4294967); 1017 virtualMemory = this.ParseHelper.GetAttributeIntegerValue(sourceLineNumbers, attrib, 0, 4294967);
1028 break; 1018 break;
1029 default: 1019 default:
1030 this.Core.UnexpectedAttribute(node, attrib); 1020 this.ParseHelper.UnexpectedAttribute(element, attrib);
1031 break; 1021 break;
1032 } 1022 }
1033 } 1023 }
1034 else 1024 else
1035 { 1025 {
1036 this.Core.ParseExtensionAttribute(node, attrib); 1026 this.ParseHelper.ParseExtensionAttribute(this.Context.Extensions, intermediate, section, element, attrib);
1037 } 1027 }
1038 } 1028 }
1039 1029
1040 if (null == id) 1030 if (null == id)
1041 { 1031 {
1042 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id")); 1032 this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, element.Name.LocalName, "Id"));
1043 } 1033 }
1044 1034
1045 if (null == name) 1035 if (null == name)
1046 { 1036 {
1047 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Name")); 1037 this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, element.Name.LocalName, "Name"));
1048 } 1038 }
1049 1039
1050 if (null == user && 8 == (attributes & 0x1F)) 1040 if (null == user && 8 == (attributes & 0x1F))
1051 { 1041 {
1052 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "User", "Identity", "other")); 1042 this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, element.Name.LocalName, "User", "Identity", "other"));
1053 } 1043 }
1054 1044
1055 if (null != user && 8 != (attributes & 0x1F)) 1045 if (null != user && 8 != (attributes & 0x1F))
1056 { 1046 {
1057 this.Core.OnMessage(WixErrors.IllegalAttributeValueWithoutOtherAttribute(sourceLineNumbers, node.Name.LocalName, "User", user, "Identity", "other")); 1047 this.Messaging.Write(ErrorMessages.IllegalAttributeValueWithoutOtherAttribute(sourceLineNumbers, element.Name.LocalName, "User", user, "Identity", "other"));
1058 } 1048 }
1059 1049
1060 cpuMon = maxCpuUsage.ToString(CultureInfo.InvariantCulture.NumberFormat); 1050 cpuMon = maxCpuUsage.ToString(CultureInfo.InvariantCulture.NumberFormat);
@@ -1067,7 +1057,7 @@ namespace WixToolset.Extensions
1067 } 1057 }
1068 } 1058 }
1069 1059
1070 foreach (XElement child in node.Elements()) 1060 foreach (XElement child in element.Elements())
1071 { 1061 {
1072 if (this.Namespace == child.Name.Namespace) 1062 if (this.Namespace == child.Name.Namespace)
1073 { 1063 {
@@ -1076,228 +1066,226 @@ namespace WixToolset.Extensions
1076 case "RecycleTime": 1066 case "RecycleTime":
1077 if (null == componentId) 1067 if (null == componentId)
1078 { 1068 {
1079 SourceLineNumber childSourceLineNumbers = Preprocessor.GetSourceLineNumbers(child); 1069 SourceLineNumber childSourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(child);
1080 this.Core.OnMessage(IIsErrors.IllegalElementWithoutComponent(childSourceLineNumbers, node.Name.LocalName)); 1070 this.Messaging.Write(IIsErrors.IllegalElementWithoutComponent(childSourceLineNumbers, element.Name.LocalName));
1081 } 1071 }
1082 1072
1083 if (null == recycleTimes) 1073 if (null == recycleTimes)
1084 { 1074 {
1085 recycleTimes = this.ParseRecycleTimeElement(child); 1075 recycleTimes = this.ParseRecycleTimeElement(intermediate, section, child);
1086 } 1076 }
1087 else 1077 else
1088 { 1078 {
1089 recycleTimes = String.Concat(recycleTimes, ",", this.ParseRecycleTimeElement(child)); 1079 recycleTimes = String.Concat(recycleTimes, ",", this.ParseRecycleTimeElement(intermediate, section, child));
1090 } 1080 }
1091 break; 1081 break;
1092 default: 1082 default:
1093 this.Core.UnexpectedElement(node, child); 1083 this.ParseHelper.UnexpectedElement(element, child);
1094 break; 1084 break;
1095 } 1085 }
1096 } 1086 }
1097 else 1087 else
1098 { 1088 {
1099 this.Core.ParseExtensionElement(node, child); 1089 this.ParseHelper.ParseExtensionElement(this.Context.Extensions, intermediate, section, element, child);
1100 } 1090 }
1101 } 1091 }
1102 1092
1103 if (null != componentId) 1093 if (null != componentId)
1104 { 1094 {
1105 // Reference ConfigureIIs since nothing will happen without it 1095 // Reference ConfigureIIs since nothing will happen without it
1106 this.Core.CreateSimpleReference(sourceLineNumbers, "CustomAction", "ConfigureIIs"); 1096 this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "CustomAction", "ConfigureIIs");
1107 } 1097 }
1108 1098
1109 if (!this.Core.EncounteredError) 1099 if (!this.Messaging.EncounteredError)
1110 { 1100 {
1111 Row row = this.Core.CreateRow(sourceLineNumbers, "IIsAppPool"); 1101 var row = this.ParseHelper.CreateRow(section, sourceLineNumbers, "IIsAppPool", id);
1112 row[0] = id; 1102 row.Set(1, name);
1113 row[1] = name; 1103 row.Set(2, componentId);
1114 row[2] = componentId; 1104 row.Set(3, attributes);
1115 row[3] = attributes; 1105 row.Set(4, user);
1116 row[4] = user;
1117 if (CompilerConstants.IntegerNotSet != recycleMinutes) 1106 if (CompilerConstants.IntegerNotSet != recycleMinutes)
1118 { 1107 {
1119 row[5] = recycleMinutes; 1108 row.Set(5, recycleMinutes);
1120 } 1109 }
1121 1110
1122 if (CompilerConstants.IntegerNotSet != recycleRequests) 1111 if (CompilerConstants.IntegerNotSet != recycleRequests)
1123 { 1112 {
1124 row[6] = recycleRequests; 1113 row.Set(6, recycleRequests);
1125 } 1114 }
1126 row[7] = recycleTimes; 1115 row.Set(7, recycleTimes);
1127 if (CompilerConstants.IntegerNotSet != idleTimeout) 1116 if (CompilerConstants.IntegerNotSet != idleTimeout)
1128 { 1117 {
1129 row[8] = idleTimeout; 1118 row.Set(8, idleTimeout);
1130 } 1119 }
1131 1120
1132 if (CompilerConstants.IntegerNotSet != queueLimit) 1121 if (CompilerConstants.IntegerNotSet != queueLimit)
1133 { 1122 {
1134 row[9] = queueLimit; 1123 row.Set(9, queueLimit);
1135 } 1124 }
1136 row[10] = cpuMon; 1125 row.Set(10, cpuMon);
1137 if (CompilerConstants.IntegerNotSet != maxWorkerProcs) 1126 if (CompilerConstants.IntegerNotSet != maxWorkerProcs)
1138 { 1127 {
1139 row[11] = maxWorkerProcs; 1128 row.Set(11, maxWorkerProcs);
1140 } 1129 }
1141 1130
1142 if (CompilerConstants.IntegerNotSet != virtualMemory) 1131 if (CompilerConstants.IntegerNotSet != virtualMemory)
1143 { 1132 {
1144 row[12] = virtualMemory; 1133 row.Set(12, virtualMemory);
1145 } 1134 }
1146 1135
1147 if (CompilerConstants.IntegerNotSet != privateMemory) 1136 if (CompilerConstants.IntegerNotSet != privateMemory)
1148 { 1137 {
1149 row[13] = privateMemory; 1138 row.Set(13, privateMemory);
1150 } 1139 }
1151 row[14] = managedRuntimeVersion; 1140 row.Set(14, managedRuntimeVersion);
1152 row[15] = managedPipelineMode; 1141 row.Set(15, managedPipelineMode);
1153 } 1142 }
1154 } 1143 }
1155 1144
1156 /// <summary> 1145 /// <summary>
1157 /// Parses a web directory element. 1146 /// Parses a web directory element.
1158 /// </summary> 1147 /// </summary>
1159 /// <param name="node">Element to parse.</param> 1148 /// <param name="element">Element to parse.</param>
1160 /// <param name="componentId">Identifier for parent component.</param> 1149 /// <param name="componentId">Identifier for parent component.</param>
1161 /// <param name="parentWeb">Optional identifier for parent web site.</param> 1150 /// <param name="parentWeb">Optional identifier for parent web site.</param>
1162 private void ParseWebDirElement(XElement node, string componentId, string parentWeb) 1151 private void ParseWebDirElement(Intermediate intermediate, IntermediateSection section, XElement element, string componentId, string parentWeb)
1163 { 1152 {
1164 SourceLineNumber sourceLineNumbers = Preprocessor.GetSourceLineNumbers(node); 1153 SourceLineNumber sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(element);
1165 string id = null; 1154 Identifier id = null;
1166 string dirProperties = null; 1155 string dirProperties = null;
1167 string path = null; 1156 string path = null;
1168 string application = null; 1157 string application = null;
1169 1158
1170 foreach (XAttribute attrib in node.Attributes()) 1159 foreach (XAttribute attrib in element.Attributes())
1171 { 1160 {
1172 if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace) 1161 if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace)
1173 { 1162 {
1174 switch (attrib.Name.LocalName) 1163 switch (attrib.Name.LocalName)
1175 { 1164 {
1176 case "Id": 1165 case "Id":
1177 id = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib); 1166 id = this.ParseHelper.GetAttributeIdentifier(sourceLineNumbers, attrib);
1178 break; 1167 break;
1179 case "DirProperties": 1168 case "DirProperties":
1180 dirProperties = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib); 1169 dirProperties = this.ParseHelper.GetAttributeIdentifierValue(sourceLineNumbers, attrib);
1181 break; 1170 break;
1182 case "Path": 1171 case "Path":
1183 path = this.Core.GetAttributeValue(sourceLineNumbers, attrib); 1172 path = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib);
1184 break; 1173 break;
1185 case "WebApplication": 1174 case "WebApplication":
1186 application = this.Core.GetAttributeValue(sourceLineNumbers, attrib); 1175 application = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib);
1187 break; 1176 break;
1188 case "WebSite": 1177 case "WebSite":
1189 if (null != parentWeb) 1178 if (null != parentWeb)
1190 { 1179 {
1191 this.Core.OnMessage(IIsErrors.WebSiteAttributeUnderWebSite(sourceLineNumbers, node.Name.LocalName)); 1180 this.Messaging.Write(IIsErrors.WebSiteAttributeUnderWebSite(sourceLineNumbers, element.Name.LocalName));
1192 } 1181 }
1193 1182
1194 parentWeb = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib); 1183 parentWeb = this.ParseHelper.GetAttributeIdentifierValue(sourceLineNumbers, attrib);
1195 this.Core.CreateSimpleReference(sourceLineNumbers, "IIsWebSite", parentWeb); 1184 this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "IIsWebSite", parentWeb);
1196 break; 1185 break;
1197 default: 1186 default:
1198 this.Core.UnexpectedAttribute(node, attrib); 1187 this.ParseHelper.UnexpectedAttribute(element, attrib);
1199 break; 1188 break;
1200 } 1189 }
1201 } 1190 }
1202 else 1191 else
1203 { 1192 {
1204 this.Core.ParseExtensionAttribute(node, attrib); 1193 this.ParseHelper.ParseExtensionAttribute(this.Context.Extensions, intermediate, section, element, attrib);
1205 } 1194 }
1206 } 1195 }
1207 1196
1208 if (null == id) 1197 if (null == id)
1209 { 1198 {
1210 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id")); 1199 this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, element.Name.LocalName, "Id"));
1211 } 1200 }
1212 1201
1213 if (null == path) 1202 if (null == path)
1214 { 1203 {
1215 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Path")); 1204 this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, element.Name.LocalName, "Path"));
1216 } 1205 }
1217 1206
1218 if (null == parentWeb) 1207 if (null == parentWeb)
1219 { 1208 {
1220 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "WebSite")); 1209 this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, element.Name.LocalName, "WebSite"));
1221 } 1210 }
1222 1211
1223 foreach (XElement child in node.Elements()) 1212 foreach (XElement child in element.Elements())
1224 { 1213 {
1225 if (this.Namespace == child.Name.Namespace) 1214 if (this.Namespace == child.Name.Namespace)
1226 { 1215 {
1227 SourceLineNumber childSourceLineNumbers = Preprocessor.GetSourceLineNumbers(child); 1216 SourceLineNumber childSourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(child);
1228 switch (child.Name.LocalName) 1217 switch (child.Name.LocalName)
1229 { 1218 {
1230 case "WebApplication": 1219 case "WebApplication":
1231 if (null != application) 1220 if (null != application)
1232 { 1221 {
1233 this.Core.OnMessage(IIsErrors.WebApplicationAlreadySpecified(childSourceLineNumbers, node.Name.LocalName)); 1222 this.Messaging.Write(IIsErrors.WebApplicationAlreadySpecified(childSourceLineNumbers, element.Name.LocalName));
1234 } 1223 }
1235 1224
1236 application = this.ParseWebApplicationElement(child); 1225 application = this.ParseWebApplicationElement(intermediate, section, child);
1237 break; 1226 break;
1238 case "WebDirProperties": 1227 case "WebDirProperties":
1239 if (null == componentId) 1228 if (null == componentId)
1240 { 1229 {
1241 this.Core.OnMessage(IIsErrors.IllegalElementWithoutComponent(childSourceLineNumbers, child.Name.LocalName)); 1230 this.Messaging.Write(IIsErrors.IllegalElementWithoutComponent(childSourceLineNumbers, child.Name.LocalName));
1242 } 1231 }
1243 1232
1244 string childWebDirProperties = this.ParseWebDirPropertiesElement(child); 1233 string childWebDirProperties = this.ParseWebDirPropertiesElement(intermediate, section, child);
1245 if (null == dirProperties) 1234 if (null == dirProperties)
1246 { 1235 {
1247 dirProperties = childWebDirProperties; 1236 dirProperties = childWebDirProperties;
1248 } 1237 }
1249 else 1238 else
1250 { 1239 {
1251 this.Core.OnMessage(WixErrors.IllegalAttributeWhenNested(sourceLineNumbers, child.Name.LocalName, "DirProperties", child.Name.LocalName)); 1240 this.Messaging.Write(ErrorMessages.IllegalAttributeWhenNested(sourceLineNumbers, child.Name.LocalName, "DirProperties", child.Name.LocalName));
1252 } 1241 }
1253 break; 1242 break;
1254 default: 1243 default:
1255 this.Core.UnexpectedElement(node, child); 1244 this.ParseHelper.UnexpectedElement(element, child);
1256 break; 1245 break;
1257 } 1246 }
1258 } 1247 }
1259 else 1248 else
1260 { 1249 {
1261 this.Core.ParseExtensionElement(node, child); 1250 this.ParseHelper.ParseExtensionElement(this.Context.Extensions, intermediate, section, element, child);
1262 } 1251 }
1263 } 1252 }
1264 1253
1265 if (null == dirProperties) 1254 if (null == dirProperties)
1266 { 1255 {
1267 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "DirProperties")); 1256 this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, element.Name.LocalName, "DirProperties"));
1268 } 1257 }
1269 1258
1270 if (null != application) 1259 if (null != application)
1271 { 1260 {
1272 this.Core.CreateSimpleReference(sourceLineNumbers, "IIsWebApplication", application); 1261 this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "IIsWebApplication", application);
1273 } 1262 }
1274 1263
1275 this.Core.CreateSimpleReference(sourceLineNumbers, "IIsWebDirProperties", dirProperties); 1264 this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "IIsWebDirProperties", dirProperties);
1276 1265
1277 // Reference ConfigureIIs since nothing will happen without it 1266 // Reference ConfigureIIs since nothing will happen without it
1278 this.Core.CreateSimpleReference(sourceLineNumbers, "CustomAction", "ConfigureIIs"); 1267 this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "CustomAction", "ConfigureIIs");
1279 1268
1280 if (!this.Core.EncounteredError) 1269 if (!this.Messaging.EncounteredError)
1281 { 1270 {
1282 Row row = this.Core.CreateRow(sourceLineNumbers, "IIsWebDir"); 1271 var row = this.ParseHelper.CreateRow(section, sourceLineNumbers, "IIsWebDir", id);
1283 row[0] = id; 1272 row.Set(1, componentId);
1284 row[1] = componentId; 1273 row.Set(2, parentWeb);
1285 row[2] = parentWeb; 1274 row.Set(3, path);
1286 row[3] = path; 1275 row.Set(4, dirProperties);
1287 row[4] = dirProperties; 1276 row.Set(5, application);
1288 row[5] = application;
1289 } 1277 }
1290 } 1278 }
1291 1279
1292 /// <summary> 1280 /// <summary>
1293 /// Parses a web directory properties element. 1281 /// Parses a web directory properties element.
1294 /// </summary> 1282 /// </summary>
1295 /// <param name="node">Element to parse.</param> 1283 /// <param name="element">Element to parse.</param>
1296 /// <returns>The identifier for this WebDirProperties.</returns> 1284 /// <returns>The identifier for this WebDirProperties.</returns>
1297 private string ParseWebDirPropertiesElement(XElement node) 1285 private string ParseWebDirPropertiesElement(Intermediate intermediate, IntermediateSection section, XElement element)
1298 { 1286 {
1299 SourceLineNumber sourceLineNumbers = Preprocessor.GetSourceLineNumbers(node); 1287 SourceLineNumber sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(element);
1300 string id = null; 1288 Identifier id = null;
1301 int access = 0; 1289 int access = 0;
1302 bool accessSet = false; 1290 bool accessSet = false;
1303 int accessSSLFlags = 0; 1291 int accessSSLFlags = 0;
@@ -1316,53 +1304,53 @@ namespace WixToolset.Extensions
1316 YesNoType logVisits = YesNoType.NotSet; 1304 YesNoType logVisits = YesNoType.NotSet;
1317 YesNoType notCustomError = YesNoType.NotSet; 1305 YesNoType notCustomError = YesNoType.NotSet;
1318 1306
1319 foreach (XAttribute attrib in node.Attributes()) 1307 foreach (XAttribute attrib in element.Attributes())
1320 { 1308 {
1321 if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace) 1309 if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace)
1322 { 1310 {
1323 switch (attrib.Name.LocalName) 1311 switch (attrib.Name.LocalName)
1324 { 1312 {
1325 case "Id": 1313 case "Id":
1326 id = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib); 1314 id = this.ParseHelper.GetAttributeIdentifier(sourceLineNumbers, attrib);
1327 break; 1315 break;
1328 case "AnonymousUser": 1316 case "AnonymousUser":
1329 anonymousUser = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib); 1317 anonymousUser = this.ParseHelper.GetAttributeIdentifierValue(sourceLineNumbers, attrib);
1330 this.Core.CreateSimpleReference(sourceLineNumbers, "User", anonymousUser); 1318 this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "User", anonymousUser);
1331 break; 1319 break;
1332 case "AspDetailedError": 1320 case "AspDetailedError":
1333 aspDetailedError = this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib); 1321 aspDetailedError = this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib);
1334 break; 1322 break;
1335 case "AuthenticationProviders": 1323 case "AuthenticationProviders":
1336 authenticationProviders = this.Core.GetAttributeValue(sourceLineNumbers, attrib); 1324 authenticationProviders = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib);
1337 break; 1325 break;
1338 case "CacheControlCustom": 1326 case "CacheControlCustom":
1339 cacheControlCustom = this.Core.GetAttributeValue(sourceLineNumbers, attrib); 1327 cacheControlCustom = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib);
1340 break; 1328 break;
1341 case "CacheControlMaxAge": 1329 case "CacheControlMaxAge":
1342 cacheControlMaxAge = this.Core.GetAttributeLongValue(sourceLineNumbers, attrib, 0, uint.MaxValue); // 4294967295 (uint.MaxValue) represents unlimited 1330 cacheControlMaxAge = this.ParseHelper.GetAttributeLongValue(sourceLineNumbers, attrib, 0, uint.MaxValue); // 4294967295 (uint.MaxValue) represents unlimited
1343 break; 1331 break;
1344 case "ClearCustomError": 1332 case "ClearCustomError":
1345 notCustomError = this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib); 1333 notCustomError = this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib);
1346 break; 1334 break;
1347 case "DefaultDocuments": 1335 case "DefaultDocuments":
1348 defaultDocuments = this.Core.GetAttributeValue(sourceLineNumbers, attrib); 1336 defaultDocuments = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib);
1349 break; 1337 break;
1350 case "HttpExpires": 1338 case "HttpExpires":
1351 httpExpires = this.Core.GetAttributeValue(sourceLineNumbers, attrib); 1339 httpExpires = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib);
1352 break; 1340 break;
1353 case "IIsControlledPassword": 1341 case "IIsControlledPassword":
1354 iisControlledPassword = YesNoType.Yes == this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib); 1342 iisControlledPassword = YesNoType.Yes == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib);
1355 break; 1343 break;
1356 case "Index": 1344 case "Index":
1357 index = this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib); 1345 index = this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib);
1358 break; 1346 break;
1359 case "LogVisits": 1347 case "LogVisits":
1360 logVisits = this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib); 1348 logVisits = this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib);
1361 break; 1349 break;
1362 1350
1363 // Access attributes 1351 // Access attributes
1364 case "Execute": 1352 case "Execute":
1365 if (YesNoType.Yes == this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib)) 1353 if (YesNoType.Yes == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib))
1366 { 1354 {
1367 access |= 4; 1355 access |= 4;
1368 } 1356 }
@@ -1373,7 +1361,7 @@ namespace WixToolset.Extensions
1373 accessSet = true; 1361 accessSet = true;
1374 break; 1362 break;
1375 case "Read": 1363 case "Read":
1376 if (YesNoType.Yes == this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib)) 1364 if (YesNoType.Yes == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib))
1377 { 1365 {
1378 access |= 1; 1366 access |= 1;
1379 } 1367 }
@@ -1384,7 +1372,7 @@ namespace WixToolset.Extensions
1384 accessSet = true; 1372 accessSet = true;
1385 break; 1373 break;
1386 case "Script": 1374 case "Script":
1387 if (YesNoType.Yes == this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib)) 1375 if (YesNoType.Yes == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib))
1388 { 1376 {
1389 access |= 512; 1377 access |= 512;
1390 } 1378 }
@@ -1395,7 +1383,7 @@ namespace WixToolset.Extensions
1395 accessSet = true; 1383 accessSet = true;
1396 break; 1384 break;
1397 case "Write": 1385 case "Write":
1398 if (YesNoType.Yes == this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib)) 1386 if (YesNoType.Yes == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib))
1399 { 1387 {
1400 access |= 2; 1388 access |= 2;
1401 } 1389 }
@@ -1408,7 +1396,7 @@ namespace WixToolset.Extensions
1408 1396
1409 // AccessSSL Attributes 1397 // AccessSSL Attributes
1410 case "AccessSSL": 1398 case "AccessSSL":
1411 if (YesNoType.Yes == this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib)) 1399 if (YesNoType.Yes == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib))
1412 { 1400 {
1413 accessSSLFlags |= 8; 1401 accessSSLFlags |= 8;
1414 } 1402 }
@@ -1419,7 +1407,7 @@ namespace WixToolset.Extensions
1419 accessSSLFlagsSet = true; 1407 accessSSLFlagsSet = true;
1420 break; 1408 break;
1421 case "AccessSSL128": 1409 case "AccessSSL128":
1422 if (YesNoType.Yes == this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib)) 1410 if (YesNoType.Yes == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib))
1423 { 1411 {
1424 accessSSLFlags |= 256; 1412 accessSSLFlags |= 256;
1425 } 1413 }
@@ -1430,7 +1418,7 @@ namespace WixToolset.Extensions
1430 accessSSLFlagsSet = true; 1418 accessSSLFlagsSet = true;
1431 break; 1419 break;
1432 case "AccessSSLMapCert": 1420 case "AccessSSLMapCert":
1433 if (YesNoType.Yes == this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib)) 1421 if (YesNoType.Yes == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib))
1434 { 1422 {
1435 accessSSLFlags |= 128; 1423 accessSSLFlags |= 128;
1436 } 1424 }
@@ -1441,7 +1429,7 @@ namespace WixToolset.Extensions
1441 accessSSLFlagsSet = true; 1429 accessSSLFlagsSet = true;
1442 break; 1430 break;
1443 case "AccessSSLNegotiateCert": 1431 case "AccessSSLNegotiateCert":
1444 if (YesNoType.Yes == this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib)) 1432 if (YesNoType.Yes == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib))
1445 { 1433 {
1446 accessSSLFlags |= 32; 1434 accessSSLFlags |= 32;
1447 } 1435 }
@@ -1452,7 +1440,7 @@ namespace WixToolset.Extensions
1452 accessSSLFlagsSet = true; 1440 accessSSLFlagsSet = true;
1453 break; 1441 break;
1454 case "AccessSSLRequireCert": 1442 case "AccessSSLRequireCert":
1455 if (YesNoType.Yes == this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib)) 1443 if (YesNoType.Yes == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib))
1456 { 1444 {
1457 accessSSLFlags |= 64; 1445 accessSSLFlags |= 64;
1458 } 1446 }
@@ -1465,7 +1453,7 @@ namespace WixToolset.Extensions
1465 1453
1466 // Authorization attributes 1454 // Authorization attributes
1467 case "AnonymousAccess": 1455 case "AnonymousAccess":
1468 if (YesNoType.Yes == this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib)) 1456 if (YesNoType.Yes == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib))
1469 { 1457 {
1470 authorization |= 1; 1458 authorization |= 1;
1471 } 1459 }
@@ -1476,7 +1464,7 @@ namespace WixToolset.Extensions
1476 authorizationSet = true; 1464 authorizationSet = true;
1477 break; 1465 break;
1478 case "BasicAuthentication": 1466 case "BasicAuthentication":
1479 if (YesNoType.Yes == this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib)) 1467 if (YesNoType.Yes == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib))
1480 { 1468 {
1481 authorization |= 2; 1469 authorization |= 2;
1482 } 1470 }
@@ -1487,7 +1475,7 @@ namespace WixToolset.Extensions
1487 authorizationSet = true; 1475 authorizationSet = true;
1488 break; 1476 break;
1489 case "DigestAuthentication": 1477 case "DigestAuthentication":
1490 if (YesNoType.Yes == this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib)) 1478 if (YesNoType.Yes == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib))
1491 { 1479 {
1492 authorization |= 16; 1480 authorization |= 16;
1493 } 1481 }
@@ -1498,7 +1486,7 @@ namespace WixToolset.Extensions
1498 authorizationSet = true; 1486 authorizationSet = true;
1499 break; 1487 break;
1500 case "PassportAuthentication": 1488 case "PassportAuthentication":
1501 if (YesNoType.Yes == this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib)) 1489 if (YesNoType.Yes == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib))
1502 { 1490 {
1503 authorization |= 64; 1491 authorization |= 64;
1504 } 1492 }
@@ -1509,7 +1497,7 @@ namespace WixToolset.Extensions
1509 authorizationSet = true; 1497 authorizationSet = true;
1510 break; 1498 break;
1511 case "WindowsAuthentication": 1499 case "WindowsAuthentication":
1512 if (YesNoType.Yes == this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib)) 1500 if (YesNoType.Yes == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib))
1513 { 1501 {
1514 authorization |= 4; 1502 authorization |= 4;
1515 } 1503 }
@@ -1520,187 +1508,186 @@ namespace WixToolset.Extensions
1520 authorizationSet = true; 1508 authorizationSet = true;
1521 break; 1509 break;
1522 default: 1510 default:
1523 this.Core.UnexpectedAttribute(node, attrib); 1511 this.ParseHelper.UnexpectedAttribute(element, attrib);
1524 break; 1512 break;
1525 } 1513 }
1526 } 1514 }
1527 else 1515 else
1528 { 1516 {
1529 this.Core.ParseExtensionAttribute(node, attrib); 1517 this.ParseHelper.ParseExtensionAttribute(this.Context.Extensions, intermediate, section, element, attrib);
1530 } 1518 }
1531 } 1519 }
1532 1520
1533 if (null == id) 1521 if (null == id)
1534 { 1522 {
1535 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id")); 1523 this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, element.Name.LocalName, "Id"));
1536 } 1524 }
1537 1525
1538 this.Core.ParseForExtensionElements(node); 1526 this.ParseHelper.ParseForExtensionElements(this.Context.Extensions, intermediate, section, element);
1539 1527
1540 if (!this.Core.EncounteredError) 1528 if (!this.Messaging.EncounteredError)
1541 { 1529 {
1542 Row row = this.Core.CreateRow(sourceLineNumbers, "IIsWebDirProperties"); 1530 var row = this.ParseHelper.CreateRow(section, sourceLineNumbers, "IIsWebDirProperties", id);
1543 row[0] = id;
1544 if (accessSet) 1531 if (accessSet)
1545 { 1532 {
1546 row[1] = access; 1533 row.Set(1, access);
1547 } 1534 }
1548 1535
1549 if (authorizationSet) 1536 if (authorizationSet)
1550 { 1537 {
1551 row[2] = authorization; 1538 row.Set(2, authorization);
1552 } 1539 }
1553 row[3] = anonymousUser; 1540 row.Set(3, anonymousUser);
1554 row[4] = iisControlledPassword ? 1 : 0; 1541 row.Set(4, iisControlledPassword ? 1 : 0);
1555 if (YesNoType.NotSet != logVisits) 1542 if (YesNoType.NotSet != logVisits)
1556 { 1543 {
1557 row[5] = YesNoType.Yes == logVisits ? 1 : 0; 1544 row.Set(5, YesNoType.Yes == logVisits ? 1 : 0);
1558 } 1545 }
1559 1546
1560 if (YesNoType.NotSet != index) 1547 if (YesNoType.NotSet != index)
1561 { 1548 {
1562 row[6] = YesNoType.Yes == index ? 1 : 0; 1549 row.Set(6, YesNoType.Yes == index ? 1 : 0);
1563 } 1550 }
1564 row[7] = defaultDocuments; 1551 row.Set(7, defaultDocuments);
1565 if (YesNoType.NotSet != aspDetailedError) 1552 if (YesNoType.NotSet != aspDetailedError)
1566 { 1553 {
1567 row[8] = YesNoType.Yes == aspDetailedError ? 1 : 0; 1554 row.Set(8, YesNoType.Yes == aspDetailedError ? 1 : 0);
1568 } 1555 }
1569 row[9] = httpExpires; 1556 row.Set(9, httpExpires);
1570 if (CompilerConstants.LongNotSet != cacheControlMaxAge) 1557 if (CompilerConstants.LongNotSet != cacheControlMaxAge)
1571 { 1558 {
1572 row[10] = unchecked((int)cacheControlMaxAge); 1559 row.Set(10, unchecked((int)cacheControlMaxAge));
1573 } 1560 }
1574 row[11] = cacheControlCustom; 1561 row.Set(11, cacheControlCustom);
1575 if (YesNoType.NotSet != notCustomError) 1562 if (YesNoType.NotSet != notCustomError)
1576 { 1563 {
1577 row[12] = YesNoType.Yes == notCustomError ? 1 : 0; 1564 row.Set(12, YesNoType.Yes == notCustomError ? 1 : 0);
1578 } 1565 }
1579 1566
1580 if (accessSSLFlagsSet) 1567 if (accessSSLFlagsSet)
1581 { 1568 {
1582 row[13] = accessSSLFlags; 1569 row.Set(13, accessSSLFlags);
1583 } 1570 }
1584 1571
1585 if (null != authenticationProviders) 1572 if (null != authenticationProviders)
1586 { 1573 {
1587 row[14] = authenticationProviders; 1574 row.Set(14, authenticationProviders);
1588 } 1575 }
1589 } 1576 }
1590 1577
1591 return id; 1578 return id?.Id;
1592 } 1579 }
1593 1580
1594 /// <summary> 1581 /// <summary>
1595 /// Parses a web error element. 1582 /// Parses a web error element.
1596 /// </summary> 1583 /// </summary>
1597 /// <param name="node">Element to parse.</param> 1584 /// <param name="element">Element to parse.</param>
1598 /// <param name="parentType">Type of the parent.</param> 1585 /// <param name="parentType">Type of the parent.</param>
1599 /// <param name="parent">Id of the parent.</param> 1586 /// <param name="parent">Id of the parent.</param>
1600 private void ParseWebErrorElement(XElement node, WebErrorParentType parentType, string parent) 1587 private void ParseWebErrorElement(Intermediate intermediate, IntermediateSection section, XElement element, WebErrorParentType parentType, string parent)
1601 { 1588 {
1602 SourceLineNumber sourceLineNumbers = Preprocessor.GetSourceLineNumbers(node); 1589 SourceLineNumber sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(element);
1603 int errorCode = CompilerConstants.IntegerNotSet; 1590 int errorCode = CompilerConstants.IntegerNotSet;
1604 string file = null; 1591 string file = null;
1605 string url = null; 1592 string url = null;
1606 int subCode = CompilerConstants.IntegerNotSet; 1593 int subCode = CompilerConstants.IntegerNotSet;
1607 1594
1608 foreach (XAttribute attrib in node.Attributes()) 1595 foreach (XAttribute attrib in element.Attributes())
1609 { 1596 {
1610 if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace) 1597 if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace)
1611 { 1598 {
1612 switch (attrib.Name.LocalName) 1599 switch (attrib.Name.LocalName)
1613 { 1600 {
1614 case "ErrorCode": 1601 case "ErrorCode":
1615 errorCode = this.Core.GetAttributeIntegerValue(sourceLineNumbers, attrib, 400, 599); 1602 errorCode = this.ParseHelper.GetAttributeIntegerValue(sourceLineNumbers, attrib, 400, 599);
1616 break; 1603 break;
1617 case "File": 1604 case "File":
1618 file = this.Core.GetAttributeValue(sourceLineNumbers, attrib); 1605 file = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib);
1619 break; 1606 break;
1620 case "SubCode": 1607 case "SubCode":
1621 subCode = this.Core.GetAttributeIntegerValue(sourceLineNumbers, attrib, 0, int.MaxValue); 1608 subCode = this.ParseHelper.GetAttributeIntegerValue(sourceLineNumbers, attrib, 0, int.MaxValue);
1622 break; 1609 break;
1623 case "URL": 1610 case "URL":
1624 url = this.Core.GetAttributeValue(sourceLineNumbers, attrib); 1611 url = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib);
1625 break; 1612 break;
1626 default: 1613 default:
1627 this.Core.UnexpectedAttribute(node, attrib); 1614 this.ParseHelper.UnexpectedAttribute(element, attrib);
1628 break; 1615 break;
1629 } 1616 }
1630 } 1617 }
1631 else 1618 else
1632 { 1619 {
1633 this.Core.ParseExtensionAttribute(node, attrib); 1620 this.ParseHelper.ParseExtensionAttribute(this.Context.Extensions, intermediate, section, element, attrib);
1634 } 1621 }
1635 } 1622 }
1636 1623
1637 if (CompilerConstants.IntegerNotSet == errorCode) 1624 if (CompilerConstants.IntegerNotSet == errorCode)
1638 { 1625 {
1639 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "ErrorCode")); 1626 this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, element.Name.LocalName, "ErrorCode"));
1640 errorCode = CompilerConstants.IllegalInteger; 1627 errorCode = CompilerConstants.IllegalInteger;
1641 } 1628 }
1642 1629
1643 if (CompilerConstants.IntegerNotSet == subCode) 1630 if (CompilerConstants.IntegerNotSet == subCode)
1644 { 1631 {
1645 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "SubCode")); 1632 this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, element.Name.LocalName, "SubCode"));
1646 subCode = CompilerConstants.IllegalInteger; 1633 subCode = CompilerConstants.IllegalInteger;
1647 } 1634 }
1648 1635
1649 if (String.IsNullOrEmpty(file) && String.IsNullOrEmpty(url)) 1636 if (String.IsNullOrEmpty(file) && String.IsNullOrEmpty(url))
1650 { 1637 {
1651 this.Core.OnMessage(WixErrors.IllegalAttributeWithOtherAttribute(sourceLineNumbers, node.Name.LocalName, "File", "URL")); 1638 this.Messaging.Write(ErrorMessages.IllegalAttributeWithOtherAttribute(sourceLineNumbers, element.Name.LocalName, "File", "URL"));
1652 } 1639 }
1653 1640
1654 this.Core.ParseForExtensionElements(node); 1641 this.ParseHelper.ParseForExtensionElements(this.Context.Extensions, intermediate, section, element);
1655 1642
1656 // Reference ConfigureIIs since nothing will happen without it 1643 // Reference ConfigureIIs since nothing will happen without it
1657 this.Core.CreateSimpleReference(sourceLineNumbers, "CustomAction", "ConfigureIIs"); 1644 this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "CustomAction", "ConfigureIIs");
1658 1645
1659 if (!this.Core.EncounteredError) 1646 if (!this.Messaging.EncounteredError)
1660 { 1647 {
1661 Row row = this.Core.CreateRow(sourceLineNumbers, "IIsWebError"); 1648 var row = this.ParseHelper.CreateRow(section, sourceLineNumbers, "IIsWebError");
1662 row[0] = errorCode; 1649 row.Set(0, errorCode);
1663 row[1] = subCode; 1650 row.Set(1, subCode);
1664 row[2] = (int)parentType; 1651 row.Set(2, (int)parentType);
1665 row[3] = parent; 1652 row.Set(3, parent);
1666 row[4] = file; 1653 row.Set(4, file);
1667 row[5] = url; 1654 row.Set(5, url);
1668 } 1655 }
1669 } 1656 }
1670 1657
1671 /// <summary> 1658 /// <summary>
1672 /// Parses a web filter element. 1659 /// Parses a web filter element.
1673 /// </summary> 1660 /// </summary>
1674 /// <param name="node">Element to parse.</param> 1661 /// <param name="element">Element to parse.</param>
1675 /// <param name="componentId">Identifier of parent component.</param> 1662 /// <param name="componentId">Identifier of parent component.</param>
1676 /// <param name="parentWeb">Optional identifier of parent web site.</param> 1663 /// <param name="parentWeb">Optional identifier of parent web site.</param>
1677 private void ParseWebFilterElement(XElement node, string componentId, string parentWeb) 1664 private void ParseWebFilterElement(Intermediate intermediate, IntermediateSection section, XElement element, string componentId, string parentWeb)
1678 { 1665 {
1679 SourceLineNumber sourceLineNumbers = Preprocessor.GetSourceLineNumbers(node); 1666 SourceLineNumber sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(element);
1680 string id = null; 1667 Identifier id = null;
1681 string description = null; 1668 string description = null;
1682 int flags = 0; 1669 int flags = 0;
1683 int loadOrder = CompilerConstants.IntegerNotSet; 1670 int loadOrder = CompilerConstants.IntegerNotSet;
1684 string name = null; 1671 string name = null;
1685 string path = null; 1672 string path = null;
1686 1673
1687 foreach (XAttribute attrib in node.Attributes()) 1674 foreach (XAttribute attrib in element.Attributes())
1688 { 1675 {
1689 if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace) 1676 if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace)
1690 { 1677 {
1691 switch (attrib.Name.LocalName) 1678 switch (attrib.Name.LocalName)
1692 { 1679 {
1693 case "Id": 1680 case "Id":
1694 id = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib); 1681 id = this.ParseHelper.GetAttributeIdentifier(sourceLineNumbers, attrib);
1695 break; 1682 break;
1696 case "Description": 1683 case "Description":
1697 description = this.Core.GetAttributeValue(sourceLineNumbers, attrib); 1684 description = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib);
1698 break; 1685 break;
1699 case "Flags": 1686 case "Flags":
1700 flags = this.Core.GetAttributeIntegerValue(sourceLineNumbers, attrib, 0, int.MaxValue); 1687 flags = this.ParseHelper.GetAttributeIntegerValue(sourceLineNumbers, attrib, 0, int.MaxValue);
1701 break; 1688 break;
1702 case "LoadOrder": 1689 case "LoadOrder":
1703 string loadOrderValue = this.Core.GetAttributeValue(sourceLineNumbers, attrib); 1690 string loadOrderValue = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib);
1704 if (0 < loadOrderValue.Length) 1691 if (0 < loadOrderValue.Length)
1705 { 1692 {
1706 switch (loadOrderValue) 1693 switch (loadOrderValue)
@@ -1712,70 +1699,69 @@ namespace WixToolset.Extensions
1712 loadOrder = -1; 1699 loadOrder = -1;
1713 break; 1700 break;
1714 default: 1701 default:
1715 loadOrder = this.Core.GetAttributeIntegerValue(sourceLineNumbers, attrib, 1, short.MaxValue); 1702 loadOrder = this.ParseHelper.GetAttributeIntegerValue(sourceLineNumbers, attrib, 1, short.MaxValue);
1716 break; 1703 break;
1717 } 1704 }
1718 } 1705 }
1719 break; 1706 break;
1720 case "Name": 1707 case "Name":
1721 name = this.Core.GetAttributeValue(sourceLineNumbers, attrib); 1708 name = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib);
1722 break; 1709 break;
1723 case "Path": 1710 case "Path":
1724 path = this.Core.GetAttributeValue(sourceLineNumbers, attrib); 1711 path = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib);
1725 break; 1712 break;
1726 case "WebSite": 1713 case "WebSite":
1727 if (null != parentWeb) 1714 if (null != parentWeb)
1728 { 1715 {
1729 this.Core.OnMessage(IIsErrors.WebSiteAttributeUnderWebSite(sourceLineNumbers, node.Name.LocalName)); 1716 this.Messaging.Write(IIsErrors.WebSiteAttributeUnderWebSite(sourceLineNumbers, element.Name.LocalName));
1730 } 1717 }
1731 1718
1732 parentWeb = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib); 1719 parentWeb = this.ParseHelper.GetAttributeIdentifierValue(sourceLineNumbers, attrib);
1733 this.Core.CreateSimpleReference(sourceLineNumbers, "IIsWebSite", parentWeb); 1720 this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "IIsWebSite", parentWeb);
1734 break; 1721 break;
1735 default: 1722 default:
1736 this.Core.UnexpectedAttribute(node, attrib); 1723 this.ParseHelper.UnexpectedAttribute(element, attrib);
1737 break; 1724 break;
1738 } 1725 }
1739 } 1726 }
1740 else 1727 else
1741 { 1728 {
1742 this.Core.ParseExtensionAttribute(node, attrib); 1729 this.ParseHelper.ParseExtensionAttribute(this.Context.Extensions, intermediate, section, element, attrib);
1743 } 1730 }
1744 } 1731 }
1745 1732
1746 if (null == id) 1733 if (null == id)
1747 { 1734 {
1748 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id")); 1735 this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, element.Name.LocalName, "Id"));
1749 } 1736 }
1750 1737
1751 if (null == name) 1738 if (null == name)
1752 { 1739 {
1753 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Name")); 1740 this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, element.Name.LocalName, "Name"));
1754 } 1741 }
1755 1742
1756 if (null == path) 1743 if (null == path)
1757 { 1744 {
1758 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Path")); 1745 this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, element.Name.LocalName, "Path"));
1759 } 1746 }
1760 1747
1761 this.Core.ParseForExtensionElements(node); 1748 this.ParseHelper.ParseForExtensionElements(this.Context.Extensions, intermediate, section, element);
1762 1749
1763 // Reference ConfigureIIs since nothing will happen without it 1750 // Reference ConfigureIIs since nothing will happen without it
1764 this.Core.CreateSimpleReference(sourceLineNumbers, "CustomAction", "ConfigureIIs"); 1751 this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "CustomAction", "ConfigureIIs");
1765 1752
1766 if (!this.Core.EncounteredError) 1753 if (!this.Messaging.EncounteredError)
1767 { 1754 {
1768 Row row = this.Core.CreateRow(sourceLineNumbers, "IIsFilter"); 1755 var row = this.ParseHelper.CreateRow(section, sourceLineNumbers, "IIsFilter", id);
1769 row[0] = id; 1756 row.Set(1, name);
1770 row[1] = name; 1757 row.Set(2, componentId);
1771 row[2] = componentId; 1758 row.Set(3, path);
1772 row[3] = path; 1759 row.Set(4, parentWeb);
1773 row[4] = parentWeb; 1760 row.Set(5, description);
1774 row[5] = description; 1761 row.Set(6, flags);
1775 row[6] = flags;
1776 if (CompilerConstants.IntegerNotSet != loadOrder) 1762 if (CompilerConstants.IntegerNotSet != loadOrder)
1777 { 1763 {
1778 row[7] = loadOrder; 1764 row.Set(7, loadOrder);
1779 } 1765 }
1780 } 1766 }
1781 } 1767 }
@@ -1783,24 +1769,24 @@ namespace WixToolset.Extensions
1783 /// <summary> 1769 /// <summary>
1784 /// Parses web log element. 1770 /// Parses web log element.
1785 /// </summary> 1771 /// </summary>
1786 /// <param name="node">Node to be parsed.</param> 1772 /// <param name="element">Node to be parsed.</param>
1787 private void ParseWebLogElement(XElement node) 1773 private void ParseWebLogElement(Intermediate intermediate, IntermediateSection section, XElement element)
1788 { 1774 {
1789 SourceLineNumber sourceLineNumbers = Preprocessor.GetSourceLineNumbers(node); 1775 SourceLineNumber sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(element);
1790 string id = null; 1776 Identifier id = null;
1791 string type = null; 1777 string type = null;
1792 1778
1793 foreach (XAttribute attrib in node.Attributes()) 1779 foreach (XAttribute attrib in element.Attributes())
1794 { 1780 {
1795 if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace) 1781 if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace)
1796 { 1782 {
1797 switch (attrib.Name.LocalName) 1783 switch (attrib.Name.LocalName)
1798 { 1784 {
1799 case "Id": 1785 case "Id":
1800 id = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib); 1786 id = this.ParseHelper.GetAttributeIdentifier(sourceLineNumbers, attrib);
1801 break; 1787 break;
1802 case "Type": 1788 case "Type":
1803 string typeValue = this.Core.GetAttributeValue(sourceLineNumbers, attrib); 1789 string typeValue = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib);
1804 if (0 < typeValue.Length) 1790 if (0 < typeValue.Length)
1805 { 1791 {
1806 switch (typeValue) 1792 switch (typeValue)
@@ -1821,84 +1807,83 @@ namespace WixToolset.Extensions
1821 type = "W3C Extended Log File Format"; 1807 type = "W3C Extended Log File Format";
1822 break; 1808 break;
1823 default: 1809 default:
1824 this.Core.OnMessage(WixErrors.IllegalAttributeValue(sourceLineNumbers, node.Name.LocalName, "Type", typeValue, "IIS", "NCSA", "none", "ODBC", "W3C")); 1810 this.Messaging.Write(ErrorMessages.IllegalAttributeValue(sourceLineNumbers, element.Name.LocalName, "Type", typeValue, "IIS", "NCSA", "none", "ODBC", "W3C"));
1825 break; 1811 break;
1826 } 1812 }
1827 } 1813 }
1828 break; 1814 break;
1829 default: 1815 default:
1830 this.Core.UnexpectedAttribute(node, attrib); 1816 this.ParseHelper.UnexpectedAttribute(element, attrib);
1831 break; 1817 break;
1832 } 1818 }
1833 } 1819 }
1834 else 1820 else
1835 { 1821 {
1836 this.Core.ParseExtensionAttribute(node, attrib); 1822 this.ParseHelper.ParseExtensionAttribute(this.Context.Extensions, intermediate, section, element, attrib);
1837 } 1823 }
1838 } 1824 }
1839 1825
1840 if (null == id) 1826 if (null == id)
1841 { 1827 {
1842 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id")); 1828 this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, element.Name.LocalName, "Id"));
1843 } 1829 }
1844 1830
1845 if (null == type) 1831 if (null == type)
1846 { 1832 {
1847 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Type")); 1833 this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, element.Name.LocalName, "Type"));
1848 } 1834 }
1849 1835
1850 this.Core.ParseForExtensionElements(node); 1836 this.ParseHelper.ParseForExtensionElements(this.Context.Extensions, intermediate, section, element);
1851 1837
1852 if (!this.Core.EncounteredError) 1838 if (!this.Messaging.EncounteredError)
1853 { 1839 {
1854 Row row = this.Core.CreateRow(sourceLineNumbers, "IIsWebLog"); 1840 var row = this.ParseHelper.CreateRow(section, sourceLineNumbers, "IIsWebLog", id);
1855 row[0] = id; 1841 row.Set(1, type);
1856 row[1] = type;
1857 } 1842 }
1858 } 1843 }
1859 1844
1860 /// <summary> 1845 /// <summary>
1861 /// Parses a web property element. 1846 /// Parses a web property element.
1862 /// </summary> 1847 /// </summary>
1863 /// <param name="node">Element to parse.</param> 1848 /// <param name="element">Element to parse.</param>
1864 /// <param name="componentId">Identifier for parent component.</param> 1849 /// <param name="componentId">Identifier for parent component.</param>
1865 private void ParseWebPropertyElement(XElement node, string componentId) 1850 private void ParseWebPropertyElement(Intermediate intermediate, IntermediateSection section, XElement element, string componentId)
1866 { 1851 {
1867 SourceLineNumber sourceLineNumbers = Preprocessor.GetSourceLineNumbers(node); 1852 SourceLineNumber sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(element);
1868 string id = null; 1853 Identifier id = null;
1869 string value = null; 1854 string value = null;
1870 1855
1871 foreach (XAttribute attrib in node.Attributes()) 1856 foreach (XAttribute attrib in element.Attributes())
1872 { 1857 {
1873 if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace) 1858 if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace)
1874 { 1859 {
1875 switch (attrib.Name.LocalName) 1860 switch (attrib.Name.LocalName)
1876 { 1861 {
1877 case "Id": 1862 case "Id":
1878 id = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib); 1863 id = this.ParseHelper.GetAttributeIdentifier(sourceLineNumbers, attrib);
1879 break; 1864 break;
1880 case "Value": 1865 case "Value":
1881 value = this.Core.GetAttributeValue(sourceLineNumbers, attrib); 1866 value = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib);
1882 break; 1867 break;
1883 default: 1868 default:
1884 this.Core.UnexpectedAttribute(node, attrib); 1869 this.ParseHelper.UnexpectedAttribute(element, attrib);
1885 break; 1870 break;
1886 } 1871 }
1887 } 1872 }
1888 else 1873 else
1889 { 1874 {
1890 this.Core.ParseExtensionAttribute(node, attrib); 1875 this.ParseHelper.ParseExtensionAttribute(this.Context.Extensions, intermediate, section, element, attrib);
1891 } 1876 }
1892 } 1877 }
1893 1878
1894 switch (id) 1879 switch (id?.Id)
1895 { 1880 {
1896 case "ETagChangeNumber": 1881 case "ETagChangeNumber":
1897 case "MaxGlobalBandwidth": 1882 case "MaxGlobalBandwidth":
1898 // Must specify a value for these 1883 // Must specify a value for these
1899 if (null == value) 1884 if (null == value)
1900 { 1885 {
1901 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Value", "Id", id)); 1886 this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, element.Name.LocalName, "Value", "Id", id.Id));
1902 } 1887 }
1903 break; 1888 break;
1904 case "IIs5IsolationMode": 1889 case "IIs5IsolationMode":
@@ -1906,54 +1891,53 @@ namespace WixToolset.Extensions
1906 // Can't specify a value for these 1891 // Can't specify a value for these
1907 if (null != value) 1892 if (null != value)
1908 { 1893 {
1909 this.Core.OnMessage(WixErrors.IllegalAttributeWithOtherAttribute(sourceLineNumbers, node.Name.LocalName, "Value", "Id", id)); 1894 this.Messaging.Write(ErrorMessages.IllegalAttributeWithOtherAttribute(sourceLineNumbers, element.Name.LocalName, "Value", "Id", id.Id));
1910 } 1895 }
1911 break; 1896 break;
1912 default: 1897 default:
1913 this.Core.OnMessage(WixErrors.IllegalAttributeValue(sourceLineNumbers, node.Name.LocalName, "Id", id, "ETagChangeNumber", "IIs5IsolationMode", "LogInUTF8", "MaxGlobalBandwidth")); 1898 this.Messaging.Write(ErrorMessages.IllegalAttributeValue(sourceLineNumbers, element.Name.LocalName, "Id", id?.Id, "ETagChangeNumber", "IIs5IsolationMode", "LogInUTF8", "MaxGlobalBandwidth"));
1914 break; 1899 break;
1915 } 1900 }
1916 1901
1917 this.Core.ParseForExtensionElements(node); 1902 this.ParseHelper.ParseForExtensionElements(this.Context.Extensions, intermediate, section, element);
1918 1903
1919 // Reference ConfigureIIs since nothing will happen without it 1904 // Reference ConfigureIIs since nothing will happen without it
1920 this.Core.CreateSimpleReference(sourceLineNumbers, "CustomAction", "ConfigureIIs"); 1905 this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "CustomAction", "ConfigureIIs");
1921 1906
1922 if (!this.Core.EncounteredError) 1907 if (!this.Messaging.EncounteredError)
1923 { 1908 {
1924 Row row = this.Core.CreateRow(sourceLineNumbers, "IIsProperty"); 1909 var row = this.ParseHelper.CreateRow(section, sourceLineNumbers, "IIsProperty", id);
1925 row[0] = id; 1910 row.Set(1, componentId);
1926 row[1] = componentId; 1911 row.Set(2, 0);
1927 row[2] = 0; 1912 row.Set(3, value);
1928 row[3] = value;
1929 } 1913 }
1930 } 1914 }
1931 1915
1932 /// <summary> 1916 /// <summary>
1933 /// Parses a web service extension element. 1917 /// Parses a web service extension element.
1934 /// </summary> 1918 /// </summary>
1935 /// <param name="node">Element to parse.</param> 1919 /// <param name="element">Element to parse.</param>
1936 /// <param name="componentId">Identifier for parent component.</param> 1920 /// <param name="componentId">Identifier for parent component.</param>
1937 private void ParseWebServiceExtensionElement(XElement node, string componentId) 1921 private void ParseWebServiceExtensionElement(Intermediate intermediate, IntermediateSection section, XElement element, string componentId)
1938 { 1922 {
1939 SourceLineNumber sourceLineNumbers = Preprocessor.GetSourceLineNumbers(node); 1923 SourceLineNumber sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(element);
1940 string id = null; 1924 Identifier id = null;
1941 int attributes = 0; 1925 int attributes = 0;
1942 string description = null; 1926 string description = null;
1943 string file = null; 1927 string file = null;
1944 string group = null; 1928 string group = null;
1945 1929
1946 foreach (XAttribute attrib in node.Attributes()) 1930 foreach (XAttribute attrib in element.Attributes())
1947 { 1931 {
1948 if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace) 1932 if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace)
1949 { 1933 {
1950 switch (attrib.Name.LocalName) 1934 switch (attrib.Name.LocalName)
1951 { 1935 {
1952 case "Id": 1936 case "Id":
1953 id = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib); 1937 id = this.ParseHelper.GetAttributeIdentifier(sourceLineNumbers, attrib);
1954 break; 1938 break;
1955 case "Allow": 1939 case "Allow":
1956 if (YesNoType.Yes == this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib)) 1940 if (YesNoType.Yes == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib))
1957 { 1941 {
1958 attributes |= 1; 1942 attributes |= 1;
1959 } 1943 }
@@ -1963,16 +1947,16 @@ namespace WixToolset.Extensions
1963 } 1947 }
1964 break; 1948 break;
1965 case "Description": 1949 case "Description":
1966 description = this.Core.GetAttributeValue(sourceLineNumbers, attrib); 1950 description = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib);
1967 break; 1951 break;
1968 case "File": 1952 case "File":
1969 file = this.Core.GetAttributeValue(sourceLineNumbers, attrib); 1953 file = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib);
1970 break; 1954 break;
1971 case "Group": 1955 case "Group":
1972 group = this.Core.GetAttributeValue(sourceLineNumbers, attrib); 1956 group = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib);
1973 break; 1957 break;
1974 case "UIDeletable": 1958 case "UIDeletable":
1975 if (YesNoType.Yes == this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib)) 1959 if (YesNoType.Yes == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib))
1976 { 1960 {
1977 attributes |= 2; 1961 attributes |= 2;
1978 } 1962 }
@@ -1982,52 +1966,51 @@ namespace WixToolset.Extensions
1982 } 1966 }
1983 break; 1967 break;
1984 default: 1968 default:
1985 this.Core.UnexpectedAttribute(node, attrib); 1969 this.ParseHelper.UnexpectedAttribute(element, attrib);
1986 break; 1970 break;
1987 } 1971 }
1988 } 1972 }
1989 else 1973 else
1990 { 1974 {
1991 this.Core.ParseExtensionAttribute(node, attrib); 1975 this.ParseHelper.ParseExtensionAttribute(this.Context.Extensions, intermediate, section, element, attrib);
1992 } 1976 }
1993 } 1977 }
1994 1978
1995 if (null == id) 1979 if (null == id)
1996 { 1980 {
1997 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id")); 1981 this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, element.Name.LocalName, "Id"));
1998 } 1982 }
1999 1983
2000 if (null == file) 1984 if (null == file)
2001 { 1985 {
2002 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "File")); 1986 this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, element.Name.LocalName, "File"));
2003 } 1987 }
2004 1988
2005 this.Core.ParseForExtensionElements(node); 1989 this.ParseHelper.ParseForExtensionElements(this.Context.Extensions, intermediate, section, element);
2006 1990
2007 // Reference ConfigureIIs since nothing will happen without it 1991 // Reference ConfigureIIs since nothing will happen without it
2008 this.Core.CreateSimpleReference(sourceLineNumbers, "CustomAction", "ConfigureIIs"); 1992 this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "CustomAction", "ConfigureIIs");
2009 1993
2010 if (!this.Core.EncounteredError) 1994 if (!this.Messaging.EncounteredError)
2011 { 1995 {
2012 Row row = this.Core.CreateRow(sourceLineNumbers, "IIsWebServiceExtension"); 1996 var row = this.ParseHelper.CreateRow(section, sourceLineNumbers, "IIsWebServiceExtension", id);
2013 row[0] = id; 1997 row.Set(1, componentId);
2014 row[1] = componentId; 1998 row.Set(2, file);
2015 row[2] = file; 1999 row.Set(3, description);
2016 row[3] = description; 2000 row.Set(4, group);
2017 row[4] = group; 2001 row.Set(5, attributes);
2018 row[5] = attributes;
2019 } 2002 }
2020 } 2003 }
2021 2004
2022 /// <summary> 2005 /// <summary>
2023 /// Parses a web site element. 2006 /// Parses a web site element.
2024 /// </summary> 2007 /// </summary>
2025 /// <param name="node">Element to parse.</param> 2008 /// <param name="element">Element to parse.</param>
2026 /// <param name="componentId">Optional identifier of parent component.</param> 2009 /// <param name="componentId">Optional identifier of parent component.</param>
2027 private void ParseWebSiteElement(XElement node, string componentId) 2010 private void ParseWebSiteElement(Intermediate intermediate, IntermediateSection section, XElement element, string componentId)
2028 { 2011 {
2029 SourceLineNumber sourceLineNumbers = Preprocessor.GetSourceLineNumbers(node); 2012 SourceLineNumber sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(element);
2030 string id = null; 2013 Identifier id = null;
2031 string application = null; 2014 string application = null;
2032 int attributes = 0; 2015 int attributes = 0;
2033 int connectionTimeout = CompilerConstants.IntegerNotSet; 2016 int connectionTimeout = CompilerConstants.IntegerNotSet;
@@ -2040,22 +2023,22 @@ namespace WixToolset.Extensions
2040 int sequence = CompilerConstants.IntegerNotSet; 2023 int sequence = CompilerConstants.IntegerNotSet;
2041 int state = CompilerConstants.IntegerNotSet; 2024 int state = CompilerConstants.IntegerNotSet;
2042 2025
2043 foreach (XAttribute attrib in node.Attributes()) 2026 foreach (XAttribute attrib in element.Attributes())
2044 { 2027 {
2045 if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace) 2028 if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace)
2046 { 2029 {
2047 switch (attrib.Name.LocalName) 2030 switch (attrib.Name.LocalName)
2048 { 2031 {
2049 case "Id": 2032 case "Id":
2050 id = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib); 2033 id = this.ParseHelper.GetAttributeIdentifier(sourceLineNumbers, attrib);
2051 break; 2034 break;
2052 case "AutoStart": 2035 case "AutoStart":
2053 if (null == componentId) 2036 if (null == componentId)
2054 { 2037 {
2055 this.Core.OnMessage(IIsErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName)); 2038 this.Messaging.Write(IIsErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, element.Name.LocalName, attrib.Name.LocalName));
2056 } 2039 }
2057 2040
2058 if (YesNoType.Yes == this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib)) 2041 if (YesNoType.Yes == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib))
2059 { 2042 {
2060 state = 2; 2043 state = 2;
2061 } 2044 }
@@ -2067,10 +2050,10 @@ namespace WixToolset.Extensions
2067 case "ConfigureIfExists": 2050 case "ConfigureIfExists":
2068 if (null == componentId) 2051 if (null == componentId)
2069 { 2052 {
2070 this.Core.OnMessage(IIsErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName)); 2053 this.Messaging.Write(IIsErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, element.Name.LocalName, attrib.Name.LocalName));
2071 } 2054 }
2072 2055
2073 if (YesNoType.Yes == this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib)) 2056 if (YesNoType.Yes == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib))
2074 { 2057 {
2075 attributes &= ~2; 2058 attributes &= ~2;
2076 } 2059 }
@@ -2080,41 +2063,41 @@ namespace WixToolset.Extensions
2080 } 2063 }
2081 break; 2064 break;
2082 case "ConnectionTimeout": 2065 case "ConnectionTimeout":
2083 connectionTimeout = this.Core.GetAttributeIntegerValue(sourceLineNumbers, attrib, 0, short.MaxValue); 2066 connectionTimeout = this.ParseHelper.GetAttributeIntegerValue(sourceLineNumbers, attrib, 0, short.MaxValue);
2084 break; 2067 break;
2085 case "Description": 2068 case "Description":
2086 description = this.Core.GetAttributeValue(sourceLineNumbers, attrib); 2069 description = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib);
2087 break; 2070 break;
2088 case "Directory": 2071 case "Directory":
2089 directory = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib); 2072 directory = this.ParseHelper.GetAttributeIdentifierValue(sourceLineNumbers, attrib);
2090 this.Core.CreateSimpleReference(sourceLineNumbers, "Directory", directory); 2073 this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "Directory", directory);
2091 break; 2074 break;
2092 case "DirProperties": 2075 case "DirProperties":
2093 if (null == componentId) 2076 if (null == componentId)
2094 { 2077 {
2095 this.Core.OnMessage(IIsErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName)); 2078 this.Messaging.Write(IIsErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, element.Name.LocalName, attrib.Name.LocalName));
2096 } 2079 }
2097 2080
2098 dirProperties = this.Core.GetAttributeValue(sourceLineNumbers, attrib); 2081 dirProperties = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib);
2099 break; 2082 break;
2100 case "SiteId": 2083 case "SiteId":
2101 siteId = this.Core.GetAttributeValue(sourceLineNumbers, attrib); 2084 siteId = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib);
2102 if ("*" == siteId) 2085 if ("*" == siteId)
2103 { 2086 {
2104 siteId = "-1"; 2087 siteId = "-1";
2105 } 2088 }
2106 break; 2089 break;
2107 case "Sequence": 2090 case "Sequence":
2108 sequence = this.Core.GetAttributeIntegerValue(sourceLineNumbers, attrib, 1, short.MaxValue); 2091 sequence = this.ParseHelper.GetAttributeIntegerValue(sourceLineNumbers, attrib, 1, short.MaxValue);
2109 break; 2092 break;
2110 case "StartOnInstall": 2093 case "StartOnInstall":
2111 if (null == componentId) 2094 if (null == componentId)
2112 { 2095 {
2113 this.Core.OnMessage(IIsErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName)); 2096 this.Messaging.Write(IIsErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, element.Name.LocalName, attrib.Name.LocalName));
2114 } 2097 }
2115 2098
2116 // when state is set to 2 it implies 1, so don't set it to 1 2099 // when state is set to 2 it implies 1, so don't set it to 1
2117 if (2 != state && YesNoType.Yes == this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib)) 2100 if (2 != state && YesNoType.Yes == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib))
2118 { 2101 {
2119 state = 1; 2102 state = 1;
2120 } 2103 }
@@ -2126,71 +2109,71 @@ namespace WixToolset.Extensions
2126 case "WebApplication": 2109 case "WebApplication":
2127 if (null == componentId) 2110 if (null == componentId)
2128 { 2111 {
2129 this.Core.OnMessage(IIsErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName)); 2112 this.Messaging.Write(IIsErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, element.Name.LocalName, attrib.Name.LocalName));
2130 } 2113 }
2131 2114
2132 application = this.Core.GetAttributeValue(sourceLineNumbers, attrib); 2115 application = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib);
2133 break; 2116 break;
2134 case "WebLog": 2117 case "WebLog":
2135 if (null == componentId) 2118 if (null == componentId)
2136 { 2119 {
2137 this.Core.OnMessage(IIsErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName)); 2120 this.Messaging.Write(IIsErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, element.Name.LocalName, attrib.Name.LocalName));
2138 } 2121 }
2139 2122
2140 log = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib); 2123 log = this.ParseHelper.GetAttributeIdentifierValue(sourceLineNumbers, attrib);
2141 this.Core.CreateSimpleReference(sourceLineNumbers, "IIsWebLog", log); 2124 this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "IIsWebLog", log);
2142 break; 2125 break;
2143 default: 2126 default:
2144 this.Core.UnexpectedAttribute(node, attrib); 2127 this.ParseHelper.UnexpectedAttribute(element, attrib);
2145 break; 2128 break;
2146 } 2129 }
2147 } 2130 }
2148 else 2131 else
2149 { 2132 {
2150 this.Core.ParseExtensionAttribute(node, attrib); 2133 this.ParseHelper.ParseExtensionAttribute(this.Context.Extensions, intermediate, section, element, attrib);
2151 } 2134 }
2152 } 2135 }
2153 2136
2154 if (null == id) 2137 if (null == id)
2155 { 2138 {
2156 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id")); 2139 this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, element.Name.LocalName, "Id"));
2157 } 2140 }
2158 2141
2159 if (null == description) 2142 if (null == description)
2160 { 2143 {
2161 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Description")); 2144 this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, element.Name.LocalName, "Description"));
2162 } 2145 }
2163 2146
2164 if (null == directory && null != componentId) 2147 if (null == directory && null != componentId)
2165 { 2148 {
2166 this.Core.OnMessage(IIsErrors.RequiredAttributeUnderComponent(sourceLineNumbers, node.Name.LocalName, "Directory")); 2149 this.Messaging.Write(IIsErrors.RequiredAttributeUnderComponent(sourceLineNumbers, element.Name.LocalName, "Directory"));
2167 } 2150 }
2168 2151
2169 foreach (XElement child in node.Elements()) 2152 foreach (XElement child in element.Elements())
2170 { 2153 {
2171 if (this.Namespace == child.Name.Namespace) 2154 if (this.Namespace == child.Name.Namespace)
2172 { 2155 {
2173 SourceLineNumber childSourceLineNumbers = Preprocessor.GetSourceLineNumbers(child); 2156 SourceLineNumber childSourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(child);
2174 switch (child.Name.LocalName) 2157 switch (child.Name.LocalName)
2175 { 2158 {
2176 case "CertificateRef": 2159 case "CertificateRef":
2177 if (null == componentId) 2160 if (null == componentId)
2178 { 2161 {
2179 this.Core.OnMessage(IIsErrors.IllegalElementWithoutComponent(childSourceLineNumbers, child.Name.LocalName)); 2162 this.Messaging.Write(IIsErrors.IllegalElementWithoutComponent(childSourceLineNumbers, child.Name.LocalName));
2180 } 2163 }
2181 2164
2182 this.ParseCertificateRefElement(child, id); 2165 this.ParseCertificateRefElement(intermediate, section, child, id?.Id);
2183 break; 2166 break;
2184 case "HttpHeader": 2167 case "HttpHeader":
2185 if (null == componentId) 2168 if (null == componentId)
2186 { 2169 {
2187 this.Core.OnMessage(IIsErrors.IllegalElementWithoutComponent(childSourceLineNumbers, child.Name.LocalName)); 2170 this.Messaging.Write(IIsErrors.IllegalElementWithoutComponent(childSourceLineNumbers, child.Name.LocalName));
2188 } 2171 }
2189 2172
2190 this.ParseHttpHeaderElement(child, HttpHeaderParentType.WebSite, id); 2173 this.ParseHttpHeaderElement(intermediate, section, child, HttpHeaderParentType.WebSite, id?.Id);
2191 break; 2174 break;
2192 case "WebAddress": 2175 case "WebAddress":
2193 string address = this.ParseWebAddressElement(child, id); 2176 string address = this.ParseWebAddressElement(intermediate, section, child, id?.Id);
2194 if (null == keyAddress) 2177 if (null == keyAddress)
2195 { 2178 {
2196 keyAddress = address; 2179 keyAddress = address;
@@ -2199,279 +2182,278 @@ namespace WixToolset.Extensions
2199 case "WebApplication": 2182 case "WebApplication":
2200 if (null == componentId) 2183 if (null == componentId)
2201 { 2184 {
2202 this.Core.OnMessage(IIsErrors.IllegalElementWithoutComponent(childSourceLineNumbers, child.Name.LocalName)); 2185 this.Messaging.Write(IIsErrors.IllegalElementWithoutComponent(childSourceLineNumbers, child.Name.LocalName));
2203 } 2186 }
2204 2187
2205 if (null != application) 2188 if (null != application)
2206 { 2189 {
2207 this.Core.OnMessage(IIsErrors.WebApplicationAlreadySpecified(childSourceLineNumbers, node.Name.LocalName)); 2190 this.Messaging.Write(IIsErrors.WebApplicationAlreadySpecified(childSourceLineNumbers, element.Name.LocalName));
2208 } 2191 }
2209 2192
2210 application = this.ParseWebApplicationElement(child); 2193 application = this.ParseWebApplicationElement(intermediate, section, child);
2211 break; 2194 break;
2212 case "WebDir": 2195 case "WebDir":
2213 if (null == componentId) 2196 if (null == componentId)
2214 { 2197 {
2215 this.Core.OnMessage(IIsErrors.IllegalElementWithoutComponent(childSourceLineNumbers, child.Name.LocalName)); 2198 this.Messaging.Write(IIsErrors.IllegalElementWithoutComponent(childSourceLineNumbers, child.Name.LocalName));
2216 } 2199 }
2217 2200
2218 this.ParseWebDirElement(child, componentId, id); 2201 this.ParseWebDirElement(intermediate, section, child, componentId, id?.Id);
2219 break; 2202 break;
2220 case "WebDirProperties": 2203 case "WebDirProperties":
2221 if (null == componentId) 2204 if (null == componentId)
2222 { 2205 {
2223 this.Core.OnMessage(IIsErrors.IllegalElementWithoutComponent(childSourceLineNumbers, child.Name.LocalName)); 2206 this.Messaging.Write(IIsErrors.IllegalElementWithoutComponent(childSourceLineNumbers, child.Name.LocalName));
2224 } 2207 }
2225 2208
2226 string childWebDirProperties = this.ParseWebDirPropertiesElement(child); 2209 string childWebDirProperties = this.ParseWebDirPropertiesElement(intermediate, section, child);
2227 if (null == dirProperties) 2210 if (null == dirProperties)
2228 { 2211 {
2229 dirProperties = childWebDirProperties; 2212 dirProperties = childWebDirProperties;
2230 } 2213 }
2231 else 2214 else
2232 { 2215 {
2233 this.Core.OnMessage(WixErrors.IllegalParentAttributeWhenNested(sourceLineNumbers, "WebSite", "DirProperties", child.Name.LocalName)); 2216 this.Messaging.Write(ErrorMessages.IllegalParentAttributeWhenNested(sourceLineNumbers, "WebSite", "DirProperties", child.Name.LocalName));
2234 } 2217 }
2235 break; 2218 break;
2236 case "WebError": 2219 case "WebError":
2237 if (null == componentId) 2220 if (null == componentId)
2238 { 2221 {
2239 this.Core.OnMessage(IIsErrors.IllegalElementWithoutComponent(childSourceLineNumbers, child.Name.LocalName)); 2222 this.Messaging.Write(IIsErrors.IllegalElementWithoutComponent(childSourceLineNumbers, child.Name.LocalName));
2240 } 2223 }
2241 2224
2242 this.ParseWebErrorElement(child, WebErrorParentType.WebSite, id); 2225 this.ParseWebErrorElement(intermediate, section, child, WebErrorParentType.WebSite, id?.Id);
2243 break; 2226 break;
2244 case "WebFilter": 2227 case "WebFilter":
2245 if (null == componentId) 2228 if (null == componentId)
2246 { 2229 {
2247 this.Core.OnMessage(IIsErrors.IllegalElementWithoutComponent(childSourceLineNumbers, child.Name.LocalName)); 2230 this.Messaging.Write(IIsErrors.IllegalElementWithoutComponent(childSourceLineNumbers, child.Name.LocalName));
2248 } 2231 }
2249 2232
2250 this.ParseWebFilterElement(child, componentId, id); 2233 this.ParseWebFilterElement(intermediate, section, child, componentId, id?.Id);
2251 break; 2234 break;
2252 case "WebVirtualDir": 2235 case "WebVirtualDir":
2253 if (null == componentId) 2236 if (null == componentId)
2254 { 2237 {
2255 this.Core.OnMessage(IIsErrors.IllegalElementWithoutComponent(childSourceLineNumbers, child.Name.LocalName)); 2238 this.Messaging.Write(IIsErrors.IllegalElementWithoutComponent(childSourceLineNumbers, child.Name.LocalName));
2256 } 2239 }
2257 2240
2258 this.ParseWebVirtualDirElement(child, componentId, id, null); 2241 this.ParseWebVirtualDirElement(intermediate, section, child, componentId, id?.Id, null);
2259 break; 2242 break;
2260 case "MimeMap": 2243 case "MimeMap":
2261 this.ParseMimeMapElement(child, id, MimeMapParentType.WebSite); 2244 this.ParseMimeMapElement(intermediate, section, child, id?.Id, MimeMapParentType.WebSite);
2262 break; 2245 break;
2263 default: 2246 default:
2264 this.Core.UnexpectedElement(node, child); 2247 this.ParseHelper.UnexpectedElement(element, child);
2265 break; 2248 break;
2266 } 2249 }
2267 } 2250 }
2268 else 2251 else
2269 { 2252 {
2270 this.Core.ParseExtensionElement(node, child); 2253 this.ParseHelper.ParseExtensionElement(this.Context.Extensions, intermediate, section, element, child);
2271 } 2254 }
2272 } 2255 }
2273 2256
2274 2257
2275 if (null == keyAddress) 2258 if (null == keyAddress)
2276 { 2259 {
2277 this.Core.OnMessage(WixErrors.ExpectedElement(sourceLineNumbers, node.Name.LocalName, "WebAddress")); 2260 this.Messaging.Write(ErrorMessages.ExpectedElement(sourceLineNumbers, element.Name.LocalName, "WebAddress"));
2278 } 2261 }
2279 2262
2280 if (null != application) 2263 if (null != application)
2281 { 2264 {
2282 this.Core.CreateSimpleReference(sourceLineNumbers, "IIsWebApplication", application); 2265 this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "IIsWebApplication", application);
2283 } 2266 }
2284 2267
2285 if (null != dirProperties) 2268 if (null != dirProperties)
2286 { 2269 {
2287 this.Core.CreateSimpleReference(sourceLineNumbers, "IIsWebDirProperties", dirProperties); 2270 this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "IIsWebDirProperties", dirProperties);
2288 } 2271 }
2289 2272
2290 if (null != componentId) 2273 if (null != componentId)
2291 { 2274 {
2292 // Reference ConfigureIIs since nothing will happen without it 2275 // Reference ConfigureIIs since nothing will happen without it
2293 this.Core.CreateSimpleReference(sourceLineNumbers, "CustomAction", "ConfigureIIs"); 2276 this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "CustomAction", "ConfigureIIs");
2294 } 2277 }
2295 2278
2296 if (!this.Core.EncounteredError) 2279 if (!this.Messaging.EncounteredError)
2297 { 2280 {
2298 Row row = this.Core.CreateRow(sourceLineNumbers, "IIsWebSite"); 2281 var row = this.ParseHelper.CreateRow(section, sourceLineNumbers, "IIsWebSite", id);
2299 row[0] = id; 2282 row.Set(1, componentId);
2300 row[1] = componentId; 2283 row.Set(2, description);
2301 row[2] = description;
2302 if (CompilerConstants.IntegerNotSet != connectionTimeout) 2284 if (CompilerConstants.IntegerNotSet != connectionTimeout)
2303 { 2285 {
2304 row[3] = connectionTimeout; 2286 row.Set(3, connectionTimeout);
2305 } 2287 }
2306 row[4] = directory; 2288 row.Set(4, directory);
2307 if (CompilerConstants.IntegerNotSet != state) 2289 if (CompilerConstants.IntegerNotSet != state)
2308 { 2290 {
2309 row[5] = state; 2291 row.Set(5, state);
2310 } 2292 }
2311 2293
2312 if (0 != attributes) 2294 if (0 != attributes)
2313 { 2295 {
2314 row[6] = attributes; 2296 row.Set(6, attributes);
2315 } 2297 }
2316 row[7] = keyAddress; 2298 row.Set(7, keyAddress);
2317 row[8] = dirProperties; 2299 row.Set(8, dirProperties);
2318 row[9] = application; 2300 row.Set(9, application);
2319 if (CompilerConstants.IntegerNotSet != sequence) 2301 if (CompilerConstants.IntegerNotSet != sequence)
2320 { 2302 {
2321 row[10] = sequence; 2303 row.Set(10, sequence);
2322 } 2304 }
2323 row[11] = log; 2305 row.Set(11, log);
2324 row[12] = siteId; 2306 row.Set(12, siteId);
2325 } 2307 }
2326 } 2308 }
2327 2309
2328 /// <summary> 2310 /// <summary>
2329 /// Parses a HTTP Header element. 2311 /// Parses a HTTP Header element.
2330 /// </summary> 2312 /// </summary>
2331 /// <param name="node">Element to parse.</param> 2313 /// <param name="element">Element to parse.</param>
2332 /// <param name="parentType">Type of the parent.</param> 2314 /// <param name="parentType">Type of the parent.</param>
2333 /// <param name="parent">Id of the parent.</param> 2315 /// <param name="parent">Id of the parent.</param>
2334 private void ParseHttpHeaderElement(XElement node, HttpHeaderParentType parentType, string parent) 2316 private void ParseHttpHeaderElement(Intermediate intermediate, IntermediateSection section, XElement element, HttpHeaderParentType parentType, string parent)
2335 { 2317 {
2336 SourceLineNumber sourceLineNumbers = Preprocessor.GetSourceLineNumbers(node); 2318 SourceLineNumber sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(element);
2337 Identifier id = null; 2319 Identifier id = null;
2338 string headerName = null; 2320 string headerName = null;
2339 string headerValue = null; 2321 string headerValue = null;
2340 2322
2341 foreach (XAttribute attrib in node.Attributes()) 2323 foreach (XAttribute attrib in element.Attributes())
2342 { 2324 {
2343 if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace) 2325 if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace)
2344 { 2326 {
2345 switch (attrib.Name.LocalName) 2327 switch (attrib.Name.LocalName)
2346 { 2328 {
2347 case "Id": 2329 case "Id":
2348 id = this.Core.GetAttributeIdentifier(sourceLineNumbers, attrib); 2330 id = this.ParseHelper.GetAttributeIdentifier(sourceLineNumbers, attrib);
2349 break; 2331 break;
2350 case "Name": 2332 case "Name":
2351 headerName = this.Core.GetAttributeValue(sourceLineNumbers, attrib); 2333 headerName = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib);
2352 break; 2334 break;
2353 case "Value": 2335 case "Value":
2354 headerValue = this.Core.GetAttributeValue(sourceLineNumbers, attrib); 2336 headerValue = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib);
2355 break; 2337 break;
2356 default: 2338 default:
2357 this.Core.UnexpectedAttribute(node, attrib); 2339 this.ParseHelper.UnexpectedAttribute(element, attrib);
2358 break; 2340 break;
2359 } 2341 }
2360 } 2342 }
2361 else 2343 else
2362 { 2344 {
2363 this.Core.ParseExtensionAttribute(node, attrib); 2345 this.ParseHelper.ParseExtensionAttribute(this.Context.Extensions, intermediate, section, element, attrib);
2364 } 2346 }
2365 } 2347 }
2366 2348
2367 if (null == headerName) 2349 if (null == headerName)
2368 { 2350 {
2369 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Name")); 2351 this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, element.Name.LocalName, "Name"));
2370 } 2352 }
2371 else if (null == id) 2353 else if (null == id)
2372 { 2354 {
2373 id = this.Core.CreateIdentifierFromFilename(headerName); 2355 id = this.ParseHelper.CreateIdentifierFromFilename(headerName);
2374 } 2356 }
2375 2357
2376 this.Core.ParseForExtensionElements(node); 2358 this.ParseHelper.ParseForExtensionElements(this.Context.Extensions, intermediate, section, element);
2377 2359
2378 // Reference ConfigureIIs since nothing will happen without it 2360 // Reference ConfigureIIs since nothing will happen without it
2379 this.Core.CreateSimpleReference(sourceLineNumbers, "CustomAction", "ConfigureIIs"); 2361 this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "CustomAction", "ConfigureIIs");
2380 2362
2381 Row row = this.Core.CreateRow(sourceLineNumbers, "IIsHttpHeader", id); 2363 var row = this.ParseHelper.CreateRow(section, sourceLineNumbers, "IIsHttpHeader", id);
2382 row[1] = (int)parentType; 2364 row.Set(1, (int)parentType);
2383 row[2] = parent; 2365 row.Set(2, parent);
2384 row[3] = headerName; 2366 row.Set(3, headerName);
2385 row[4] = headerValue; 2367 row.Set(4, headerValue);
2386 row[5] = 0; 2368 row.Set(5, 0);
2387 row[6] = null; 2369 //row.Set(6, null);
2388 } 2370 }
2389 2371
2390 /// <summary> 2372 /// <summary>
2391 /// Parses a virtual directory element. 2373 /// Parses a virtual directory element.
2392 /// </summary> 2374 /// </summary>
2393 /// <param name="node">Element to parse.</param> 2375 /// <param name="element">Element to parse.</param>
2394 /// <param name="componentId">Identifier of parent component.</param> 2376 /// <param name="componentId">Identifier of parent component.</param>
2395 /// <param name="parentWeb">Identifier of parent web site.</param> 2377 /// <param name="parentWeb">Identifier of parent web site.</param>
2396 /// <param name="parentAlias">Alias of the parent web site.</param> 2378 /// <param name="parentAlias">Alias of the parent web site.</param>
2397 private void ParseWebVirtualDirElement(XElement node, string componentId, string parentWeb, string parentAlias) 2379 private void ParseWebVirtualDirElement(Intermediate intermediate, IntermediateSection section, XElement element, string componentId, string parentWeb, string parentAlias)
2398 { 2380 {
2399 SourceLineNumber sourceLineNumbers = Preprocessor.GetSourceLineNumbers(node); 2381 SourceLineNumber sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(element);
2400 string id = null; 2382 Identifier id = null;
2401 string alias = null; 2383 string alias = null;
2402 string application = null; 2384 string application = null;
2403 string directory = null; 2385 string directory = null;
2404 string dirProperties = null; 2386 string dirProperties = null;
2405 2387
2406 foreach (XAttribute attrib in node.Attributes()) 2388 foreach (XAttribute attrib in element.Attributes())
2407 { 2389 {
2408 if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace) 2390 if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace)
2409 { 2391 {
2410 switch (attrib.Name.LocalName) 2392 switch (attrib.Name.LocalName)
2411 { 2393 {
2412 case "Id": 2394 case "Id":
2413 id = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib); 2395 id = this.ParseHelper.GetAttributeIdentifier(sourceLineNumbers, attrib);
2414 break; 2396 break;
2415 case "Alias": 2397 case "Alias":
2416 alias = this.Core.GetAttributeValue(sourceLineNumbers, attrib); 2398 alias = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib);
2417 break; 2399 break;
2418 case "Directory": 2400 case "Directory":
2419 directory = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib); 2401 directory = this.ParseHelper.GetAttributeIdentifierValue(sourceLineNumbers, attrib);
2420 this.Core.CreateSimpleReference(sourceLineNumbers, "Directory", directory); 2402 this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "Directory", directory);
2421 break; 2403 break;
2422 case "DirProperties": 2404 case "DirProperties":
2423 dirProperties = this.Core.GetAttributeValue(sourceLineNumbers, attrib); 2405 dirProperties = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib);
2424 break; 2406 break;
2425 case "WebApplication": 2407 case "WebApplication":
2426 application = this.Core.GetAttributeValue(sourceLineNumbers, attrib); 2408 application = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib);
2427 break; 2409 break;
2428 case "WebSite": 2410 case "WebSite":
2429 if (null != parentWeb) 2411 if (null != parentWeb)
2430 { 2412 {
2431 this.Core.OnMessage(IIsErrors.WebSiteAttributeUnderWebSite(sourceLineNumbers, node.Name.LocalName)); 2413 this.Messaging.Write(IIsErrors.WebSiteAttributeUnderWebSite(sourceLineNumbers, element.Name.LocalName));
2432 } 2414 }
2433 2415
2434 parentWeb = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib); 2416 parentWeb = this.ParseHelper.GetAttributeIdentifierValue(sourceLineNumbers, attrib);
2435 this.Core.CreateSimpleReference(sourceLineNumbers, "IIsWebSite", parentWeb); 2417 this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "IIsWebSite", parentWeb);
2436 break; 2418 break;
2437 default: 2419 default:
2438 this.Core.UnexpectedAttribute(node, attrib); 2420 this.ParseHelper.UnexpectedAttribute(element, attrib);
2439 break; 2421 break;
2440 } 2422 }
2441 } 2423 }
2442 else 2424 else
2443 { 2425 {
2444 this.Core.ParseExtensionAttribute(node, attrib); 2426 this.ParseHelper.ParseExtensionAttribute(this.Context.Extensions, intermediate, section, element, attrib);
2445 } 2427 }
2446 } 2428 }
2447 2429
2448 if (null == id) 2430 if (null == id)
2449 { 2431 {
2450 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id")); 2432 this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, element.Name.LocalName, "Id"));
2451 } 2433 }
2452 2434
2453 if (null == alias) 2435 if (null == alias)
2454 { 2436 {
2455 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Alias")); 2437 this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, element.Name.LocalName, "Alias"));
2456 } 2438 }
2457 else if (-1 != alias.IndexOf("\\", StringComparison.Ordinal)) 2439 else if (-1 != alias.IndexOf("\\", StringComparison.Ordinal))
2458 { 2440 {
2459 this.Core.OnMessage(IIsErrors.IllegalCharacterInAttributeValue(sourceLineNumbers, node.Name.LocalName, "Alias", alias, '\\')); 2441 this.Messaging.Write(IIsErrors.IllegalCharacterInAttributeValue(sourceLineNumbers, element.Name.LocalName, "Alias", alias, '\\'));
2460 } 2442 }
2461 2443
2462 if (null == directory) 2444 if (null == directory)
2463 { 2445 {
2464 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Directory")); 2446 this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, element.Name.LocalName, "Directory"));
2465 } 2447 }
2466 2448
2467 if (null == parentWeb) 2449 if (null == parentWeb)
2468 { 2450 {
2469 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "WebSite")); 2451 this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, element.Name.LocalName, "WebSite"));
2470 } 2452 }
2471 2453
2472 if (null == componentId) 2454 if (null == componentId)
2473 { 2455 {
2474 this.Core.OnMessage(IIsErrors.IllegalElementWithoutComponent(sourceLineNumbers, node.Name.LocalName)); 2456 this.Messaging.Write(IIsErrors.IllegalElementWithoutComponent(sourceLineNumbers, element.Name.LocalName));
2475 } 2457 }
2476 2458
2477 if (null != parentAlias) 2459 if (null != parentAlias)
@@ -2479,84 +2461,83 @@ namespace WixToolset.Extensions
2479 alias = String.Concat(parentAlias, "/", alias); 2461 alias = String.Concat(parentAlias, "/", alias);
2480 } 2462 }
2481 2463
2482 foreach (XElement child in node.Elements()) 2464 foreach (XElement child in element.Elements())
2483 { 2465 {
2484 if (this.Namespace == child.Name.Namespace) 2466 if (this.Namespace == child.Name.Namespace)
2485 { 2467 {
2486 SourceLineNumber childSourceLineNumbers = Preprocessor.GetSourceLineNumbers(child); 2468 SourceLineNumber childSourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(child);
2487 switch (child.Name.LocalName) 2469 switch (child.Name.LocalName)
2488 { 2470 {
2489 case "WebApplication": 2471 case "WebApplication":
2490 if (null != application) 2472 if (null != application)
2491 { 2473 {
2492 this.Core.OnMessage(IIsErrors.WebApplicationAlreadySpecified(childSourceLineNumbers, node.Name.LocalName)); 2474 this.Messaging.Write(IIsErrors.WebApplicationAlreadySpecified(childSourceLineNumbers, element.Name.LocalName));
2493 } 2475 }
2494 2476
2495 application = this.ParseWebApplicationElement(child); 2477 application = this.ParseWebApplicationElement(intermediate, section, child);
2496 break; 2478 break;
2497 case "WebDirProperties": 2479 case "WebDirProperties":
2498 if (null == componentId) 2480 if (null == componentId)
2499 { 2481 {
2500 this.Core.OnMessage(IIsErrors.IllegalElementWithoutComponent(childSourceLineNumbers, child.Name.LocalName)); 2482 this.Messaging.Write(IIsErrors.IllegalElementWithoutComponent(childSourceLineNumbers, child.Name.LocalName));
2501 } 2483 }
2502 2484
2503 string childWebDirProperties = this.ParseWebDirPropertiesElement(child); 2485 string childWebDirProperties = this.ParseWebDirPropertiesElement(intermediate, section, child);
2504 if (null == dirProperties) 2486 if (null == dirProperties)
2505 { 2487 {
2506 dirProperties = childWebDirProperties; 2488 dirProperties = childWebDirProperties;
2507 } 2489 }
2508 else 2490 else
2509 { 2491 {
2510 this.Core.OnMessage(WixErrors.IllegalAttributeWhenNested(sourceLineNumbers, child.Name.LocalName, "DirProperties", child.Name.LocalName)); 2492 this.Messaging.Write(ErrorMessages.IllegalAttributeWhenNested(sourceLineNumbers, child.Name.LocalName, "DirProperties", child.Name.LocalName));
2511 } 2493 }
2512 break; 2494 break;
2513 2495
2514 case "WebError": 2496 case "WebError":
2515 this.ParseWebErrorElement(child, WebErrorParentType.WebVirtualDir, id); 2497 this.ParseWebErrorElement(intermediate, section, child, WebErrorParentType.WebVirtualDir, id?.Id);
2516 break; 2498 break;
2517 case "WebVirtualDir": 2499 case "WebVirtualDir":
2518 this.ParseWebVirtualDirElement(child, componentId, parentWeb, alias); 2500 this.ParseWebVirtualDirElement(intermediate, section, child, componentId, parentWeb, alias);
2519 break; 2501 break;
2520 case "HttpHeader": 2502 case "HttpHeader":
2521 this.ParseHttpHeaderElement(child, HttpHeaderParentType.WebVirtualDir, id); 2503 this.ParseHttpHeaderElement(intermediate, section, child, HttpHeaderParentType.WebVirtualDir, id?.Id);
2522 break; 2504 break;
2523 case "MimeMap": 2505 case "MimeMap":
2524 this.ParseMimeMapElement(child, id, MimeMapParentType.WebVirtualDir); 2506 this.ParseMimeMapElement(intermediate, section, child, id?.Id, MimeMapParentType.WebVirtualDir);
2525 break; 2507 break;
2526 default: 2508 default:
2527 this.Core.UnexpectedElement(node, child); 2509 this.ParseHelper.UnexpectedElement(element, child);
2528 break; 2510 break;
2529 } 2511 }
2530 } 2512 }
2531 else 2513 else
2532 { 2514 {
2533 this.Core.ParseExtensionElement(node, child); 2515 this.ParseHelper.ParseExtensionElement(this.Context.Extensions, intermediate, section, element, child);
2534 } 2516 }
2535 } 2517 }
2536 2518
2537 if (null != dirProperties) 2519 if (null != dirProperties)
2538 { 2520 {
2539 this.Core.CreateSimpleReference(sourceLineNumbers, "IIsWebDirProperties", dirProperties); 2521 this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "IIsWebDirProperties", dirProperties);
2540 } 2522 }
2541 2523
2542 if (null != application) 2524 if (null != application)
2543 { 2525 {
2544 this.Core.CreateSimpleReference(sourceLineNumbers, "IIsWebApplication", application); 2526 this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "IIsWebApplication", application);
2545 } 2527 }
2546 2528
2547 // Reference ConfigureIIs since nothing will happen without it 2529 // Reference ConfigureIIs since nothing will happen without it
2548 this.Core.CreateSimpleReference(sourceLineNumbers, "CustomAction", "ConfigureIIs"); 2530 this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "CustomAction", "ConfigureIIs");
2549 2531
2550 if (!this.Core.EncounteredError) 2532 if (!this.Messaging.EncounteredError)
2551 { 2533 {
2552 Row row = this.Core.CreateRow(sourceLineNumbers, "IIsWebVirtualDir"); 2534 var row = this.ParseHelper.CreateRow(section, sourceLineNumbers, "IIsWebVirtualDir", id);
2553 row[0] = id; 2535 row.Set(1, componentId);
2554 row[1] = componentId; 2536 row.Set(2, parentWeb);
2555 row[2] = parentWeb; 2537 row.Set(3, alias);
2556 row[3] = alias; 2538 row.Set(4, directory);
2557 row[4] = directory; 2539 row.Set(5, dirProperties);
2558 row[5] = dirProperties; 2540 row.Set(6, application);
2559 row[6] = application;
2560 } 2541 }
2561 } 2542 }
2562 } 2543 }
diff --git a/src/wixext/IIsDecompiler.cs b/src/wixext/IIsDecompiler.cs
index 8b3b8248..17e15348 100644
--- a/src/wixext/IIsDecompiler.cs
+++ b/src/wixext/IIsDecompiler.cs
@@ -1,7 +1,8 @@
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. 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 2
3namespace WixToolset.Extensions 3namespace WixToolset.Iis
4{ 4{
5#if TODO_CONSIDER_DECOMPILER
5 using System; 6 using System;
6 using System.Collections; 7 using System.Collections;
7 using System.Globalization; 8 using System.Globalization;
@@ -1544,4 +1545,5 @@ namespace WixToolset.Extensions
1544 } 1545 }
1545 } 1546 }
1546 } 1547 }
1548#endif
1547} 1549}
diff --git a/src/wixext/IIsExtensionData.cs b/src/wixext/IIsExtensionData.cs
index 5b8bf564..799ea71e 100644
--- a/src/wixext/IIsExtensionData.cs
+++ b/src/wixext/IIsExtensionData.cs
@@ -1,64 +1,30 @@
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. 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 2
3namespace WixToolset.Extensions 3namespace WixToolset.Iis
4{ 4{
5 using System;
6 using System.Reflection;
7 using WixToolset.Data; 5 using WixToolset.Data;
8 using WixToolset.Extensibility; 6 using WixToolset.Extensibility;
9 7
10 /// <summary> 8 /// <summary>
11 /// The WiX Toolset Internet Information Services Extension. 9 /// The WiX Toolset Internet Information Services Extension.
12 /// </summary> 10 /// </summary>
13 public sealed class IIsExtensionData : ExtensionData 11 public sealed class IIsExtensionData : BaseExtensionData
14 { 12 {
15 /// <summary> 13 /// <summary>
16 /// Gets the default culture. 14 /// Gets the default culture.
17 /// </summary> 15 /// </summary>
18 /// <value>The default culture.</value> 16 /// <value>The default culture.</value>
19 public override string DefaultCulture 17 public override string DefaultCulture => "en-US";
20 {
21 get { return "en-us"; }
22 }
23
24 /// <summary>
25 /// Gets the optional table definitions for this extension.
26 /// </summary>
27 /// <value>The optional table definitions for this extension.</value>
28 public override TableDefinitionCollection TableDefinitions
29 {
30 get
31 {
32 return IIsExtensionData.GetExtensionTableDefinitions();
33 }
34 }
35
36 /// <summary>
37 /// Gets the library associated with this extension.
38 /// </summary>
39 /// <param name="tableDefinitions">The table definitions to use while loading the library.</param>
40 /// <returns>The loaded library.</returns>
41 public override Library GetLibrary(TableDefinitionCollection tableDefinitions)
42 {
43 return IIsExtensionData.GetExtensionLibrary(tableDefinitions);
44 }
45 18
46 /// <summary> 19 public override bool TryGetTupleDefinitionByName(string name, out IntermediateTupleDefinition tupleDefinition)
47 /// Internal mechanism to access the extension's table definitions.
48 /// </summary>
49 /// <returns>Extension's table definitions.</returns>
50 internal static TableDefinitionCollection GetExtensionTableDefinitions()
51 { 20 {
52 return ExtensionData.LoadTableDefinitionHelper(Assembly.GetExecutingAssembly(), "WixToolset.Extensions.Data.tables.xml"); 21 tupleDefinition = null;
22 return tupleDefinition != null;
53 } 23 }
54 24
55 /// <summary> 25 public override Intermediate GetLibrary(ITupleDefinitionCreator tupleDefinitions)
56 /// Internal mechanism to access the extension's library.
57 /// </summary>
58 /// <returns>Extension's library.</returns>
59 internal static Library GetExtensionLibrary(TableDefinitionCollection tableDefinitions)
60 { 26 {
61 return ExtensionData.LoadLibraryHelper(Assembly.GetExecutingAssembly(), "WixToolset.Extensions.Data.iis.wixlib", tableDefinitions); 27 return Intermediate.Load(typeof(IIsExtensionData).Assembly, "WixToolset.Iis.iis.wixlib", tupleDefinitions);
62 } 28 }
63 } 29 }
64} 30}
diff --git a/src/wixext/IisErrors.cs b/src/wixext/IisErrors.cs
new file mode 100644
index 00000000..874c5609
--- /dev/null
+++ b/src/wixext/IisErrors.cs
@@ -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
3namespace WixToolset.Iis
4{
5 using System;
6 using WixToolset.Data;
7
8 public static class IIsErrors
9 {
10 public static Message MimeMapExtensionMissingPeriod(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string attributeValue)
11 {
12 throw new NotImplementedException();
13 }
14
15 public static Message IllegalAttributeWithoutComponent(SourceLineNumber sourceLineNumbers, string elementName, string attributeName)
16 {
17 throw new NotImplementedException();
18 }
19
20 public static Message IllegalElementWithoutComponent(SourceLineNumber sourceLineNumbers, string elementName)
21 {
22 throw new NotImplementedException();
23 }
24
25 public static Message OneOfAttributesRequiredUnderComponent(SourceLineNumber sourceLineNumbers, string elementName, string attributeName1, string attributeName2, string attributeName3, string attributeName4)
26 {
27 throw new NotImplementedException();
28 }
29
30 public static Message WebSiteAttributeUnderWebSite(SourceLineNumber sourceLineNumbers, string elementName)
31 {
32 throw new NotImplementedException();
33 }
34
35 public static Message WebApplicationAlreadySpecified(SourceLineNumber sourceLineNumbers, string elementName)
36 {
37 throw new NotImplementedException();
38 }
39
40 public static Message IllegalCharacterInAttributeValue(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string value, char illegalCharacter)
41 {
42 throw new NotImplementedException();
43 }
44
45 public static Message DeprecatedBinaryChildElement(SourceLineNumber sourceLineNumbers, string elementName)
46 {
47 throw new NotImplementedException();
48 }
49
50 public static Message WebSiteNotFound(string webSiteDescription)
51 {
52 throw new NotImplementedException();
53 }
54
55 public static Message InsufficientPermissionHarvestWebSite()
56 {
57 throw new NotImplementedException();
58 }
59
60 public static Message CannotHarvestWebSite()
61 {
62 throw new NotImplementedException();
63 }
64
65 public static Message RequiredAttributeUnderComponent(SourceLineNumber sourceLineNumbers, string elementName, string attributeName)
66 {
67 throw new NotImplementedException();
68 }
69 }
70} \ No newline at end of file
diff --git a/src/wixext/IisExtensionFactory.cs b/src/wixext/IisExtensionFactory.cs
new file mode 100644
index 00000000..038379f8
--- /dev/null
+++ b/src/wixext/IisExtensionFactory.cs
@@ -0,0 +1,18 @@
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.Iis
4{
5 using System;
6 using System.Collections.Generic;
7 using WixToolset.Extensibility;
8
9 public class IisExtensionFactory : BaseExtensionFactory
10 {
11 protected override IEnumerable<Type> ExtensionTypes => new[]
12 {
13 typeof(IIsCompiler),
14 typeof(IIsExtensionData),
15 typeof(IisWindowsInstallerBackendBinderExtension),
16 };
17 }
18}
diff --git a/src/wixext/IisWindowsInstallerBackendBinderExtension.cs b/src/wixext/IisWindowsInstallerBackendBinderExtension.cs
new file mode 100644
index 00000000..93b6795f
--- /dev/null
+++ b/src/wixext/IisWindowsInstallerBackendBinderExtension.cs
@@ -0,0 +1,26 @@
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.Iis
4{
5 using System.Linq;
6 using System.Xml;
7 using WixToolset.Data.WindowsInstaller;
8 using WixToolset.Extensibility;
9
10 public class IisWindowsInstallerBackendBinderExtension : BaseWindowsInstallerBackendBinderExtension
11 {
12 private static readonly TableDefinition[] Tables = LoadTables();
13
14 protected override TableDefinition[] TableDefinitionsForTuples => Tables;
15
16 private static TableDefinition[] LoadTables()
17 {
18 using (var resourceStream = typeof(IisWindowsInstallerBackendBinderExtension).Assembly.GetManifestResourceStream("WixToolset.Iis.tables.xml"))
19 using (var reader = XmlReader.Create(resourceStream))
20 {
21 var tables = TableDefinitionCollection.Load(reader);
22 return tables.ToArray();
23 }
24 }
25 }
26}
diff --git a/src/wixext/WixToolset.Iis.wixext.csproj b/src/wixext/WixToolset.Iis.wixext.csproj
new file mode 100644
index 00000000..28da704a
--- /dev/null
+++ b/src/wixext/WixToolset.Iis.wixext.csproj
@@ -0,0 +1,36 @@
1<?xml version="1.0" encoding="utf-8"?>
2<!-- 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. -->
3
4<Project Sdk="Microsoft.NET.Sdk">
5 <PropertyGroup>
6 <TargetFramework>netstandard2.0</TargetFramework>
7 <RootNamespace>WixToolset.Iis</RootNamespace>
8 <Description>WiX Toolset Iis Extension</Description>
9 <Title>WiX Toolset Iis Extension</Title>
10 <IsTool>true</IsTool>
11 <ContentTargetFolders>build</ContentTargetFolders>
12 </PropertyGroup>
13
14 <ItemGroup>
15 <Content Include="$(MSBuildThisFileName).targets" />
16 <Content Include="iis.xsd" PackagePath="tools" />
17 <EmbeddedResource Include="tables.xml" />
18 <EmbeddedResource Include="$(OutputPath)..\iis.wixlib" />
19 </ItemGroup>
20
21 <ItemGroup>
22 <ProjectReference Include="$(WixToolsetRootFolder)\Data\src\WixToolset.Data\WixToolset.Data.csproj" Condition=" '$(Configuration)' == 'Debug' And Exists('$(WixToolsetRootFolder)\Data\README.md') " />
23 <PackageReference Include="WixToolset.Data" Version="4.0.*" Condition=" '$(Configuration)' == 'Release' Or !Exists('$(WixToolsetRootFolder)\Data\README.md') " PrivateAssets="all" />
24
25 <ProjectReference Include="$(WixToolsetRootFolder)\Extensibility\src\WixToolset.Extensibility\WixToolset.Extensibility.csproj" Condition=" '$(Configuration)' == 'Debug' And Exists('$(WixToolsetRootFolder)\Extensibility\README.md') " />
26 <PackageReference Include="WixToolset.Extensibility" Version="4.0.*" Condition=" '$(Configuration)' == 'Release' Or !Exists('$(WixToolsetRootFolder)\Extensibility\README.md') " PrivateAssets="all" />
27 </ItemGroup>
28
29 <ItemGroup>
30 <ProjectReference Include="..\wixlib\iis.wixproj" ReferenceOutputAssembly="false" Condition=" '$(NCrunch)'=='' " />
31 </ItemGroup>
32
33 <ItemGroup>
34 <PackageReference Include="Nerdbank.GitVersioning" Version="2.1.65" PrivateAssets="all" />
35 </ItemGroup>
36</Project>
diff --git a/src/wixext/WixToolset.Iis.wixext.targets b/src/wixext/WixToolset.Iis.wixext.targets
new file mode 100644
index 00000000..6398fce1
--- /dev/null
+++ b/src/wixext/WixToolset.Iis.wixext.targets
@@ -0,0 +1,11 @@
1<?xml version="1.0" encoding="utf-8"?>
2<!-- 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. -->
3
4<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
5 <PropertyGroup>
6 <WixToolsetIisWixextPath Condition=" '$(WixToolsetIisWixextPath)' == '' ">$(MSBuildThisFileDirectory)..\tools\WixToolset.Iis.wixext.dll</WixToolsetIisWixextPath>
7 </PropertyGroup>
8 <ItemGroup>
9 <WixExtension Include="$(WixToolsetIisWixextPath)" />
10 </ItemGroup>
11</Project>
diff --git a/src/wixext/messages.cs b/src/wixext/messages.cs
deleted file mode 100644
index 8b43bd9f..00000000
--- a/src/wixext/messages.cs
+++ /dev/null
@@ -1,237 +0,0 @@
1//------------------------------------------------------------------------------
2// <auto-generated>
3// This code was generated by a tool.
4// Runtime Version:4.0.30319.42000
5//
6// Changes to this file may cause incorrect behavior and will be lost if
7// the code is regenerated.
8// </auto-generated>
9//------------------------------------------------------------------------------
10
11namespace WixToolset.Extensions
12{
13 using System;
14 using System.Reflection;
15 using System.Resources;
16 using WixToolset.Data;
17
18
19 public class IIsErrorEventArgs : MessageEventArgs
20 {
21
22 private static ResourceManager resourceManager = new ResourceManager("WixToolset.Extensions.Data.Messages", Assembly.GetExecutingAssembly());
23
24 public IIsErrorEventArgs(SourceLineNumber sourceLineNumbers, int id, string resourceName, params object[] messageArgs) :
25 base(sourceLineNumbers, id, resourceName, messageArgs)
26 {
27 base.ResourceManager = resourceManager;
28 }
29 }
30
31 public sealed class IIsErrors
32 {
33
34 private IIsErrors()
35 {
36 }
37
38 public static MessageEventArgs MimeMapExtensionMissingPeriod(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string attributeValue)
39 {
40 return new IIsErrorEventArgs(sourceLineNumbers, 5150, "IIsErrors_MimeMapExtensionMissingPeriod_1", elementName, attributeName, attributeValue);
41 }
42
43 public static MessageEventArgs IllegalAttributeWithoutComponent(SourceLineNumber sourceLineNumbers, string elementName, string attributeName)
44 {
45 return new IIsErrorEventArgs(sourceLineNumbers, 5151, "IIsErrors_IllegalAttributeWithoutComponent_1", elementName, attributeName);
46 }
47
48 public static MessageEventArgs IllegalElementWithoutComponent(SourceLineNumber sourceLineNumbers, string elementName)
49 {
50 return new IIsErrorEventArgs(sourceLineNumbers, 5152, "IIsErrors_IllegalElementWithoutComponent_1", elementName);
51 }
52
53 public static MessageEventArgs OneOfAttributesRequiredUnderComponent(SourceLineNumber sourceLineNumbers, string elementName, string attributeName1, string attributeName2, string attributeName3, string attributeName4)
54 {
55 return new IIsErrorEventArgs(sourceLineNumbers, 5153, "IIsErrors_OneOfAttributesRequiredUnderComponent_1", elementName, attributeName1, attributeName2, attributeName3, attributeName4);
56 }
57
58 public static MessageEventArgs WebSiteAttributeUnderWebSite(SourceLineNumber sourceLineNumbers, string elementName)
59 {
60 return new IIsErrorEventArgs(sourceLineNumbers, 5154, "IIsErrors_WebSiteAttributeUnderWebSite_1", elementName);
61 }
62
63 public static MessageEventArgs WebApplicationAlreadySpecified(SourceLineNumber sourceLineNumbers, string elementName)
64 {
65 return new IIsErrorEventArgs(sourceLineNumbers, 5155, "IIsErrors_WebApplicationAlreadySpecified_1", elementName);
66 }
67
68 public static MessageEventArgs IllegalCharacterInAttributeValue(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string value, char illegalCharacter)
69 {
70 return new IIsErrorEventArgs(sourceLineNumbers, 5156, "IIsErrors_IllegalCharacterInAttributeValue_1", elementName, attributeName, value, illegalCharacter);
71 }
72
73 public static MessageEventArgs DeprecatedBinaryChildElement(SourceLineNumber sourceLineNumbers, string elementName)
74 {
75 return new IIsErrorEventArgs(sourceLineNumbers, 5157, "IIsErrors_DeprecatedBinaryChildElement_1", elementName);
76 }
77
78 public static MessageEventArgs WebSiteNotFound(string webSiteDescription)
79 {
80 return new IIsErrorEventArgs(null, 5158, "IIsErrors_WebSiteNotFound_1", webSiteDescription);
81 }
82
83 public static MessageEventArgs InsufficientPermissionHarvestWebSite()
84 {
85 return new IIsErrorEventArgs(null, 5159, "IIsErrors_InsufficientPermissionHarvestWebSite_1");
86 }
87
88 public static MessageEventArgs CannotHarvestWebSite()
89 {
90 return new IIsErrorEventArgs(null, 5160, "IIsErrors_CannotHarvestWebSite_1");
91 }
92
93 public static MessageEventArgs RequiredAttributeUnderComponent(SourceLineNumber sourceLineNumbers, string elementName, string attributeName)
94 {
95 return new IIsErrorEventArgs(sourceLineNumbers, 5161, "IIsErrors_RequiredAttributeUnderComponent_1", elementName, attributeName);
96 }
97 }
98
99 public class IIsWarningEventArgs : MessageEventArgs
100 {
101
102 private static ResourceManager resourceManager = new ResourceManager("WixToolset.Extensions.Data.Messages", Assembly.GetExecutingAssembly());
103
104 public IIsWarningEventArgs(SourceLineNumber sourceLineNumbers, int id, string resourceName, params object[] messageArgs) :
105 base(sourceLineNumbers, id, resourceName, messageArgs)
106 {
107 base.ResourceManager = resourceManager;
108 }
109 }
110
111 public sealed class IIsWarnings
112 {
113
114 private IIsWarnings()
115 {
116 }
117
118 public static MessageEventArgs EncounteredNullDirectoryForWebSite(string directory)
119 {
120 return new IIsWarningEventArgs(null, 5400, "IIsWarnings_EncounteredNullDirectoryForWebSite_1", directory);
121 }
122 }
123
124 public class IIsVerboseEventArgs : MessageEventArgs
125 {
126
127 private static ResourceManager resourceManager = new ResourceManager("WixToolset.Extensions.Data.Messages", Assembly.GetExecutingAssembly());
128
129 public IIsVerboseEventArgs(SourceLineNumber sourceLineNumbers, int id, string resourceName, params object[] messageArgs) :
130 base(sourceLineNumbers, id, resourceName, messageArgs)
131 {
132 base.ResourceManager = resourceManager;
133 }
134 }
135
136 public sealed class IIsVerboses
137 {
138
139 private IIsVerboses()
140 {
141 }
142 }
143}
144
145/*
146<?xml version='1.0' encoding='utf-8'?>
147<!-- 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. -->
148
149
150<Messages Namespace="WixToolset.Extensions" Resources="Data.Messages" xmlns="http://schemas.microsoft.com/genmsgs/2004/07/messages">
151 <Class Name="IIsErrors" ContainerName="IIsErrorEventArgs" BaseContainerName="MessageEventArgs">
152 <Message Id="MimeMapExtensionMissingPeriod" Number="5150">
153 <Instance>The {0}/@{1} attribute's value, '{2}', is not a valid mime map extension. It must begin with a period.
154 <Parameter Type="System.String" Name="elementName" />
155 <Parameter Type="System.String" Name="attributeName" />
156 <Parameter Type="System.String" Name="attributeValue" />
157 </Instance>
158 </Message>
159 <Message Id="IllegalAttributeWithoutComponent" Number="5151">
160 <Instance>The {0}/@{1} attribute cannot be specified unless the element has a Component as an ancestor. A {0} that does not have a Component ancestor is not installed.
161 <Parameter Type="System.String" Name="elementName" />
162 <Parameter Type="System.String" Name="attributeName" />
163 </Instance>
164 </Message>
165 <Message Id="IllegalElementWithoutComponent" Number="5152">
166 <Instance>The {0} element cannot be specified unless the element has a Component as an ancestor. A {0} that does not have a Component ancestor is not installed.
167 <Parameter Type="System.String" Name="elementName" />
168 </Instance>
169 </Message>
170 <Message Id="OneOfAttributesRequiredUnderComponent" Number="5153">
171 <Instance>When nested under a Component, the {0} element must have one of the following attributes specified: {1}, {2}, {3} or {4}.
172 <Parameter Type="System.String" Name="elementName" />
173 <Parameter Type="System.String" Name="attributeName1" />
174 <Parameter Type="System.String" Name="attributeName2" />
175 <Parameter Type="System.String" Name="attributeName3" />
176 <Parameter Type="System.String" Name="attributeName4" />
177 </Instance>
178 </Message>
179 <Message Id="WebSiteAttributeUnderWebSite" Number="5154">
180 <Instance>The {0}/@WebSite attribute cannot be specified when the {0} element is nested under a WebSite element.
181 <Parameter Type="System.String" Name="elementName" />
182 </Instance>
183 </Message>
184 <Message Id="WebApplicationAlreadySpecified" Number="5155">
185 <Instance>The {0} element can have at most a single WebApplication specified. This can be either through the WebApplication attribute, or through a nested WebApplication element, but not both.
186 <Parameter Type="System.String" Name="elementName" />
187 </Instance>
188 </Message>
189 <Message Id="IllegalCharacterInAttributeValue" Number="5156">
190 <Instance>
191 The {0}/@{1} attribute's value, '{2}', is invalid. It cannot contain the character '{3}'.
192 <Parameter Type="System.String" Name="elementName" />
193 <Parameter Type="System.String" Name="attributeName" />
194 <Parameter Type="System.String" Name="value" />
195 <Parameter Type="System.Char" Name="illegalCharacter" />
196 </Instance>
197 </Message>
198 <Message Id="DeprecatedBinaryChildElement" Number="5157">
199 <Instance>The {0} element contains a deprecated child Binary element. Please move the Binary element under a Fragment, Module, or Product element and set the {0}/@BinaryKey attribute to the value of the Binary/@Id attribute.
200 <Parameter Type="System.String" Name="elementName" />
201 </Instance>
202 </Message>
203 <Message Id="WebSiteNotFound" Number="5158" SourceLineNumbers="no">
204 <Instance>
205 The web site '{0}' could not be found. Please check that the web site exists, and that it is spelled correctly (please note, you must use the correct case).
206 <Parameter Type="System.String" Name="webSiteDescription" />
207 </Instance>
208 </Message>
209 <Message Id="InsufficientPermissionHarvestWebSite" Number="5159" SourceLineNumbers="no">
210 <Instance>
211 Not enough permissions to harvest website. On Windows Vista, you must run Heat elevated.
212 </Instance>
213 </Message>
214 <Message Id="CannotHarvestWebSite" Number="5160" SourceLineNumbers="no">
215 <Instance>
216 Cannot harvest website. On Windows Vista, you must install IIS 6 Management Compatibility.
217 </Instance>
218 </Message>
219 <Message Id="RequiredAttributeUnderComponent" Number="5161">
220 <Instance>The {0}/@{1} attribute must be specified when the element has a Component as an ancestor.
221 <Parameter Type="System.String" Name="elementName" />
222 <Parameter Type="System.String" Name="attributeName" />
223 </Instance>
224 </Message>
225 </Class>
226 <Class Name="IIsWarnings" ContainerName="IIsWarningEventArgs" BaseContainerName="MessageEventArgs">
227 <Message Id="EncounteredNullDirectoryForWebSite" Number="5400" SourceLineNumbers="no">
228 <Instance>
229 Could not harvest website directory: {0}. Please update the output with the appropriate directory ID before using.
230 <Parameter Type="System.String" Name="directory" />
231 </Instance>
232 </Message>
233 </Class>
234 <Class Name="IIsVerboses" ContainerName="IIsVerboseEventArgs" BaseContainerName="MessageEventArgs">
235 </Class>
236</Messages>
237*/ \ No newline at end of file
diff --git a/src/wixlib/IIsExtension_Platform.wxi b/src/wixlib/IIsExtension_Platform.wxi
index 1991ef99..ad53f0c1 100644
--- a/src/wixlib/IIsExtension_Platform.wxi
+++ b/src/wixlib/IIsExtension_Platform.wxi
@@ -22,18 +22,18 @@
22 <ProgressText Action="WriteIIS7ConfigChanges$(var.DeferredSuffix)">!(loc.WriteIIS7ConfigChanges)</ProgressText> 22 <ProgressText Action="WriteIIS7ConfigChanges$(var.DeferredSuffix)">!(loc.WriteIIS7ConfigChanges)</ProgressText>
23 </UI> 23 </UI>
24 24
25 <CustomAction Id="ConfigureIIs$(var.Suffix)" BinaryKey="IIsSchedule$(var.Suffix)" DllEntry="ConfigureIIs" Execute="immediate" Return="check" SuppressModularization="yes" /> 25 <CustomAction Id="ConfigureIIs$(var.Suffix)" BinaryKey="IisCA$(var.Suffix)" DllEntry="ConfigureIIs" Execute="immediate" Return="check" SuppressModularization="yes" />
26 <CustomAction Id="ConfigureIIsExec$(var.DeferredSuffix)" BinaryKey="IIsSchedule$(var.Suffix)" DllEntry="ConfigureIIsExec" Impersonate="no" Execute="deferred" Return="check" HideTarget="yes" SuppressModularization="yes" /> 26 <CustomAction Id="ConfigureIIsExec$(var.DeferredSuffix)" BinaryKey="IisCA$(var.Suffix)" DllEntry="ConfigureIIsExec" Impersonate="no" Execute="deferred" Return="check" HideTarget="yes" SuppressModularization="yes" />
27 <CustomAction Id="StartMetabaseTransaction$(var.DeferredSuffix)" BinaryKey="IIsExecute$(var.Suffix)" DllEntry="StartMetabaseTransaction" Impersonate="no" Execute="deferred" Return="check" HideTarget="yes" SuppressModularization="yes" /> 27 <CustomAction Id="StartMetabaseTransaction$(var.DeferredSuffix)" BinaryKey="IisCA$(var.Suffix)" DllEntry="StartMetabaseTransaction" Impersonate="no" Execute="deferred" Return="check" HideTarget="yes" SuppressModularization="yes" />
28 <CustomAction Id="RollbackMetabaseTransaction$(var.DeferredSuffix)" BinaryKey="IIsExecute$(var.Suffix)" DllEntry="RollbackMetabaseTransaction" Impersonate="no" Execute="rollback" Return="check" HideTarget="yes" SuppressModularization="yes" /> 28 <CustomAction Id="RollbackMetabaseTransaction$(var.DeferredSuffix)" BinaryKey="IisCA$(var.Suffix)" DllEntry="RollbackMetabaseTransaction" Impersonate="no" Execute="rollback" Return="check" HideTarget="yes" SuppressModularization="yes" />
29 <CustomAction Id="CommitMetabaseTransaction$(var.DeferredSuffix)" BinaryKey="IIsExecute$(var.Suffix)" DllEntry="CommitMetabaseTransaction" Impersonate="no" Execute="commit" Return="check" HideTarget="yes" SuppressModularization="yes" /> 29 <CustomAction Id="CommitMetabaseTransaction$(var.DeferredSuffix)" BinaryKey="IisCA$(var.Suffix)" DllEntry="CommitMetabaseTransaction" Impersonate="no" Execute="commit" Return="check" HideTarget="yes" SuppressModularization="yes" />
30 <CustomAction Id="WriteMetabaseChanges$(var.DeferredSuffix)" BinaryKey="IIsExecute$(var.Suffix)" DllEntry="WriteMetabaseChanges" Impersonate="no" Execute="deferred" Return="check" HideTarget="yes" SuppressModularization="yes" /> 30 <CustomAction Id="WriteMetabaseChanges$(var.DeferredSuffix)" BinaryKey="IisCA$(var.Suffix)" DllEntry="WriteMetabaseChanges" Impersonate="no" Execute="deferred" Return="check" HideTarget="yes" SuppressModularization="yes" />
31 31
32 <CustomAction Id="ConfigureIIs7Exec$(var.DeferredSuffix)" BinaryKey="IIsSchedule$(var.Suffix)" DllEntry="ConfigureIIs7Exec" Impersonate="no" Execute="deferred" Return="check" HideTarget="yes" SuppressModularization="yes" /> 32 <CustomAction Id="ConfigureIIs7Exec$(var.DeferredSuffix)" BinaryKey="IisCA$(var.Suffix)" DllEntry="ConfigureIIs7Exec" Impersonate="no" Execute="deferred" Return="check" HideTarget="yes" SuppressModularization="yes" />
33 <CustomAction Id="StartIIS7ConfigTransaction$(var.DeferredSuffix)" BinaryKey="IIsExecute$(var.Suffix)" DllEntry="StartIIS7ConfigTransaction" Impersonate="no" Execute="deferred" Return="check" HideTarget="yes" SuppressModularization="yes" /> 33 <CustomAction Id="StartIIS7ConfigTransaction$(var.DeferredSuffix)" BinaryKey="IisCA$(var.Suffix)" DllEntry="StartIIS7ConfigTransaction" Impersonate="no" Execute="deferred" Return="check" HideTarget="yes" SuppressModularization="yes" />
34 <CustomAction Id="RollbackIIS7ConfigTransaction$(var.DeferredSuffix)" BinaryKey="IIsExecute$(var.Suffix)" DllEntry="RollbackIIS7ConfigTransaction" Impersonate="no" Execute="rollback" Return="check" HideTarget="yes" SuppressModularization="yes" /> 34 <CustomAction Id="RollbackIIS7ConfigTransaction$(var.DeferredSuffix)" BinaryKey="IisCA$(var.Suffix)" DllEntry="RollbackIIS7ConfigTransaction" Impersonate="no" Execute="rollback" Return="check" HideTarget="yes" SuppressModularization="yes" />
35 <CustomAction Id="CommitIIS7ConfigTransaction$(var.DeferredSuffix)" BinaryKey="IIsExecute$(var.Suffix)" DllEntry="CommitIIS7ConfigTransaction" Impersonate="no" Execute="commit" Return="check" HideTarget="yes" SuppressModularization="yes" /> 35 <CustomAction Id="CommitIIS7ConfigTransaction$(var.DeferredSuffix)" BinaryKey="IisCA$(var.Suffix)" DllEntry="CommitIIS7ConfigTransaction" Impersonate="no" Execute="commit" Return="check" HideTarget="yes" SuppressModularization="yes" />
36 <CustomAction Id="WriteIIS7ConfigChanges$(var.DeferredSuffix)" BinaryKey="IIsExecute$(var.Suffix)" DllEntry="WriteIIS7ConfigChanges" Impersonate="no" Execute="deferred" Return="check" HideTarget="yes" SuppressModularization="yes" /> 36 <CustomAction Id="WriteIIS7ConfigChanges$(var.DeferredSuffix)" BinaryKey="IisCA$(var.Suffix)" DllEntry="WriteIIS7ConfigChanges" Impersonate="no" Execute="deferred" Return="check" HideTarget="yes" SuppressModularization="yes" />
37 37
38 <InstallExecuteSequence> 38 <InstallExecuteSequence>
39 <Custom Action="ConfigureIIs$(var.Suffix)" Before="RegisterUser" Overridable="yes">NOT SKIPCONFIGUREIIS AND VersionNT &gt; 400</Custom> 39 <Custom Action="ConfigureIIs$(var.Suffix)" Before="RegisterUser" Overridable="yes">NOT SKIPCONFIGUREIIS AND VersionNT &gt; 400</Custom>
@@ -41,23 +41,22 @@
41 </Fragment> 41 </Fragment>
42 42
43 <Fragment> 43 <Fragment>
44 <Binary Id="IIsSchedule$(var.Suffix)" SourceFile="!(bindpath.$(var.platform))scasched.dll" /> 44 <Binary Id="IisCA$(var.Suffix)" SourceFile="!(bindpath.$(var.platform))iisca.dll" />
45 <Binary Id="IIsExecute$(var.Suffix)" SourceFile="!(bindpath.$(var.platform))scaexec.dll" />
46 </Fragment> 45 </Fragment>
47 46
48 <Fragment> 47 <Fragment>
49 <CustomAction Id="InstallCertificates$(var.Suffix)" BinaryKey="IIsSchedule$(var.Suffix)" DllEntry="InstallCertificates" Execute="immediate" Return="check" SuppressModularization="yes" /> 48 <CustomAction Id="InstallCertificates$(var.Suffix)" BinaryKey="IisCA$(var.Suffix)" DllEntry="InstallCertificates" Execute="immediate" Return="check" SuppressModularization="yes" />
50 <CustomAction Id="UninstallCertificates$(var.Suffix)" BinaryKey="IIsSchedule$(var.Suffix)" DllEntry="UninstallCertificates" Execute="immediate" Return="check" SuppressModularization="yes" /> 49 <CustomAction Id="UninstallCertificates$(var.Suffix)" BinaryKey="IisCA$(var.Suffix)" DllEntry="UninstallCertificates" Execute="immediate" Return="check" SuppressModularization="yes" />
51 50
52 <CustomAction Id="AddUserCertificate$(var.DeferredSuffix)" BinaryKey="IIsExecute$(var.Suffix)" DllEntry="AddUserCertificate" Impersonate="yes" Execute="deferred" Return="check" HideTarget="yes" SuppressModularization="yes" TerminalServerAware="yes" /> 51 <CustomAction Id="AddUserCertificate$(var.DeferredSuffix)" BinaryKey="IisCA$(var.Suffix)" DllEntry="AddUserCertificate" Impersonate="yes" Execute="deferred" Return="check" HideTarget="yes" SuppressModularization="yes" TerminalServerAware="yes" />
53 <CustomAction Id="AddMachineCertificate$(var.DeferredSuffix)" BinaryKey="IIsExecute$(var.Suffix)" DllEntry="AddMachineCertificate" Impersonate="no" Execute="deferred" Return="check" HideTarget="yes" SuppressModularization="yes" /> 52 <CustomAction Id="AddMachineCertificate$(var.DeferredSuffix)" BinaryKey="IisCA$(var.Suffix)" DllEntry="AddMachineCertificate" Impersonate="no" Execute="deferred" Return="check" HideTarget="yes" SuppressModularization="yes" />
54 <CustomAction Id="DeleteUserCertificate$(var.DeferredSuffix)" BinaryKey="IIsExecute$(var.Suffix)" DllEntry="DeleteUserCertificate" Impersonate="yes" Execute="deferred" Return="check" HideTarget="yes" SuppressModularization="yes" TerminalServerAware="yes" /> 53 <CustomAction Id="DeleteUserCertificate$(var.DeferredSuffix)" BinaryKey="IisCA$(var.Suffix)" DllEntry="DeleteUserCertificate" Impersonate="yes" Execute="deferred" Return="check" HideTarget="yes" SuppressModularization="yes" TerminalServerAware="yes" />
55 <CustomAction Id="DeleteMachineCertificate$(var.DeferredSuffix)" BinaryKey="IIsExecute$(var.Suffix)" DllEntry="DeleteMachineCertificate" Impersonate="no" Execute="deferred" Return="check" HideTarget="yes" SuppressModularization="yes" /> 54 <CustomAction Id="DeleteMachineCertificate$(var.DeferredSuffix)" BinaryKey="IisCA$(var.Suffix)" DllEntry="DeleteMachineCertificate" Impersonate="no" Execute="deferred" Return="check" HideTarget="yes" SuppressModularization="yes" />
56 55
57 <CustomAction Id="RollbackAddUserCertificate$(var.DeferredSuffix)" BinaryKey="IIsExecute$(var.Suffix)" DllEntry="DeleteUserCertificate" Impersonate="yes" Execute="rollback" Return="check" HideTarget="yes" SuppressModularization="yes" TerminalServerAware="yes" /> 56 <CustomAction Id="RollbackAddUserCertificate$(var.DeferredSuffix)" BinaryKey="IisCA$(var.Suffix)" DllEntry="DeleteUserCertificate" Impersonate="yes" Execute="rollback" Return="check" HideTarget="yes" SuppressModularization="yes" TerminalServerAware="yes" />
58 <CustomAction Id="RollbackAddMachineCertificate$(var.DeferredSuffix)" BinaryKey="IIsExecute$(var.Suffix)" DllEntry="DeleteMachineCertificate" Impersonate="no" Execute="rollback" Return="check" HideTarget="yes" SuppressModularization="yes" /> 57 <CustomAction Id="RollbackAddMachineCertificate$(var.DeferredSuffix)" BinaryKey="IisCA$(var.Suffix)" DllEntry="DeleteMachineCertificate" Impersonate="no" Execute="rollback" Return="check" HideTarget="yes" SuppressModularization="yes" />
59 <CustomAction Id="RollbackDeleteUserCertificate$(var.DeferredSuffix)" BinaryKey="IIsExecute$(var.Suffix)" DllEntry="AddUserCertificate" Impersonate="yes" Execute="rollback" Return="check" HideTarget="yes" SuppressModularization="yes" TerminalServerAware="yes" /> 58 <CustomAction Id="RollbackDeleteUserCertificate$(var.DeferredSuffix)" BinaryKey="IisCA$(var.Suffix)" DllEntry="AddUserCertificate" Impersonate="yes" Execute="rollback" Return="check" HideTarget="yes" SuppressModularization="yes" TerminalServerAware="yes" />
60 <CustomAction Id="RollbackDeleteMachineCertificate$(var.DeferredSuffix)" BinaryKey="IIsExecute$(var.Suffix)" DllEntry="AddMachineCertificate" Impersonate="no" Execute="rollback" Return="check" HideTarget="yes" SuppressModularization="yes" /> 59 <CustomAction Id="RollbackDeleteMachineCertificate$(var.DeferredSuffix)" BinaryKey="IisCA$(var.Suffix)" DllEntry="AddMachineCertificate" Impersonate="no" Execute="rollback" Return="check" HideTarget="yes" SuppressModularization="yes" />
61 60
62 <InstallExecuteSequence> 61 <InstallExecuteSequence>
63 <Custom Action="UninstallCertificates$(var.Suffix)" Before="RemoveFiles" Overridable="yes">VersionNT &gt; 400</Custom> 62 <Custom Action="UninstallCertificates$(var.Suffix)" Before="RemoveFiles" Overridable="yes">VersionNT &gt; 400</Custom>
diff --git a/src/wixlib/caSuffix.wxi b/src/wixlib/caSuffix.wxi
new file mode 100644
index 00000000..a56a2393
--- /dev/null
+++ b/src/wixlib/caSuffix.wxi
@@ -0,0 +1,28 @@
1<?xml version="1.0" encoding="utf-8"?>
2<!-- 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. -->
3
4<Include xmlns="http://wixtoolset.org/schemas/v4/wxs">
5 <?ifndef platform ?>
6 <?error Required value "platform" not defined in include caSuffix.wxi ?>
7 <?endif ?>
8
9 <?ifdef Suffix ?>
10 <?undef Suffix ?>
11 <?undef DeferredSuffix ?>
12 <?endif ?>
13
14 <?if $(var.platform)="x86" ?>
15 <?define Suffix="" ?>
16 <?define DeferredSuffix="" ?>
17 <?endif ?>
18
19 <?if $(var.platform)="x64" ?>
20 <?define Suffix="_x64" ?>
21 <?define DeferredSuffix="_64" ?>
22 <?endif ?>
23
24 <?if $(var.platform)="arm" ?>
25 <?define Suffix="_ARM" ?>
26 <?define DeferredSuffix="_ARM" ?>
27 <?endif ?>
28</Include>
diff --git a/src/wixlib/caerr.wxi b/src/wixlib/caerr.wxi
new file mode 100644
index 00000000..141942f2
--- /dev/null
+++ b/src/wixlib/caerr.wxi
@@ -0,0 +1,96 @@
1<Include>
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
diff --git a/src/wixlib/iis.v3.ncrunchproject b/src/wixlib/iis.v3.ncrunchproject
new file mode 100644
index 00000000..319cd523
--- /dev/null
+++ b/src/wixlib/iis.v3.ncrunchproject
@@ -0,0 +1,5 @@
1<ProjectConfiguration>
2 <Settings>
3 <IgnoreThisComponentCompletely>True</IgnoreThisComponentCompletely>
4 </Settings>
5</ProjectConfiguration> \ No newline at end of file
diff --git a/src/wixlib/iis.wixproj b/src/wixlib/iis.wixproj
new file mode 100644
index 00000000..2a2a1b53
--- /dev/null
+++ b/src/wixlib/iis.wixproj
@@ -0,0 +1,44 @@
1<?xml version="1.0" encoding="utf-8"?>
2<!-- 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. -->
3<Project DefaultTargets="Build" InitialTargets="EnsureWixToolsetInstalled" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="15.0">
4 <Import Project="..\..\packages\WixToolset.MSBuild.4.0.0-build-0005\build\WixToolset.MSBuild.props" Condition="Exists('..\..\packages\WixToolset.MSBuild.4.0.0-build-0005\build\WixToolset.MSBuild.props')" />
5 <Import Project="..\FindLocalWix.props" />
6 <PropertyGroup>
7 <ProjectGuid>{92FE99D2-355D-4F52-A7C1-10EECB4A5BB1}</ProjectGuid>
8 <OutputName>iis</OutputName>
9 <OutputType>Library</OutputType>
10 <BindFiles>true</BindFiles>
11 <Pedantic>true</Pedantic>
12 <Cultures>en-us</Cultures>
13 </PropertyGroup>
14 <ItemGroup>
15 <Compile Include="IIsExtension.wxs" />
16 <Compile Include="IIsExtension_x86.wxs" />
17 <EmbeddedResource Include="en-us.wxl" />
18 <EmbeddedResource Include="ja-jp.wxl" />
19 <EmbeddedResource Include="pt-br.wxl" />
20 </ItemGroup>
21 <ItemGroup>
22 <None Include="IIsExtension_Platform.wxi" />
23 <None Include="packages.config" />
24 </ItemGroup>
25 <ItemGroup>
26 <ProjectReference Include="..\ca\iisca.vcxproj">
27 <Name>iisca</Name>
28 <Project>{CB3FB8C4-14BF-4EA6-9F01-7FB258E5AEF3}</Project>
29 </ProjectReference>
30 </ItemGroup>
31 <Import Project="$(WixTargetsPath)" Condition=" '$(WixTargetsPath)' != '' AND Exists('$(WixTargetsPath)') " />
32 <Import Project="$(MSBuildExtensionsPath32)\Microsoft\WiX\v3.x\wix.targets" Condition=" '$(WixTargetsPath)' == '' AND Exists('$(MSBuildExtensionsPath32)\Microsoft\WiX\v3.x\wix.targets') " />
33 <Target Name="EnsureWixToolsetInstalled" Condition=" '$(WixTargetsImported)' != 'true' ">
34 <Error Text="WiX Toolset build tools (v4.0 or later) must be installed to build this project. To download the WiX Toolset, go to http://wixtoolset.org/releases/." />
35 </Target>
36 <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
37 <PropertyGroup>
38 <ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
39 </PropertyGroup>
40 <Error Condition="!Exists('..\..\packages\Nerdbank.GitVersioning.2.1.65\build\Nerdbank.GitVersioning.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Nerdbank.GitVersioning.2.1.65\build\Nerdbank.GitVersioning.targets'))" />
41 <Error Condition="!Exists('..\..\packages\WixToolset.MSBuild.4.0.0-build-0005\build\WixToolset.MSBuild.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\WixToolset.MSBuild.4.0.0-build-0005\build\WixToolset.MSBuild.props'))" />
42 </Target>
43 <Import Project="..\..\packages\Nerdbank.GitVersioning.2.1.65\build\Nerdbank.GitVersioning.targets" Condition="Exists('..\..\packages\Nerdbank.GitVersioning.2.1.65\build\Nerdbank.GitVersioning.targets')" />
44</Project> \ No newline at end of file
diff --git a/src/wixlib/packages.config b/src/wixlib/packages.config
new file mode 100644
index 00000000..f3d424e1
--- /dev/null
+++ b/src/wixlib/packages.config
@@ -0,0 +1,5 @@
1<?xml version="1.0" encoding="utf-8"?>
2<packages>
3 <package id="Nerdbank.GitVersioning" version="2.1.65" developmentDependency="true" targetFramework="net40" />
4 <package id="WixToolset.MSBuild" version="4.0.0-build-0005" developmentDependency="true" targetFramework="net40" />
5</packages> \ No newline at end of file
diff --git a/version.json b/version.json
new file mode 100644
index 00000000..5f857771
--- /dev/null
+++ b/version.json
@@ -0,0 +1,11 @@
1{
2 "version": "4.0",
3 "publicReleaseRefSpec": [
4 "^refs/heads/master$"
5 ],
6 "cloudBuild": {
7 "buildNumber": {
8 "enabled": true
9 }
10 }
11}