Modernize tuples; update to latest dependencies.
Bob Arnson committed
Oct 24, 2019 at 17:16 UTC
014bc7918c05f01f819c07fac6e502e0f542a222
9 files changed
+46
-58
src/Cpp.Build.props
+1
-1
@@ -8,7 +8,7 @@
8
<OutDir>$(OutputPath)$(Platform)\</OutDir>
9
</PropertyGroup>
10
11
- <PropertyGroup Condition="'$(WindowsTargetPlatformVersion)'=='' AND '$(VisualStudioVersion)'=='15.0'">
11
+ <PropertyGroup Condition="'$(WindowsTargetPlatformVersion)'=='' AND '$(VisualStudioVersion)'>='15.0'">
12
<WindowsTargetPlatformVersion>$([Microsoft.Build.Utilities.ToolLocationHelper]::GetLatestSDKTargetPlatformVersion('Windows', '10.0'))</WindowsTargetPlatformVersion>
13
</PropertyGroup>
14
src/ca/netfxca.vcxproj
+5
-15
@@ -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" 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
-
4
+ <Import Project="..\..\packages\WixToolset.WcaUtil.4.0.8\build\WixToolset.WcaUtil.props" Condition="Exists('..\..\packages\WixToolset.WcaUtil.4.0.8\build\WixToolset.WcaUtil.props')" />
5
+ <Import Project="..\..\packages\WixToolset.DUtil.4.0.18\build\WixToolset.DUtil.props" Condition="Exists('..\..\packages\WixToolset.DUtil.4.0.18\build\WixToolset.DUtil.props')" />
6
<ItemGroup Label="ProjectConfigurations">
7
<ProjectConfiguration Include="Debug|Win32">
8
<Configuration>Debug</Configuration>
@@ -15,7 +13,6 @@
13
<Platform>Win32</Platform>
14
</ProjectConfiguration>
15
</ItemGroup>
18
-
16
<PropertyGroup Label="Globals">
17
<ProjectGuid>{F72D34CA-48DA-4DFD-91A9-A0C78BEF6981}</ProjectGuid>
18
<ConfigurationType>DynamicLibrary</ConfigurationType>
@@ -25,38 +22,31 @@
22
<ProjectModuleDefinitionFile>netfxca.def</ProjectModuleDefinitionFile>
23
<Description>WiX Toolset .NET Framework CustomAction</Description>
24
</PropertyGroup>
28
-
25
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
26
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
31
-
27
<PropertyGroup>
28
<ProjectAdditionalLinkLibraries>msi.lib</ProjectAdditionalLinkLibraries>
29
</PropertyGroup>
35
-
30
<ItemGroup>
31
<ClCompile Include="dllmain.cpp">
32
<PrecompiledHeader>Create</PrecompiledHeader>
33
</ClCompile>
34
<ClCompile Include="netfxca.cpp" />
35
</ItemGroup>
42
-
36
<ItemGroup>
37
<ClInclude Include="cost.h" />
38
<ClInclude Include="precomp.h" />
39
</ItemGroup>
47
-
40
<ItemGroup>
49
- <None Include="packages.config" />
41
<None Include="netfxca.def" />
42
+ <None Include="packages.config" />
43
</ItemGroup>
52
-
44
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
54
-
45
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
46
<PropertyGroup>
47
<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>
48
</PropertyGroup>
59
- <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'))" />
60
- <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'))" />
49
+ <Error Condition="!Exists('..\..\packages\WixToolset.DUtil.4.0.18\build\WixToolset.DUtil.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\WixToolset.DUtil.4.0.18\build\WixToolset.DUtil.props'))" />
50
+ <Error Condition="!Exists('..\..\packages\WixToolset.WcaUtil.4.0.8\build\WixToolset.WcaUtil.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\WixToolset.WcaUtil.4.0.8\build\WixToolset.WcaUtil.props'))" />
51
</Target>
52
</Project>
\ No newline at end of file
src/ca/packages.config
+2
-2
@@ -1,5 +1,5 @@
1
<?xml version="1.0" encoding="utf-8"?>
2
<packages>
3
- <package id="WixToolset.DUtil" version="4.0.6" targetFramework="native" />
4
- <package id="WixToolset.WcaUtil" version="4.0.2" targetFramework="native" />
3
+ <package id="WixToolset.DUtil" version="4.0.18" targetFramework="native" />
4
+ <package id="WixToolset.WcaUtil" version="4.0.8" targetFramework="native" />
5
</packages>
\ No newline at end of file
src/test/WixToolsetTest.Netfx/WixToolsetTest.Netfx.csproj
+7
-4
@@ -1,4 +1,4 @@
1
-<?xml version="1.0" encoding="utf-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 Sdk="Microsoft.NET.Sdk">
@@ -31,8 +31,11 @@
31
</ItemGroup>
32
33
<ItemGroup>
34
- <PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.8.0" />
35
- <PackageReference Include="xunit" Version="2.4.0" />
36
- <PackageReference Include="xunit.runner.visualstudio" Version="2.4.0" />
34
+ <PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.3.0" />
35
+ <PackageReference Include="xunit" Version="2.4.1" />
36
+ <PackageReference Include="xunit.runner.visualstudio" Version="2.4.1">
37
+ <PrivateAssets>all</PrivateAssets>
38
+ <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
39
+ </PackageReference>
40
</ItemGroup>
41
</Project>
src/wixext/NetFxCompiler.cs
+9
-6
@@ -7,6 +7,7 @@ namespace WixToolset.Netfx
7
using System.Xml.Linq;
8
using WixToolset.Data;
9
using WixToolset.Extensibility;
10
+ using WixToolset.Netfx.Tuples;
11
12
/// <summary>
13
/// The compiler for the WiX Toolset .NET Framework Extension.
@@ -147,12 +148,14 @@ namespace WixToolset.Netfx
148
149
if (!this.Messaging.EncounteredError)
150
{
150
- var row = this.ParseHelper.CreateRow(section, sourceLineNumbers, "NetFxNativeImage", id);
151
- row.Set(1, fileId);
152
- row.Set(2, priority);
153
- row.Set(3, attributes);
154
- row.Set(4, assemblyApplication);
155
- row.Set(5, appBaseDirectory);
151
+ section.Tuples.Add(new NetFxNativeImageTuple(sourceLineNumbers, id)
152
+ {
153
+ FileRef=fileId,
154
+ Priority=priority,
155
+ Attributes=attributes,
156
+ ApplicationFileRef=assemblyApplication,
157
+ ApplicationBaseDirectoryRef=appBaseDirectory,
158
+ });
159
}
160
}
161
}
src/wixext/Tuples/NetFxNativeImageTuple.cs
+12
-19
@@ -6,12 +6,11 @@ namespace WixToolset.Netfx.Tuples
6
7
public enum NetFxNativeImageTupleFields
8
{
9
- NetFxNativeImage,
10
- File_,
9
+ FileRef,
10
Priority,
11
Attributes,
13
- File_Application,
14
- Directory_ApplicationBase,
12
+ ApplicationFileRef,
13
+ ApplicationBaseDirectoryRef,
14
}
15
16
public class NetFxNativeImageTuple : IntermediateTuple
@@ -26,16 +25,10 @@ namespace WixToolset.Netfx.Tuples
25
26
public IntermediateField this[NetFxNativeImageTupleFields index] => this.Fields[(int)index];
27
29
- public string NetFxNativeImage
28
+ public string FileRef
29
{
31
- get => this.Fields[(int)NetFxNativeImageTupleFields.NetFxNativeImage].AsString();
32
- set => this.Set((int)NetFxNativeImageTupleFields.NetFxNativeImage, value);
33
- }
34
-
35
- public string File_
36
- {
37
- get => this.Fields[(int)NetFxNativeImageTupleFields.File_].AsString();
38
- set => this.Set((int)NetFxNativeImageTupleFields.File_, value);
30
+ get => this.Fields[(int)NetFxNativeImageTupleFields.FileRef].AsString();
31
+ set => this.Set((int)NetFxNativeImageTupleFields.FileRef, value);
32
}
33
34
public int Priority
@@ -50,16 +43,16 @@ namespace WixToolset.Netfx.Tuples
43
set => this.Set((int)NetFxNativeImageTupleFields.Attributes, value);
44
}
45
53
- public string File_Application
46
+ public string ApplicationFileRef
47
{
55
- get => this.Fields[(int)NetFxNativeImageTupleFields.File_Application].AsString();
56
- set => this.Set((int)NetFxNativeImageTupleFields.File_Application, value);
48
+ get => this.Fields[(int)NetFxNativeImageTupleFields.ApplicationFileRef].AsString();
49
+ set => this.Set((int)NetFxNativeImageTupleFields.ApplicationFileRef, value);
50
}
51
59
- public string Directory_ApplicationBase
52
+ public string ApplicationBaseDirectoryRef
53
{
61
- get => this.Fields[(int)NetFxNativeImageTupleFields.Directory_ApplicationBase].AsString();
62
- set => this.Set((int)NetFxNativeImageTupleFields.Directory_ApplicationBase, value);
54
+ get => this.Fields[(int)NetFxNativeImageTupleFields.ApplicationBaseDirectoryRef].AsString();
55
+ set => this.Set((int)NetFxNativeImageTupleFields.ApplicationBaseDirectoryRef, value);
56
}
57
}
58
}
\ No newline at end of file
src/wixext/Tuples/NetfxTupleDefinitions.cs
+4
-5
@@ -1,4 +1,4 @@
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
3
namespace WixToolset.Netfx.Tuples
4
{
@@ -15,12 +15,11 @@ namespace WixToolset.Netfx.Tuples
15
NetfxTupleDefinitionNames.NetFxNativeImage,
16
new[]
17
{
18
- new IntermediateFieldDefinition(nameof(NetFxNativeImageTupleFields.NetFxNativeImage), IntermediateFieldType.String),
19
- new IntermediateFieldDefinition(nameof(NetFxNativeImageTupleFields.File_), IntermediateFieldType.String),
18
+ new IntermediateFieldDefinition(nameof(NetFxNativeImageTupleFields.FileRef), IntermediateFieldType.String),
19
new IntermediateFieldDefinition(nameof(NetFxNativeImageTupleFields.Priority), IntermediateFieldType.Number),
20
new IntermediateFieldDefinition(nameof(NetFxNativeImageTupleFields.Attributes), IntermediateFieldType.Number),
22
- new IntermediateFieldDefinition(nameof(NetFxNativeImageTupleFields.File_Application), IntermediateFieldType.String),
23
- new IntermediateFieldDefinition(nameof(NetFxNativeImageTupleFields.Directory_ApplicationBase), IntermediateFieldType.String),
21
+ new IntermediateFieldDefinition(nameof(NetFxNativeImageTupleFields.ApplicationFileRef), IntermediateFieldType.String),
22
+ new IntermediateFieldDefinition(nameof(NetFxNativeImageTupleFields.ApplicationBaseDirectoryRef), IntermediateFieldType.String),
23
},
24
typeof(NetFxNativeImageTuple));
25
}
src/wixlib/netfx.wixproj
+4
-4
@@ -1,7 +1,7 @@
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')" />
4
+ <Import Project="..\..\packages\WixToolset.MSBuild.4.0.0-build-0049\build\WixToolset.MSBuild.props" Condition="Exists('..\..\packages\WixToolset.MSBuild.4.0.0-build-0049\build\WixToolset.MSBuild.props')" />
5
<Import Project="..\FindLocalWix.props" />
6
<PropertyGroup>
7
<ProjectGuid>{45e4a6ac-3190-4e17-83f0-9935ffa5dc2b}</ProjectGuid>
@@ -45,9 +45,9 @@
45
<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>
46
</PropertyGroup>
47
<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'))" />
48
- <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'))" />
49
- <Error Condition="!Exists('..\..\packages\WixToolset.Util.wixext.4.0.8\build\WixToolset.Util.wixext.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\WixToolset.Util.wixext.4.0.8\build\WixToolset.Util.wixext.targets'))" />
48
+ <Error Condition="!Exists('..\..\packages\WixToolset.MSBuild.4.0.0-build-0049\build\WixToolset.MSBuild.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\WixToolset.MSBuild.4.0.0-build-0049\build\WixToolset.MSBuild.props'))" />
49
+ <Error Condition="!Exists('..\..\packages\WixToolset.Util.wixext.4.0.15\build\WixToolset.Util.wixext.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\WixToolset.Util.wixext.4.0.15\build\WixToolset.Util.wixext.targets'))" />
50
</Target>
51
<Import Project="..\..\packages\Nerdbank.GitVersioning.2.1.65\build\Nerdbank.GitVersioning.targets" Condition="Exists('..\..\packages\Nerdbank.GitVersioning.2.1.65\build\Nerdbank.GitVersioning.targets')" />
52
- <Import Project="..\..\packages\WixToolset.Util.wixext.4.0.8\build\WixToolset.Util.wixext.targets" Condition="Exists('..\..\packages\WixToolset.Util.wixext.4.0.8\build\WixToolset.Util.wixext.targets')" />
52
+ <Import Project="..\..\packages\WixToolset.Util.wixext.4.0.15\build\WixToolset.Util.wixext.targets" Condition="Exists('..\..\packages\WixToolset.Util.wixext.4.0.15\build\WixToolset.Util.wixext.targets')" />
53
</Project>
\ No newline at end of file
src/wixlib/packages.config
+2
-2
@@ -1,6 +1,6 @@
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
- <package id="WixToolset.Util.wixext" version="4.0.8" targetFramework="net40" />
4
+ <package id="WixToolset.MSBuild" version="4.0.0-build-0049" developmentDependency="true" targetFramework="net40" />
5
+ <package id="WixToolset.Util.wixext" version="4.0.15" targetFramework="net40" />
6
</packages>
\ No newline at end of file