Update to latest build infrastructure

This commit is contained in:
Rob Mensching 2021-03-03 13:54:13 -08:00
Родитель a5fe70f726
Коммит 68022b358a
15 изменённых файлов: 135 добавлений и 85 удалений

41
.gitignore поставляемый
Просмотреть файл

@ -13,6 +13,9 @@
# User-specific files (MonoDevelop/Xamarin Studio)
*.userprefs
# Mono auto generated files
mono_crash.*
# Build results
[Dd]ebug/
[Dd]ebugPublic/
@ -20,12 +23,14 @@
[Rr]eleases/
x64/
x86/
[Ww][Ii][Nn]32/
[Aa][Rr][Mm]/
[Aa][Rr][Mm]64/
bld/
[Bb]in/
[Oo]bj/
[Ll]og/
[Ll]ogs/
# Visual Studio 2015/2017 cache/options directory
.vs/
@ -39,9 +44,10 @@ Generated\ Files/
[Tt]est[Rr]esult*/
[Bb]uild[Ll]og.*
# NUNIT
# NUnit
*.VisualState.xml
TestResult.xml
nunit-*.xml
# Build Results of an ATL Project
[Dd]ebugPS/
@ -56,6 +62,9 @@ project.lock.json
project.fragment.lock.json
artifacts/
# ASP.NET Scaffolding
ScaffoldingReadMe.txt
# StyleCop
StyleCopReport.xml
@ -122,9 +131,6 @@ _ReSharper*/
*.[Rr]e[Ss]harper
*.DotSettings.user
# JustCode is a .NET coding add-in
.JustCode
# TeamCity is a build add-in
_TeamCity*
@ -135,6 +141,11 @@ _TeamCity*
.axoCover/*
!.axoCover/settings.json
# Coverlet is a free, cross platform Code Coverage Tool
coverage*.json
coverage*.xml
coverage*.info
# Visual Studio code coverage results
*.coverage
*.coveragexml
@ -182,6 +193,8 @@ PublishScripts/
# NuGet Packages
*.nupkg
# NuGet Symbol Packages
*.snupkg
# The packages folder can be ignored because of Package Restore
**/[Pp]ackages/*
# except build/, which is used as an MSBuild target.
@ -206,6 +219,8 @@ BundleArtifacts/
Package.StoreAssociation.xml
_pkginfo.txt
*.appx
*.appxbundle
*.appxupload
# Visual Studio cache files
# files ending in .cache can be ignored
@ -231,8 +246,6 @@ orleans.codegen.cs
# Since there are multiple workflows, uncomment next line to ignore bower_components
# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
#bower_components/
# ASP.NET Core default setup: bower directory is configured as wwwroot/lib/ and bower restore is true
**/wwwroot/lib/
# RIA/Silverlight projects
Generated_Code/
@ -257,6 +270,9 @@ ServiceFabricBackup/
*.bim.layout
*.bim_*.settings
*.rptproj.rsuser
*- [Bb]ackup.rdl
*- [Bb]ackup ([0-9]).rdl
*- [Bb]ackup ([0-9][0-9]).rdl
# Microsoft Fakes
FakesAssemblies/
@ -292,10 +308,6 @@ paket-files/
# FAKE - F# Make
.fake/
# JetBrains Rider
.idea/
*.sln.iml
# CodeRush personal settings
.cr/personal
@ -339,3 +351,12 @@ ASALocalRun/
# BeatPulse healthcheck temp database
healthchecksdb
# Backup folder for Package Reference Convert tool in Visual Studio 2017
MigrationBackup/
# Ionide (cross platform F# VS Code tools) working folder
.ionide/
# Fody - auto-generated XML schema
FodyWeavers.xsd

Просмотреть файл

