Build Windows Installers using the repo's main build script and repotasks (#6139)

Follow-up to #6078

This should solve race conditions in restoring .wixproj files.

Co-authored-by: Nate McMaster <natemcmaster@users.noreply.github.com>
Co-authored-by: Justin Kotalik <jkotalik@users.noreply.github.com>
This commit is contained in:
Justin Kotalik 2018-12-31 10:54:15 -08:00 committed by Nate McMaster
parent 4816bdcaad
commit 2b7a3a222a
28 changed files with 92 additions and 209 deletions

View File

@ -87,6 +87,15 @@
<InstallersOutputPath>$(ArtifactsConfigurationDir)installers\</InstallersOutputPath> <InstallersOutputPath>$(ArtifactsConfigurationDir)installers\</InstallersOutputPath>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(OutputInRepoRoot)' == 'true' ">
<BaseOutputPath>$(RepositoryRoot)bin\$(Configuration)\$(MSBuildProjectName)\</BaseOutputPath>
<OutputPath>$(BaseOutputPath)</OutputPath>
<BaseIntermediateOutputPath>$(RepositoryRoot)obj\$(MSBuildProjectName)\</BaseIntermediateOutputPath>
<IntermediateOutputPath>$(BaseIntermediateOutputPath)$(Configuration)\</IntermediateOutputPath>
<OutputPath Condition=" '$(AppendPlatformToOutputPath)' == 'true' AND '$(Platform)' != '' AND '$(Platform)' != 'AnyCPU' ">$(OutputPath)$(Platform)\</OutputPath>
<IntermediateOutputPath Condition=" '$(AppendPlatformToOutputPath)' == 'true' AND '$(Platform)' != '' AND '$(Platform)' != 'AnyCPU' ">$(IntermediateOutputPath)$(Platform)\</IntermediateOutputPath>
</PropertyGroup>
<!-- Defines project type conventions. --> <!-- Defines project type conventions. -->
<PropertyGroup> <PropertyGroup>
<RepoRelativeProjectDir>$([MSBuild]::MakeRelative($(RepositoryRoot), $(MSBuildProjectDirectory)))</RepoRelativeProjectDir> <RepoRelativeProjectDir>$([MSBuild]::MakeRelative($(RepositoryRoot), $(MSBuildProjectDirectory)))</RepoRelativeProjectDir>
@ -97,6 +106,8 @@
<IsSampleProject Condition="$(RepoRelativeProjectDir.Contains('sample'))">true</IsSampleProject> <IsSampleProject Condition="$(RepoRelativeProjectDir.Contains('sample'))">true</IsSampleProject>
</PropertyGroup> </PropertyGroup>
<Import Project="build\tasks\RepoTasks.tasks" Condition="'$(MSBuildProjectName)' != 'RepoTasks'" />
<Import Project="eng\Dependencies.props" /> <Import Project="eng\Dependencies.props" />
<Import Project="eng\PatchConfig.props" /> <Import Project="eng\PatchConfig.props" />
<Import Project="eng\ProjectReferences.props" /> <Import Project="eng\ProjectReferences.props" />

View File

