@joebigelow / wix-1 / commits / b7ee8f1e

Create netstandard version of Mba.Core and separate nupkg for mbanative.

Sean Hall committed Jun 18, 2020 at 18:03 UTC b7ee8f1eaa4e67b3eeba426b4bc528b35042dbea
11 files changed +72 -114
appveyor.cmd
+9 -5
@@ -1,15 +1,19 @@
1 @setlocal
2 @pushd %~dp0
3 +@set _C=Release
4
5 nuget restore
6
6 -msbuild -p:Configuration=Release;Platform=x86;PlatformToolset=v140
7 +msbuild -p:Configuration=%_C%;Platform=x86;PlatformToolset=v140
8
8 -msbuild -p:Configuration=Release;Platform=x86;PlatformToolset=v141
9 +msbuild -p:Configuration=%_C%;Platform=x86;PlatformToolset=v141
10
10 -msbuild -p:Configuration=Release -t:Pack src\balutil\balutil.vcxproj
11 -msbuild -p:Configuration=Release -t:Pack src\bextutil\bextutil.vcxproj
12 -msbuild -p:Configuration=Release -t:Pack src\WixToolset.Mba.Core\WixToolset.Mba.Core.csproj
11 +@rem msbuild -t:VSTest -p:Configuration=%_C% src\test\WixToolsetTest.Mba.Core\WixToolsetTest.Mba.Core.csproj
12 +
13 +msbuild -t:Pack -p:Configuration=%_C% src\balutil\balutil.vcxproj
14 +msbuild -t:Pack -p:Configuration=%_C% src\bextutil\bextutil.vcxproj
15 +msbuild -t:Pack -p:Configuration=%_C% src\WixToolset.Mba.Core\WixToolset.Mba.Core.csproj
16 +msbuild -t:Pack -p:Configuration=%_C% src\mbanative\mbanative.vcxproj
17
18 @popd
19 @endlocal
\ No newline at end of file
balutil.sln
+5 -5
@@ -7,7 +7,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "balutil", "src\balutil\balu
7 EndProject
8 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "bextutil", "src\bextutil\bextutil.vcxproj", "{06027492-1CB9-48BC-B31E-C1F9356ED07E}"
9 EndProject
10 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WixToolset.Mba.Core", "src\WixToolset.Mba.Core\WixToolset.Mba.Core.csproj", "{E7E1841E-A58E-4901-B9CA-4845B807D45F}"
10 +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WixToolset.Mba.Core", "src\WixToolset.Mba.Core\WixToolset.Mba.Core.csproj", "{E7E1841E-A58E-4901-B9CA-4845B807D45F}"
11 EndProject
12 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mbanative", "src\mbanative\mbanative.vcxproj", "{665E0441-17F9-4105-B202-EDF274657F6E}"
13 EndProject
@@ -52,10 +52,10 @@ Global
52 {665E0441-17F9-4105-B202-EDF274657F6E}.Release|x64.ActiveCfg = Release|Win32
53 {665E0441-17F9-4105-B202-EDF274657F6E}.Release|x86.ActiveCfg = Release|Win32
54 {665E0441-17F9-4105-B202-EDF274657F6E}.Release|x86.Build.0 = Release|Win32
55 - {F54997F7-10D7-409B-B9F2-DB546490EDC0}.Debug|x64.ActiveCfg = Debug|x64
56 - {F54997F7-10D7-409B-B9F2-DB546490EDC0}.Debug|x64.Build.0 = Debug|x64
57 - {F54997F7-10D7-409B-B9F2-DB546490EDC0}.Debug|x86.ActiveCfg = Debug|x86
58 - {F54997F7-10D7-409B-B9F2-DB546490EDC0}.Debug|x86.Build.0 = Debug|x86
55 + {F54997F7-10D7-409B-B9F2-DB546490EDC0}.Debug|x64.ActiveCfg = Debug|Any CPU
56 + {F54997F7-10D7-409B-B9F2-DB546490EDC0}.Debug|x64.Build.0 = Debug|Any CPU
57 + {F54997F7-10D7-409B-B9F2-DB546490EDC0}.Debug|x86.ActiveCfg = Debug|Any CPU
58 + {F54997F7-10D7-409B-B9F2-DB546490EDC0}.Debug|x86.Build.0 = Debug|Any CPU
59 {F54997F7-10D7-409B-B9F2-DB546490EDC0}.Release|x64.ActiveCfg = Release|Any CPU
60 {F54997F7-10D7-409B-B9F2-DB546490EDC0}.Release|x64.Build.0 = Release|Any CPU
61 {F54997F7-10D7-409B-B9F2-DB546490EDC0}.Release|x86.ActiveCfg = Release|Any CPU
src/WixToolset.Mba.Core/Engine.cs
+5 -5
@@ -332,14 +332,14 @@ namespace WixToolset.Mba.Core
332 internal sealed class Variables<T> : IVariables<T>
333 {
334 // .NET 2.0 does not support Func<T, TResult> or Action<T1, T2>.
335 - internal delegate T Getter<T>(string name);
336 - internal delegate void Setter<T>(string name, T value);
335 + internal delegate T Getter(string name);
336 + internal delegate void Setter(string name, T value);
337
338 - private Getter<T> getter;
339 - private Setter<T> setter;
338 + private Getter getter;
339 + private Setter setter;
340 private Predicate<string> contains;
341
342 - internal Variables(Getter<T> getter, Setter<T> setter, Predicate<string> contains)
342 + internal Variables(Getter getter, Setter setter, Predicate<string> contains)
343 {
344 this.getter = getter;
345 this.setter = setter;
src/WixToolset.Mba.Core/Properties/AssemblyInfo.cs deleted
-17
@@ -1,17 +0,0 @@
1 -// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information.
2 -
3 -using System;
4 -using System.Reflection;
5 -using System.Runtime.InteropServices;
6 -
7 -[assembly: AssemblyTitle("Managed Bootstrapper Application Core (WiX)")]
8 -[assembly: AssemblyDescription("Managed Bootstrapper Application Core")]
9 -[assembly: AssemblyProduct("WiX Toolset")]
10 -[assembly: AssemblyCompany("WiX Toolset Team")]
11 -[assembly: AssemblyCopyright("Copyright (c) .NET Foundation and contributors. All rights reserved.")]
12 -
13 -// Types should not be visible to COM by default.
14 -[assembly: ComVisible(false)]
15 -[assembly: Guid("6f4e0cc9-8ad4-4b5a-a669-3aafff67a76f")]
16 -
17 -[assembly: CLSCompliantAttribute(true)]
src/WixToolset.Mba.Core/WixToolset.Mba.Core.csproj
+13 -60
@@ -1,76 +1,29 @@
1 <?xml version="1.0" encoding="utf-8"?>
2 <!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. -->
3
4 -
5 -<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
4 +<Project Sdk="Microsoft.NET.Sdk">
5 <PropertyGroup>
7 - <ProjectGuid>{E7E1841E-A58E-4901-B9CA-4845B807D45F}</ProjectGuid>
6 + <TargetFrameworks>netstandard2.0;net20</TargetFrameworks>
7 <AssemblyName>WixToolset.Mba.Core</AssemblyName>
9 - <OutputType>Library</OutputType>
8 <RootNamespace>WixToolset.Mba.Core</RootNamespace>
11 - <NoWarn>0693;1591</NoWarn>
12 - <TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
9 + <DebugType>embedded</DebugType>
10 <Description>Managed Bootstrapper Application Core</Description>
11 + <NuspecFile>$(MSBuildThisFileName).nuspec</NuspecFile>
12 </PropertyGroup>
15 - <PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
16 - <DebugSymbols>true</DebugSymbols>
17 - <Optimize>false</Optimize>
18 - <DefineConstants>$(DefineConstants);DEBUG;TRACE</DefineConstants>
19 - </PropertyGroup>
20 - <PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
21 - <DebugSymbols>true</DebugSymbols>
22 - <Optimize>true</Optimize>
23 - <DefineConstants>$(DefineConstants);TRACE</DefineConstants>
13 +
14 + <PropertyGroup Condition=" '$(UsingMicrosoftNETSdk)'!='true' and '$(CreateDocumentation)'!='false' ">
15 + <DocumentationFile>$(OutputPath)\$(AssemblyName).xml</DocumentationFile>
16 </PropertyGroup>
17 +
18 <ItemGroup>
26 - <Compile Include="BalUtil.cs" />
27 - <Compile Include="BaseBootstrapperApplicationFactory.cs" />
28 - <Compile Include="BootstrapperApplication.cs" />
29 - <Compile Include="BootstrapperApplicationData.cs" />
30 - <Compile Include="BootstrapperApplicationFactoryAttribute.cs" />
31 - <Compile Include="BootstrapperCommand.cs" />
32 - <Compile Include="BundleInfo.cs" />
33 - <Compile Include="Engine.cs" />
34 - <Compile Include="EventArgs.cs" />
35 - <Compile Include="IBootstrapperApplication.cs" />
36 - <Compile Include="IBootstrapperApplicationData.cs" />
37 - <Compile Include="IBootstrapperApplicationFactory.cs" />
38 - <Compile Include="IBootstrapperCommand.cs" />
39 - <Compile Include="IBootstrapperEngine.cs" />
40 - <Compile Include="IBundleInfo.cs" />
41 - <Compile Include="IDefaultBootstrapperApplication.cs" />
42 - <Compile Include="IEngine.cs" />
43 - <Compile Include="IPackageInfo.cs" />
44 - <Compile Include="IVariables.cs" />
45 - <Compile Include="NativeMethods.cs" />
46 - <Compile Include="PackageInfo.cs" />
47 - <Compile Include="Properties\AssemblyInfo.cs" />
48 - </ItemGroup>
49 - <ItemGroup>
50 - <None Include="packages.config" />
51 - </ItemGroup>
52 - <ItemGroup>
53 - <Reference Include="System" />
54 - <Reference Include="System.Configuration" />
55 - <Reference Include="System.Data" />
56 - <Reference Include="System.Xml" />
19 + <PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0" PrivateAssets="All" />
20 + <PackageReference Include="Nerdbank.GitVersioning" Version="2.1.65" PrivateAssets="All" />
21 </ItemGroup>
22
59 - <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
60 -
61 - <Target Name="Pack" DependsOnTargets="GetBuildVersion">
62 - <Exec Command='nuget pack $(AssemblyName).nuspec -OutputDirectory "$(BaseOutputPath)$(Configuration)" -Properties Configuration=$(Configuration);Id=$(AssemblyName);Version="$(BuildVersionSimple)";Authors="$(Authors)";Copyright="$(Copyright)";Description="$(Description)";Title="$(Title)"' />
63 - </Target>
64 -
65 - <Import Project="..\..\packages\Nerdbank.GitVersioning.2.1.65\build\Nerdbank.GitVersioning.targets" Condition="Exists('..\..\packages\Nerdbank.GitVersioning.2.1.65\build\Nerdbank.GitVersioning.targets')" />
66 - <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
23 + <Target Name="SetNuspecProperties" AfterTargets="GetBuildVersion">
24 <PropertyGroup>
68 - <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>
25 + <NuspecBasePath>$(OutputPath)</NuspecBasePath>
26 + <NuspecProperties>Configuration=$(Configuration);Id=$(MSBuildThisFileName);Version=$(BuildVersionSimple);Authors=$(Authors);Copyright=$(Copyright);Description=$(Description)</NuspecProperties>
27 </PropertyGroup>
70 - <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'))" />
28 </Target>
72 -
73 - <PropertyGroup Condition=" '$(CreateDocumentation)'!='false' ">
74 - <DocumentationFile>$(OutputPath)\$(AssemblyName).xml</DocumentationFile>
75 - </PropertyGroup>
29 </Project>
\ No newline at end of file
src/WixToolset.Mba.Core/WixToolset.Mba.Core.nuspec
+11 -5
@@ -5,17 +5,23 @@
5 <version>$version$</version>
6 <authors>WiX Toolset Team</authors>
7 <owners>WiX Toolset Team</owners>
8 - <!-- <license type="expression">MS-RL</license> -->
9 - <licenseUrl>https://licenses.nuget.org/MS-RL</licenseUrl>
8 + <license type="expression">MS-RL</license>
9 <projectUrl>https://github.com/wixtoolset/balutil</projectUrl>
10 <requireLicenseAcceptance>false</requireLicenseAcceptance>
11 <description>$description$</description>
12 <copyright>$copyright$</copyright>
13 +
14 + <dependencies>
15 + <group>
16 + <dependency id="runtime.win.WixToolset.Mba.Core" version="$version$" />
17 + </group>
18 + <group targetFramework=".NETFramework2.0" />
19 + <group targetFramework=".NETStandard2.0" />
20 + </dependencies>
21 </metadata>
22
23 <files>
17 - <file src="build\net20\$id$.props" target="build\net20" />
18 - <file src="..\..\build\$configuration$\v141\x86\mbanative.dll" target="build\net20\x86" />
19 - <file src="..\..\build\$configuration$\$id$.dll" target="lib\net20" />
24 + <file src="net20\$id$.dll" target="lib\net20" />
25 + <file src="netstandard2.0\$id$.dll" target="lib\netstandard2.0" />
26 </files>
27 </package>
src/WixToolset.Mba.Core/build/net20/WixToolset.Mba.Core.props deleted
-11
@@ -1,11 +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 -<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
5 - <PropertyGroup>
6 - <WixToolsetMbaNativePath Condition=" '$(WixToolsetMbaNativePath)' == '' ">$(MSBuildThisFileDirectory)x86\mbanative.dll</WixToolsetMbaNativePath>
7 - </PropertyGroup>
8 - <ItemGroup>
9 - <Content Include="$(WixToolsetMbaNativePath)" CopyToOutputDirectory="Always" />
10 - </ItemGroup>
11 -</Project>
src/WixToolset.Mba.Core/packages.config deleted
-4
@@ -1,4 +0,0 @@
1 -<?xml version="1.0" encoding="utf-8"?>
2 -<packages>
3 - <package id="Nerdbank.GitVersioning" version="2.1.65" targetFramework="net20" developmentDependency="true" />
4 -</packages>
\ No newline at end of file
src/mbanative/mbanative.vcxproj
+9 -1
@@ -31,12 +31,17 @@
31 <CharacterSet>Unicode</CharacterSet>
32 <TargetName>mbanative</TargetName>
33 <ProjectModuleDefinitionFile>mbanative.def</ProjectModuleDefinitionFile>
34 + <Description>Native component of WixToolset.Mba.Core</Description>
35 </PropertyGroup>
36
37 <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
38 <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
39 <Import Project="..\NativeMultiTargeting.Build.props" />
40
41 + <ImportGroup Label="Shared">
42 + <Import Project="..\..\packages\Nerdbank.GitVersioning.2.1.65\build\Nerdbank.GitVersioning.targets" Condition="Exists('..\..\packages\Nerdbank.GitVersioning.2.1.65\build\Nerdbank.GitVersioning.targets')" />
43 + </ImportGroup>
44 +
45 <PropertyGroup>
46 <ProjectAdditionalIncludeDirectories>..\balutil\inc</ProjectAdditionalIncludeDirectories>
47 <ProjectAdditionalLinkLibraries>balutil.lib</ProjectAdditionalLinkLibraries>
@@ -63,8 +68,11 @@
68 <ProjectReference Include="..\balutil\balutil.vcxproj" />
69 </ItemGroup>
70
71 + <Target Name="Pack" DependsOnTargets="GetBuildVersion">
72 + <Exec Command='nuget pack runtime.win.WixToolset.Mba.Core.nuspec -BasePath "$(BaseOutputPath)$(Configuration)" -OutputDirectory "$(BaseOutputPath)$(Configuration)" -Properties Configuration=$(Configuration);Id=runtime.win.WixToolset.Mba.Core;Version="$(BuildVersionSimple)";Platform=$(PlatformTarget);Authors="$(Authors)";Copyright="$(Copyright)";Description="$(Description)"' />
73 + </Target>
74 +
75 <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
67 - <Import Project="..\..\packages\Nerdbank.GitVersioning.2.1.65\build\Nerdbank.GitVersioning.targets" Condition="Exists('..\..\packages\Nerdbank.GitVersioning.2.1.65\build\Nerdbank.GitVersioning.targets')" />
76 <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
77 <PropertyGroup>
78 <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>
src/mbanative/runtime.win.WixToolset.Mba.Core.nuspec new
+19
@@ -0,0 +1,19 @@
1 +<?xml version="1.0"?>
2 +<package >
3 + <metadata>
4 + <id>$id$</id>
5 + <version>$version$</version>
6 + <authors>WiX Toolset Team</authors>
7 + <owners>WiX Toolset Team</owners>
8 + <license type="expression">MS-RL</license>
9 + <projectUrl>https://github.com/wixtoolset/balutil</projectUrl>
10 + <requireLicenseAcceptance>false</requireLicenseAcceptance>
11 + <description>$description$</description>
12 + <copyright>$copyright$</copyright>
13 + </metadata>
14 +
15 + <files>
16 + <file src="v141\x86\mbanative.dll" target="runtimes\win-x86\native" />
17 + <file src="v141\x86\mbanative.pdb" target="runtimes\win-x86\native" />
18 + </files>
19 +</package>
src/test/WixToolsetTest.Mba.Core/WixToolsetTest.Mba.Core.csproj
+1 -1
@@ -5,7 +5,7 @@
5 <PropertyGroup>
6 <TargetFramework>netcoreapp3.1</TargetFramework>
7 <IsPackable>false</IsPackable>
8 - <Platforms>AnyCPU;x86;x64</Platforms>
8 + <RuntimeIdentifier>win-x86</RuntimeIdentifier>
9 </PropertyGroup>
10
11 <PropertyGroup>