@ -1,13 +1,19 @@
@setlocal
@pushd %~dp0
@set _C=Release
@if /i "%1"=="debug" set _C=Debug
nuget restore || exit /b
:: Restore
msbuild -p:Configuration=%_C% -t:Restore || exit /b
msbuild -p:Configuration=Release -Restore || exit /b
:: Build
msbuild -p:Configuration=%_C% src\test\WixToolsetTest.Netfx\WixToolsetTest.Netfx.csproj || exit /b
dotnet test -c Release --no-build src\test\WixToolsetTest.Netfx || exit /b
:: Test
dotnet test -c %_C% --no-build src\test\WixToolsetTest.Netfx || exit /b
msbuild -p:Configuration=Release -p:NoBuild=true -t:Pack src\wixext\WixToolset.NetFx.wixext.csproj || exit /b
:: Pack
msbuild -p:Configuration=%_C% -p:NoBuild=true -t:Pack src\wixext\WixToolset.Netfx.wixext.csproj || exit /b
@popd
@endlocal

Просмотреть файл

@ -33,6 +33,8 @@ skip_tags: true
artifacts:
- path: build\Release\**\*.nupkg
name: nuget
- path: build\Release\**\*.snupkg
name: snupkg
notifications:
- provider: Slack

Просмотреть файл

@ -1,5 +1,5 @@
{
"msbuild-sdks": {
"WixToolset.Sdk": "4.0.0-build-0193"
"WixToolset.Sdk": "4.0.0-build-0194"
}
}

Просмотреть файл

@ -22,8 +22,6 @@
<Product>WiX Toolset</Product>
</PropertyGroup>
<Import Project="CSharp.Build.props" Condition=" '$(MSBuildProjectExtension)'=='.csproj' and Exists('CSharp.Build.props') " />
<Import Project="Cpp.Build.props" Condition=" Exists('Cpp.Build.props') And '$(MSBuildProjectExtension)'=='.vcxproj' " />
<Import Project="Wix.Build.props" Condition=" Exists('Wix.Build.props') And '$(MSBuildProjectExtension)'=='.wixproj' " />
<Import Project="Directory$(MSBuildProjectExtension).props" Condition=" Exists('Directory$(MSBuildProjectExtension).props') " />
<Import Project="Custom.Build.props" Condition=" Exists('Custom.Build.props') " />
</Project>

Просмотреть файл

@ -9,11 +9,6 @@
See the original here: https://github.com/dotnet/sdk/issues/1151#issuecomment-385133284
-->
<Project>
<PropertyGroup>
<CreateDocumentation Condition=" '$(CreateDocumentationFile)'!='true' ">false</CreateDocumentation>
<DocumentationFile Condition=" '$(CreateDocumentationFile)'=='true' ">$(OutputPath)\$(AssemblyName).xml</DocumentationFile>
</PropertyGroup>
<PropertyGroup>
<ReplacePackageReferences>true</ReplacePackageReferences>
<TheSolutionPath Condition=" '$(NCrunch)'=='' ">$(SolutionPath)</TheSolutionPath>
@ -51,6 +46,6 @@
</When>
</Choose>
<Import Project="Wix.Build.targets" Condition=" Exists('Wix.Build.targets') And '$(MSBuildProjectExtension)'=='.wixproj' " />
<Import Project="Directory$(MSBuildProjectExtension).targets" Condition=" Exists('Directory$(MSBuildProjectExtension).targets') " />
<Import Project="Custom.Build.targets" Condition=" Exists('Custom.Build.targets') " />
</Project>

Просмотреть файл

Просмотреть файл