@ -45,6 +45,9 @@ Build native projects (C++).
.PARAMETER NodeJS .PARAMETER NodeJS
Build NodeJS projects (TypeScript, JS). Build NodeJS projects (TypeScript, JS).
.PARAMETER Installers
Build Windows Installers. Required .NET 3.5 to be installed (WiX toolset requirement).
.PARAMETER MSBuildArguments .PARAMETER MSBuildArguments
Additional MSBuild arguments to be passed through. Additional MSBuild arguments to be passed through.
@ -96,6 +99,8 @@ param(
[switch]$Native, [switch]$Native,
[Parameter(ParameterSetName = 'Groups')] [Parameter(ParameterSetName = 'Groups')]
[switch]$NodeJS, [switch]$NodeJS,
[Parameter(ParameterSetName = 'Groups')]
[switch]$Installers,
# Other lifecycle targets # Other lifecycle targets
[switch]$Help, # Show help [switch]$Help, # Show help
@ -236,7 +241,7 @@ elseif ($Projects) {
} }
else { else {
# When adding new sub-group build flags, add them to this check. # When adding new sub-group build flags, add them to this check.
if((-not $Native) -and (-not $Managed) -and (-not $NodeJS)) { if((-not $Native) -and (-not $Managed) -and (-not $NodeJS) -and (-not $Installers)) {
Write-Warning "No default group of projects was specified, so building the 'managed' subset of projects. Run ``build.cmd -help`` for more details." Write-Warning "No default group of projects was specified, so building the 'managed' subset of projects. Run ``build.cmd -help`` for more details."
# This goal of this is to pick a sensible default for `build.cmd` with zero arguments. # This goal of this is to pick a sensible default for `build.cmd` with zero arguments.
@ -248,6 +253,7 @@ else {
$MSBuildArguments += "/p:BuildManaged=$Managed" $MSBuildArguments += "/p:BuildManaged=$Managed"
$MSBuildArguments += "/p:BuildNative=$Native" $MSBuildArguments += "/p:BuildNative=$Native"
$MSBuildArguments += "/p:BuildNodeJS=$NodeJS" $MSBuildArguments += "/p:BuildNodeJS=$NodeJS"
$MSBuildArguments += "/p:BuildWindowsInstallers=$Installers"
} }
# Target selection # Target selection

View File

@ -64,6 +64,35 @@
</ItemGroup> </ItemGroup>
</When> </When>
<Otherwise> <Otherwise>
<ItemGroup Condition=" '$(BuildWindowsInstallers)' == 'true' ">
<ProjectToBuild Include="$(RepositoryRoot)src/Installers/Windows/AspNetCoreModule-Setup/ANCMPackageResolver/ANCMPackageResolver.csproj" />
<!-- Build the ANCM custom action -->
<ProjectToBuild Include="$(RepositoryRoot)src/Installers/Windows/AspNetCoreModule-Setup/CustomAction/aspnetcoreCA.vcxproj" AdditionalProperties="Platform=x64" />
<ProjectToBuild Include="$(RepositoryRoot)src/Installers/Windows/AspNetCoreModule-Setup/CustomAction/aspnetcoreCA.vcxproj" AdditionalProperties="Platform=x86" />
<!-- Build the ANCM msis -->
<ProjectToBuild Include="$(RepositoryRoot)src/Installers/Windows/AspNetCoreModule-Setup/ANCMIISExpressV1/AncmIISExpressV1.wixproj" AdditionalProperties="Platform=x64" />
<ProjectToBuild Include="$(RepositoryRoot)src/Installers/Windows/AspNetCoreModule-Setup/ANCMIISExpressV1/AncmIISExpressV1.wixproj" AdditionalProperties="Platform=x86" />
<ProjectToBuild Include="$(RepositoryRoot)src/Installers/Windows/AspNetCoreModule-Setup/ANCMIISExpressV2/AncmIISExpressV2.wixproj" AdditionalProperties="Platform=x64" />
<ProjectToBuild Include="$(RepositoryRoot)src/Installers/Windows/AspNetCoreModule-Setup/ANCMIISExpressV2/AncmIISExpressV2.wixproj" AdditionalProperties="Platform=x86" />
<ProjectToBuild Include="$(RepositoryRoot)src/Installers/Windows/AspNetCoreModule-Setup/ANCMV1/ANCMV1.wixproj" AdditionalProperties="Platform=x64" />
<ProjectToBuild Include="$(RepositoryRoot)src/Installers/Windows/AspNetCoreModule-Setup/ANCMV1/ANCMV1.wixproj" AdditionalProperties="Platform=x86" />
<ProjectToBuild Include="$(RepositoryRoot)src/Installers/Windows/AspNetCoreModule-Setup/ANCMV2/ANCMV2.wixproj" AdditionalProperties="Platform=x64" />
<ProjectToBuild Include="$(RepositoryRoot)src/Installers/Windows/AspNetCoreModule-Setup/ANCMV2/ANCMV2.wixproj" AdditionalProperties="Platform=x86" />
<!-- Build the SharedFramework installers -->
<ProjectToBuild Include="$(RepositoryRoot)src/Installers/Windows/SharedFrameworkBundle/SharedFrameworkBundle.wixproj" AdditionalProperties="Platform=x64" />
<ProjectToBuild Include="$(RepositoryRoot)src/Installers/Windows/SharedFrameworkBundle/SharedFrameworkBundle.wixproj" AdditionalProperties="Platform=x86" />
<!-- Build the SharedFramework wixlib -->
<ProjectToBuild Include="$(RepositoryRoot)src/Installers/Windows/SharedFrameworkLib/SharedFrameworkLib.wixproj" AdditionalProperties="Platform=x64" />
<ProjectToBuild Include="$(RepositoryRoot)src/Installers/Windows/SharedFrameworkLib/SharedFrameworkLib.wixproj" AdditionalProperties="Platform=x86" />
<!-- Windows hosting bundled -->
<ProjectToBuild Include="$(RepositoryRoot)src/Installers/Windows/WindowsHostingBundle/WindowsHostingBundle.wixproj" AdditionalProperties="Platform=x86" />
</ItemGroup>
<ItemGroup> <ItemGroup>
<NpmProjectDirectory Include="$(RepositoryRoot)src\Middleware\CORS\test\FunctionalTests\" /> <NpmProjectDirectory Include="$(RepositoryRoot)src\Middleware\CORS\test\FunctionalTests\" />

View File

@ -1,3 +1,4 @@
#if BUILD_MSI_TASKS
// Copyright (c) .NET Foundation. All rights reserved. // Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
@ -36,3 +37,4 @@ namespace RepoTasks
} }
} }
} }
#endif

View File

