From 014bc7918c05f01f819c07fac6e502e0f542a222 Mon Sep 17 00:00:00 2001 From: Bob Arnson Date: Thu, 24 Oct 2019 17:16:31 -0400 Subject: Modernize tuples; update to latest dependencies. --- src/Cpp.Build.props | 2 +- src/ca/netfxca.vcxproj | 20 ++++---------- src/ca/packages.config | 4 +-- .../WixToolsetTest.Netfx.csproj | 11 +++++--- src/wixext/NetFxCompiler.cs | 15 ++++++----- src/wixext/Tuples/NetFxNativeImageTuple.cs | 31 +++++++++------------- src/wixext/Tuples/NetfxTupleDefinitions.cs | 9 +++---- src/wixlib/netfx.wixproj | 8 +++--- src/wixlib/packages.config | 4 +-- 9 files changed, 46 insertions(+), 58 deletions(-) (limited to 'src') diff --git a/src/Cpp.Build.props b/src/Cpp.Build.props index 0e00132b..44a042c7 100644 --- a/src/Cpp.Build.props +++ b/src/Cpp.Build.props @@ -8,7 +8,7 @@ $(OutputPath)$(Platform)\ - + $([Microsoft.Build.Utilities.ToolLocationHelper]::GetLatestSDKTargetPlatformVersion('Windows', '10.0')) diff --git a/src/ca/netfxca.vcxproj b/src/ca/netfxca.vcxproj index 8be3a0ea..3f525e58 100644 --- a/src/ca/netfxca.vcxproj +++ b/src/ca/netfxca.vcxproj @@ -1,10 +1,8 @@ - - - - + + Debug @@ -15,7 +13,6 @@ Win32 - {F72D34CA-48DA-4DFD-91A9-A0C78BEF6981} DynamicLibrary @@ -25,38 +22,31 @@ netfxca.def WiX Toolset .NET Framework CustomAction - - msi.lib - Create - - - + - - 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}. - - + + \ No newline at end of file diff --git a/src/ca/packages.config b/src/ca/packages.config index b87f9ab4..4e9403bf 100644 --- a/src/ca/packages.config +++ b/src/ca/packages.config @@ -1,5 +1,5 @@  - - + + \ No newline at end of file diff --git a/src/test/WixToolsetTest.Netfx/WixToolsetTest.Netfx.csproj b/src/test/WixToolsetTest.Netfx/WixToolsetTest.Netfx.csproj index 7fe2dcff..3f04fea5 100644 --- a/src/test/WixToolsetTest.Netfx/WixToolsetTest.Netfx.csproj +++ b/src/test/WixToolsetTest.Netfx/WixToolsetTest.Netfx.csproj @@ -1,4 +1,4 @@ - + @@ -31,8 +31,11 @@ - - - + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + diff --git a/src/wixext/NetFxCompiler.cs b/src/wixext/NetFxCompiler.cs index 55db4297..8a5d02f5 100644 --- a/src/wixext/NetFxCompiler.cs +++ b/src/wixext/NetFxCompiler.cs @@ -7,6 +7,7 @@ namespace WixToolset.Netfx using System.Xml.Linq; using WixToolset.Data; using WixToolset.Extensibility; + using WixToolset.Netfx.Tuples; /// /// The compiler for the WiX Toolset .NET Framework Extension. @@ -147,12 +148,14 @@ namespace WixToolset.Netfx if (!this.Messaging.EncounteredError) { - var row = this.ParseHelper.CreateRow(section, sourceLineNumbers, "NetFxNativeImage", id); - row.Set(1, fileId); - row.Set(2, priority); - row.Set(3, attributes); - row.Set(4, assemblyApplication); - row.Set(5, appBaseDirectory); + section.Tuples.Add(new NetFxNativeImageTuple(sourceLineNumbers, id) + { + FileRef=fileId, + Priority=priority, + Attributes=attributes, + ApplicationFileRef=assemblyApplication, + ApplicationBaseDirectoryRef=appBaseDirectory, + }); } } } diff --git a/src/wixext/Tuples/NetFxNativeImageTuple.cs b/src/wixext/Tuples/NetFxNativeImageTuple.cs index af507137..51211f75 100644 --- a/src/wixext/Tuples/NetFxNativeImageTuple.cs +++ b/src/wixext/Tuples/NetFxNativeImageTuple.cs @@ -6,12 +6,11 @@ namespace WixToolset.Netfx.Tuples public enum NetFxNativeImageTupleFields { - NetFxNativeImage, - File_, + FileRef, Priority, Attributes, - File_Application, - Directory_ApplicationBase, + ApplicationFileRef, + ApplicationBaseDirectoryRef, } public class NetFxNativeImageTuple : IntermediateTuple @@ -26,16 +25,10 @@ namespace WixToolset.Netfx.Tuples public IntermediateField this[NetFxNativeImageTupleFields index] => this.Fields[(int)index]; - public string NetFxNativeImage + public string FileRef { - get => this.Fields[(int)NetFxNativeImageTupleFields.NetFxNativeImage].AsString(); - set => this.Set((int)NetFxNativeImageTupleFields.NetFxNativeImage, value); - } - - public string File_ - { - get => this.Fields[(int)NetFxNativeImageTupleFields.File_].AsString(); - set => this.Set((int)NetFxNativeImageTupleFields.File_, value); + get => this.Fields[(int)NetFxNativeImageTupleFields.FileRef].AsString(); + set => this.Set((int)NetFxNativeImageTupleFields.FileRef, value); } public int Priority @@ -50,16 +43,16 @@ namespace WixToolset.Netfx.Tuples set => this.Set((int)NetFxNativeImageTupleFields.Attributes, value); } - public string File_Application + public string ApplicationFileRef { - get => this.Fields[(int)NetFxNativeImageTupleFields.File_Application].AsString(); - set => this.Set((int)NetFxNativeImageTupleFields.File_Application, value); + get => this.Fields[(int)NetFxNativeImageTupleFields.ApplicationFileRef].AsString(); + set => this.Set((int)NetFxNativeImageTupleFields.ApplicationFileRef, value); } - public string Directory_ApplicationBase + public string ApplicationBaseDirectoryRef { - get => this.Fields[(int)NetFxNativeImageTupleFields.Directory_ApplicationBase].AsString(); - set => this.Set((int)NetFxNativeImageTupleFields.Directory_ApplicationBase, value); + get => this.Fields[(int)NetFxNativeImageTupleFields.ApplicationBaseDirectoryRef].AsString(); + set => this.Set((int)NetFxNativeImageTupleFields.ApplicationBaseDirectoryRef, value); } } } \ No newline at end of file diff --git a/src/wixext/Tuples/NetfxTupleDefinitions.cs b/src/wixext/Tuples/NetfxTupleDefinitions.cs index aa584b38..9b617279 100644 --- a/src/wixext/Tuples/NetfxTupleDefinitions.cs +++ b/src/wixext/Tuples/NetfxTupleDefinitions.cs @@ -1,4 +1,4 @@ -// 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. +// 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. namespace WixToolset.Netfx.Tuples { @@ -15,12 +15,11 @@ namespace WixToolset.Netfx.Tuples NetfxTupleDefinitionNames.NetFxNativeImage, new[] { - new IntermediateFieldDefinition(nameof(NetFxNativeImageTupleFields.NetFxNativeImage), IntermediateFieldType.String), - new IntermediateFieldDefinition(nameof(NetFxNativeImageTupleFields.File_), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(NetFxNativeImageTupleFields.FileRef), IntermediateFieldType.String), new IntermediateFieldDefinition(nameof(NetFxNativeImageTupleFields.Priority), IntermediateFieldType.Number), new IntermediateFieldDefinition(nameof(NetFxNativeImageTupleFields.Attributes), IntermediateFieldType.Number), - new IntermediateFieldDefinition(nameof(NetFxNativeImageTupleFields.File_Application), IntermediateFieldType.String), - new IntermediateFieldDefinition(nameof(NetFxNativeImageTupleFields.Directory_ApplicationBase), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(NetFxNativeImageTupleFields.ApplicationFileRef), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(NetFxNativeImageTupleFields.ApplicationBaseDirectoryRef), IntermediateFieldType.String), }, typeof(NetFxNativeImageTuple)); } diff --git a/src/wixlib/netfx.wixproj b/src/wixlib/netfx.wixproj index 302e5a1f..438ac60f 100644 --- a/src/wixlib/netfx.wixproj +++ b/src/wixlib/netfx.wixproj @@ -1,7 +1,7 @@ - + {45e4a6ac-3190-4e17-83f0-9935ffa5dc2b} @@ -45,9 +45,9 @@ 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}. - - + + - + \ No newline at end of file diff --git a/src/wixlib/packages.config b/src/wixlib/packages.config index 00328b08..1d51675a 100644 --- a/src/wixlib/packages.config +++ b/src/wixlib/packages.config @@ -1,6 +1,6 @@  - - + + \ No newline at end of file -- cgit v1.2.3-55-g6feb