@ -0,0 +1,26 @@
<!-- 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. -->
<!--
Do NOT modify this file. Update the canonical version in Home\repo-template\src\Directory.csproj.targets
then update all of the repos.
-->
<Project>
<PropertyGroup>
<CreateDocumentation Condition=" '$(CreateDocumentationFile)'!='true' ">false</CreateDocumentation>
<DocumentationFile Condition=" '$(CreateDocumentationFile)'=='true' ">$(OutputPath)\$(AssemblyName).xml</DocumentationFile>
</PropertyGroup>
<Target Name="SetNuspecProperties" DependsOnTargets="InitializeSourceControlInformation" AfterTargets="GetBuildVersion"
Condition=" Exists('$(MSBuildProjectName).nuspec') ">
<PropertyGroup>
<ProjectUrl Condition=" '$(ProjectUrl)'=='' and '$(PrivateRepositoryUrl)'!='' ">$(PrivateRepositoryUrl.Replace('.git',''))</ProjectUrl>
<NuspecFile>$(MSBuildProjectName).nuspec</NuspecFile>
<NuspecBasePath Condition=" '$(NuspecBasePath)'=='' ">$(OutputPath)..\</NuspecBasePath>
<NuspecProperties>$(NuspecProperties);Id=$(PackageId);Authors=$(Authors);Copyright=$(Copyright);Description=$(Description);Title=$(Title)</NuspecProperties>
<NuspecProperties>$(NuspecProperties);Version=$(PackageVersion);RepositoryCommit=$(SourceRevisionId);RepositoryType=$(RepositoryType);RepositoryUrl=$(PrivateRepositoryUrl);ProjectFolder=$(MSBuildProjectDirectory)\;ProjectUrl=$(ProjectUrl)</NuspecProperties>
<PublishRepositoryUrl>true</PublishRepositoryUrl>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
</PropertyGroup>
</Target>
</Project>

Просмотреть файл

@ -10,6 +10,9 @@
<!-- NBGV properties -->
<AssemblyCompany>$(Company)</AssemblyCompany>
<AssemblyCopyright>$(Copyright)</AssemblyCopyright>
<RuntimeIdentifiers>win-x86;win-x64;win-arm64</RuntimeIdentifiers>
<NuGetTargetMoniker>native,Version=v0.0</NuGetTargetMoniker>
</PropertyGroup>
<PropertyGroup Condition="'$(WindowsTargetPlatformVersion)'=='' AND '$(VisualStudioVersion)'>='15.0'">
@ -78,6 +81,12 @@
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
</ClCompile>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition=" '$(Configuration)'=='Debug' and '$(CLRSupport)'=='true' ">
<ClCompile>
<BasicRuntimeChecks></BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebugDll</RuntimeLibrary>
</ClCompile>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition=" '$(Configuration)'=='Release' ">
<ClCompile>
<Optimization>MinSpace</Optimization>
@ -91,4 +100,16 @@
<OptimizeReferences>true</OptimizeReferences>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition=" '$(Configuration)'=='Release' and '$(CLRSupport)'=='true' ">
<ClCompile>
<BasicRuntimeChecks></BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDll</RuntimeLibrary>
</ClCompile>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition=" '$(CLRSupport)'=='true' ">
<Link>
<KeyFile>$(LinkKeyFile)</KeyFile>
<DelaySign>$(LinkDelaySign)</DelaySign>
</Link>
</ItemDefinitionGroup>
</Project>

Просмотреть файл