@ -4,6 +4,7 @@
<PropertyGroup> <PropertyGroup>
<TargetFramework Condition="'$(MSBuildRuntimeType)' == 'Core' ">netcoreapp2.1</TargetFramework> <TargetFramework Condition="'$(MSBuildRuntimeType)' == 'Core' ">netcoreapp2.1</TargetFramework>
<TargetFramework Condition="'$(MSBuildRuntimeType)' != 'Core' ">net461</TargetFramework> <TargetFramework Condition="'$(MSBuildRuntimeType)' != 'Core' ">net461</TargetFramework>
<DefineConstants Condition="'$(BuildWindowsInstallers)' == 'true'">$(DefineConstants);BUILD_MSI_TASKS</DefineConstants>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
@ -13,5 +14,16 @@
<PackageReference Include="WindowsAzure.Storage" Version="$(DevDependency_WindowsAzureStoragePackageVersion)" /> <PackageReference Include="WindowsAzure.Storage" Version="$(DevDependency_WindowsAzureStoragePackageVersion)" />
</ItemGroup> </ItemGroup>
<ItemGroup Condition="'$(BuildWindowsInstallers)' == 'true'">
<PackageReference Include="Wix" Version="3.11.1" />
<Reference Include="Microsoft.Deployment.WindowsInstaller">
<HintPath>$(WiXSdkPath)\Microsoft.Deployment.WindowsInstaller.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Deployment.WindowsInstaller.Package">
<HintPath>$(WiXSdkPath)\Microsoft.Deployment.WindowsInstaller.Package.dll</HintPath>
</Reference>
</ItemGroup>
<Import Project="$(RepoTasksSdkPath)\Sdk.targets" Condition="'$(RepoTasksSdkPath)' != '' "/> <Import Project="$(RepoTasksSdkPath)\Sdk.targets" Condition="'$(RepoTasksSdkPath)' != '' "/>
</Project> </Project>

View File

@ -4,6 +4,8 @@
</PropertyGroup> </PropertyGroup>
<UsingTask TaskName="RepoTasks.GenerateRestoreSourcesPropsFile" AssemblyFile="$(_RepoTaskAssembly)" /> <UsingTask TaskName="RepoTasks.GenerateRestoreSourcesPropsFile" AssemblyFile="$(_RepoTaskAssembly)" />
<UsingTask TaskName="RepoTasks.GenerateGuid" AssemblyFile="$(_RepoTaskAssembly)" />
<UsingTask TaskName="RepoTasks.GetMsiProperty" AssemblyFile="$(_RepoTaskAssembly)" />
<UsingTask TaskName="RepoTasks.JoinItems" AssemblyFile="$(_RepoTaskAssembly)" /> <UsingTask TaskName="RepoTasks.JoinItems" AssemblyFile="$(_RepoTaskAssembly)" />
<UsingTask TaskName="RepoTasks.OrderBy" AssemblyFile="$(_RepoTaskAssembly)" /> <UsingTask TaskName="RepoTasks.OrderBy" AssemblyFile="$(_RepoTaskAssembly)" />
<UsingTask TaskName="RepoTasks.GenerateSharedFrameworkMetadataFiles" AssemblyFile="$(_RepoTaskAssembly)" /> <UsingTask TaskName="RepoTasks.GenerateSharedFrameworkMetadataFiles" AssemblyFile="$(_RepoTaskAssembly)" />

View File

