Update to latest changes from Core and send build notifications to Slack
Rob Mensching committed
Dec 29, 2017 at 04:55 UTC
cba9d16b54cd4ba5b8750ee97ed5aa36cf1fc382
21 files changed
+479
-572
VisualStudio.wixext.sln
+17
-3
@@ -1,13 +1,15 @@
1
2
Microsoft Visual Studio Solution File, Format Version 12.00
3
# Visual Studio 15
4
-VisualStudioVersion = 15.0.26730.16
4
+VisualStudioVersion = 15.0.27130.2003
5
MinimumVisualStudioVersion = 15.0.26124.0
6
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ca", "src\ca\vsca.vcxproj", "{45308B85-0628-4978-8FC8-6AD9E1AD5949}"
6
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vsca", "src\ca\vsca.vcxproj", "{45308B85-0628-4978-8FC8-6AD9E1AD5949}"
7
EndProject
8
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WixToolset.VisualStudio.wixext", "src\wixext\WixToolset.VisualStudio.wixext.csproj", "{61BFD377-9DE1-48B4-8687-560DF68D6F3B}"
9
EndProject
10
-Project("{930C7802-8A8C-48F9-8165-68863BCCD9DD}") = "wixlib", "src\wixlib\vs.wixproj", "{14345C9D-8AF8-435A-BB1B-E067CE7EB321}"
10
+Project("{930C7802-8A8C-48F9-8165-68863BCCD9DD}") = "vs", "src\wixlib\vs.wixproj", "{14345C9D-8AF8-435A-BB1B-E067CE7EB321}"
11
+EndProject
12
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WixToolsetTest.VisualStudio", "src\test\WixToolsetTest.VisualStudio\WixToolsetTest.VisualStudio.csproj", "{DD2BD0F7-1E4A-4D11-954C-3505323C4E1B}"
13
EndProject
14
Global
15
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -49,6 +51,18 @@ Global
51
{14345C9D-8AF8-435A-BB1B-E067CE7EB321}.Release|x64.Build.0 = Release|x64
52
{14345C9D-8AF8-435A-BB1B-E067CE7EB321}.Release|x86.ActiveCfg = Release|x86
53
{14345C9D-8AF8-435A-BB1B-E067CE7EB321}.Release|x86.Build.0 = Release|x86
54
+ {DD2BD0F7-1E4A-4D11-954C-3505323C4E1B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
55
+ {DD2BD0F7-1E4A-4D11-954C-3505323C4E1B}.Debug|Any CPU.Build.0 = Debug|Any CPU
56
+ {DD2BD0F7-1E4A-4D11-954C-3505323C4E1B}.Debug|x64.ActiveCfg = Debug|Any CPU
57
+ {DD2BD0F7-1E4A-4D11-954C-3505323C4E1B}.Debug|x64.Build.0 = Debug|Any CPU
58
+ {DD2BD0F7-1E4A-4D11-954C-3505323C4E1B}.Debug|x86.ActiveCfg = Debug|Any CPU
59
+ {DD2BD0F7-1E4A-4D11-954C-3505323C4E1B}.Debug|x86.Build.0 = Debug|Any CPU
60
+ {DD2BD0F7-1E4A-4D11-954C-3505323C4E1B}.Release|Any CPU.ActiveCfg = Release|Any CPU
61
+ {DD2BD0F7-1E4A-4D11-954C-3505323C4E1B}.Release|Any CPU.Build.0 = Release|Any CPU
62
+ {DD2BD0F7-1E4A-4D11-954C-3505323C4E1B}.Release|x64.ActiveCfg = Release|Any CPU
63
+ {DD2BD0F7-1E4A-4D11-954C-3505323C4E1B}.Release|x64.Build.0 = Release|Any CPU
64
+ {DD2BD0F7-1E4A-4D11-954C-3505323C4E1B}.Release|x86.ActiveCfg = Release|Any CPU
65
+ {DD2BD0F7-1E4A-4D11-954C-3505323C4E1B}.Release|x86.Build.0 = Release|Any CPU
66
EndGlobalSection
67
GlobalSection(SolutionProperties) = preSolution
68
HideSolutionNode = FALSE
appveyor.cmd
+3
-1
@@ -5,7 +5,9 @@ nuget restore
5
6
msbuild -p:Configuration=Release -t:Restore
7
8
-msbuild -p:Configuration=Release -t:Pack .\src\wixext\WixToolset.VisualStudio.wixext.csproj
8
+msbuild -p:Configuration=Release src\test\WixToolsetTest.VisualStudio\WixToolsetTest.VisualStudio.csproj
9
+
10
+msbuild -p:Configuration=Release -t:Pack src\wixext\WixToolset.VisualStudio.wixext.csproj
11
12
@popd
13
@endlocal
\ No newline at end of file
appveyor.yml
+5
@@ -22,3 +22,8 @@ skip_tags: true
22
artifacts:
23
- path: build\Release\**\*.nupkg
24
name: nuget
25
+
26
+notifications:
27
+- provider: Slack
28
+ incoming_webhook:
29
+ secure: p5xuu+4x2JHfwGDMDe5KcG1k7gZxqYc4jWVwvyNZv5cvkubPD2waJs5yXMAXZNN7Z63/3PWHb7q4KoY/99AjauYa1nZ4c5qYqRPFRBKTHfA=
src/FindLocalWix.props
+1
-1
@@ -3,6 +3,6 @@
3
4
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
5
<PropertyGroup>
6
- <WixTargetsPath Condition=" '$(Configuration)' != 'Release' And Exists('$(MSBuildThisFileDirectory)..\..\Core\build\Release\publish\wix.targets') ">$(MSBuildThisFileDirectory)..\..\Core\build\Release\publish\wix.targets</WixTargetsPath>
6
+ <WixTargetsPath Condition=" '$(Configuration)' != 'Release' And Exists('$(MSBuildThisFileDirectory)..\..\Core\build\Release\publish\net461\wix.targets') ">$(MSBuildThisFileDirectory)..\..\Core\build\Release\publish\net461\wix.targets</WixTargetsPath>
7
</PropertyGroup>
8
</Project>
src/test/WixToolsetTest.VisualStudio/TestData/UsingVsixPackage/Package.en-us.wxl
new
+11
@@ -0,0 +1,11 @@
1
+<?xml version="1.0" encoding="utf-8"?>
2
+
3
+<!--
4
+This 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>
src/test/WixToolsetTest.VisualStudio/TestData/UsingVsixPackage/Package.wxs
new
+24
@@ -0,0 +1,24 @@
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
+ <PropertyRef Id="VS2017DEVENV" />
10
+
11
+ <Feature Id="ProductFeature" Title="!(loc.FeatureTitle)">
12
+ <ComponentGroupRef Id="ProductComponents" />
13
+ </Feature>
14
+
15
+ </Product>
16
+
17
+ <Fragment>
18
+ <Directory Id="TARGETDIR" Name="SourceDir">
19
+ <Directory Id="ProgramFilesFolder">
20
+ <Directory Id="INSTALLFOLDER" Name="MsiPackage" />
21
+ </Directory>
22
+ </Directory>
23
+ </Fragment>
24
+</Wix>
src/test/WixToolsetTest.VisualStudio/TestData/UsingVsixPackage/PackageComponents.wxs
new
+14
@@ -0,0 +1,14 @@
1
+<?xml version="1.0" encoding="utf-8"?>
2
+<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs"
3
+ xmlns:vs="http://wixtoolset.org/schemas/v4/wxs/vs">
4
+ <Fragment>
5
+ <ComponentGroup Id="ProductComponents" Directory="INSTALLFOLDER">
6
+ <Component>
7
+ <File Name="fake.vsix" Source="example.txt">
8
+ <vs:VsixPackage PackageId="ExampleVsix" />
9
+ </File>
10
+
11
+ </Component>
12
+ </ComponentGroup>
13
+ </Fragment>
14
+</Wix>
src/test/WixToolsetTest.VisualStudio/TestData/UsingVsixPackage/example.txt
new
+1
@@ -0,0 +1 @@
1
+This is example.txt.
\ No newline at end of file
src/test/WixToolsetTest.VisualStudio/VisualStudioExtensionFixture.cs
new
+46
@@ -0,0 +1,46 @@
1
+// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information.
2
+
3
+namespace WixToolsetTest.VisualStudio
4
+{
5
+ using System.Linq;
6
+ using WixBuildTools.TestSupport;
7
+ using WixToolset.Core.TestPackage;
8
+ using WixToolset.VisualStudio;
9
+ using Xunit;
10
+
11
+ public class VisualStudioExtensionFixture
12
+ {
13
+ [Fact]
14
+ public void CanBuildUsingVsixPackage()
15
+ {
16
+ var folder = TestData.Get(@"TestData\UsingVsixPackage");
17
+ var build = new Builder(folder, typeof(VSExtensionFactory), new[] { folder });
18
+
19
+ var results = build.BuildAndQuery(Build, "CustomAction");
20
+ Assert.Equal(new[]
21
+ {
22
+ "CustomAction:SetVS2010Vsix\t51\tVS_VSIX_INSTALLER_PATH\t[VS2010_VSIX_INSTALLER_PATH]\t0",
23
+ "CustomAction:SetVS2012Vsix\t51\tVS_VSIX_INSTALLER_PATH\t[VS2012_VSIX_INSTALLER_PATH]\t0",
24
+ "CustomAction:SetVS2013Vsix\t51\tVS_VSIX_INSTALLER_PATH\t[VS2013_VSIX_INSTALLER_PATH]\t0",
25
+ "CustomAction:SetVS2015Vsix\t51\tVS_VSIX_INSTALLER_PATH\t[VS2015_VSIX_INSTALLER_PATH]\t0",
26
+ "CustomAction:vimyrEjb_CFhXi3TTLayKNM2w7rvr4\t3122\tVS_VSIX_INSTALLER_PATH\t/q \"[#filzi8nwT8Ta133xcfp7qSIdGdRiC0]\" /admin\t0",
27
+ "CustomAction:viuFqqe3R3R3Fh7P05ubFRhqQlCBdQ\t1074\tVS_VSIX_INSTALLER_PATH\t/q \"[#filzi8nwT8Ta133xcfp7qSIdGdRiC0]\"\t0",
28
+ "CustomAction:vrmyrEjb_CFhXi3TTLayKNM2w7rvr4\t3442\tVS_VSIX_INSTALLER_PATH\t/q /u:\"ExampleVsix\" /admin\t0",
29
+ "CustomAction:vruFqqe3R3R3Fh7P05ubFRhqQlCBdQ\t1394\tVS_VSIX_INSTALLER_PATH\t/q /u:\"ExampleVsix\"\t0",
30
+ "CustomAction:VSFindInstances\t257\tVSCA\tFindInstances\t0",
31
+ "CustomAction:vumyrEjb_CFhXi3TTLayKNM2w7rvr4\t3186\tVS_VSIX_INSTALLER_PATH\t/q /u:\"ExampleVsix\" /admin\t0",
32
+ "CustomAction:vuuFqqe3R3R3Fh7P05ubFRhqQlCBdQ\t1138\tVS_VSIX_INSTALLER_PATH\t/q /u:\"ExampleVsix\"\t0",
33
+ "CustomAction:Vwd2012VsixWhenVSAbsent\t51\tVS_VSIX_INSTALLER_PATH\t[VWD2012_VSIX_INSTALL_ROOT]\\Common7\\IDE\\VSIXInstaller.exe\t0",
34
+ "CustomAction:Vwd2013VsixWhenVSAbsent\t51\tVS_VSIX_INSTALLER_PATH\t[VWD2013_VSIX_INSTALL_ROOT]\\Common7\\IDE\\VSIXInstaller.exe\t0",
35
+ "CustomAction:Vwd2015VsixWhenVSAbsent\t51\tVS_VSIX_INSTALLER_PATH\t[VWD2015_VSIX_INSTALL_ROOT]\\Common7\\IDE\\VSIXInstaller.exe\t0",
36
+ }, results.OrderBy(s => s).ToArray());
37
+ }
38
+
39
+ private static void Build(string[] args)
40
+ {
41
+ var result = WixRunner.Execute(args, out var messages);
42
+ Assert.Equal(0, result);
43
+ Assert.Empty(messages);
44
+ }
45
+ }
46
+}
src/test/WixToolsetTest.VisualStudio/WixToolsetTest.VisualStudio.csproj
new
+40
@@ -0,0 +1,40 @@
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.0</TargetFramework>
7
+ <IsPackable>false</IsPackable>
8
+ </PropertyGroup>
9
+
10
+ <PropertyGroup>
11
+ <NoWarn>NU1701</NoWarn>
12
+ </PropertyGroup>
13
+
14
+ <ItemGroup>
15
+ <Content Include="TestData\UsingVsixPackage\example.txt" CopyToOutputDirectory="PreserveNewest" />
16
+ <Content Include="TestData\UsingVsixPackage\Package.en-us.wxl" CopyToOutputDirectory="PreserveNewest" />
17
+ <Content Include="TestData\UsingVsixPackage\Package.wxs" CopyToOutputDirectory="PreserveNewest" />
18
+ <Content Include="TestData\UsingVsixPackage\PackageComponents.wxs" CopyToOutputDirectory="PreserveNewest" />
19
+ </ItemGroup>
20
+
21
+ <ItemGroup>
22
+ <ProjectReference Include="..\..\wixext\WixToolset.VisualStudio.wixext.csproj" />
23
+ </ItemGroup>
24
+
25
+ <ItemGroup>
26
+ <ProjectReference Include="$(WixToolsetRootFolder)\Core\src\WixToolset.Core.TestPackage\WixToolset.Core.TestPackage.csproj" Condition=" '$(Configuration)' == 'Debug' And Exists('$(WixToolsetRootFolder)\Core\src\WixToolset.Core.TestPackage\WixToolset.Core.TestPackage.csproj') " />
27
+ <ProjectReference Include="$(WixToolsetRootFolder)\Core\src\wix\wix.csproj" Condition=" '$(Configuration)' == 'Debug' And Exists('$(WixToolsetRootFolder)\Core\src\wix\wix.csproj') " />
28
+ <PackageReference Include="WixToolset.Core.TestPackage" Version="4.0.*" Condition=" '$(Configuration)' == 'Release' Or !Exists('$(WixToolsetRootFolder)\Core\src\WixToolset.Core.TestPackage\WixToolset.Core.TestPackage.csproj') " PrivateAssets="all" />
29
+ </ItemGroup>
30
+
31
+ <ItemGroup>
32
+ <PackageReference Include="WixBuildTools.TestSupport" Version="4.0.*" />
33
+ </ItemGroup>
34
+
35
+ <ItemGroup>
36
+ <PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.3.0-preview-20170628-02" />
37
+ <PackageReference Include="xunit" Version="2.2.0" />
38
+ <PackageReference Include="xunit.runner.visualstudio" Version="2.2.0" />
39
+ </ItemGroup>
40
+</Project>
src/wixext/Data/messages.xml
deleted
-133
@@ -1,133 +0,0 @@
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
-
5
-<Messages Namespace="WixToolset.Extensions" Resources="Data.Messages" xmlns="http://schemas.microsoft.com/genmsgs/2004/07/messages">
6
- <Class Name="VSErrors" ContainerName="VSErrorEventArgs" BaseContainerName="MessageEventArgs">
7
- <Message Id="InvalidOutputGroup" Number="5301" SourceLineNumbers="no">
8
- <Instance>
9
- Invalid project output group: {0}.
10
- <Parameter Type="System.String" Name="outputGroup" />
11
- </Instance>
12
- </Message>
13
- <Message Id="NoOutputGroupSpecified" Number="5302" SourceLineNumbers="no">
14
- <Instance>
15
- No project output group specified.
16
- </Instance>
17
- </Message>
18
- <Message Id="CannotLoadMSBuildAssembly" Number="5303" SourceLineNumbers="no">
19
- <Instance>
20
- Failed to load MSBuild assembly: {0}
21
- <Parameter Type="System.String" Name="innerExceptionMessage" />
22
- </Instance>
23
- </Message>
24
- <Message Id="CannotLoadMSBuildEngine" Number="5304" SourceLineNumbers="no">
25
- <Instance>
26
- Failed to load MSBuild engine: {0}
27
- <Parameter Type="System.String" Name="innerExceptionMessage" />
28
- </Instance>
29
- </Message>
30
- <Message Id="CannotLoadProject" Number="5305" SourceLineNumbers="no">
31
- <Instance>
32
- Failed to load project {0}: {1}
33
- <Parameter Type="System.String" Name="projectFile" />
34
- <Parameter Type="System.String" Name="innerExceptionMessage" />
35
- </Instance>
36
- </Message>
37
- <Message Id="CannotBuildProject" Number="5306" SourceLineNumbers="no">
38
- <Instance>
39
- Failed to build project {0}: {1}
40
- <Parameter Type="System.String" Name="projectFile" />
41
- <Parameter Type="System.String" Name="innerExceptionMessage" />
42
- </Instance>
43
- </Message>
44
- <Message Id="BuildFailed" Number="5307" SourceLineNumbers="no">
45
- <Instance>
46
- Build failed.
47
- </Instance>
48
- </Message>
49
- <Message Id="MissingProjectOutputGroup" Number="5308" SourceLineNumbers="no">
50
- <Instance>
51
- Missing project output group '{1}' in project {0}.
52
- <Parameter Type="System.String" Name="projectFile" />
53
- <Parameter Type="System.String" Name="outputGroup" />
54
- </Instance>
55
- </Message>
56
- <Message Id="DirectoryAttributeAccessorBadType" Number="5309" SourceLineNumbers="no">
57
- <Instance>
58
- DirectoryAttributeAccessor tried to access an invalid element type for attribute '{0'}.
59
- <Parameter Type="System.String" Name="attributeName" />
60
- </Instance>
61
- </Message>
62
- <Message Id="InvalidOutputType" Number="5310" SourceLineNumbers="no">
63
- <Instance>
64
- Invalid generated type: {0}. Must be one of: components, container, payloadgroup, layout.
65
- <Parameter Type="System.String" Name="generateType" />
66
- </Instance>
67
- </Message>
68
- <Message Id="InvalidDirectoryId" Number="5311" SourceLineNumbers="no">
69
- <Instance>
70
- Invalid directory ID: {0}. Check that it doesn't start with a hyphen or slash.
71
- <Parameter Type="System.String" Name="generateType" />
72
- </Instance>
73
- </Message>
74
- <Message Id="InvalidProjectName" Number="5312" SourceLineNumbers="no">
75
- <Instance>
76
- Invalid project name: {0}. Check that it doesn't start with a hyphen or slash.
77
- <Parameter Type="System.String" Name="generateType" />
78
- </Instance>
79
- </Message>
80
- <Message Id="BuildErrorDuringHarvesting" Number="5313" SourceLineNumbers="no">
81
- <Instance>
82
- Build error during harvesting: {0}
83
- <Parameter Type="System.String" Name="buildError" />
84
- </Instance>
85
- </Message>
86
- <Message Id="CannotLoadMSBuildWrapperAssembly" Number="5314" SourceLineNumbers="no">
87
- <Instance>
88
- Failed to load MSBuild wrapper assembly: {0}
89
- <Parameter Type="System.String" Name="innerExceptionMessage" />
90
- </Instance>
91
- </Message>
92
- <Message Id="CannotLoadMSBuildWrapperType" Number="5315" SourceLineNumbers="no">
93
- <Instance>
94
- Failed to load MSBuild wrapper type: {0}
95
- <Parameter Type="System.String" Name="innerExceptionMessage" />
96
- </Instance>
97
- </Message>
98
- <Message Id="CannotLoadMSBuildWrapperObject" Number="5316" SourceLineNumbers="no">
99
- <Instance>
100
- Failed to load MSBuild wrapper object: {0}
101
- <Parameter Type="System.String" Name="innerExceptionMessage" />
102
- </Instance>
103
- </Message>
104
- </Class>
105
- <Class Name="VSWarnings" ContainerName="VSWarningEventArgs" BaseContainerName="MessageEventArgs">
106
- <Message Id="NoLogger" Number="5399" SourceLineNumbers="no">
107
- <Instance>
108
- Failed to set loggers: {0}
109
- <Parameter Type="System.String" Name="exceptionMessage" />
110
- </Instance>
111
- </Message>
112
- <Message Id="NoProjectConfiguration" Number="5398" SourceLineNumbers="no">
113
- <Instance>
114
- Failed to set project configuration and platform: {0}
115
- <Parameter Type="System.String" Name="exceptionMessage" />
116
- </Instance>
117
- </Message>
118
- </Class>
119
- <Class Name="VSVerboses" ContainerName="VSVerboseEventArgs" BaseContainerName="MessageEventArgs">
120
- <Message Id="FoundToolsVersion" Number="5379" SourceLineNumbers="no">
121
- <Instance>
122
- Found ToolsVersion {0} inside project file.
123
- <Parameter Type="System.String" Name="toolsVersion" />
124
- </Instance>
125
- </Message>
126
- <Message Id="LoadingProject" Number="5378" SourceLineNumbers="no">
127
- <Instance>
128
- Loading project using MSBuild version {0}.
129
- <Parameter Type="System.String" Name="msbuildVersion" />
130
- </Instance>
131
- </Message>
132
- </Class>
133
-</Messages>
src/wixext/Data/tables.xml
deleted
-66
@@ -1,66 +0,0 @@
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
-
5
-<tableDefinitions xmlns="http://wixtoolset.org/schemas/v4/wi/tables">
6
- <tableDefinition name="HelpFile" createSymbols="yes">
7
- <columnDefinition name="HelpFileKey" type="string" length="72" primaryKey="yes" modularize="column"
8
- category="identifier" description="Primary Key for HelpFile Table (required)."/>
9
- <columnDefinition name="HelpFileName" type="string" length="72"
10
- category="text" description="Internal Microsoft Help ID for this HelpFile (required)."/>
11
- <columnDefinition name="LangID" type="number" length="2" nullable="yes"
12
- category="language" description="Language ID for content file (optional)."/>
13
- <columnDefinition name="File_HxS" type="string" length="72" modularize="column"
14
- keyTable="File" keyColumn="1" category="identifier" description="Key for HxS (Title) file (required)."/>
15
- <columnDefinition name="File_HxI" type="string" length="72" nullable="yes" modularize="column"
16
- keyTable="File" keyColumn="1" category="identifier" description="Key for HxI (Index) file (optional)."/>
17
- <columnDefinition name="File_HxQ" type="string" length="72" nullable="yes" modularize="column"
18
- keyTable="File" keyColumn="1" category="identifier" description="Key for HxQ (Query) file (optional)."/>
19
- <columnDefinition name="File_HxR" type="string" length="72" nullable="yes" modularize="column"
20
- keyTable="File" keyColumn="1" category="identifier" description="Key for HxR (Attributes) file (optional)."/>
21
- <columnDefinition name="File_Samples" type="string" length="72" nullable="yes" modularize="column"
22
- keyTable="File" keyColumn="1" category="identifier" description="Key for a file that is in the 'root' of the samples directory for this HelpFile (optional)."/>
23
- </tableDefinition>
24
- <tableDefinition name="HelpFileToNamespace">
25
- <columnDefinition name="HelpFile_" type="string" length="72" primaryKey="yes" modularize="column"
26
- keyTable="HelpFile" keyColumn="1" category="identifier" description="Foreign key into HelpFile table (required)."/>
27
- <columnDefinition name="HelpNamespace_" type="string" length="72" primaryKey="yes"
28
- keyTable="HelpNamespace" keyColumn="1" category="identifier" description="Foreign key into HelpNamespace table (required)."/>
29
- </tableDefinition>
30
- <tableDefinition name="HelpFilter" createSymbols="yes">
31
- <columnDefinition name="FilterKey" type="string" length="72" primaryKey="yes" modularize="column"
32
- category="identifier" description="Primary Key for HelpFilter (required)."/>
33
- <columnDefinition name="Description" type="localized" length="0"
34
- category="text" description="Friendly name for Filter (required)."/>
35
- <columnDefinition name="QueryString" type="string" length="0" nullable="yes"
36
- category="text" description="Query String for Help Filter (optional)."/>
37
- </tableDefinition>
38
- <tableDefinition name="HelpFilterToNamespace">
39
- <columnDefinition name="HelpFilter_" type="string" length="72" primaryKey="yes" modularize="column"
40
- keyTable="HelpFilter" keyColumn="1" category="identifier" description="Foreign key into HelpFilter table (required)."/>
41
- <columnDefinition name="HelpNamespace_" type="string" length="72" primaryKey="yes"
42
- keyTable="HelpNamespace" keyColumn="1" category="identifier" description="Foreign key into HelpNamespace table (required)."/>
43
- </tableDefinition>
44
- <tableDefinition name="HelpNamespace" createSymbols="yes">
45
- <columnDefinition name="NamespaceKey" type="string" length="72" primaryKey="yes"
46
- category="identifier" description="Primary Key for HelpNamespace (required)."/>
47
- <columnDefinition name="NamespaceName" type="string" length="0"
48
- category="text" description="Internal Microsoft Help ID for this Namespace (required)."/>
49
- <columnDefinition name="File_Collection" type="string" length="72" modularize="column"
50
- keyTable="File" keyColumn="1" category="text" description="Key for HxC (Collection) file (required)."/>
51
- <columnDefinition name="Description" type="localized" length="0" nullable="yes"
52
- category="text" description="Friendly name for Namespace (optional)."/>
53
- </tableDefinition>
54
- <tableDefinition name="HelpPlugin">
55
- <columnDefinition name="HelpNamespace_" type="string" length="72" primaryKey="yes"
56
- keyTable="HelpNamespace" keyColumn="1" category="identifier" description="Forein Key into HelpNamespace table for the child namespace that will be plugged into the parent namespace (required)."/>
57
- <columnDefinition name="HelpNamespace_Parent" type="string" length="72" primaryKey="yes"
58
- category="identifier" description="Forein Key into HelpNamespace table for the parent namespace into which the child will be inserted (required)."/>
59
- <columnDefinition name="File_HxT" type="string" length="72" nullable="yes" modularize="column"
60
- keyTable="File" keyColumn="1" category="identifier" description="Key for HxT file of child namespace (optional)."/>
61
- <columnDefinition name="File_HxA" type="string" length="72" nullable="yes" modularize="column"
62
- keyTable="File" keyColumn="1" category="identifier" description="Key for HxA (Attributes) file of child namespace (optional)."/>
63
- <columnDefinition name="File_ParentHxT" type="string" length="72" nullable="yes" modularize="column"
64
- keyTable="File" keyColumn="1" category="identifier" description="Key for HxT file of parent namespace that now includes the new child namespace (optional)."/>
65
- </tableDefinition>
66
-</tableDefinitions>
src/wixext/VSCompiler.cs
+204
-265
@@ -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.
2
3
-namespace WixToolset.Extensions
3
+namespace WixToolset.VisualStudio
4
{
5
using System;
6
using System.Collections.Generic;
@@ -11,7 +11,7 @@ namespace WixToolset.Extensions
11
/// <summary>
12
/// The compiler for the WiX Toolset Visual Studio Extension.
13
/// </summary>
14
- public sealed class VSCompiler : CompilerExtension
14
+ public sealed class VSCompiler : BaseCompilerExtension
15
{
16
internal const int MsidbCustomActionTypeExe = 0x00000002; // Target = command line args
17
internal const int MsidbCustomActionTypeProperty = 0x00000030; // Source = full path to executable
@@ -20,22 +20,9 @@ namespace WixToolset.Extensions
20
internal const int MsidbCustomActionTypeInScript = 0x00000400; // queue for execution within script
21
internal const int MsidbCustomActionTypeNoImpersonate = 0x00000800; // queue for not impersonating
22
23
- /// <summary>
24
- /// Instantiate a new HelpCompiler.
25
- /// </summary>
26
- public VSCompiler()
27
- {
28
- this.Namespace = "http://wixtoolset.org/schemas/v4/wxs/vs";
29
- }
23
+ public override XNamespace Namespace => "http://wixtoolset.org/schemas/v4/wxs/vs";
24
31
- /// <summary>
32
- /// Processes an element for the Compiler.
33
- /// </summary>
34
- /// <param name="sourceLineNumbers">Source line number for the parent element.</param>
35
- /// <param name="parentElement">Parent element of element to process.</param>
36
- /// <param name="element">Element to process.</param>
37
- /// <param name="contextValues">Extra information about the context in which this element is being parsed.</param>
38
- public override void ParseElement(XElement parentElement, XElement element, IDictionary<string, string> context)
25
+ public override void ParseElement(Intermediate intermediate, IntermediateSection section, XElement parentElement, XElement element, IDictionary<string, string> context)
26
{
27
switch (parentElement.Name.LocalName)
28
{
@@ -43,10 +30,10 @@ namespace WixToolset.Extensions
30
switch (element.Name.LocalName)
31
{
32
case "VsixPackage":
46
- this.ParseVsixPackageElement(element, context["ComponentId"], null);
33
+ this.ParseVsixPackageElement(intermediate, section, element, context["ComponentId"], null);
34
break;
35
default:
49
- this.Core.UnexpectedElement(parentElement, element);
36
+ this.ParseHelper.UnexpectedElement(parentElement, element);
37
break;
38
}
39
break;
@@ -54,16 +41,16 @@ namespace WixToolset.Extensions
41
switch (element.Name.LocalName)
42
{
43
case "HelpCollection":
57
- this.ParseHelpCollectionElement(element, context["FileId"]);
44
+ this.ParseHelpCollectionElement(intermediate, section, element, context["FileId"]);
45
break;
46
case "HelpFile":
60
- this.ParseHelpFileElement(element, context["FileId"]);
47
+ this.ParseHelpFileElement(intermediate, section, element, context["FileId"]);
48
break;
49
case "VsixPackage":
63
- this.ParseVsixPackageElement(element, context["ComponentId"], context["FileId"]);
50
+ this.ParseVsixPackageElement(intermediate, section, element, context["ComponentId"], context["FileId"]);
51
break;
52
default:
66
- this.Core.UnexpectedElement(parentElement, element);
53
+ this.ParseHelper.UnexpectedElement(parentElement, element);
54
break;
55
}
56
break;
@@ -73,186 +60,171 @@ namespace WixToolset.Extensions
60
switch (element.Name.LocalName)
61
{
62
case "HelpCollectionRef":
76
- this.ParseHelpCollectionRefElement(element);
63
+ this.ParseHelpCollectionRefElement(intermediate, section, element);
64
break;
65
case "HelpFilter":
79
- this.ParseHelpFilterElement(element);
66
+ this.ParseHelpFilterElement(intermediate, section, element);
67
break;
68
default:
82
- this.Core.UnexpectedElement(parentElement, element);
69
+ this.ParseHelper.UnexpectedElement(parentElement, element);
70
break;
71
}
72
break;
73
default:
87
- this.Core.UnexpectedElement(parentElement, element);
74
+ this.ParseHelper.UnexpectedElement(parentElement, element);
75
break;
76
}
77
}
78
92
- /// <summary>
93
- /// Parses a HelpCollectionRef element.
94
- /// </summary>
95
- /// <param name="node">Element to process.</param>
96
- private void ParseHelpCollectionRefElement(XElement node)
79
+ private void ParseHelpCollectionRefElement(Intermediate intermediate, IntermediateSection section, XElement element)
80
{
98
- SourceLineNumber sourceLineNumbers = Preprocessor.GetSourceLineNumbers(node);
99
- string id = null;
81
+ SourceLineNumber sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(element);
82
+ Identifier id = null;
83
101
- foreach (XAttribute attrib in node.Attributes())
84
+ foreach (XAttribute attrib in element.Attributes())
85
{
86
if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace)
87
{
88
switch (attrib.Name.LocalName)
89
{
90
case "Id":
108
- id = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib);
109
- this.Core.CreateSimpleReference(sourceLineNumbers, "HelpNamespace", id);
91
+ id = this.ParseHelper.GetAttributeIdentifier(sourceLineNumbers, attrib);
92
+ this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "HelpNamespace", id.Id);
93
break;
94
default:
112
- this.Core.UnexpectedAttribute(node, attrib);
95
+ this.ParseHelper.UnexpectedAttribute(element, attrib);
96
break;
97
}
98
}
99
else
100
{
118
- this.Core.ParseExtensionAttribute(node, attrib);
101
+ this.ParseHelper.ParseExtensionAttribute(this.Context.Extensions, intermediate, section, element, attrib);
102
}
103
}
104
105
if (null == id)
106
{
124
- this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id"));
107
+ this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, element.Name.LocalName, "Id"));
108
}
109
127
- foreach (XElement child in node.Elements())
110
+ foreach (XElement child in element.Elements())
111
{
112
if (this.Namespace == child.Name.Namespace)
113
{
131
- SourceLineNumber childSourceLineNumbers = Preprocessor.GetSourceLineNumbers(child);
114
+ SourceLineNumber childSourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(child);
115
switch (child.Name.LocalName)
116
{
117
case "HelpFileRef":
135
- this.ParseHelpFileRefElement(child, id);
118
+ this.ParseHelpFileRefElement(intermediate, section, child, id);
119
break;
120
default:
138
- this.Core.UnexpectedElement(node, child);
121
+ this.ParseHelper.UnexpectedElement(element, child);
122
break;
123
}
124
}
125
else
126
{
144
- this.Core.ParseExtensionElement(node, child);
127
+ this.ParseHelper.ParseExtensionElement(this.Context.Extensions, intermediate, section, element, child);
128
}
129
}
130
}
131
149
- /// <summary>
150
- /// Parses a HelpCollection element.
151
- /// </summary>
152
- /// <param name="node">Element to process.</param>
153
- /// <param name="fileId">Identifier of the parent File element.</param>
154
- private void ParseHelpCollectionElement(XElement node, string fileId)
132
+ private void ParseHelpCollectionElement(Intermediate intermediate, IntermediateSection section, XElement element, string fileId)
133
{
156
- SourceLineNumber sourceLineNumbers = Preprocessor.GetSourceLineNumbers(node);
157
- string id = null;
134
+ SourceLineNumber sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(element);
135
+ Identifier id = null;
136
string description = null;
137
string name = null;
138
YesNoType suppressCAs = YesNoType.No;
139
162
- foreach (XAttribute attrib in node.Attributes())
140
+ foreach (XAttribute attrib in element.Attributes())
141
{
142
if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace)
143
{
144
switch (attrib.Name.LocalName)
145
{
146
case "Id":
169
- id = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib);
147
+ id = this.ParseHelper.GetAttributeIdentifier(sourceLineNumbers, attrib);
148
break;
149
case "Description":
172
- description = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
150
+ description = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib);
151
break;
152
case "Name":
175
- name = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
153
+ name = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib);
154
break;
155
case "SuppressCustomActions":
178
- suppressCAs = this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib);
156
+ suppressCAs = this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib);
157
break;
158
default:
181
- this.Core.UnexpectedAttribute(node, attrib);
159
+ this.ParseHelper.UnexpectedAttribute(element, attrib);
160
break;
161
}
162
}
163
else
164
{
187
- this.Core.ParseExtensionAttribute(node, attrib);
165
+ this.ParseHelper.ParseExtensionAttribute(this.Context.Extensions, intermediate, section, element, attrib);
166
}
167
}
168
169
if (null == id)
170
{
193
- this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id"));
171
+ this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, element.Name.LocalName, "Id"));
172
}
173
174
if (null == description)
175
{
198
- this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Description"));
176
+ this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, element.Name.LocalName, "Description"));
177
}
178
179
if (null == name)
180
{
203
- this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Name"));
181
+ this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, element.Name.LocalName, "Name"));
182
}
183
206
- foreach (XElement child in node.Elements())
184
+ foreach (XElement child in element.Elements())
185
{
186
if (this.Namespace == child.Name.Namespace)
187
{
188
switch (child.Name.LocalName)
189
{
190
case "HelpFileRef":
213
- this.ParseHelpFileRefElement(child, id);
191
+ this.ParseHelpFileRefElement(intermediate, section, child, id);
192
break;
193
case "HelpFilterRef":
216
- this.ParseHelpFilterRefElement(child, id);
194
+ this.ParseHelpFilterRefElement(intermediate, section, child, id);
195
break;
196
case "PlugCollectionInto":
219
- this.ParsePlugCollectionIntoElement(child, id);
197
+ this.ParsePlugCollectionIntoElement(intermediate, section, child, id);
198
break;
199
default:
222
- this.Core.UnexpectedElement(node, child);
200
+ this.ParseHelper.UnexpectedElement(element, child);
201
break;
202
}
203
}
204
else
205
{
228
- this.Core.ParseExtensionElement(node, child);
206
+ this.ParseHelper.ParseExtensionElement(this.Context.Extensions, intermediate, section, element, child);
207
}
208
}
209
232
- if (!this.Core.EncounteredError)
210
+ if (!this.Messaging.EncounteredError)
211
{
234
- Row row = this.Core.CreateRow(sourceLineNumbers, "HelpNamespace");
235
- row[0] = id;
236
- row[1] = name;
237
- row[2] = fileId;
238
- row[3] = description;
212
+ var row = this.ParseHelper.CreateRow(section, sourceLineNumbers, "HelpNamespace", id);
213
+ row.Set(1, name);
214
+ row.Set(2, fileId);
215
+ row.Set(3, description);
216
217
if (YesNoType.No == suppressCAs)
218
{
242
- this.Core.CreateSimpleReference(sourceLineNumbers, "CustomAction", "CA_RegisterMicrosoftHelp.3643236F_FC70_11D3_A536_0090278A1BB8");
219
+ this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "CustomAction", "CA_RegisterMicrosoftHelp.3643236F_FC70_11D3_A536_0090278A1BB8");
220
}
221
}
222
}
223
247
- /// <summary>
248
- /// Parses a HelpFile element.
249
- /// </summary>
250
- /// <param name="node">Element to process.</param>
251
- /// <param name="fileId">Identifier of the parent file element.</param>
252
- private void ParseHelpFileElement(XElement node, string fileId)
224
+ private void ParseHelpFileElement(Intermediate intermediate, IntermediateSection section, XElement element, string fileId)
225
{
254
- SourceLineNumber sourceLineNumbers = Preprocessor.GetSourceLineNumbers(node);
255
- string id = null;
226
+ SourceLineNumber sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(element);
227
+ Identifier id = null;
228
string name = null;
229
int language = CompilerConstants.IntegerNotSet;
230
string hxi = null;
@@ -261,255 +233,232 @@ namespace WixToolset.Extensions
233
string samples = null;
234
YesNoType suppressCAs = YesNoType.No;
235
264
- foreach (XAttribute attrib in node.Attributes())
236
+ foreach (XAttribute attrib in element.Attributes())
237
{
238
if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace)
239
{
240
switch (attrib.Name.LocalName)
241
{
242
case "Id":
271
- id = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib);
243
+ id = this.ParseHelper.GetAttributeIdentifier(sourceLineNumbers, attrib);
244
break;
245
case "AttributeIndex":
274
- hxr = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib);
275
- this.Core.CreateSimpleReference(sourceLineNumbers, "File", hxr);
246
+ hxr = this.ParseHelper.GetAttributeIdentifierValue(sourceLineNumbers, attrib);
247
+ this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "File", hxr);
248
break;
249
case "Index":
278
- hxi = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib);
279
- this.Core.CreateSimpleReference(sourceLineNumbers, "File", hxi);
250
+ hxi = this.ParseHelper.GetAttributeIdentifierValue(sourceLineNumbers, attrib);
251
+ this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "File", hxi);
252
break;
253
case "Language":
282
- language = this.Core.GetAttributeIntegerValue(sourceLineNumbers, attrib, 0, short.MaxValue);
254
+ language = this.ParseHelper.GetAttributeIntegerValue(sourceLineNumbers, attrib, 0, short.MaxValue);
255
break;
256
case "Name":
285
- name = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
257
+ name = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib);
258
break;
259
case "SampleLocation":
288
- samples = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib);
289
- this.Core.CreateSimpleReference(sourceLineNumbers, "File", samples);
260
+ samples = this.ParseHelper.GetAttributeIdentifierValue(sourceLineNumbers, attrib);
261
+ this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "File", samples);
262
break;
263
case "Search":
292
- hxq = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib);
293
- this.Core.CreateSimpleReference(sourceLineNumbers, "File", hxq);
264
+ hxq = this.ParseHelper.GetAttributeIdentifierValue(sourceLineNumbers, attrib);
265
+ this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "File", hxq);
266
break;
267
case "SuppressCustomActions":
296
- suppressCAs = this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib);
268
+ suppressCAs = this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib);
269
break;
270
default:
299
- this.Core.UnexpectedAttribute(node, attrib);
271
+ this.ParseHelper.UnexpectedAttribute(element, attrib);
272
break;
273
}
274
}
275
else
276
{
305
- this.Core.ParseExtensionAttribute(node, attrib);
277
+ this.ParseHelper.ParseExtensionAttribute(this.Context.Extensions, intermediate, section, element, attrib);
278
}
279
}
280
281
if (null == id)
282
{
311
- this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id"));
283
+ this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, element.Name.LocalName, "Id"));
284
}
285
286
if (null == name)
287
{
316
- this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Name"));
288
+ this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, element.Name.LocalName, "Name"));
289
}
290
319
- //uninstall will always fail silently, leaving file registered, if Language is not set
291
+ // Uninstall will always fail silently, leaving file registered, if Language is not set
292
if (CompilerConstants.IntegerNotSet == language)
293
{
322
- this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Language"));
294
+ this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, element.Name.LocalName, "Language"));
295
}
296
325
- this.Core.ParseForExtensionElements(node);
297
+ this.ParseHelper.ParseForExtensionElements(this.Context.Extensions, intermediate, section, element);
298
327
- if (!this.Core.EncounteredError)
299
+ if (!this.Messaging.EncounteredError)
300
{
329
- Row row = this.Core.CreateRow(sourceLineNumbers, "HelpFile");
330
- row[0] = id;
331
- row[1] = name;
332
- row[2] = language;
333
- row[3] = fileId;
334
- row[4] = hxi;
335
- row[5] = hxq;
336
- row[6] = hxr;
337
- row[7] = samples;
301
+ var row = this.ParseHelper.CreateRow(section, sourceLineNumbers, "HelpFile", id);
302
+ row.Set(1, name);
303
+ row.Set(2, language);
304
+ row.Set(3, fileId);
305
+ row.Set(4, hxi);
306
+ row.Set(5, hxq);
307
+ row.Set(6, hxr);
308
+ row.Set(7, samples);
309
310
if (YesNoType.No == suppressCAs)
311
{
341
- this.Core.CreateSimpleReference(sourceLineNumbers, "CustomAction", "CA_RegisterMicrosoftHelp.3643236F_FC70_11D3_A536_0090278A1BB8");
312
+ this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "CustomAction", "CA_RegisterMicrosoftHelp.3643236F_FC70_11D3_A536_0090278A1BB8");
313
}
314
}
315
}
316
346
- /// <summary>
347
- /// Parses a HelpFileRef element.
348
- /// </summary>
349
- /// <param name="node">Element to process.</param>
350
- /// <param name="collectionId">Identifier of the parent help collection.</param>
351
- private void ParseHelpFileRefElement(XElement node, string collectionId)
317
+ private void ParseHelpFileRefElement(Intermediate intermediate, IntermediateSection section, XElement element, Identifier collectionId)
318
{
353
- SourceLineNumber sourceLineNumbers = Preprocessor.GetSourceLineNumbers(node);
354
- string id = null;
319
+ SourceLineNumber sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(element);
320
+ Identifier id = null;
321
356
- foreach (XAttribute attrib in node.Attributes())
322
+ foreach (XAttribute attrib in element.Attributes())
323
{
324
if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace)
325
{
326
switch (attrib.Name.LocalName)
327
{
328
case "Id":
363
- id = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib);
364
- this.Core.CreateSimpleReference(sourceLineNumbers, "HelpFile", id);
329
+ id = this.ParseHelper.GetAttributeIdentifier(sourceLineNumbers, attrib);
330
+ this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "HelpFile", id.Id);
331
break;
332
default:
367
- this.Core.UnexpectedAttribute(node, attrib);
333
+ this.ParseHelper.UnexpectedAttribute(element, attrib);
334
break;
335
}
336
}
337
else
338
{
373
- this.Core.ParseExtensionAttribute(node, attrib);
339
+ this.ParseHelper.ParseExtensionAttribute(this.Context.Extensions, intermediate, section, element, attrib);
340
}
341
}
342
343
if (null == id)
344
{
379
- this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id"));
345
+ this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, element.Name.LocalName, "Id"));
346
}
347
382
- this.Core.ParseForExtensionElements(node);
348
+ this.ParseHelper.ParseForExtensionElements(this.Context.Extensions, intermediate, section, element);
349
384
- if (!this.Core.EncounteredError)
350
+ if (!this.Messaging.EncounteredError)
351
{
386
- Row row = this.Core.CreateRow(sourceLineNumbers, "HelpFileToNamespace");
387
- row[0] = id;
388
- row[1] = collectionId;
352
+ var row = this.ParseHelper.CreateRow(section, sourceLineNumbers, "HelpFileToNamespace", id);
353
+ row.Set(1, collectionId);
354
}
355
}
356
392
- /// <summary>
393
- /// Parses a HelpFilter element.
394
- /// </summary>
395
- /// <param name="node">Element to process.</param>
396
- private void ParseHelpFilterElement(XElement node)
357
+ private void ParseHelpFilterElement(Intermediate intermediate, IntermediateSection section, XElement element)
358
{
398
- SourceLineNumber sourceLineNumbers = Preprocessor.GetSourceLineNumbers(node);
399
- string id = null;
359
+ SourceLineNumber sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(element);
360
+ Identifier id = null;
361
string filterDefinition = null;
362
string name = null;
363
YesNoType suppressCAs = YesNoType.No;
364
404
- foreach (XAttribute attrib in node.Attributes())
365
+ foreach (XAttribute attrib in element.Attributes())
366
{
367
if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace)
368
{
369
switch (attrib.Name.LocalName)
370
{
371
case "Id":
411
- id = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib);
372
+ id = this.ParseHelper.GetAttributeIdentifier(sourceLineNumbers, attrib);
373
break;
374
case "FilterDefinition":
414
- filterDefinition = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
375
+ filterDefinition = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib);
376
break;
377
case "Name":
417
- name = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
378
+ name = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib);
379
break;
380
case "SuppressCustomActions":
420
- suppressCAs = this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib);
381
+ suppressCAs = this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib);
382
break;
383
default:
423
- this.Core.UnexpectedAttribute(node, attrib);
384
+ this.ParseHelper.UnexpectedAttribute(element, attrib);
385
break;
386
}
387
}
388
else
389
{
429
- this.Core.ParseExtensionAttribute(node, attrib);
390
+ this.ParseHelper.ParseExtensionAttribute(this.Context.Extensions, intermediate, section, element, attrib);
391
}
392
}
393
394
if (null == id)
395
{
435
- this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id"));
396
+ this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, element.Name.LocalName, "Id"));
397
}
398
399
if (null == name)
400
{
440
- this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Name"));
401
+ this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, element.Name.LocalName, "Name"));
402
}
403
443
- this.Core.ParseForExtensionElements(node);
404
+ this.ParseHelper.ParseForExtensionElements(this.Context.Extensions, intermediate, section, element);
405
445
- if (!this.Core.EncounteredError)
406
+ if (!this.Messaging.EncounteredError)
407
{
447
- Row row = this.Core.CreateRow(sourceLineNumbers, "HelpFilter");
448
- row[0] = id;
449
- row[1] = name;
450
- row[2] = filterDefinition;
408
+ var row = this.ParseHelper.CreateRow(section, sourceLineNumbers, "HelpFilter", id);
409
+ row.Set(1, name);
410
+ row.Set(2, filterDefinition);
411
412
if (YesNoType.No == suppressCAs)
413
{
454
- this.Core.CreateSimpleReference(sourceLineNumbers, "CustomAction", "CA_RegisterMicrosoftHelp.3643236F_FC70_11D3_A536_0090278A1BB8");
414
+ this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "CustomAction", "CA_RegisterMicrosoftHelp.3643236F_FC70_11D3_A536_0090278A1BB8");
415
}
416
}
417
}
418
459
- /// <summary>
460
- /// Parses a HelpFilterRef element.
461
- /// </summary>
462
- /// <param name="node">Element to process.</param>
463
- /// <param name="collectionId">Identifier of the parent help collection.</param>
464
- private void ParseHelpFilterRefElement(XElement node, string collectionId)
419
+ private void ParseHelpFilterRefElement(Intermediate intermediate, IntermediateSection section, XElement element, Identifier collectionId)
420
{
466
- SourceLineNumber sourceLineNumbers = Preprocessor.GetSourceLineNumbers(node);
467
- string id = null;
421
+ SourceLineNumber sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(element);
422
+ Identifier id = null;
423
469
- foreach (XAttribute attrib in node.Attributes())
424
+ foreach (XAttribute attrib in element.Attributes())
425
{
426
if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace)
427
{
428
switch (attrib.Name.LocalName)
429
{
430
case "Id":
476
- id = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib);
477
- this.Core.CreateSimpleReference(sourceLineNumbers, "HelpFilter", id);
431
+ id = this.ParseHelper.GetAttributeIdentifier(sourceLineNumbers, attrib);
432
+ this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "HelpFilter", id.Id);
433
break;
434
default:
480
- this.Core.UnexpectedAttribute(node, attrib);
435
+ this.ParseHelper.UnexpectedAttribute(element, attrib);
436
break;
437
}
438
}
439
else
440
{
486
- this.Core.ParseExtensionAttribute(node, attrib);
441
+ this.ParseHelper.ParseExtensionAttribute(this.Context.Extensions, intermediate, section, element, attrib);
442
}
443
}
444
445
if (null == id)
446
{
492
- this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id"));
447
+ this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, element.Name.LocalName, "Id"));
448
}
449
495
- this.Core.ParseForExtensionElements(node);
450
+ this.ParseHelper.ParseForExtensionElements(this.Context.Extensions, intermediate, section, element);
451
497
- if (!this.Core.EncounteredError)
452
+ if (!this.Messaging.EncounteredError)
453
{
499
- Row row = this.Core.CreateRow(sourceLineNumbers, "HelpFilterToNamespace");
500
- row[0] = id;
501
- row[1] = collectionId;
454
+ var row = this.ParseHelper.CreateRow(section, sourceLineNumbers, "HelpFilterToNamespace", id);
455
+ row.Set(1, collectionId.Id);
456
}
457
}
458
505
- /// <summary>
506
- /// Parses a PlugCollectionInto element.
507
- /// </summary>
508
- /// <param name="node">Element to process.</param>
509
- /// <param name="parentId">Identifier of the parent help collection.</param>
510
- private void ParsePlugCollectionIntoElement(XElement node, string parentId)
459
+ private void ParsePlugCollectionIntoElement(Intermediate intermediate, IntermediateSection section, XElement element, Identifier parentId)
460
{
512
- SourceLineNumber sourceLineNumbers = Preprocessor.GetSourceLineNumbers(node);
461
+ SourceLineNumber sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(element);
462
string hxa = null;
463
string hxt = null;
464
string hxtParent = null;
@@ -519,38 +468,38 @@ namespace WixToolset.Extensions
468
bool pluginVS05 = false;
469
bool pluginVS08 = false;
470
522
- foreach (XAttribute attrib in node.Attributes())
471
+ foreach (XAttribute attrib in element.Attributes())
472
{
473
if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace)
474
{
475
switch (attrib.Name.LocalName)
476
{
477
case "Attributes":
529
- hxa = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib);
478
+ hxa = this.ParseHelper.GetAttributeIdentifierValue(sourceLineNumbers, attrib);
479
break;
480
case "TableOfContents":
532
- hxt = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib);
481
+ hxt = this.ParseHelper.GetAttributeIdentifierValue(sourceLineNumbers, attrib);
482
break;
483
case "TargetCollection":
535
- namespaceParent = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib);
484
+ namespaceParent = this.ParseHelper.GetAttributeIdentifierValue(sourceLineNumbers, attrib);
485
break;
486
case "TargetTableOfContents":
538
- hxtParent = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib);
487
+ hxtParent = this.ParseHelper.GetAttributeIdentifierValue(sourceLineNumbers, attrib);
488
break;
489
case "TargetFeature":
541
- feature = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib);
490
+ feature = this.ParseHelper.GetAttributeIdentifierValue(sourceLineNumbers, attrib);
491
break;
492
case "SuppressExternalNamespaces":
544
- suppressExternalNamespaces = this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib);
493
+ suppressExternalNamespaces = this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib);
494
break;
495
default:
547
- this.Core.UnexpectedAttribute(node, attrib);
496
+ this.ParseHelper.UnexpectedAttribute(element, attrib);
497
break;
498
}
499
}
500
else
501
{
553
- this.Core.ParseExtensionAttribute(node, attrib);
502
+ this.ParseHelper.ParseExtensionAttribute(this.Context.Extensions, intermediate, section, element, attrib);
503
}
504
}
505
@@ -559,35 +508,33 @@ namespace WixToolset.Extensions
508
509
if (null == namespaceParent)
510
{
562
- this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "TargetCollection"));
511
+ this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, element.Name.LocalName, "TargetCollection"));
512
}
513
514
if (null == feature && (pluginVS05 || pluginVS08) && YesNoType.No == suppressExternalNamespaces)
515
{
567
- this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "TargetFeature"));
516
+ this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, element.Name.LocalName, "TargetFeature"));
517
}
518
570
- this.Core.ParseForExtensionElements(node);
519
+ this.ParseHelper.ParseForExtensionElements(this.Context.Extensions, intermediate, section, element);
520
572
- if (!this.Core.EncounteredError)
521
+ if (!this.Messaging.EncounteredError)
522
{
574
- Row row = this.Core.CreateRow(sourceLineNumbers, "HelpPlugin");
575
- row[0] = parentId;
576
- row[1] = namespaceParent;
577
- row[2] = hxt;
578
- row[3] = hxa;
579
- row[4] = hxtParent;
523
+ var row = this.ParseHelper.CreateRow(section, sourceLineNumbers, "HelpPlugin", parentId);
524
+ row.Set(1, namespaceParent);
525
+ row.Set(2, hxt);
526
+ row.Set(3, hxa);
527
+ row.Set(4, hxtParent);
528
529
if (pluginVS05)
530
{
531
if (YesNoType.No == suppressExternalNamespaces)
532
{
533
// Bring in the help 2 base namespace components for VS 2005
586
- this.Core.CreateComplexReference(sourceLineNumbers, ComplexReferenceParentType.Feature, feature, String.Empty,
534
+ this.ParseHelper.CreateComplexReference(section, sourceLineNumbers, ComplexReferenceParentType.Feature, feature, String.Empty,
535
ComplexReferenceChildType.ComponentGroup, "Help2_VS2005_Namespace_Components", false);
536
// Reference CustomAction since nothing will happen without it
589
- this.Core.CreateSimpleReference(sourceLineNumbers, "CustomAction",
590
- "CA_HxMerge_VSIPCC_VSCC");
537
+ this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "CustomAction", "CA_HxMerge_VSIPCC_VSCC");
538
}
539
}
540
else if (pluginVS08)
@@ -595,31 +542,23 @@ namespace WixToolset.Extensions
542
if (YesNoType.No == suppressExternalNamespaces)
543
{
544
// Bring in the help 2 base namespace components for VS 2008
598
- this.Core.CreateComplexReference(sourceLineNumbers, ComplexReferenceParentType.Feature, feature, String.Empty,
545
+ this.ParseHelper.CreateComplexReference(section, sourceLineNumbers, ComplexReferenceParentType.Feature, feature, String.Empty,
546
ComplexReferenceChildType.ComponentGroup, "Help2_VS2008_Namespace_Components", false);
547
// Reference CustomAction since nothing will happen without it
601
- this.Core.CreateSimpleReference(sourceLineNumbers, "CustomAction",
602
- "CA_ScheduleExtHelpPlugin_VSCC_VSIPCC");
548
+ this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "CustomAction", "CA_ScheduleExtHelpPlugin_VSCC_VSIPCC");
549
}
550
}
551
else
552
{
553
// Reference the parent namespace to enforce the foreign key relationship
608
- this.Core.CreateSimpleReference(sourceLineNumbers, "HelpNamespace",
609
- namespaceParent);
554
+ this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "HelpNamespace", namespaceParent);
555
}
556
}
557
}
558
614
- /// <summary>
615
- /// Parses a VsixPackage element.
616
- /// </summary>
617
- /// <param name="node">Element to process.</param>
618
- /// <param name="componentId">Identifier of the parent Component element.</param>
619
- /// <param name="fileId">Identifier of the parent File element.</param>
620
- private void ParseVsixPackageElement(XElement node, string componentId, string fileId)
559
+ private void ParseVsixPackageElement(Intermediate intermediate, IntermediateSection section, XElement element, string componentId, string fileId)
560
{
622
- SourceLineNumber sourceLineNumbers = Preprocessor.GetSourceLineNumbers(node);
561
+ SourceLineNumber sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(element);
562
string propertyId = "VS_VSIX_INSTALLER_PATH";
563
string packageId = null;
564
YesNoType permanent = YesNoType.NotSet;
@@ -627,7 +566,7 @@ namespace WixToolset.Extensions
566
string targetVersion = null;
567
YesNoType vital = YesNoType.NotSet;
568
630
- foreach (XAttribute attrib in node.Attributes())
569
+ foreach (XAttribute attrib in element.Attributes())
570
{
571
if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace)
572
{
@@ -636,21 +575,21 @@ namespace WixToolset.Extensions
575
case "File":
576
if (String.IsNullOrEmpty(fileId))
577
{
639
- fileId = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib);
578
+ fileId = this.ParseHelper.GetAttributeIdentifierValue(sourceLineNumbers, attrib);
579
}
580
else
581
{
643
- this.Core.OnMessage(WixErrors.IllegalAttributeWhenNested(sourceLineNumbers, node.Name.LocalName, "File", "File"));
582
+ this.Messaging.Write(ErrorMessages.IllegalAttributeWhenNested(sourceLineNumbers, element.Name.LocalName, "File", "File"));
583
}
584
break;
585
case "PackageId":
647
- packageId = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
586
+ packageId = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib);
587
break;
588
case "Permanent":
650
- permanent = this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib);
589
+ permanent = this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib);
590
break;
591
case "Target":
653
- target = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
592
+ target = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib);
593
switch (target.ToLowerInvariant())
594
{
595
case "integrated":
@@ -681,53 +620,53 @@ namespace WixToolset.Extensions
620
}
621
break;
622
case "TargetVersion":
684
- targetVersion = this.Core.GetAttributeVersionValue(sourceLineNumbers, attrib);
623
+ targetVersion = this.ParseHelper.GetAttributeVersionValue(sourceLineNumbers, attrib);
624
break;
625
case "Vital":
687
- vital = this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib);
626
+ vital = this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib);
627
break;
628
case "VsixInstallerPathProperty":
690
- propertyId = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib);
629
+ propertyId = this.ParseHelper.GetAttributeIdentifierValue(sourceLineNumbers, attrib);
630
break;
631
default:
693
- this.Core.UnexpectedAttribute(node, attrib);
632
+ this.ParseHelper.UnexpectedAttribute(element, attrib);
633
break;
634
}
635
}
636
else
637
{
699
- this.Core.ParseExtensionAttribute(node, attrib);
638
+ this.ParseHelper.ParseExtensionAttribute(this.Context.Extensions, intermediate, section, element, attrib);
639
}
640
}
641
642
if (String.IsNullOrEmpty(fileId))
643
{
705
- this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "File"));
644
+ this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, element.Name.LocalName, "File"));
645
}
646
647
if (String.IsNullOrEmpty(packageId))
648
{
710
- this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "PackageId"));
649
+ this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, element.Name.LocalName, "PackageId"));
650
}
651
652
if (!String.IsNullOrEmpty(target) && String.IsNullOrEmpty(targetVersion))
653
{
715
- this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "TargetVersion", "Target"));
654
+ this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, element.Name.LocalName, "TargetVersion", "Target"));
655
}
656
else if (String.IsNullOrEmpty(target) && !String.IsNullOrEmpty(targetVersion))
657
{
719
- this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Target", "TargetVersion"));
658
+ this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, element.Name.LocalName, "Target", "TargetVersion"));
659
}
660
722
- this.Core.ParseForExtensionElements(node);
661
+ this.ParseHelper.ParseForExtensionElements(this.Context.Extensions, intermediate, section, element);
662
724
- if (!this.Core.EncounteredError)
663
+ if (!this.Messaging.EncounteredError)
664
{
665
// Ensure there is a reference to the AppSearch Property that will find the VsixInstaller.exe.
727
- this.Core.CreateSimpleReference(sourceLineNumbers, "Property", propertyId);
666
+ this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "Property", propertyId);
667
668
// Ensure there is a reference to the package file (even if we are a child under it).
730
- this.Core.CreateSimpleReference(sourceLineNumbers, "File", fileId);
669
+ this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "File", fileId);
670
671
string cmdlinePrefix = "/q ";
672
@@ -746,8 +685,8 @@ namespace WixToolset.Extensions
685
}
686
else // the package is vital so ensure there is a rollback action scheduled.
687
{
749
- Identifier rollbackNamePerUser = this.Core.CreateIdentifier("vru", componentId, fileId, "per-user", target ?? String.Empty, targetVersion ?? String.Empty);
750
- Identifier rollbackNamePerMachine = this.Core.CreateIdentifier("vrm", componentId, fileId, "per-machine", target ?? String.Empty, targetVersion ?? String.Empty);
688
+ Identifier rollbackNamePerUser = this.ParseHelper.CreateIdentifier("vru", componentId, fileId, "per-user", target ?? String.Empty, targetVersion ?? String.Empty);
689
+ Identifier rollbackNamePerMachine = this.ParseHelper.CreateIdentifier("vrm", componentId, fileId, "per-machine", target ?? String.Empty, targetVersion ?? String.Empty);
690
string rollbackCmdLinePerUser = String.Concat(cmdlinePrefix, " /u:\"", packageId, "\"");
691
string rollbackCmdLinePerMachine = String.Concat(rollbackCmdLinePerUser, " /admin");
692
int rollbackExtraBitsPerUser = VSCompiler.MsidbCustomActionTypeContinue | VSCompiler.MsidbCustomActionTypeRollback | VSCompiler.MsidbCustomActionTypeInScript;
@@ -755,27 +694,27 @@ namespace WixToolset.Extensions
694
string rollbackConditionPerUser = String.Format("NOT ALLUSERS AND NOT Installed AND ${0}=2 AND ?{0}>2", componentId); // NOT Installed && Component being installed but not installed already.
695
string rollbackConditionPerMachine = String.Format("ALLUSERS AND NOT Installed AND ${0}=2 AND ?{0}>2", componentId); // NOT Installed && Component being installed but not installed already.
696
758
- this.SchedulePropertyExeAction(sourceLineNumbers, rollbackNamePerUser, propertyId, rollbackCmdLinePerUser, rollbackExtraBitsPerUser, rollbackConditionPerUser, null, installAfter);
759
- this.SchedulePropertyExeAction(sourceLineNumbers, rollbackNamePerMachine, propertyId, rollbackCmdLinePerMachine, rollbackExtraBitsPerMachine, rollbackConditionPerMachine, null, rollbackNamePerUser.Id);
697
+ this.SchedulePropertyExeAction(section, sourceLineNumbers, rollbackNamePerUser, propertyId, rollbackCmdLinePerUser, rollbackExtraBitsPerUser, rollbackConditionPerUser, null, installAfter);
698
+ this.SchedulePropertyExeAction(section, sourceLineNumbers, rollbackNamePerMachine, propertyId, rollbackCmdLinePerMachine, rollbackExtraBitsPerMachine, rollbackConditionPerMachine, null, rollbackNamePerUser.Id);
699
700
installAfter = rollbackNamePerMachine.Id;
701
}
702
764
- Identifier installNamePerUser = this.Core.CreateIdentifier("viu", componentId, fileId, "per-user", target ?? String.Empty, targetVersion ?? String.Empty);
765
- Identifier installNamePerMachine = this.Core.CreateIdentifier("vim", componentId, fileId, "per-machine", target ?? String.Empty, targetVersion ?? String.Empty);
703
+ Identifier installNamePerUser = this.ParseHelper.CreateIdentifier("viu", componentId, fileId, "per-user", target ?? String.Empty, targetVersion ?? String.Empty);
704
+ Identifier installNamePerMachine = this.ParseHelper.CreateIdentifier("vim", componentId, fileId, "per-machine", target ?? String.Empty, targetVersion ?? String.Empty);
705
string installCmdLinePerUser = String.Format("{0} \"[#{1}]\"", cmdlinePrefix, fileId);
706
string installCmdLinePerMachine = String.Concat(installCmdLinePerUser, " /admin");
707
string installConditionPerUser = String.Format("NOT ALLUSERS AND ${0}=3", componentId); // only execute if the Component being installed.
708
string installConditionPerMachine = String.Format("ALLUSERS AND ${0}=3", componentId); // only execute if the Component being installed.
709
771
- this.SchedulePropertyExeAction(sourceLineNumbers, installNamePerUser, propertyId, installCmdLinePerUser, installExtraBits, installConditionPerUser, null, installAfter);
772
- this.SchedulePropertyExeAction(sourceLineNumbers, installNamePerMachine, propertyId, installCmdLinePerMachine, installExtraBits | VSCompiler.MsidbCustomActionTypeNoImpersonate, installConditionPerMachine, null, installNamePerUser.Id);
710
+ this.SchedulePropertyExeAction(section, sourceLineNumbers, installNamePerUser, propertyId, installCmdLinePerUser, installExtraBits, installConditionPerUser, null, installAfter);
711
+ this.SchedulePropertyExeAction(section, sourceLineNumbers, installNamePerMachine, propertyId, installCmdLinePerMachine, installExtraBits | VSCompiler.MsidbCustomActionTypeNoImpersonate, installConditionPerMachine, null, installNamePerUser.Id);
712
713
// If not permanent, schedule the uninstall custom action.
714
if (permanent != YesNoType.Yes)
715
{
777
- Identifier uninstallNamePerUser = this.Core.CreateIdentifier("vuu", componentId, fileId, "per-user", target ?? String.Empty, targetVersion ?? String.Empty);
778
- Identifier uninstallNamePerMachine = this.Core.CreateIdentifier("vum", componentId, fileId, "per-machine", target ?? String.Empty, targetVersion ?? String.Empty);
716
+ Identifier uninstallNamePerUser = this.ParseHelper.CreateIdentifier("vuu", componentId, fileId, "per-user", target ?? String.Empty, targetVersion ?? String.Empty);
717
+ Identifier uninstallNamePerMachine = this.ParseHelper.CreateIdentifier("vum", componentId, fileId, "per-machine", target ?? String.Empty, targetVersion ?? String.Empty);
718
string uninstallCmdLinePerUser = String.Concat(cmdlinePrefix, " /u:\"", packageId, "\"");
719
string uninstallCmdLinePerMachine = String.Concat(uninstallCmdLinePerUser, " /admin");
720
int uninstallExtraBitsPerUser = VSCompiler.MsidbCustomActionTypeContinue | VSCompiler.MsidbCustomActionTypeInScript;
@@ -783,39 +722,39 @@ namespace WixToolset.Extensions
722
string uninstallConditionPerUser = String.Format("NOT ALLUSERS AND ${0}=2 AND ?{0}>2", componentId); // Only execute if component is being uninstalled.
723
string uninstallConditionPerMachine = String.Format("ALLUSERS AND ${0}=2 AND ?{0}>2", componentId); // Only execute if component is being uninstalled.
724
786
- this.SchedulePropertyExeAction(sourceLineNumbers, uninstallNamePerUser, propertyId, uninstallCmdLinePerUser, uninstallExtraBitsPerUser, uninstallConditionPerUser, "InstallFinalize", null);
787
- this.SchedulePropertyExeAction(sourceLineNumbers, uninstallNamePerMachine, propertyId, uninstallCmdLinePerMachine, uninstallExtraBitsPerMachine, uninstallConditionPerMachine, "InstallFinalize", null);
725
+ this.SchedulePropertyExeAction(section, sourceLineNumbers, uninstallNamePerUser, propertyId, uninstallCmdLinePerUser, uninstallExtraBitsPerUser, uninstallConditionPerUser, "InstallFinalize", null);
726
+ this.SchedulePropertyExeAction(section, sourceLineNumbers, uninstallNamePerMachine, propertyId, uninstallCmdLinePerMachine, uninstallExtraBitsPerMachine, uninstallConditionPerMachine, "InstallFinalize", null);
727
}
728
}
729
}
730
792
- private void SchedulePropertyExeAction(SourceLineNumber sourceLineNumbers, Identifier name, string source, string cmdline, int extraBits, string condition, string beforeAction, string afterAction)
731
+ private void SchedulePropertyExeAction(IntermediateSection section, SourceLineNumber sourceLineNumbers, Identifier name, string source, string cmdline, int extraBits, string condition, string beforeAction, string afterAction)
732
{
733
const string sequence = "InstallExecuteSequence";
734
796
- Row actionRow = this.Core.CreateRow(sourceLineNumbers, "CustomAction", name);
797
- actionRow[1] = VSCompiler.MsidbCustomActionTypeProperty | VSCompiler.MsidbCustomActionTypeExe | extraBits;
798
- actionRow[2] = source;
799
- actionRow[3] = cmdline;
735
+ var actionRow = this.ParseHelper.CreateRow(section, sourceLineNumbers, "CustomAction", name);
736
+ actionRow.Set(1, VSCompiler.MsidbCustomActionTypeProperty | VSCompiler.MsidbCustomActionTypeExe | extraBits);
737
+ actionRow.Set(2, source);
738
+ actionRow.Set(3, cmdline);
739
801
- Row sequenceRow = this.Core.CreateRow(sourceLineNumbers, "WixAction");
802
- sequenceRow[0] = sequence;
803
- sequenceRow[1] = name.Id;
804
- sequenceRow[2] = condition;
740
+ var sequenceRow = this.ParseHelper.CreateRow(section, sourceLineNumbers, "WixAction", new Identifier(name.Access, sequence, name.Id));
741
+ sequenceRow.Set(0, sequence);
742
+ sequenceRow.Set(1, name.Id);
743
+ sequenceRow.Set(2, condition);
744
// no explicit sequence
806
- sequenceRow[4] = beforeAction;
807
- sequenceRow[5] = afterAction;
808
- sequenceRow[6] = 0; // not overridable
745
+ sequenceRow.Set(4, beforeAction);
746
+ sequenceRow.Set(5, afterAction);
747
+ sequenceRow.Set(6, 0); // not overridable
748
749
if (null != beforeAction)
750
{
751
if (WindowsInstallerStandard.IsStandardAction(beforeAction))
752
{
814
- this.Core.CreateSimpleReference(sourceLineNumbers, "WixAction", sequence, beforeAction);
753
+ this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "WixAction", sequence, beforeAction);
754
}
755
else
756
{
818
- this.Core.CreateSimpleReference(sourceLineNumbers, "CustomAction", beforeAction);
757
+ this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "CustomAction", beforeAction);
758
}
759
}
760
@@ -823,11 +762,11 @@ namespace WixToolset.Extensions
762
{
763
if (WindowsInstallerStandard.IsStandardAction(afterAction))
764
{
826
- this.Core.CreateSimpleReference(sourceLineNumbers, "WixAction", sequence, afterAction);
765
+ this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "WixAction", sequence, afterAction);
766
}
767
else
768
{
830
- this.Core.CreateSimpleReference(sourceLineNumbers, "CustomAction", afterAction);
769
+ this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "CustomAction", afterAction);
770
}
771
}
772
}
src/wixext/VSDecompiler.cs
+5
-3
@@ -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.
2
3
-namespace WixToolset.Extensions
3
+namespace WixToolset.VisualStudio
4
{
5
+#if TODO_CONSIDER_DECOMPILER
6
using System;
7
using System.Collections;
8
using System.Diagnostics;
@@ -104,7 +105,7 @@ namespace WixToolset.Extensions
105
{
106
helpFile.SampleLocation = (string)row[7];
107
}
107
-
108
+
109
if (this.Core.RootElement is Wix.Module)
110
{
111
helpFile.SuppressCustomActions = VS.YesNoType.yes;
@@ -270,7 +271,7 @@ namespace WixToolset.Extensions
271
272
//we cannot do this work because we cannot get the FeatureComponent table
273
//plugCollectionInto.TargetFeature = DecompileHelpComponents();
273
-
274
+
275
VS.HelpCollection helpCollection = (VS.HelpCollection)this.Core.GetIndexedElement("HelpNamespace", (string)row[0]);
276
if (null != helpCollection)
277
{
@@ -293,4 +294,5 @@ namespace WixToolset.Extensions
294
// return String.Empty;
295
//}
296
}
297
+#endif
298
}
src/wixext/VSExtensionData.cs
+4
-44
@@ -1,55 +1,15 @@
1
// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information.
2
3
-namespace WixToolset.Extensions
3
+namespace WixToolset.VisualStudio
4
{
5
- using System;
6
- using System.Reflection;
5
using WixToolset.Data;
6
using WixToolset.Extensibility;
7
10
- /// <summary>
11
- /// The WiX Toolset Visual Studio Extension.
12
- /// </summary>
13
- public sealed class VSExtensionData : ExtensionData
8
+ public sealed class VSExtensionData : BaseExtensionData
9
{
15
- /// <summary>
16
- /// Gets the optional table definitions for this extension.
17
- /// </summary>
18
- /// <value>The optional table definitions for this extension.</value>
19
- public override TableDefinitionCollection TableDefinitions
10
+ public override Intermediate GetLibrary(ITupleDefinitionCreator tupleDefinitions)
11
{
21
- get
22
- {
23
- return VSExtensionData.GetExtensionTableDefinitions();
24
- }
25
- }
26
-
27
- /// <summary>
28
- /// Gets the library associated with this extension.
29
- /// </summary>
30
- /// <param name="tableDefinitions">The table definitions to use while loading the library.</param>
31
- /// <returns>The loaded library.</returns>
32
- public override Library GetLibrary(TableDefinitionCollection tableDefinitions)
33
- {
34
- return VSExtensionData.GetExtensionLibrary(tableDefinitions);
35
- }
36
-
37
- /// <summary>
38
- /// Internal mechanism to access the extension's table definitions.
39
- /// </summary>
40
- /// <returns>Extension's table definitions.</returns>
41
- internal static TableDefinitionCollection GetExtensionTableDefinitions()
42
- {
43
- return ExtensionData.LoadTableDefinitionHelper(Assembly.GetExecutingAssembly(), "WixToolset.Extensions.Data.tables.xml");
44
- }
45
-
46
- /// <summary>
47
- /// Internal mechanism to access the extension's library.
48
- /// </summary>
49
- /// <returns>Extension's library.</returns>
50
- internal static Library GetExtensionLibrary(TableDefinitionCollection tableDefinitions)
51
- {
52
- return ExtensionData.LoadLibraryHelper(Assembly.GetExecutingAssembly(), "WixToolset.Extensions.Data.vs.wixlib", tableDefinitions);
12
+ return Intermediate.Load(typeof(VSExtensionData).Assembly, "WixToolset.VisualStudio.vs.wixlib", tupleDefinitions);
13
}
14
}
15
}
src/wixext/VSExtensionFactory.cs
new
+18
@@ -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
+
3
+namespace WixToolset.VisualStudio
4
+{
5
+ using System;
6
+ using System.Collections.Generic;
7
+ using WixToolset.Extensibility;
8
+
9
+ public class VSExtensionFactory : BaseExtensionFactory
10
+ {
11
+ protected override IEnumerable<Type> ExtensionTypes => new[]
12
+ {
13
+ typeof(VSCompiler),
14
+ typeof(VSExtensionData),
15
+ typeof(VSWindowsInstallerBackendExtension),
16
+ };
17
+ }
18
+}
src/wixext/VSWindowsInstallerBackendExtension.cs
new
+75
@@ -0,0 +1,75 @@
1
+// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information.
2
+
3
+namespace WixToolset.VisualStudio
4
+{
5
+ using WixToolset.Data.WindowsInstaller;
6
+ using WixToolset.Extensibility;
7
+
8
+ public class VSWindowsInstallerBackendExtension : BaseWindowsInstallerBackendExtension
9
+ {
10
+ private static readonly TableDefinition[] Tables = new[] {
11
+ new TableDefinition(
12
+ "HelpFile",
13
+ new[]
14
+ {
15
+ new ColumnDefinition("HelpFileKey", ColumnType.String, 72, true, false, ColumnCategory.Identifier, description: "Primary Key for HelpFile Table (required)."),
16
+ new ColumnDefinition("HelpFileName", ColumnType.String, 0, false, false, ColumnCategory.Text, description: "Internal Microsoft Help ID for this HelpFile (required)."),
17
+ new ColumnDefinition("LangID", ColumnType.Number, 2, false, true, ColumnCategory.Language, description: "Language ID for content file (optional)."),
18
+ new ColumnDefinition("File_HxS", ColumnType.String, 72, false, true, ColumnCategory.Identifier, keyTable:"File", keyColumn: 1, description: "Key for HxS (Title) file (required)."),
19
+ new ColumnDefinition("File_HxI", ColumnType.String, 72, false, true, ColumnCategory.Identifier, keyTable:"File", keyColumn: 1, description: "Key for HxI (Index) file (required)."),
20
+ new ColumnDefinition("File_HxQ", ColumnType.String, 72, false, true, ColumnCategory.Identifier, keyTable:"File", keyColumn: 1, description: "Key for HxQ (Query) file (required)."),
21
+ new ColumnDefinition("File_HxR", ColumnType.String, 72, false, true, ColumnCategory.Identifier, keyTable:"File", keyColumn: 1, description: "Key for HxR (Attributes) file (required)."),
22
+ new ColumnDefinition("File_Samples", ColumnType.String, 72, false, true, ColumnCategory.Identifier, keyTable:"File", keyColumn: 1, description: "Key for a file that is in the 'root' of the samples directory for this HelpFile (optional)."),
23
+ }
24
+ ),
25
+ new TableDefinition(
26
+ "HelpFileToNamespace",
27
+ new[]
28
+ {
29
+ new ColumnDefinition("HelpFile_", ColumnType.String, 72, true, false, ColumnCategory.Identifier, keyTable: "HelpFile", keyColumn: 1, description: "Foreign key into HelpFile table (required)."),
30
+ new ColumnDefinition("HelpNamespace_", ColumnType.String, 72, true, false, ColumnCategory.Identifier, keyTable: "HelpNamespace", keyColumn: 1, description: "Foreign key into HelpNamespace table (required)."),
31
+ }
32
+ ),
33
+ new TableDefinition(
34
+ "HelpFilter",
35
+ new[]
36
+ {
37
+ new ColumnDefinition("FilterKey", ColumnType.String, 72, true, false, ColumnCategory.Identifier, description: "Primary Key for HelpFilter (required)."),
38
+ new ColumnDefinition("Description", ColumnType.Localized, 0, false, false, ColumnCategory.Text, description: "Friendly name for Filter (required)."),
39
+ new ColumnDefinition("QueryString", ColumnType.String, 0, false, true, ColumnCategory.Text, description: "Query String for Help Filter (optional)."),
40
+ }
41
+ ),
42
+ new TableDefinition(
43
+ "HelpFilterToNamespace",
44
+ new[]
45
+ {
46
+ new ColumnDefinition("HelpFilter_", ColumnType.String, 72, true, false, ColumnCategory.Identifier, keyTable: "HelpFilter", keyColumn: 1, description: "Foreign key into HelpFilter table (required)."),
47
+ new ColumnDefinition("HelpNamespace_", ColumnType.String, 72, true, false, ColumnCategory.Identifier, keyTable: "HelpNamespace", keyColumn: 1, description: "Foreign key into HelpNamespace table (required)."),
48
+ }
49
+ ),
50
+ new TableDefinition(
51
+ "HelpNamespace",
52
+ new[]
53
+ {
54
+ new ColumnDefinition("NamespaceKey", ColumnType.String, 72, true, false, ColumnCategory.Identifier, description: "Primary Key for HelpNamespace (required)."),
55
+ new ColumnDefinition("NamespaceName", ColumnType.String, 0, false, false, ColumnCategory.Text, description: "Internal Microsoft Help ID for this Namespace (required)."),
56
+ new ColumnDefinition("File_Collection", ColumnType.String, 72, false, false, ColumnCategory.Identifier, keyTable:"File", keyColumn: 1, description: "Key for HxC (Collection) file (required)."),
57
+ new ColumnDefinition("Description", ColumnType.Localized, 0, false, true, ColumnCategory.Text, description: "Friendly name for Namespace (optional)."),
58
+ }
59
+ ),
60
+ new TableDefinition(
61
+ "HelpPlugin",
62
+ new[]
63
+ {
64
+ new ColumnDefinition("HelpNamespace_", ColumnType.String, 72, true, false, ColumnCategory.Identifier, keyTable: "HelpNamespace", keyColumn: 1, description: "Foreign key into HelpNamespace table for the child namespace that will be plugged into the parent namespace (required)."),
65
+ new ColumnDefinition("HelpNamespace_Parent", ColumnType.String, 72, true, false, ColumnCategory.Identifier, keyTable: "HelpNamespace", keyColumn: 1, description: "Foreign key into HelpNamespace table for the parent namespace into which the child will be inserted (required)."),
66
+ new ColumnDefinition("File_HxT", ColumnType.String, 72, false, true, ColumnCategory.Identifier, keyTable:"File", keyColumn: 1, description: "Key for HxT file of child namespace (optional)."),
67
+ new ColumnDefinition("File_HxA", ColumnType.String, 72, false, true, ColumnCategory.Identifier, keyTable:"File", keyColumn: 1, description: "Key for HxA (Attributes) file of child namespace (optional)."),
68
+ new ColumnDefinition("File_ParentHxT", ColumnType.String, 72, false, true, ColumnCategory.Identifier, keyTable:"File", keyColumn: 1, description: "Key for HxT file of parent namespace that now includes the new child namespace (optional)."),
69
+ }
70
+ ),
71
+ };
72
+
73
+ protected override TableDefinition[] TableDefinitionsForTuples => Tables;
74
+ }
75
+}
src/wixext/WixToolset.VisualStudio.wixext.csproj
+4
-41
@@ -4,66 +4,29 @@
4
<Project Sdk="Microsoft.NET.Sdk">
5
<PropertyGroup>
6
<TargetFramework>netstandard2.0</TargetFramework>
7
- <RootNamespace>WixToolset.Extensions</RootNamespace>
7
+ <RootNamespace>WixToolset.VisualStudio</RootNamespace>
8
<Description>WiX Toolset Visual Studio Extension</Description>
9
<Title>WiX Toolset VS Extension</Title>
10
<IsTool>true</IsTool>
11
<ContentTargetFolders>build</ContentTargetFolders>
12
</PropertyGroup>
13
14
- <PropertyGroup>
15
- <NoWarn>NU1701</NoWarn>
16
- </PropertyGroup>
17
-
18
- <ItemGroup>
19
- <EmbeddedResource Include="Data\tables.xml">
20
- <LogicalName>$(RootNamespace).Data.tables.xml</LogicalName>
21
- </EmbeddedResource>
22
-
23
- <MsgGenSource Include="Data\messages.xml">
24
- <ResourcesLogicalName>$(RootNamespace).Data.Messages.resources</ResourcesLogicalName>
25
- </MsgGenSource>
26
-
27
- <EmbeddedResource Include="Xsd\vs.xsd">
28
- <LogicalName>$(RootNamespace).Xsd.vs.xsd</LogicalName>
29
- <Pack>true</Pack>
30
- <PackagePath>tools</PackagePath>
31
- </EmbeddedResource>
32
-
33
- <XsdGenSource Include="Xsd\vs.xsd">
34
- <CommonNamespace>WixToolset.Data.Serialize</CommonNamespace>
35
- <Namespace>WixToolset.Extensions.Serialize.VS</Namespace>
36
- </XsdGenSource>
37
-
38
- <EmbeddedResource Include="$(OutputPath)..\vs.wixlib">
39
- <Link>Data\vs.wixlib</Link>
40
- </EmbeddedResource>
41
- </ItemGroup>
42
-
14
<ItemGroup>
15
<Content Include="$(MSBuildThisFileName).targets" />
16
+ <Content Include="vs.xsd" PackagePath="tools" />
17
+ <EmbeddedResource Include="$(OutputPath)..\vs.wixlib" />
18
</ItemGroup>
19
20
<ItemGroup>
48
- <ProjectReference Include="$(WixToolsetRootFolder)\Data\src\WixToolset.Data\WixToolset.Data.csproj" Condition=" '$(Configuration)' == 'Debug' And Exists('$(WixToolsetRootFolder)\Data\src\WixToolset.Data\WixToolset.Data.csproj') " />
49
- <PackageReference Include="WixToolset.Data" Version="4.0.*" Condition=" '$(Configuration)' == 'Release' Or !Exists('$(WixToolsetRootFolder)\Data\src\WixToolset.Data\WixToolset.Data.csproj') " PrivateAssets="all" />
50
-
21
<ProjectReference Include="$(WixToolsetRootFolder)\Extensibility\src\WixToolset.Extensibility\WixToolset.Extensibility.csproj" Condition=" '$(Configuration)' == 'Debug' And Exists('$(WixToolsetRootFolder)\Extensibility\src\WixToolset.Extensibility\WixToolset.Extensibility.csproj') " />
22
<PackageReference Include="WixToolset.Extensibility" Version="4.0.*" Condition=" '$(Configuration)' == 'Release' Or !Exists('$(WixToolsetRootFolder)\Extensibility\src\WixToolset.Extensibility\WixToolset.Extensibility.csproj') " PrivateAssets="all" />
53
-
54
- <ProjectReference Include="$(WixToolsetRootFolder)\Core\src\WixToolset.Core\WixToolset.Core.csproj" Condition=" '$(Configuration)' == 'Debug' And Exists('$(WixToolsetRootFolder)\Core\src\WixToolset.Core\WixToolset.Core.csproj') " />
55
- <PackageReference Include="WixToolset.Core" Version="4.0.*" Condition=" '$(Configuration)' == 'Release' Or !Exists('$(WixToolsetRootFolder)\Core\src\WixToolset.Core\WixToolset.Core.csproj') " PrivateAssets="all" />
23
</ItemGroup>
24
25
<ItemGroup>
59
- <ProjectReference Include="..\wixlib\vs.wixproj">
60
- <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
61
- </ProjectReference>
26
+ <ProjectReference Include="..\wixlib\vs.wixproj" ReferenceOutputAssembly="false" />
27
</ItemGroup>
28
29
<ItemGroup>
30
<PackageReference Include="Nerdbank.GitVersioning" Version="2.0.41" PrivateAssets="all" />
66
- <PackageReference Include="WixBuildTools.MsgGen" Version="4.0.*" PrivateAssets="all" />
67
- <PackageReference Include="WixBuildTools.XsdGen" Version="4.0.*" PrivateAssets="all" />
31
</ItemGroup>
32
</Project>
src/wixext/vs.xsd
renamed
src/wixlib/packages.config
+2
-2
@@ -1,5 +1,5 @@
1
<?xml version="1.0" encoding="utf-8"?>
2
<packages>
3
- <package id="Nerdbank.GitVersioning" version="2.0.41" developmentDependency="true" />
4
- <package id="WixToolset.Core.InternalPackage" version="4.0.15" targetFramework="net40" developmentDependency="true" />
3
+ <package id="Nerdbank.GitVersioning" version="2.1.7" developmentDependency="true" targetFramework="net40" />
4
+ <package id="WixToolset.Core.InternalPackage" version="4.0.57" targetFramework="net40" developmentDependency="true" />
5
</packages>
\ No newline at end of file
src/wixlib/vs.wixproj
+5
-13
@@ -1,10 +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
-
3
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="15.0">
5
- <Import Project="..\..\packages\WixToolset.Core.InternalPackage.4.0.15\build\WixToolset.Core.InternalPackage.props" Condition="Exists('..\..\packages\WixToolset.Core.InternalPackage.4.0.15\build\WixToolset.Core.InternalPackage.props')" />
4
+ <Import Project="..\..\packages\WixToolset.Core.InternalPackage.4.0.57\build\WixToolset.Core.InternalPackage.props" Condition="Exists('..\..\packages\WixToolset.Core.InternalPackage.4.0.57\build\WixToolset.Core.InternalPackage.props')" />
5
<Import Project="..\FindLocalWix.props" />
7
-
6
<PropertyGroup>
7
<ProjectGuid>{14345C9D-8AF8-435A-BB1B-E067CE7EB321}</ProjectGuid>
8
<OutputName>vs</OutputName>
@@ -13,7 +11,6 @@
11
<Pedantic>true</Pedantic>
12
<Cultures>en-us</Cultures>
13
</PropertyGroup>
16
-
14
<ItemGroup>
15
<Compile Include="HTML_Help_Registration__RTL_X86.wxs" />
16
<Compile Include="Vs2003.wxs" />
@@ -31,35 +28,30 @@
28
<Compile Include="vs2005\vs2005_VSIPCC_Collection_Files_RTL.wxs" />
29
<Compile Include="vs2008\vs2008_VSIPCC_Collection_Files_RTL.wxs" />
30
</ItemGroup>
34
-
31
<ItemGroup>
32
<Folder Include="vs2005\" />
33
<Folder Include="vs2008\" />
34
</ItemGroup>
39
-
35
<ItemGroup>
36
<None Include="packages.config" />
37
</ItemGroup>
43
-
38
<ItemGroup>
39
<ProjectReference Include="..\ca\vsca.vcxproj">
40
<Name>vsca</Name>
41
<Project>{45308b85-0628-4978-8fc8-6ad9e1ad5949}</Project>
42
</ProjectReference>
43
</ItemGroup>
50
-
44
<Import Project="$(WixTargetsPath)" Condition=" '$(WixTargetsPath)' != '' AND Exists('$(WixTargetsPath)') " />
45
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\WiX\v3.x\wix.targets" Condition=" '$(WixTargetsPath)' == '' AND Exists('$(MSBuildExtensionsPath32)\Microsoft\WiX\v3.x\wix.targets') " />
46
<Target Name="EnsureWixToolsetInstalled" Condition=" '$(WixTargetsImported)' != 'true' ">
47
<Error Text="FG-WiX or WiX Toolset build tools (v3.11 or later) must be installed to build this project. To download FG-WiX, go to https://www.firegiant.com/downloads/. To download the WiX Toolset, go to http://wixtoolset.org/releases/." />
48
</Target>
56
-
49
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
50
<PropertyGroup>
51
<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>
52
</PropertyGroup>
61
- <Error Condition="!Exists('..\..\packages\Nerdbank.GitVersioning.2.0.41\build\Nerdbank.GitVersioning.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Nerdbank.GitVersioning.2.0.41\build\Nerdbank.GitVersioning.targets'))" />
62
- <Error Condition="!Exists('..\..\packages\WixToolset.Core.InternalPackage.4.0.15\build\WixToolset.Core.InternalPackage.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\WixToolset.Core.InternalPackage.4.0.15\build\WixToolset.Core.InternalPackage.props'))" />
53
+ <Error Condition="!Exists('..\..\packages\Nerdbank.GitVersioning.2.1.7\build\Nerdbank.GitVersioning.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Nerdbank.GitVersioning.2.1.7\build\Nerdbank.GitVersioning.targets'))" />
54
+ <Error Condition="!Exists('..\..\packages\WixToolset.Core.InternalPackage.4.0.57\build\WixToolset.Core.InternalPackage.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\WixToolset.Core.InternalPackage.4.0.57\build\WixToolset.Core.InternalPackage.props'))" />
55
</Target>
64
- <Import Project="..\..\packages\Nerdbank.GitVersioning.2.0.41\build\Nerdbank.GitVersioning.targets" Condition="Exists('..\..\packages\Nerdbank.GitVersioning.2.0.41\build\Nerdbank.GitVersioning.targets')" />
65
-</Project>
56
+ <Import Project="..\..\packages\Nerdbank.GitVersioning.2.1.7\build\Nerdbank.GitVersioning.targets" Condition="Exists('..\..\packages\Nerdbank.GitVersioning.2.1.7\build\Nerdbank.GitVersioning.targets')" />
57
+</Project>
\ No newline at end of file