@ -1,8 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- 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. -->
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="..\..\packages\WixToolset.DUtil.4.0.64\build\WixToolset.DUtil.props" Condition="Exists('..\..\packages\WixToolset.DUtil.4.0.64\build\WixToolset.DUtil.props')" />
<Import Project="..\..\packages\WixToolset.WcaUtil.4.0.18\build\WixToolset.WcaUtil.props" Condition="Exists('..\..\packages\WixToolset.WcaUtil.4.0.18\build\WixToolset.WcaUtil.props')" />
<Project DefaultTargets="Build" ToolsVersion="16.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
@ -29,6 +28,7 @@
<Platform>ARM64</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{F72D34CA-48DA-4DFD-91A9-A0C78BEF6981}</ProjectGuid>
<ConfigurationType>DynamicLibrary</ConfigurationType>
@ -38,31 +38,36 @@
<ProjectModuleDefinitionFile>netfxca.def</ProjectModuleDefinitionFile>
<Description>WiX Toolset .NET Framework CustomAction</Description>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<PropertyGroup>
<ProjectAdditionalLinkLibraries>msi.lib</ProjectAdditionalLinkLibraries>
</PropertyGroup>
<ItemGroup>
<ClCompile Include="dllmain.cpp">
<PrecompiledHeader>Create</PrecompiledHeader>
</ClCompile>
<ClCompile Include="netfxca.cpp" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="cost.h" />
<ClInclude Include="precomp.h" />
</ItemGroup>
<ItemGroup>
<None Include="netfxca.def" />
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="WixToolset.Dutil" Version="4.0.64" />
<PackageReference Include="WixToolset.WcaUtil" Version="4.0.18" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0" />
<PackageReference Include="Nerdbank.GitVersioning" Version="3.3.37" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<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>
</PropertyGroup>
<Error Condition="!Exists('..\..\packages\WixToolset.DUtil.4.0.64\build\WixToolset.DUtil.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\WixToolset.DUtil.4.0.64\build\WixToolset.DUtil.props'))" />
<Error Condition="!Exists('..\..\packages\WixToolset.WcaUtil.4.0.18\build\WixToolset.WcaUtil.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\WixToolset.WcaUtil.4.0.18\build\WixToolset.WcaUtil.props'))" />
</Target>
</Project>

Просмотреть файл

@ -1,5 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="WixToolset.DUtil" version="4.0.64" targetFramework="native" />
<package id="WixToolset.WcaUtil" version="4.0.18" targetFramework="native" />
</packages>

Просмотреть файл

@ -4,22 +4,14 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<DebugType>embedded</DebugType>
<IsPackable>false</IsPackable>
</PropertyGroup>
<ItemGroup>
<Content Include="TestData\UsingDotNetCorePackages\BundleLatest.wxs" CopyToOutputDirectory="PreserveNewest" />
<Content Include="TestData\UsingDotNetCorePackages\BundleLatest_x64.wxs" CopyToOutputDirectory="PreserveNewest" />
<Content Include="TestData\UsingNativeImage\example.txt" CopyToOutputDirectory="PreserveNewest" />
<Content Include="TestData\UsingNativeImage\Package.en-us.wxl" CopyToOutputDirectory="PreserveNewest" />
<Content Include="TestData\UsingNativeImage\Package.wxs" CopyToOutputDirectory="PreserveNewest" />
<Content Include="TestData\UsingNativeImage\PackageComponents.wxs" CopyToOutputDirectory="PreserveNewest" />
<Content Include="TestData\**" CopyToOutputDirectory="PreserveNewest" />
</ItemGroup>
<Target Name="CopyExtensions" AfterTargets="Build">
<Copy DestinationFolder="$(OutputPath)" SourceFiles="@(WixExtension)" />
</Target>
<ItemGroup>
<ProjectReference Include="..\..\wixext\WixToolset.Netfx.wixext.csproj" />
</ItemGroup>
@ -41,4 +33,8 @@
<PackageReference Include="xunit" Version="2.4.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.1" PrivateAssets="All" />
</ItemGroup>
<Target Name="CopyExtensions" AfterTargets="Build">
<Copy DestinationFolder="$(OutputPath)" SourceFiles="@(WixExtension)" />
</Target>
</Project>

Просмотреть файл