@ -52,54 +52,6 @@ function LoadXml([string]$path) {
return $obj return $obj
} }
function Get-MSBuildPath {
param(
[switch]$Prerelease,
[string[]]$Requires
)
$vsInstallDir = $null
if ($env:VSINSTALLDIR -and (Test-Path $env:VSINSTALLDIR)) {
$vsInstallDir = $env:VSINSTALLDIR
Write-Verbose "Using VSINSTALLDIR=$vsInstallDir"
}
else {
$vswhere = "${env:ProgramFiles(x86)}/Microsoft Visual Studio/Installer/vswhere.exe"
Write-Verbose "Using vswhere.exe from $vswhere"
if (-not (Test-Path $vswhere)) {
Write-Error "Missing prerequisite: could not find vswhere"
}
[string[]] $vswhereArgs = @()
if ($Prerelease) {
$vswhereArgs += '-prerelease'
}
if ($Requires) {
foreach ($r in $Requires) {
$vswhereArgs += '-requires', $r
}
}
$installs = & $vswhere -format json -version '[15.0, 16.0)' -latest -products * @vswhereArgs | ConvertFrom-Json
if (!$installs) {
Write-Error "Missing prerequisite: could not find any installations of Visual Studio"
}
$vs = $installs | Select-Object -First 1
$vsInstallDir = $vs.installationPath
Write-Host "Using $($vs.displayName)"
}
$msbuild = Join-Path $vsInstallDir 'MSBuild/15.0/bin/msbuild.exe'
if (!(Test-Path $msbuild)) {
Write-Error "Missing prerequisite: could not find msbuild.exe"
}
return $msbuild
}
function Get-RemoteFile([string]$RemotePath, [string]$LocalPath) { function Get-RemoteFile([string]$RemotePath, [string]$LocalPath) {
if ($RemotePath -notlike 'http*') { if ($RemotePath -notlike 'http*') {
Copy-Item $RemotePath $LocalPath Copy-Item $RemotePath $LocalPath

View File

@ -12,7 +12,7 @@
<TargetFramework>net461</TargetFramework> <TargetFramework>net461</TargetFramework>
<MSBuildProjectExtensionsPath>$(BaseIntermediateOutputPath)</MSBuildProjectExtensionsPath> <MSBuildProjectExtensionsPath>$(BaseIntermediateOutputPath)</MSBuildProjectExtensionsPath>
<MSBuildProjectExtensionsPath Condition="'$(MSBuildProjectExtensionsPath)' == ''">$(MSBuildProjectDir)\obj\</MSBuildProjectExtensionsPath> <MSBuildProjectExtensionsPath Condition="'$(MSBuildProjectExtensionsPath)' == ''">$(MSBuildProjectDir)\obj\</MSBuildProjectExtensionsPath>
<!-- IsRunningFromVisualStudio may be true even when running msbuild.exe from command line. This generally means that MSBUild is Visual Studio installation and therefore we need to find NuGet.targets in a different location. --> <!-- IsRunningFromVisualStudio may be true even when running msbuild.exe from command line. This generally means that MSBUild is Visual Studio installation and therefore we need to find NuGet.targets in a different location. -->
<NuGetRestoreTargets Condition="'$(NuGetRestoreTargets)'=='' and '$([MSBuild]::IsRunningFromVisualStudio())'=='true'">$(MSBuildToolsPath32)\..\..\..\Common7\IDE\CommonExtensions\Microsoft\NuGet\NuGet.targets</NuGetRestoreTargets> <NuGetRestoreTargets Condition="'$(NuGetRestoreTargets)'=='' and '$([MSBuild]::IsRunningFromVisualStudio())'=='true'">$(MSBuildToolsPath32)\..\..\..\Common7\IDE\CommonExtensions\Microsoft\NuGet\NuGet.targets</NuGetRestoreTargets>
<NuGetRestoreTargets Condition="'$(NuGetRestoreTargets)'==''">$(MSBuildToolsPath)\NuGet.targets</NuGetRestoreTargets> <NuGetRestoreTargets Condition="'$(NuGetRestoreTargets)'==''">$(MSBuildToolsPath)\NuGet.targets</NuGetRestoreTargets>
</PropertyGroup> </PropertyGroup>

View File

@ -41,5 +41,4 @@
<Import Project="$(MSBuildProjectExtensionsPath)$(MSBuildProjectFile).*.targets" /> <Import Project="$(MSBuildProjectExtensionsPath)$(MSBuildProjectFile).*.targets" />
<Import Project="$(WixTargetsPath)" Condition="'$(WixTargetsPath)' != '' " /> <Import Project="$(WixTargetsPath)" Condition="'$(WixTargetsPath)' != '' " />
<Import Project="$(MicroBuildPluginDirectory)\MicroBuild.Plugins.*\**\build\MicroBuild.Plugins.*.targets" Condition="'$(DisableMicroBuild)' != 'true' AND '$(MicroBuildPluginDirectory)' != ''" /> <Import Project="$(MicroBuildPluginDirectory)\MicroBuild.Plugins.*\**\build\MicroBuild.Plugins.*.targets" Condition="'$(DisableMicroBuild)' != 'true' AND '$(MicroBuildPluginDirectory)' != ''" />
</Project> </Project>

View File

@ -38,8 +38,6 @@
</TargetPathWithTargetPlatformMoniker> </TargetPathWithTargetPlatformMoniker>
</ItemDefinitionGroup> </ItemDefinitionGroup>
<Import Project="$(RepositoryRoot)build\tasks\RepoTasks.tasks" />
<Target Name="PrepareOutputPaths"> <Target Name="PrepareOutputPaths">
<MakeDir Directories="$(IntermediateOutputPath)" /> <MakeDir Directories="$(IntermediateOutputPath)" />
</Target> </Target>

View File

@ -4,8 +4,6 @@ This targets file should only be imported by .shfxproj files.
--> -->
<Project> <Project>
<Import Project="$(RepositoryRoot)build\tasks\RepoTasks.tasks" />
<PropertyGroup> <PropertyGroup>
<MSBuildAllProjects>$(MSBuildAllProjects);$(MSBuildThisFileFullPath)</MSBuildAllProjects> <MSBuildAllProjects>$(MSBuildAllProjects);$(MSBuildThisFileFullPath)</MSBuildAllProjects>

View File

@ -1,4 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project>
<Import Project="Sdk.props" Sdk="Microsoft.NET.Sdk" />
<PropertyGroup> <PropertyGroup>
<TargetFramework>netstandard1.0</TargetFramework> <TargetFramework>netstandard1.0</TargetFramework>
<DisableImplicitFrameworkReferences>true</DisableImplicitFrameworkReferences> <DisableImplicitFrameworkReferences>true</DisableImplicitFrameworkReferences>
@ -14,14 +16,10 @@
<PropertyGroup> <PropertyGroup>
<RestoreSources Condition="Exists('$(RepositoryRoot).deps\ANCM')"> <RestoreSources Condition="Exists('$(RepositoryRoot).deps\ANCM')">
$(RepositoryRoot).deps\ANCM;
</RestoreSources>
<RestoreSources>
$(RestoreSources); $(RestoreSources);
https://dotnetfeed.blob.core.windows.net/dotnet-core/index.json; $(RepositoryRoot).deps\ANCM;
https://api.nuget.org/v3/index.json;
https://dotnet.myget.org/F/dotnet-core/api/v3/index.json;
</RestoreSources> </RestoreSources>
</PropertyGroup> </PropertyGroup>
<Import Project="Sdk.targets" Sdk="Microsoft.NET.Sdk" />
<Target Name="Build" />
</Project> </Project>

View File

@ -3,6 +3,9 @@
<Import Project="$(RepositoryRoot)\.deps\dependencies.g.props" Condition="Exists('$(RepositoryRoot)\.deps\dependencies.g.props')" /> <Import Project="$(RepositoryRoot)\.deps\dependencies.g.props" Condition="Exists('$(RepositoryRoot)\.deps\dependencies.g.props')" />
<PropertyGroup> <PropertyGroup>
<MicrosoftAspNetCoreAspNetCoreModulePackageVersion Condition="'$(MicrosoftAspNetCoreAspNetCoreModulePackageVersion)' == ''">$(PackageVersion)</MicrosoftAspNetCoreAspNetCoreModulePackageVersion>
<MicrosoftAspNetCoreAspNetCoreModuleV2PackageVersion Condition="'$(MicrosoftAspNetCoreAspNetCoreModuleV2PackageVersion)' == ''">$(PackageVersion)</MicrosoftAspNetCoreAspNetCoreModuleV2PackageVersion>
<!-- Build number used by ANCM msis --> <!-- Build number used by ANCM msis -->
<_TwoDigitYear>$([MSBuild]::Subtract($([System.DateTime]::UtcNow.Year), 2000))</_TwoDigitYear> <_TwoDigitYear>$([MSBuild]::Subtract($([System.DateTime]::UtcNow.Year), 2000))</_TwoDigitYear>
<_ThreeDigitDayOfYear>$([System.DateTime]::UtcNow.DayOfYear.ToString().PadLeft(3, '0'))</_ThreeDigitDayOfYear> <_ThreeDigitDayOfYear>$([System.DateTime]::UtcNow.DayOfYear.ToString().PadLeft(3, '0'))</_ThreeDigitDayOfYear>

View File

@ -1,13 +1,8 @@
<Project> <Project>
<PropertyGroup> <PropertyGroup>
<RepositoryRoot>$([MSBuild]::NormalizeDirectory('$(MSBuildThisFileDirectory)..\..\..\'))</RepositoryRoot> <OutputInRepoRoot>true</OutputInRepoRoot>
<InstallersOutputPath>$(RepositoryRoot)artifacts\$(Configuration)\installers\</InstallersOutputPath> <AppendPlatformToOutputPath>true</AppendPlatformToOutputPath>
<BaseOutputPath>$(RepositoryRoot)bin\$(Configuration)\$(MSBuildProjectName)\</BaseOutputPath>
<OutputPath>$(BaseOutputPath)</OutputPath>
<BaseIntermediateOutputPath>$(RepositoryRoot)obj\$(MSBuildProjectName)\</BaseIntermediateOutputPath>
<IntermediateOutputPath>$(BaseIntermediateOutputPath)$(Configuration)\</IntermediateOutputPath>
<IntermediateOutputPath Condition=" '$(Platform)' != '' AND '$(Platform)' != 'AnyCPU' ">$(IntermediateOutputPath)$(Platform)\</IntermediateOutputPath>
</PropertyGroup> </PropertyGroup>
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory)..\, Directory.Build.props))\Directory.Build.props" /> <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory)..\, Directory.Build.props))\Directory.Build.props" />

View File

@ -1,4 +1,4 @@
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Project>
<!-- Intentionally empty to isolate this when building in the context of another repository. --> <!-- Intentionally empty to isolate this when building in the context of another repository. -->
<Import Project="Wix.targets" Condition="'$(MSBuildProjectExtension)' == '.wixproj'" /> <Import Project="Wix.targets" Condition="'$(MSBuildProjectExtension)' == '.wixproj'" />

View File

@ -1,23 +0,0 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net461</TargetFramework>
<SignAssembly>false</SignAssembly>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
</PropertyGroup>
<ItemGroup>
<Reference Include="Microsoft.Build.Tasks.v4.0" />
<Reference Include="Microsoft.Build.Framework" />
<Reference Include="Microsoft.Build.Utilities.v4.0" />
<PackageReference Include="Wix" Version="3.11.1" />
<Reference Include="Microsoft.Deployment.WindowsInstaller">
<HintPath>$(WiXSdkPath)\Microsoft.Deployment.WindowsInstaller.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Deployment.WindowsInstaller.Package">
<HintPath>$(WiXSdkPath)\Microsoft.Deployment.WindowsInstaller.Package.dll</HintPath>
</Reference>
</ItemGroup>
</Project>

View File

@ -25,8 +25,6 @@ Project("{930C7802-8A8C-48F9-8165-68863BCCD9DD}") = "WindowsHostingBundle", "Win
EndProject EndProject
Project("{930C7802-8A8C-48F9-8165-68863BCCD9DD}") = "SharedFramework", "SharedFramework\SharedFramework.wixproj", "{C681D730-4505-42C6-9E6C-87F757C4FB32}" Project("{930C7802-8A8C-48F9-8165-68863BCCD9DD}") = "SharedFramework", "SharedFramework\SharedFramework.wixproj", "{C681D730-4505-42C6-9E6C-87F757C4FB32}"
EndProject EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "InstallerTasks", "InstallerTasks\InstallerTasks.csproj", "{D58277B2-4C1F-46D6-B9E1-845C711E3B55}"
EndProject
Global Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU Debug|Any CPU = Debug|Any CPU
@ -131,18 +129,6 @@ Global
{C681D730-4505-42C6-9E6C-87F757C4FB32}.Release|x64.ActiveCfg = Release|x86 {C681D730-4505-42C6-9E6C-87F757C4FB32}.Release|x64.ActiveCfg = Release|x86
{C681D730-4505-42C6-9E6C-87F757C4FB32}.Release|x86.ActiveCfg = Release|x86 {C681D730-4505-42C6-9E6C-87F757C4FB32}.Release|x86.ActiveCfg = Release|x86
{C681D730-4505-42C6-9E6C-87F757C4FB32}.Release|x86.Build.0 = Release|x86 {C681D730-4505-42C6-9E6C-87F757C4FB32}.Release|x86.Build.0 = Release|x86
{D58277B2-4C1F-46D6-B9E1-845C711E3B55}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D58277B2-4C1F-46D6-B9E1-845C711E3B55}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D58277B2-4C1F-46D6-B9E1-845C711E3B55}.Debug|x64.ActiveCfg = Debug|Any CPU
{D58277B2-4C1F-46D6-B9E1-845C711E3B55}.Debug|x64.Build.0 = Debug|Any CPU
{D58277B2-4C1F-46D6-B9E1-845C711E3B55}.Debug|x86.ActiveCfg = Debug|Any CPU
{D58277B2-4C1F-46D6-B9E1-845C711E3B55}.Debug|x86.Build.0 = Debug|Any CPU
{D58277B2-4C1F-46D6-B9E1-845C711E3B55}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D58277B2-4C1F-46D6-B9E1-845C711E3B55}.Release|Any CPU.Build.0 = Release|Any CPU
{D58277B2-4C1F-46D6-B9E1-845C711E3B55}.Release|x64.ActiveCfg = Release|Any CPU
{D58277B2-4C1F-46D6-B9E1-845C711E3B55}.Release|x64.Build.0 = Release|Any CPU
{D58277B2-4C1F-46D6-B9E1-845C711E3B55}.Release|x86.ActiveCfg = Release|Any CPU
{D58277B2-4C1F-46D6-B9E1-845C711E3B55}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection EndGlobalSection
GlobalSection(SolutionProperties) = preSolution GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE HideSolutionNode = FALSE

