diff --git a/.vsts/builds/ci-official.yml b/.vsts/builds/ci-official.yml
index 60d086b6b7..42f58bf291 100644
--- a/.vsts/builds/ci-official.yml
+++ b/.vsts/builds/ci-official.yml
@@ -18,11 +18,26 @@ phases:
variables:
CI: true
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
+
+ # This variable is required by MicroBuildSigningPlugin to determine permissions for codesigning.
+ TeamName: AspNetCore
+
+ # SignType = { test, real }
+ # This is prefixed underscore because variables automatically become environment variables (and therefore MSBuild properties),
+ # and this one was causing issues in MSBuild projects which use the $(SignType) MSbuild prop.
+ _SignType: real
+
steps:
- task: NodeTool@0
displayName: Install Node 10.x
inputs:
versionSpec: 10.x
+ - task: MicroBuildSigningPlugin@1
+ displayName: Install MicroBuild plugin
+ condition: and(succeeded(), in(variables['_SignType'], 'test', 'real'))
+ inputs:
+ signType: $(_SignType)
+ zipSources: false
# TODO: configure build.cmd to build both x64 and x86 in one invocation
# TODO build.cmd -ci
- script: build.cmd /p:SkipTests=true /p:Configuration=$(BuildConfiguration) /p:BuildNumber=$(Build.BuildNumber) /t:Build /t:BuildSharedFx /p:SharedFxRID=win-x64 /t:BuildFallbackArchive
@@ -34,6 +49,7 @@ phases:
-GitCredential '$(dn-bot-devdiv-build-rw-code-rw)'
-Config $(BuildConfiguration)
-BuildNumber $(Build.BuildNumber)
+ -SignType $(_SignType)
displayName: Build ANCM installers
# TODO: configure harvesting to run as a part of build.cmd
- powershell: >
@@ -42,6 +58,7 @@ phases:
-x86 artifacts/runtime/aspnetcore-runtime-internal-3.0.0-alpha1-$(Build.BuildNumber)-win-x86.zip
-Config $(BuildConfiguration)
-BuildNumber $(Build.BuildNumber)
+ -SignType $(_SignType)
displayName: Build Windows installers
- task: PublishTestResults@2
displayName: Publish test results
@@ -56,6 +73,9 @@ phases:
pathtoPublish: ./artifacts/
artifactName: artifacts-Windows-Release
artifactType: Container
+ - task: MicroBuildCleanup@1
+ displayName: Cleanup MicroBuild tasks
+ condition: always()
- phase: macOS
dependsOn: Windows
diff --git a/build/external-dependencies.props b/build/external-dependencies.props
index 288d836d38..3af85905cf 100644
--- a/build/external-dependencies.props
+++ b/build/external-dependencies.props
@@ -150,7 +150,7 @@
-
+
diff --git a/build/tasks/AddMetapackageReferences.cs b/build/tasks/AddMetapackageReferences.cs
index 57a9675061..3cb11666ab 100644
--- a/build/tasks/AddMetapackageReferences.cs
+++ b/build/tasks/AddMetapackageReferences.cs
@@ -89,7 +89,10 @@ namespace RepoTasks
continue;
}
- var packageVersionValue = GetDependencyVersion(dependencyVersionType, packageName, packageVersion);
+ var packageVersionValue =
+ Enum.TryParse(package.GetMetadata("MetapackageVersionRangeType"), out var packageVersionType)
+ ? GetDependencyVersion(packageVersionType, packageName, packageVersion)
+ : GetDependencyVersion(dependencyVersionType, packageName, packageVersion);
Log.LogMessage(MessageImportance.High, $" - Package: {packageName} Version: {packageVersionValue}");
diff --git a/build/tools/templates/Archive/Archive.csproj b/build/tools/templates/Archive/Archive.csproj
deleted file mode 100644
index b0b60f6777..0000000000
--- a/build/tools/templates/Archive/Archive.csproj
+++ /dev/null
@@ -1,14 +0,0 @@
-
-
-
- netcoreapp3.0
- false
- true
- true
-
-
-
-
-
-
-
diff --git a/eng/targets/MicroBuild.Plugin.props b/eng/targets/MicroBuild.Plugin.props
index 2d75c7dc4b..0101904811 100644
--- a/eng/targets/MicroBuild.Plugin.props
+++ b/eng/targets/MicroBuild.Plugin.props
@@ -1,29 +1,12 @@
-
-
-
+ $(MicroBuildOverridePluginDirectory)
- Note: All MicroBuild plugins must be installed to the same directory (under the same packages folder). If plugins
- are installed to different directories, the plugins which are in the directories closest to the executing project
- up the hierarchy will be discovered, and the ones higher up the tree will be ignored.
- -->
- packages\MicroBuild.Core.Sentinel.1.0.0\sentinel.txt
- MicroBuild.Core.Sentinel\1.0.0\sentinel.txt
-
- $([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildProjectDirectory), $(MicroBuildSentinelFile)))
- $(MicroBuildPluginDirectory)\packages
-
-
- $(NUGET_PACKAGES)
- $(USERPROFILE)\.nuget\packages
-
-
- $(MicroBuildOverridePluginDirectory)
-
-
\ No newline at end of file
+
+ $(NuGetPackageRoot)
+ $(NUGET_PACKAGES)
+ $(USERPROFILE)\.nuget\packages
+
+
diff --git a/eng/targets/Wix.Common.props b/eng/targets/Wix.Common.props
index 5c66285a6e..d958514aba 100644
--- a/eng/targets/Wix.Common.props
+++ b/eng/targets/Wix.Common.props
@@ -22,6 +22,7 @@
+ true
$(WixExtDir)dark.exe
diff --git a/src/Installers/Windows/build.ps1 b/src/Installers/Windows/build.ps1
index 1c81d92339..edba84e35e 100644
--- a/src/Installers/Windows/build.ps1
+++ b/src/Installers/Windows/build.ps1
@@ -13,6 +13,7 @@ param(
[Alias("x64")]
[string]$Runtime64Zip,
[string]$BuildNumber = 't000',
+ [string]$SignType = '',
[string]$AccessTokenSuffix = $null,
[string]$AssetRootUrl = $null,
@@ -80,7 +81,8 @@ try {
"-p:SharedFrameworkHarvestRootPath=$repoRoot/obj/sfx/" `
"-p:Configuration=$Configuration" `
"-p:BuildNumber=$BuildNumber" `
- -bl `
+ "-p:SignType=$SignType" `
+ "-bl:$repoRoot/artifacts/logs/installers.msbuild.binlog" `
@msbuildArgs
}
}
diff --git a/src/Installers/Windows/clone_and_build_ancm.ps1 b/src/Installers/Windows/clone_and_build_ancm.ps1
index 3888a15534..25b542087c 100644
--- a/src/Installers/Windows/clone_and_build_ancm.ps1
+++ b/src/Installers/Windows/clone_and_build_ancm.ps1
@@ -9,7 +9,8 @@ param(
[string]$Configuration = 'Release',
[string]$DepsZip,
[string]$BuildNumber = 't000',
- [string]$AncmSourceBranch = 'master'
+ [string]$AncmSourceBranch = 'master',
+ [string]$SignType = ''
)
$ErrorActionPreference = 'Stop'
@@ -102,7 +103,9 @@ try {
"-p:WixTasksPath=$wixToolSetRoot\wixtasks.dll" `
"-p:WixNativeCATargetsPath=$wixToolSetRoot\sdk\wix.nativeca.targets" `
"-p:Configuration=$Configuration" `
- "-p:BuildNumber=$BuildNumber"
+ "-p:BuildNumber=$BuildNumber" `
+ "-p:SignType=$SignType" `
+ "-bl:$repoRoot/artifacts/logs/ancn.msbuild.binlog"
}
$outputPath = "$repoRoot/artifacts/bin/$Configuration/installers/en-US/"