@joebigelow / wix-1 / commits / 1550b307

Include native .pdbs in .wixext.nupkg and refine build process

Rob Mensching committed Feb 27, 2021 at 15:38 UTC 1550b30702ae4e83ea8b30bf95a4f20a6424aa4b
8 files changed +54 -37
appveyor.cmd
+11 -6
@@ -1,14 +1,19 @@
1 @setlocal
2 @pushd %~dp0
3 +@set _C=Release
4 +@if /i "%1"=="debug" set _C=Debug
5
4 -nuget restore || exit /b
6 +:: Restore
7 +msbuild -p:Configuration=%_C% -t:Restore || exit /b
8
6 -msbuild -p:Configuration=Release -t:Restore || exit /b
9 +:: Build
10 +msbuild -p:Configuration=%_C% src\test\WixToolsetTest.Dependency\WixToolsetTest.Dependency.csproj || exit /b
11
8 -msbuild -p:Configuration=Release src\test\WixToolsetTest.Dependency\WixToolsetTest.Dependency.csproj || exit /b
9 -dotnet test -c Release --no-build src\test\WixToolsetTest.Dependency || exit /b
12 +:: Test
13 +dotnet test -c %_C% --no-build src\test\WixToolsetTest.Dependency || exit /b
14
11 -msbuild -p:Configuration=Release -t:Pack src\wixext\WixToolset.Dependency.wixext.csproj || exit /b
15 +:: Pack
16 +msbuild -p:Configuration=%_C% -p:NoBuild=true -t:Pack src\wixext\WixToolset.Dependency.wixext.csproj || exit /b
17
18 @popd
14 -@endlocal
\ No newline at end of file
19 +@endlocal
src/Cpp.Build.props
+2
@@ -6,6 +6,8 @@
6 <Platform Condition=" '$(Platform)' == '' OR '$(Platform)' == 'AnyCPU' ">Win32</Platform>
7 <IntDir>$(BaseIntermediateOutputPath)$(Configuration)\$(Platform)\</IntDir>
8 <OutDir>$(OutputPath)$(Platform)\</OutDir>
9 + <RuntimeIdentifiers>win-x86;win-x64;win-arm64</RuntimeIdentifiers>
10 + <NuGetTargetMoniker>native,Version=v0.0</NuGetTargetMoniker>
11 </PropertyGroup>
12
13 <PropertyGroup Condition="'$(WindowsTargetPlatformVersion)'=='' AND '$(VisualStudioVersion)'>='15.0'">
src/FindLocalWix.props deleted
-8
@@ -1,8 +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 xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
5 - <PropertyGroup>
6 - <WixTargetsPath Condition=" '$(Configuration)' == 'Debug' And Exists('$(MSBuildThisFileDirectory)..\..\Tools\README.md') And Exists('$(MSBuildThisFileDirectory)..\..\Tools\build\Debug\net461\wix.targets') ">$(MSBuildThisFileDirectory)..\..\Tools\build\Debug\net461\wix.targets</WixTargetsPath>
7 - </PropertyGroup>
8 -</Project>
src/ca/dependencyca.vcxproj
+24 -11
@@ -1,8 +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 +
4 <Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
4 - <Import Project="..\..\packages\WixToolset.DUtil.4.0.56\build\WixToolset.DUtil.props" Condition="Exists('..\..\packages\WixToolset.DUtil.4.0.56\build\WixToolset.DUtil.props')" />
5 - <Import Project="..\..\packages\WixToolset.WcaUtil.4.0.17\build\WixToolset.WcaUtil.props" Condition="Exists('..\..\packages\WixToolset.WcaUtil.4.0.17\build\WixToolset.WcaUtil.props')" />
5 <ItemGroup Label="ProjectConfigurations">
6 <ProjectConfiguration Include="Debug|Win32">
7 <Configuration>Debug</Configuration>
@@ -29,6 +28,7 @@
28 <Platform>ARM64</Platform>
29 </ProjectConfiguration>
30 </ItemGroup>
31 +
32 <PropertyGroup Label="Globals">
33 <ProjectGuid>{B86AF46C-0F90-49CC-923F-A800B088D015}</ProjectGuid>
34 <ConfigurationType>DynamicLibrary</ConfigurationType>
@@ -39,30 +39,43 @@
39 <Description>WiX Toolset Dependency CustomAction</Description>
40 <WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
41 </PropertyGroup>
42 +
43 <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
44 <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
45 +
46 <PropertyGroup>
47 <ProjectAdditionalLinkLibraries>msi.lib</ProjectAdditionalLinkLibraries>
48 </PropertyGroup>
49 +
50 <ItemGroup>
51 <ClCompile Include="dllmain.cpp">
52 <PrecompiledHeader>Create</PrecompiledHeader>
53 </ClCompile>
54 <ClCompile Include="wixdepca.cpp" />
55 </ItemGroup>
56 +
57 <ItemGroup>
58 <ClInclude Include="precomp.h" />
59 </ItemGroup>
60 +
61 <ItemGroup>
57 - <None Include="packages.config" />
62 <None Include="wixdepca.def" />
63 </ItemGroup>
64 +
65 + <ItemGroup>
66 + <PackageReference Include="WixToolset.Dutil">
67 + <Version>4.0.62</Version>
68 + </PackageReference>
69 + <PackageReference Include="WixToolset.WcaUtil">
70 + <Version>4.0.18</Version>
71 + </PackageReference>
72 + <PackageReference Include="Microsoft.SourceLink.GitHub">
73 + <Version>1.0.0</Version>
74 + </PackageReference>
75 + <PackageReference Include="Nerdbank.GitVersioning">
76 + <Version>3.3.37</Version>
77 + </PackageReference>
78 + </ItemGroup>
79 +
80 <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
61 - <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
62 - <PropertyGroup>
63 - <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>
64 - </PropertyGroup>
65 - <Error Condition="!Exists('..\..\packages\WixToolset.DUtil.4.0.56\build\WixToolset.DUtil.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\WixToolset.DUtil.4.0.56\build\WixToolset.DUtil.props'))" />
66 - <Error Condition="!Exists('..\..\packages\WixToolset.WcaUtil.4.0.17\build\WixToolset.WcaUtil.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\WixToolset.WcaUtil.4.0.17\build\WixToolset.WcaUtil.props'))" />
67 - </Target>
68 -</Project>
\ No newline at end of file
81 +</Project>
src/ca/packages.config deleted
-5
@@ -1,5 +0,0 @@
1 -<?xml version="1.0" encoding="utf-8"?>
2 -<packages>
3 - <package id="WixToolset.DUtil" version="4.0.56" targetFramework="native" />
4 - <package id="WixToolset.WcaUtil" version="4.0.17" targetFramework="native" />
5 -</packages>
\ No newline at end of file
src/test/WixToolsetTest.Dependency/WixToolsetTest.Dependency.csproj
+1
@@ -4,6 +4,7 @@
4 <Project Sdk="Microsoft.NET.Sdk">
5 <PropertyGroup>
6 <TargetFramework>netcoreapp3.1</TargetFramework>
7 + <DebugType>embedded</DebugType>
8 <IsPackable>false</IsPackable>
9 </PropertyGroup>
10
src/wixext/WixToolset.Dependency.wixext.csproj
+11 -4
@@ -4,21 +4,22 @@
4 <Project Sdk="Microsoft.NET.Sdk">
5 <PropertyGroup>
6 <TargetFramework>netstandard2.0</TargetFramework>
7 + <DebugType>embedded</DebugType>
8 <RootNamespace>WixToolset.Dependency</RootNamespace>
9 <Description>WiX Toolset Dependency Extension</Description>
10 <Title>WiX Toolset Dependency Extension</Title>
11 <IsTool>true</IsTool>
11 - <ContentTargetFolders>build</ContentTargetFolders>
12 + <PublishRepositoryUrl>true</PublishRepositoryUrl>
13 + <SuppressDependenciesWhenPacking>true</SuppressDependenciesWhenPacking>
14 </PropertyGroup>
15
16 <ItemGroup>
15 - <Content Include="$(MSBuildThisFileName).targets" />
17 <EmbeddedResource Include="$(OutputPath)..\dependency.wixlib" />
18 </ItemGroup>
19
20 <ItemGroup>
20 - <PackageReference Include="WixToolset.Data" Version="4.0.*" PrivateAssets="all" />
21 - <PackageReference Include="WixToolset.Extensibility" Version="4.0.*" PrivateAssets="all" />
21 + <Content Include="$(MSBuildThisFileName).targets" PackagePath="build" />
22 + <Content Include="$(OutputPath)..\**\*.pdb" PackagePath="pdbs\%(RelativeFolder)" />
23 </ItemGroup>
24
25 <ItemGroup>
@@ -26,6 +27,12 @@
27 </ItemGroup>
28
29 <ItemGroup>
30 + <PackageReference Include="WixToolset.Data" Version="4.0.*" PrivateAssets="all" />
31 + <PackageReference Include="WixToolset.Extensibility" Version="4.0.*" PrivateAssets="all" />
32 + </ItemGroup>
33 +
34 + <ItemGroup>
35 + <PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0" PrivateAssets="all" />
36 <PackageReference Include="Nerdbank.GitVersioning" Version="3.3.37" PrivateAssets="all" />
37 </ItemGroup>
38 </Project>
src/wixlib/dependency.wixproj
+5 -3
@@ -1,4 +1,6 @@
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="WixToolset.Sdk">
5
6 <PropertyGroup>
@@ -16,9 +18,9 @@
18 </ItemGroup>
19
20 <ItemGroup>
19 - <ProjectReference Include="..\ca\dependencyca.vcxproj" Properties="Platform=ARM64" />
20 - <ProjectReference Include="..\ca\dependencyca.vcxproj" Properties="Platform=x86" />
21 - <ProjectReference Include="..\ca\dependencyca.vcxproj" Properties="Platform=x64" />
21 + <ProjectReference Include="..\ca\dependencyca.vcxproj" Properties="Platform=ARM64" ReferenceOutputAssembly="false" />
22 + <ProjectReference Include="..\ca\dependencyca.vcxproj" Properties="Platform=x86" ReferenceOutputAssembly="false" />
23 + <ProjectReference Include="..\ca\dependencyca.vcxproj" Properties="Platform=x64" ReferenceOutputAssembly="false" />
24 </ItemGroup>
25
26 <ItemGroup>