View File

@ -19,7 +19,7 @@
</RuntimeInstallers> </RuntimeInstallers>
</ItemGroup> </ItemGroup>
<Target Name="FetchDependencies" BeforeTargets="Restore"> <Target Name="FetchDependencies" BeforeTargets="Restore;CollectPackageReferences">
<PropertyGroup> <PropertyGroup>
<DotNetAssetRootUrl Condition=" '$(DotNetAssetRootUrl)' == '' ">https://dotnetcli.azureedge.net/dotnet/</DotNetAssetRootUrl> <DotNetAssetRootUrl Condition=" '$(DotNetAssetRootUrl)' == '' ">https://dotnetcli.azureedge.net/dotnet/</DotNetAssetRootUrl>
<DotNetAssetRootUrl Condition=" ! $(DotNetAssetRootUrl.EndsWith('/'))">$(DotNetAssetRootUrl)/</DotNetAssetRootUrl> <DotNetAssetRootUrl Condition=" ! $(DotNetAssetRootUrl.EndsWith('/'))">$(DotNetAssetRootUrl)/</DotNetAssetRootUrl>
@ -40,9 +40,7 @@
SourceUrl="%(RemoteAsset.Identity)" DestinationFolder="$(DepsPath)" DestinationFileName="%(RemoteAsset.TargetFileName)" /> SourceUrl="%(RemoteAsset.Identity)" DestinationFolder="$(DepsPath)" DestinationFileName="%(RemoteAsset.TargetFileName)" />
</Target> </Target>
<UsingTask AssemblyFile="$(OutputPath)..\InstallerTasks\InstallerTasks.dll" TaskName="RepoTasks.GetMsiProperty" /> <Target Name="ExtractPropertiesFromDotNetMsi" DependsOnTargets="FetchDependencies" BeforeTargets="BeforeBuild">
<Target Name="ExtractPropertiesFromDotNetMsi" BeforeTargets="BeforeBuild">
<!-- Create properties that holds the executable name. These are passed to the bundles so we can reference them as variables <!-- Create properties that holds the executable name. These are passed to the bundles so we can reference them as variables
from inside the ExePackage authoring. --> from inside the ExePackage authoring. -->
<CreateProperty Value="%(RuntimeInstallers.Filename)%(Extension)"> <CreateProperty Value="%(RuntimeInstallers.Filename)%(Extension)">