@ -4,38 +4,28 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<DebugType>embedded</DebugType>
<RootNamespace>WixToolset.Netfx</RootNamespace>
<Description>WiX Toolset .NET Framework Extension</Description>
<Title>WiX Toolset .NET Framework Extension</Title>
<DebugType>embedded</DebugType>
<NuspecFile>$(MSBuildThisFileName).nuspec</NuspecFile>
<IncludeSymbols>true</IncludeSymbols>
<NuspecProperties>Id=$(MSBuildThisFileName);Authors=$(Authors);Copyright=$(Copyright);Description=$(Description);Title=$(Title)</NuspecProperties>
</PropertyGroup>
<ItemGroup>
<Content Include="$(MSBuildThisFileName).targets" />
<EmbeddedResource Include="$(OutputPath)..\netfx.wixlib" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0" PrivateAssets="all" />
<PackageReference Include="WixToolset.Data" Version="4.0.*" PrivateAssets="all" />
<PackageReference Include="WixToolset.Extensibility" Version="4.0.*" PrivateAssets="all" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\wixlib\netfx.wixproj" ReferenceOutputAssembly="false" Condition=" '$(NCrunch)'=='' " />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Nerdbank.GitVersioning" Version="3.3.37" PrivateAssets="all" />
<PackageReference Include="WixToolset.Data" Version="4.0.*" PrivateAssets="all" />
<PackageReference Include="WixToolset.Extensibility" Version="4.0.*" PrivateAssets="all" />
</ItemGroup>
<Target Name="SetNuspecProperties" DependsOnTargets="InitializeSourceControlInformation" AfterTargets="GetBuildVersion">
<PropertyGroup>
<NuspecBasePath>$(OutputPath)..\</NuspecBasePath>
<NuspecProperties>$(NuspecProperties);Version=$(BuildVersionSimple);RepositoryCommit=$(SourceRevisionId);RepositoryType=$(RepositoryType);RepositoryUrl=$(PrivateRepositoryUrl);ProjectFolder=$(MSBuildThisFileDirectory)</NuspecProperties>
</PropertyGroup>
</Target>
<ItemGroup>
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0" PrivateAssets="all" />
<PackageReference Include="Nerdbank.GitVersioning" Version="3.3.37" PrivateAssets="all" />
</ItemGroup>
</Project>

Просмотреть файл

@ -3,14 +3,13 @@
<metadata minClientVersion="4.0">
<id>$id$</id>
<version>$version$</version>
<authors>$authors$</authors>
<owners>$authors$</owners>
<license type="expression">MS-RL</license>
<projectUrl>https://github.com/wixtoolset/Netfx.wixext</projectUrl>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<title>$title$</title>
<description>$description$</description>
<authors>$authors$</authors>
<license type="expression">MS-RL</license>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<copyright>$copyright$</copyright>
<projectUrl>$projectUrl$</projectUrl>
<repository type="$repositorytype$" url="$repositoryurl$" commit="$repositorycommit$" />
</metadata>

Просмотреть файл

@ -1,4 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- 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. -->
<Project Sdk="WixToolset.Sdk">
<PropertyGroup>
@ -13,9 +15,9 @@
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\ca\netfxca.vcxproj" Properties="Platform=ARM64" />
<ProjectReference Include="..\ca\netfxca.vcxproj" Properties="Platform=x86" />
<ProjectReference Include="..\ca\netfxca.vcxproj" Properties="Platform=x64" />
<ProjectReference Include="..\ca\netfxca.vcxproj" Properties="Platform=ARM64" ReferenceOutputAssembly="false" />
<ProjectReference Include="..\ca\netfxca.vcxproj" Properties="Platform=x86" ReferenceOutputAssembly="false" />
<ProjectReference Include="..\ca\netfxca.vcxproj" Properties="Platform=x64" ReferenceOutputAssembly="false" />
</ItemGroup>
<ItemGroup>
@ -27,10 +29,4 @@
<PackageReference Include="Nerdbank.GitVersioning" Version="3.3.37" PrivateAssets="All" />
</ItemGroup>
<!-- Workaround for bug in ProjectReferenceDefineConstants, they're not needed for this project anyway -->
<Target Name="ClearProjectReferenceDefineConstants" AfterTargets="CalculateDefineConstants">
<PropertyGroup>
<ProjectReferenceDefineConstants></ProjectReferenceDefineConstants>
</PropertyGroup>
</Target>
</Project>