View File

@ -1,45 +0,0 @@
<Project>
<ItemGroup>
<!-- Build the ANCM custom action -->
<InstallerProject Include="AspNetCoreModule-Setup/CustomAction/aspnetcoreCA.vcxproj" AdditionalProperties="Platform=x64" />
<InstallerProject Include="AspNetCoreModule-Setup/CustomAction/aspnetcoreCA.vcxproj" AdditionalProperties="Platform=x86" />
<!-- Build the ANCM msis -->
<InstallerProject Include="AspNetCoreModule-Setup/ANCMIISExpressV1/AncmIISExpressV1.wixproj" AdditionalProperties="Platform=x64" />
<InstallerProject Include="AspNetCoreModule-Setup/ANCMIISExpressV1/AncmIISExpressV1.wixproj" AdditionalProperties="Platform=x86" />
<InstallerProject Include="AspNetCoreModule-Setup/ANCMIISExpressV2/AncmIISExpressV2.wixproj" AdditionalProperties="Platform=x64" />
<InstallerProject Include="AspNetCoreModule-Setup/ANCMIISExpressV2/AncmIISExpressV2.wixproj" AdditionalProperties="Platform=x86" />
<InstallerProject Include="AspNetCoreModule-Setup/ANCMV1/ANCMV1.wixproj" AdditionalProperties="Platform=x64" />
<InstallerProject Include="AspNetCoreModule-Setup/ANCMV1/ANCMV1.wixproj" AdditionalProperties="Platform=x86" />
<InstallerProject Include="AspNetCoreModule-Setup/ANCMV2/ANCMV2.wixproj" AdditionalProperties="Platform=x64" />
<InstallerProject Include="AspNetCoreModule-Setup/ANCMV2/ANCMV2.wixproj" AdditionalProperties="Platform=x86" />
<!-- Build the SharedFramework installers -->
<InstallerProject Include="SharedFrameworkBundle/SharedFrameworkBundle.wixproj" AdditionalProperties="Platform=x64" />
<InstallerProject Include="SharedFrameworkBundle/SharedFrameworkBundle.wixproj" AdditionalProperties="Platform=x86" />
<!-- Build the SharedFramework wixlib -->
<InstallerProject Include="SharedFrameworkLib/SharedFrameworkLib.wixproj" AdditionalProperties="Platform=x64" />
<InstallerProject Include="SharedFrameworkLib/SharedFrameworkLib.wixproj" AdditionalProperties="Platform=x86" />
<!-- Windows hosting bundled -->
<InstallerProject Include="WindowsHostingBundle/WindowsHostingBundle.wixproj" AdditionalProperties="Platform=x86" />
</ItemGroup>
<Target Name="Build">
<MSBuild Projects="@(InstallerProject)"
Targets="Build"
BuildInParallel="true" />
</Target>
<Target Name="Clean">
<MSBuild Projects="@(InstallerProject)" Targets="Clean" />
</Target>
<Target Name="Restore">
<MSBuild Projects="AspNetCoreModule-Setup/ANCMPackageResolver/ANCMPackageResolver.csproj" Targets="Restore" />
<MSBuild Projects="@(InstallerProject)" Targets="Restore" BuildInParallel="true" />
</Target>
</Project>

View File

@ -10,8 +10,6 @@
<GuidInputs Condition="'$(IsFinalBuild)' != 'true'">$(GuidInputs);$(BuildNumberSuffix)</GuidInputs> <GuidInputs Condition="'$(IsFinalBuild)' != 'true'">$(GuidInputs);$(BuildNumberSuffix)</GuidInputs>
</PropertyGroup> </PropertyGroup>
<UsingTask AssemblyFile="$(OutputPath)..\InstallerTasks\InstallerTasks.dll" TaskName="RepoTasks.GenerateGuid" />
<Target Name="GenerateGUIDs" BeforeTargets="BeforeBuild" DependsOnTargets="_GeneratePackageGuids;_GenerateBundleGuids" Condition=" '$(DisableGuidGeneration)' != 'true' " /> <Target Name="GenerateGUIDs" BeforeTargets="BeforeBuild" DependsOnTargets="_GeneratePackageGuids;_GenerateBundleGuids" Condition=" '$(DisableGuidGeneration)' != 'true' " />
<Target Name="_GeneratePackageGuids" Condition="'$(OutputType)' == 'package'"> <Target Name="_GeneratePackageGuids" Condition="'$(OutputType)' == 'package'">

View File

@ -1,7 +1,3 @@
#
# This script requires internal-only access to the code which generates ANCM installers.
#
#requires -version 5 #requires -version 5
[cmdletbinding()] [cmdletbinding()]
param( param(
@ -14,20 +10,20 @@ param(
[string]$Runtime64Zip, [string]$Runtime64Zip,
[string]$BuildNumber = 't000', [string]$BuildNumber = 't000',
[switch]$IsFinalBuild, [switch]$IsFinalBuild,
[string]$SignType = '', [string]$SignType = ''
[switch]$clean
) )
$ErrorActionPreference = 'Stop' $ErrorActionPreference = 'Stop'
$repoRoot = Resolve-Path "$PSScriptRoot/../../../" $repoRoot = Resolve-Path "$PSScriptRoot/../../../"
Import-Module -Scope Local "$repoRoot/eng/scripts/common.psm1" -Force Import-Module -Scope Local "$repoRoot/eng/scripts/common.psm1" -Force
$msbuild = Get-MSBuildPath -Prerelease -requires 'Microsoft.VisualStudio.Component.VC.Tools.x86.x64'
$harvestRoot = "$repoRoot/obj/sfx/" $harvestRoot = "$repoRoot/obj/sfx/"
if ($clean) { if ($clean) {
Remove-Item -Recurse -Force $harvestRoot -ErrorAction Ignore | Out-Null Remove-Item -Recurse -Force $harvestRoot -ErrorAction Ignore | Out-Null
} }
# TODO: harvest shared frameworks from a project reference
New-Item "$harvestRoot/x86", "$harvestRoot/x64" -ItemType Directory -ErrorAction Ignore | Out-Null New-Item "$harvestRoot/x86", "$harvestRoot/x64" -ItemType Directory -ErrorAction Ignore | Out-Null
if (-not (Test-Path "$harvestRoot/x86/shared/")) { if (-not (Test-Path "$harvestRoot/x86/shared/")) {
@ -40,40 +36,14 @@ if (-not (Test-Path "$harvestRoot/x64/shared/")) {
Push-Location $PSScriptRoot Push-Location $PSScriptRoot
try { try {
Invoke-Block { & $msbuild ` & $repoRoot/build.ps1 `
InstallerTasks/InstallerTasks.csproj ` -Installers `
-nologo `
-m `
-v:m `
-nodeReuse:false `
-restore `
-t:Build `
"-p:Configuration=$Configuration"
}
[string[]] $msbuildArgs = @()
if ($clean) {
$msbuildArgs += '-t:Clean'
}
Invoke-Block { & $msbuild `
WindowsInstallers.proj `
-restore `
-nologo `
-m `
-v:m `
-nodeReuse:false `
-clp:Summary `
"-p:SharedFrameworkHarvestRootPath=$repoRoot/obj/sfx/" ` "-p:SharedFrameworkHarvestRootPath=$repoRoot/obj/sfx/" `
"-p:Configuration=$Configuration" ` "-p:Configuration=$Configuration" `
"-p:BuildNumberSuffix=$BuildNumber" ` "-p:BuildNumberSuffix=$BuildNumber" `
"-p:SignType=$SignType" ` "-p:SignType=$SignType" `
"-p:IsFinalBuild=$IsFinalBuild" ` "-p:IsFinalBuild=$IsFinalBuild" `
"-bl:$repoRoot/artifacts/logs/installers.msbuild.binlog" ` "-bl:$repoRoot/artifacts/logs/installers.msbuild.binlog"
'-t:Build' `
@msbuildArgs
}
} }
finally { finally {
Pop-Location Pop-Location

View File

@ -1,8 +1,7 @@
<Project> <Project>
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory)..\, Directory.Build.props))\Directory.Build.props" />
<PropertyGroup> <PropertyGroup>
<BaseIntermediateOutputPath>$(RepositoryRoot)obj\$(MSBuildProjectName)\</BaseIntermediateOutputPath> <OutputInRepoRoot>true</OutputInRepoRoot>
<BaseOutputPath>$(RepositoryRoot)bin\$(MSBuildProjectName)\</BaseOutputPath>
</PropertyGroup> </PropertyGroup>
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory)..\, Directory.Build.props))\Directory.Build.props" />
</Project> </Project>

View File

@ -30,6 +30,4 @@
</ItemGroup> </ItemGroup>
</Target> </Target>
<Import Project="$(RepositoryRoot)build\tasks\RepoTasks.tasks" />
</Project> </Project>

View File

@ -30,8 +30,6 @@
</ItemGroup> </ItemGroup>
</Target> </Target>
<Import Project="$(RepositoryRoot)build\tasks\RepoTasks.tasks" />
<Import Project="$(RepositoryRoot)src\Servers\IIS\ResolveIisReferences.targets" /> <Import Project="$(RepositoryRoot)src\Servers\IIS\ResolveIisReferences.targets" />
<Target Name="CopyFilesToOutputDirectory" /> <Target Name="CopyFilesToOutputDirectory" />

View File

@ -19,7 +19,7 @@
<Content Include="applicationHost.xdt" /> <Content Include="applicationHost.xdt" />
<Content Include="scmApplicationHost.xdt" /> <Content Include="scmApplicationHost.xdt" />
<Content Include="install.cmd" /> <Content Include="install.cmd" />
<Content Include="$(RepositoryRoot)bin\Microsoft.Web.Xdt.Extensions\$(Configuration)\net461\Microsoft.Web.Xdt.Extensions.dll" PackagePath="content" /> <Content Include="$(RepositoryRoot)bin\$(Configuration)\Microsoft.Web.Xdt.Extensions\net461\Microsoft.Web.Xdt.Extensions.dll" PackagePath="content" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>

View File

@ -1,10 +1,9 @@
<Project> <Project>
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory)..\, Directory.Build.props))\Directory.Build.props" />
<PropertyGroup> <PropertyGroup>
<BaseIntermediateOutputPath>$(RepositoryRoot)obj\$(MSBuildProjectName)\</BaseIntermediateOutputPath> <OutputInRepoRoot>true</OutputInRepoRoot>
<BaseOutputPath>$(RepositoryRoot)bin\$(MSBuildProjectName)\</BaseOutputPath>
<ToolSharedSourceRoot>$(MSBuildThisFileDirectory)Shared\</ToolSharedSourceRoot> <ToolSharedSourceRoot>$(MSBuildThisFileDirectory)Shared\</ToolSharedSourceRoot>
</PropertyGroup> </PropertyGroup>
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory)..\, Directory.Build.props))\Directory.Build.props" />
</Project> </Project>