diff --git a/azure-pipelines.yml b/azure-pipelines.yml
index 5e09eb0f67d..1ac44fa05ad 100644
--- a/azure-pipelines.yml
+++ b/azure-pipelines.yml
@@ -14,16 +14,36 @@ variables:
_PublishUsingPipelines: true
_DotNetArtifactsCategory: WINDOWSDESKTOP
+# This is set in the pipeline directly
+# When set to false, CI tests will not be enabled in builds.
+#
+# _ContinuousIntegrationTestsEnabled: false
+
+# Setting batch to true, triggers one build at a time.
+# if there is a push while a build in progress, it will wait,
+# until the running build finishes, and produce a build with all the changes
+#
# only trigger ci builds for the master and release branches
trigger:
-- master
-- release/3.0
-- arcade
-
-# To be added in the future when VSTS supports this feature
-# only trigger pull request builds for the master branch
-# pr:
-# - master
+ batch: true
+ branches:
+ include:
+ - master
+ - release/3.0
+ # - arcade
+ paths:
+ exclude:
+ - Documentation/*
+
+pr:
+ autoCancel: true
+ branches:
+ include:
+ - master
+ - release/3.0
+ paths:
+ exclude:
+ - Documentation/*
# Call the pipeline.yml template, which does the real work
jobs:
diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml
index 3195ec438cb..9045527ef65 100644
--- a/eng/Version.Details.xml
+++ b/eng/Version.Details.xml
@@ -1,111 +1,111 @@
-
+
https://github.com/dotnet/winforms
- 52be7e5282560d26926a288d75a8489cd856ec4a
+ b0e49f17123cda852fecfc4610036f31de0d3b94
-
+
https://github.com/dotnet/corefx
- 468355e66daf9eaeb1978703fa6365cd1e37e644
+ 80f411d58df8338ccd9430900b541a037a9cb383
-
+
https://github.com/dotnet/corefx
- 468355e66daf9eaeb1978703fa6365cd1e37e644
+ 80f411d58df8338ccd9430900b541a037a9cb383
-
+
https://github.com/dotnet/corefx
- 468355e66daf9eaeb1978703fa6365cd1e37e644
+ 80f411d58df8338ccd9430900b541a037a9cb383
-
+
https://github.com/dotnet/corefx
- 468355e66daf9eaeb1978703fa6365cd1e37e644
+ 80f411d58df8338ccd9430900b541a037a9cb383
-
+
https://github.com/dotnet/corefx
- 468355e66daf9eaeb1978703fa6365cd1e37e644
+ 80f411d58df8338ccd9430900b541a037a9cb383
-
+
https://github.com/dotnet/corefx
- 468355e66daf9eaeb1978703fa6365cd1e37e644
+ 80f411d58df8338ccd9430900b541a037a9cb383
-
+
https://github.com/dotnet/corefx
- 468355e66daf9eaeb1978703fa6365cd1e37e644
+ 80f411d58df8338ccd9430900b541a037a9cb383
-
+
https://github.com/dotnet/corefx
- 468355e66daf9eaeb1978703fa6365cd1e37e644
+ 80f411d58df8338ccd9430900b541a037a9cb383
-
+
https://github.com/dotnet/corefx
- 468355e66daf9eaeb1978703fa6365cd1e37e644
+ 80f411d58df8338ccd9430900b541a037a9cb383
-
+
https://github.com/dotnet/corefx
- 468355e66daf9eaeb1978703fa6365cd1e37e644
+ 80f411d58df8338ccd9430900b541a037a9cb383
-
+
https://github.com/dotnet/corefx
- 468355e66daf9eaeb1978703fa6365cd1e37e644
+ 80f411d58df8338ccd9430900b541a037a9cb383
-
+
https://github.com/dotnet/corefx
- 468355e66daf9eaeb1978703fa6365cd1e37e644
+ 80f411d58df8338ccd9430900b541a037a9cb383
-
+
https://github.com/dotnet/corefx
- 468355e66daf9eaeb1978703fa6365cd1e37e644
+ 80f411d58df8338ccd9430900b541a037a9cb383
-
+
https://github.com/dotnet/core-setup
- e1d780539e85f4d8de263957715f9d08db2ceef4
+ 915722554dc08a7075f89eddb40691caca23b6be
-
+
https://github.com/dotnet/arcade
- 332e44d0a09e1c781c9bea9a48c07d0b0151d6c7
+ a8e982d3bac01d8f4f91a4c57191147570079448
-
+
https://github.com/dotnet/arcade
- 332e44d0a09e1c781c9bea9a48c07d0b0151d6c7
+ a8e982d3bac01d8f4f91a4c57191147570079448
-
+
https://github.com/dotnet/corefx
- 468355e66daf9eaeb1978703fa6365cd1e37e644
+ 80f411d58df8338ccd9430900b541a037a9cb383
-
+
https://dev.azure.com/dnceng/internal/_git/dotnet-wpf-int
- 120e86951727331e5b899ed8b5b3b4ac35764b42
+ 8248026ca9df8ba891de6de97b91779ecaa35983
-
+
https://github.com/dotnet/corefx
- 468355e66daf9eaeb1978703fa6365cd1e37e644
+ 80f411d58df8338ccd9430900b541a037a9cb383
-
+
https://github.com/dotnet/coreclr
- 8974a699899bdc2cc5687504e1ada606ac803e9b
+ c01a9a157d512343ef104bb2b1f97b356e708b11
-
+
https://github.com/dotnet/coreclr
- 8974a699899bdc2cc5687504e1ada606ac803e9b
+ c01a9a157d512343ef104bb2b1f97b356e708b11
-
+
https://github.com/dotnet/coreclr
- 8974a699899bdc2cc5687504e1ada606ac803e9b
+ c01a9a157d512343ef104bb2b1f97b356e708b11
-
+
https://github.com/dotnet/arcade
- 332e44d0a09e1c781c9bea9a48c07d0b0151d6c7
+ a8e982d3bac01d8f4f91a4c57191147570079448
-
+
https://github.com/dotnet/arcade
- 332e44d0a09e1c781c9bea9a48c07d0b0151d6c7
+ a8e982d3bac01d8f4f91a4c57191147570079448
-
+
https://github.com/dotnet/arcade
- 332e44d0a09e1c781c9bea9a48c07d0b0151d6c7
+ a8e982d3bac01d8f4f91a4c57191147570079448
diff --git a/eng/Versions.props b/eng/Versions.props
index 8b90edcb41f..4fe293f86e0 100644
--- a/eng/Versions.props
+++ b/eng/Versions.props
@@ -2,47 +2,47 @@
4.8.0
- preview7
+ preview8
4.0.0.0
- 4.6.0-preview7.19320.1
+ 4.6.0-preview8.19378.8
- 4.8.0-preview7.19352.2
+ 4.8.0-preview8.19379.9
- 3.0.0-preview7.19323.2
- 3.0.0-preview7.19323.2
- 3.0.0-preview7.19323.2
+ 3.0.0-preview8.19372.4
+ 3.0.0-preview8.19372.4
+ 3.0.0-preview8.19372.4
- 3.0.0-preview7-27824-03
- 3.0.0-preview7.19320.1
- 4.6.0-preview7.19320.1
- 4.6.0-preview7.19320.1
- 4.6.0-preview7.19320.1
+ 3.0.0-preview8-28379-03
+ 3.0.0-preview8.19378.8
+ 4.6.0-preview8.19378.8
+ 4.6.0-preview8.19378.8
+ 4.6.0-preview8.19378.8
- 4.6.0-preview7.19320.1
- 4.6.0-preview7.19320.1
- 4.6.0-preview7.19320.1
- 4.6.0-preview7.19320.1
- 4.6.0-preview7.19320.1
+ 4.6.0-preview8.19378.8
+ 4.6.0-preview8.19378.8
+ 4.6.0-preview8.19378.8
+ 4.6.0-preview8.19378.8
+ 4.6.0-preview8.19378.8
4.6.0-preview4.19176.11
- 4.6.0-preview7.19320.1
- 4.6.0-preview7.19320.1
- 4.6.0-preview7.19320.1
- 4.6.0-preview7.19320.1
- 4.6.0-preview7.19320.1
+ 4.6.0-preview8.19378.8
+ 4.6.0-preview8.19378.8
+ 4.6.0-preview8.19378.8
+ 4.6.0-preview8.19378.8
+ 4.6.0-preview8.19378.8
- 1.0.0-beta.19326.23
- 1.0.0-beta.19326.23
- 1.0.0-beta.19326.23
+ 1.0.0-beta.19378.1
+ 1.0.0-beta.19378.1
+ 1.0.0-beta.19378.1
@@ -59,6 +59,11 @@
2.4.0
$(XUnitVersion)
$(XUnitVersion)
+
+ 0.0.0.6
- 4.8.0-preview7.19326.21
+ 4.8.0-preview8.19379.4
diff --git a/eng/WpfArcadeSdk/Sdk/Sdk.props b/eng/WpfArcadeSdk/Sdk/Sdk.props
index d10a40453e1..d5f6c0629be 100644
--- a/eng/WpfArcadeSdk/Sdk/Sdk.props
+++ b/eng/WpfArcadeSdk/Sdk/Sdk.props
@@ -68,6 +68,20 @@
Suppress NU1605 (Package downgrade warnings) when building inside Visual Studio
-->
$(NoWarn);NU1605
+
+
+ $(AdditionalNoWarn);$(NoWarn)
diff --git a/eng/WpfArcadeSdk/tools/TestProjects.targets b/eng/WpfArcadeSdk/tools/TestProjects.targets
index 335d9cacf16..1cd360f2579 100644
--- a/eng/WpfArcadeSdk/tools/TestProjects.targets
+++ b/eng/WpfArcadeSdk/tools/TestProjects.targets
@@ -30,7 +30,6 @@
-
diff --git a/eng/WpfArcadeSdk/tools/Wpf.Cpp.PrivateTools.props b/eng/WpfArcadeSdk/tools/Wpf.Cpp.PrivateTools.props
new file mode 100644
index 00000000000..fae7d5a8e14
--- /dev/null
+++ b/eng/WpfArcadeSdk/tools/Wpf.Cpp.PrivateTools.props
@@ -0,0 +1,27 @@
+
+
+
+
+ $(RepoRoot).tools\native\bin\msvcurt-c1xx\$(MsvcurtC1xxVersion)\$(Architecture)\
+ $(MsvcurtC1xxToolsPath)msvcurt$(LibSuffix)_netcore.lib
+
+
+
+
+
+ %(AdditionalDependencies);$(MsvcurtNetCoreLib)
+
+
+
diff --git a/eng/WpfArcadeSdk/tools/Wpf.Cpp.PrivateTools.targets b/eng/WpfArcadeSdk/tools/Wpf.Cpp.PrivateTools.targets
new file mode 100644
index 00000000000..80ad4843126
--- /dev/null
+++ b/eng/WpfArcadeSdk/tools/Wpf.Cpp.PrivateTools.targets
@@ -0,0 +1,43 @@
+
+
+
+
+ $(MsvcurtC1xxToolsPath)HostX86\c1xx.dll
+ $(MsvcurtC1xxToolsPath)HostX64\c1xx.dll
+
+ $(MsvcurtC1xxToolsPath)HostX86\c2.dll
+ $(MsvcurtC1xxToolsPath)HostX64\c2.dll
+
+
+
+
+
+
+
+ %(AdditionalOptions) /Bx"$(FrontEndPath)"
+
+
+ %(AdditionalOptions) /fe:"$(FrontEndPath)"
+
+
+
+
+
+ %(AdditionalOptions) /B2"$(BackEndPath)"
+
+
+
+
diff --git a/eng/WpfArcadeSdk/tools/Wpf.Cpp.props b/eng/WpfArcadeSdk/tools/Wpf.Cpp.props
index 5624ab16cb0..5b83f7f792b 100644
--- a/eng/WpfArcadeSdk/tools/Wpf.Cpp.props
+++ b/eng/WpfArcadeSdk/tools/Wpf.Cpp.props
@@ -89,30 +89,10 @@
-
-
-
- 0.0.0.4
- true
- $(RepoRoot).tools\native\bin\msvcurt-c1xx\$(MsvcurtC1xxVersion)\$(Architecture)\
- $(MsvcurtC1xxToolsPath)msvcurt$(LibSuffix)_netcore.lib
-
+ true
+
-
-
- %(AdditionalDependencies);$(MsvcurtNetCoreLib)
-
-
-
diff --git a/eng/WpfArcadeSdk/tools/Wpf.Cpp.targets b/eng/WpfArcadeSdk/tools/Wpf.Cpp.targets
index d2c806f217b..f14aa74b1f1 100644
--- a/eng/WpfArcadeSdk/tools/Wpf.Cpp.targets
+++ b/eng/WpfArcadeSdk/tools/Wpf.Cpp.targets
@@ -4,33 +4,8 @@
$([System.IO.Path]::GetDirectoryName($(NativeVersionFile)))
-
-
-
-
- $(MsvcurtC1xxToolsPath)HostX86\c1xx.dll
- $(MsvcurtC1xxToolsPath)HostX64\c1xx.dll
-
- $(MsvcurtC1xxToolsPath)HostX86\c2.dll
- $(MsvcurtC1xxToolsPath)HostX64\c2.dll
-
-
-
- %(AdditionalOptions) /Bx"$(FrontEndPath)"
-
-
- %(AdditionalOptions) /fe:"$(FrontEndPath)"
-
-
-
-
- %(AdditionalOptions) /B2"$(BackEndPath)"
-
-
-
-
+
+
%(AdditionalIncludeDirectories);$(WpfSharedDir)inc\
diff --git a/eng/common/SigningValidation.proj b/eng/common/SigningValidation.proj
index 7045fb6fb9d..3d0ac80af3f 100644
--- a/eng/common/SigningValidation.proj
+++ b/eng/common/SigningValidation.proj
@@ -3,7 +3,7 @@
+
+
+ $(WorkItemDirectory)
+ $(WorkItemCommand) --bdn-arguments="--anyCategories $(BDNCategories) $(ExtraBenchmarkDotNetArguments) $(CoreRunArgument) --artifacts $(ArtifactsDirectory) --partition-count $(PartitionCount) --partition-index %(HelixWorkItem.Index)"
+ 4:00
+
+
+
+
+ $(WorkItemDirectory)
+ $(WorkItemCommand) --bdn-arguments="--anyCategories $(BDNCategories) $(ExtraBenchmarkDotNetArguments) $(CoreRunArgument) --artifacts $(ArtifactsDirectory)"
+ 4:00
+
+
+
\ No newline at end of file
diff --git a/eng/common/performance/performance-setup.ps1 b/eng/common/performance/performance-setup.ps1
new file mode 100644
index 00000000000..7e5441f7974
--- /dev/null
+++ b/eng/common/performance/performance-setup.ps1
@@ -0,0 +1,91 @@
+Param(
+ [string] $SourceDirectory=$env:BUILD_SOURCESDIRECTORY,
+ [string] $CoreRootDirectory,
+ [string] $Architecture="x64",
+ [string] $Framework="netcoreapp3.0",
+ [string] $CompilationMode="Tiered",
+ [string] $Repository=$env:BUILD_REPOSITORY_NAME,
+ [string] $Branch=$env:BUILD_SOURCEBRANCH,
+ [string] $CommitSha=$env:BUILD_SOURCEVERSION,
+ [string] $BuildNumber=$env:BUILD_BUILDNUMBER,
+ [string] $RunCategories="coreclr corefx",
+ [string] $Csproj="src\benchmarks\micro\MicroBenchmarks.csproj",
+ [string] $Kind="micro",
+ [switch] $Internal,
+ [string] $Configurations="CompilationMode=$CompilationMode"
+)
+
+$RunFromPerformanceRepo = ($Repository -eq "dotnet/performance")
+$UseCoreRun = ($CoreRootDirectory -ne [string]::Empty)
+
+$PayloadDirectory = (Join-Path $SourceDirectory "Payload")
+$PerformanceDirectory = (Join-Path $PayloadDirectory "performance")
+$WorkItemDirectory = (Join-Path $SourceDirectory "workitem")
+$ExtraBenchmarkDotNetArguments = "--iterationCount 1 --warmupCount 0 --invocationCount 1 --unrollFactor 1 --strategy ColdStart --stopOnFirstError true"
+$Creator = $env:BUILD_DEFINITIONNAME
+$PerfLabArguments = ""
+$HelixSourcePrefix = "pr"
+
+$Queue = "Windows.10.Amd64.ClientRS4.DevEx.15.8.Open"
+
+if ($Framework.StartsWith("netcoreapp")) {
+ $Queue = "Windows.10.Amd64.ClientRS4.Open"
+}
+
+if ($Internal) {
+ $Queue = "Windows.10.Amd64.ClientRS5.Perf"
+ $PerfLabArguments = "--upload-to-perflab-container"
+ $ExtraBenchmarkDotNetArguments = ""
+ $Creator = ""
+ $HelixSourcePrefix = "official"
+}
+
+$CommonSetupArguments="--frameworks $Framework --queue $Queue --build-number $BuildNumber --build-configs $Configurations"
+$SetupArguments = "--repository https://github.com/$Repository --branch $Branch --get-perf-hash --commit-sha $CommitSha $CommonSetupArguments"
+
+if ($RunFromPerformanceRepo) {
+ $SetupArguments = "--perf-hash $CommitSha $CommonSetupArguments"
+
+ robocopy $SourceDirectory $PerformanceDirectory /E /XD $PayloadDirectory $SourceDirectory\artifacts $SourceDirectory\.git
+}
+else {
+ git clone --branch master --depth 1 --quiet https://github.com/dotnet/performance $PerformanceDirectory
+}
+
+if ($UseCoreRun) {
+ $NewCoreRoot = (Join-Path $PayloadDirectory "Core_Root")
+ Move-Item -Path $CoreRootDirectory -Destination $NewCoreRoot
+}
+
+$DocsDir = (Join-Path $PerformanceDirectory "docs")
+robocopy $DocsDir $WorkItemDirectory
+
+# Set variables that we will need to have in future steps
+$ci = $true
+
+. "$PSScriptRoot\..\pipeline-logging-functions.ps1"
+
+# Directories
+Write-PipelineSetVariable -Name 'PayloadDirectory' -Value "$PayloadDirectory" -IsMultiJobVariable $false
+Write-PipelineSetVariable -Name 'PerformanceDirectory' -Value "$PerformanceDirectory" -IsMultiJobVariable $false
+Write-PipelineSetVariable -Name 'WorkItemDirectory' -Value "$WorkItemDirectory" -IsMultiJobVariable $false
+
+# Script Arguments
+Write-PipelineSetVariable -Name 'Python' -Value "py -3" -IsMultiJobVariable $false
+Write-PipelineSetVariable -Name 'ExtraBenchmarkDotNetArguments' -Value "$ExtraBenchmarkDotNetArguments" -IsMultiJobVariable $false
+Write-PipelineSetVariable -Name 'SetupArguments' -Value "$SetupArguments" -IsMultiJobVariable $false
+Write-PipelineSetVariable -Name 'PerfLabArguments' -Value "$PerfLabArguments" -IsMultiJobVariable $false
+Write-PipelineSetVariable -Name 'BDNCategories' -Value "$RunCategories" -IsMultiJobVariable $false
+Write-PipelineSetVariable -Name 'TargetCsproj' -Value "$Csproj" -IsMultiJobVariable $false
+Write-PipelineSetVariable -Name 'Kind' -Value "$Kind" -IsMultiJobVariable $false
+Write-PipelineSetVariable -Name 'Architecture' -Value "$Architecture" -IsMultiJobVariable $false
+Write-PipelineSetVariable -Name 'UseCoreRun' -Value "$UseCoreRun" -IsMultiJobVariable $false
+Write-PipelineSetVariable -Name 'RunFromPerfRepo' -Value "$RunFromPerformanceRepo" -IsMultiJobVariable $false
+
+# Helix Arguments
+Write-PipelineSetVariable -Name 'Creator' -Value "$Creator" -IsMultiJobVariable $false
+Write-PipelineSetVariable -Name 'Queue' -Value "$Queue" -IsMultiJobVariable $false
+Write-PipelineSetVariable -Name 'HelixSourcePrefix' -Value "$HelixSourcePrefix" -IsMultiJobVariable $false
+Write-PipelineSetVariable -Name '_BuildConfig' -Value "$Architecture.$Kind.$Framework" -IsMultiJobVariable $false
+
+exit 0
\ No newline at end of file
diff --git a/eng/common/performance/performance-setup.sh b/eng/common/performance/performance-setup.sh
new file mode 100755
index 00000000000..126da5f76d4
--- /dev/null
+++ b/eng/common/performance/performance-setup.sh
@@ -0,0 +1,176 @@
+#!/usr/bin/env bash
+
+source_directory=$BUILD_SOURCESDIRECTORY
+core_root_directory=
+architecture=x64
+framework=netcoreapp3.0
+compilation_mode=tiered
+repository=$BUILD_REPOSITORY_NAME
+branch=$BUILD_SOURCEBRANCH
+commit_sha=$BUILD_SOURCEVERSION
+build_number=$BUILD_BUILDNUMBER
+internal=false
+kind="micro"
+run_categories="coreclr corefx"
+csproj="src\benchmarks\micro\MicroBenchmarks.csproj"
+configurations=
+run_from_perf_repo=false
+use_core_run=true
+
+while (($# > 0)); do
+ lowerI="$(echo $1 | awk '{print tolower($0)}')"
+ case $lowerI in
+ --sourcedirectory)
+ source_directory=$2
+ shift 2
+ ;;
+ --corerootdirectory)
+ core_root_directory=$2
+ shift 2
+ ;;
+ --architecture)
+ architecture=$2
+ shift 2
+ ;;
+ --framework)
+ framework=$2
+ shift 2
+ ;;
+ --compilationmode)
+ compilation_mode=$2
+ shift 2
+ ;;
+ --repository)
+ repository=$2
+ shift 2
+ ;;
+ --branch)
+ branch=$2
+ shift 2
+ ;;
+ --commitsha)
+ commit_sha=$2
+ shift 2
+ ;;
+ --buildnumber)
+ build_number=$2
+ shift 2
+ ;;
+ --kind)
+ kind=$2
+ shift 2
+ ;;
+ --runcategories)
+ run_categories=$2
+ shift 2
+ ;;
+ --csproj)
+ csproj=$2
+ shift 2
+ ;;
+ --internal)
+ internal=true
+ shift 1
+ ;;
+ --configurations)
+ configurations=$2
+ shift 2
+ ;;
+ --help)
+ echo "Common settings:"
+ echo " --corerootdirectory Directory where Core_Root exists, if running perf testing with --corerun"
+ echo " --architecture Architecture of the testing being run"
+ echo " --configurations List of key=value pairs that will be passed to perf testing infrastructure."
+ echo " ex: --configurations \"CompilationMode=Tiered OptimzationLevel=PGO\""
+ echo " --help Print help and exit"
+ echo ""
+ echo "Advanced settings:"
+ echo " --framework The framework to run, if not running in master"
+ echo " --compliationmode The compilation mode if not passing --configurations"
+ echo " --sourcedirectory The directory of the sources. Defaults to env:BUILD_SOURCESDIRECTORY"
+ echo " --repository The name of the repository in the / format. Defaults to env:BUILD_REPOSITORY_NAME"
+ echo " --branch The name of the branch. Defaults to env:BUILD_SOURCEBRANCH"
+ echo " --commitsha The commit sha1 to run against. Defaults to env:BUILD_SOURCEVERSION"
+ echo " --buildnumber The build number currently running. Defaults to env:BUILD_BUILDNUMBER"
+ echo " --csproj The relative path to the benchmark csproj whose tests should be run. Defaults to src\benchmarks\micro\MicroBenchmarks.csproj"
+ echo " --kind Related to csproj. The kind of benchmarks that should be run. Defaults to micro"
+ echo " --runcategories Related to csproj. Categories of benchmarks to run. Defaults to \"coreclr corefx\""
+ echo " --internal If the benchmarks are running as an official job."
+ echo ""
+ exit 0
+ ;;
+ esac
+done
+
+if [[ "$repository" == "dotnet/performance" ]]; then
+ run_from_perf_repo=true
+fi
+
+if [ -z "$configurations" ]; then
+ configurations="CompliationMode=$compilation_mode"
+fi
+
+if [ -z "$core_root_directory" ]; then
+ use_core_run=false
+fi
+
+payload_directory=$source_directory/Payload
+performance_directory=$payload_directory/performance
+workitem_directory=$source_directory/workitem
+extra_benchmark_dotnet_arguments="--iterationCount 1 --warmupCount 0 --invocationCount 1 --unrollFactor 1 --strategy ColdStart --stopOnFirstError true"
+perflab_arguments=
+queue=Ubuntu.1804.Amd64.Open
+creator=$BUILD_DEFINITIONNAME
+helix_source_prefix="pr"
+
+if [[ "$internal" == true ]]; then
+ perflab_arguments="--upload-to-perflab-container"
+ helix_source_prefix="official"
+ creator=
+ extra_benchmark_dotnet_arguments=
+
+ if [[ "$architecture" = "arm64" ]]; then
+ queue=Ubuntu.1804.Arm64.Perf
+ else
+ queue=Ubuntu.1804.Amd64.Perf
+ fi
+fi
+
+common_setup_arguments="--frameworks $framework --queue $queue --build-number $build_number --build-configs $configurations"
+setup_arguments="--repository https://github.com/$repository --branch $branch --get-perf-hash --commit-sha $commit_sha $common_setup_arguments"
+
+if [[ "$run_from_perf_repo" = true ]]; then
+ payload_directory=
+ workitem_directory=$source_directory
+ performance_directory=$workitem_directory
+ setup_arguments="--perf-hash $commit_sha $common_setup_arguments"
+else
+ git clone --branch master --depth 1 --quiet https://github.com/dotnet/performance $performance_directory
+
+ docs_directory=$performance_directory/docs
+ mv $docs_directory $workitem_directory
+fi
+
+if [[ "$use_core_run" = true ]]; then
+ new_core_root=$payload_directory/Core_Root
+ mv $core_root_directory $new_core_root
+fi
+
+# Make sure all of our variables are available for future steps
+echo "##vso[task.setvariable variable=UseCoreRun]$use_core_run"
+echo "##vso[task.setvariable variable=Architecture]$architecture"
+echo "##vso[task.setvariable variable=PayloadDirectory]$payload_directory"
+echo "##vso[task.setvariable variable=PerformanceDirectory]$performance_directory"
+echo "##vso[task.setvariable variable=WorkItemDirectory]$workitem_directory"
+echo "##vso[task.setvariable variable=Queue]$queue"
+echo "##vso[task.setvariable variable=SetupArguments]$setup_arguments"
+echo "##vso[task.setvariable variable=Python]python3"
+echo "##vso[task.setvariable variable=PerfLabArguments]$perflab_arguments"
+echo "##vso[task.setvariable variable=ExtraBenchmarkDotNetArguments]$extra_benchmark_dotnet_arguments"
+echo "##vso[task.setvariable variable=BDNCategories]$run_categories"
+echo "##vso[task.setvariable variable=TargetCsproj]$csproj"
+echo "##vso[task.setvariable variable=RunFromPerfRepo]$run_from_perf_repo"
+echo "##vso[task.setvariable variable=Creator]$creator"
+echo "##vso[task.setvariable variable=HelixSourcePrefix]$helix_source_prefix"
+echo "##vso[task.setvariable variable=Kind]$kind"
+echo "##vso[task.setvariable variable=_BuildConfig]$architecture.$kind.$framework"
\ No newline at end of file
diff --git a/eng/common/pipeline-logging-functions.ps1 b/eng/common/pipeline-logging-functions.ps1
index 7b61376f8aa..af5f48aaceb 100644
--- a/eng/common/pipeline-logging-functions.ps1
+++ b/eng/common/pipeline-logging-functions.ps1
@@ -77,13 +77,14 @@ function Write-PipelineTaskError {
[string]$Name,
[string]$Value,
[switch]$Secret,
- [switch]$AsOutput)
-
+ [switch]$AsOutput,
+ [bool]$IsMultiJobVariable=$true)
+
if($ci) {
Write-LoggingCommand -Area 'task' -Event 'setvariable' -Data $Value -Properties @{
'variable' = $Name
'isSecret' = $Secret
- 'isOutput' = 'true'
+ 'isOutput' = $IsMultiJobVariable
} -AsOutput:$AsOutput
}
}
diff --git a/eng/common/pipeline-logging-functions.sh b/eng/common/pipeline-logging-functions.sh
old mode 100644
new mode 100755
index 6098f9a5438..1c560a50613
--- a/eng/common/pipeline-logging-functions.sh
+++ b/eng/common/pipeline-logging-functions.sh
@@ -39,11 +39,11 @@ function Write-PipelineTaskError {
return
fi
- message_type="error"
- sourcepath=''
- linenumber=''
- columnnumber=''
- error_code=''
+ local message_type="error"
+ local sourcepath=''
+ local linenumber=''
+ local columnnumber=''
+ local error_code=''
while [[ $# -gt 0 ]]; do
opt="$(echo "${1/#--/-}" | awk '{print tolower($0)}')"
@@ -76,7 +76,7 @@ function Write-PipelineTaskError {
shift
done
- message="##vso[task.logissue"
+ local message="##vso[task.logissue"
message="$message type=$message_type"
@@ -100,3 +100,73 @@ function Write-PipelineTaskError {
echo "$message"
}
+function Write-PipelineSetVariable {
+ if [[ "$ci" != true ]]; then
+ return
+ fi
+
+ local name=''
+ local value=''
+ local secret=false
+ local as_output=false
+ local is_multi_job_variable=true
+
+ while [[ $# -gt 0 ]]; do
+ opt="$(echo "${1/#--/-}" | awk '{print tolower($0)}')"
+ case "$opt" in
+ -name|-n)
+ name=$2
+ shift
+ ;;
+ -value|-v)
+ value=$2
+ shift
+ ;;
+ -secret|-s)
+ secret=true
+ ;;
+ -as_output|-a)
+ as_output=true
+ ;;
+ -is_multi_job_variable|-i)
+ is_multi_job_variable=$2
+ shift
+ ;;
+ esac
+ shift
+ done
+
+ value=${value/;/%3B}
+ value=${value/\\r/%0D}
+ value=${value/\\n/%0A}
+ value=${value/]/%5D}
+
+ local message="##vso[task.setvariable variable=$name;isSecret=$secret;isOutput=$is_multi_job_variable]$value"
+
+ if [[ "$as_output" == true ]]; then
+ $message
+ else
+ echo "$message"
+ fi
+}
+
+function Write-PipelinePrependPath {
+ local prepend_path=''
+
+ while [[ $# -gt 0 ]]; do
+ opt="$(echo "${1/#--/-}" | awk '{print tolower($0)}')"
+ case "$opt" in
+ -path|-p)
+ prepend_path=$2
+ shift
+ ;;
+ esac
+ shift
+ done
+
+ export PATH="$prepend_path:$PATH"
+
+ if [[ "$ci" == true ]]; then
+ echo "##vso[task.prependpath]$prepend_path"
+ fi
+}
\ No newline at end of file
diff --git a/eng/common/post-build/darc-gather-drop.ps1 b/eng/common/post-build/darc-gather-drop.ps1
new file mode 100644
index 00000000000..93a0bd83285
--- /dev/null
+++ b/eng/common/post-build/darc-gather-drop.ps1
@@ -0,0 +1,35 @@
+param(
+ [Parameter(Mandatory=$true)][int] $BarBuildId, # ID of the build which assets should be downloaded
+ [Parameter(Mandatory=$true)][string] $DropLocation, # Where the assets should be downloaded to
+ [Parameter(Mandatory=$true)][string] $MaestroApiAccessToken, # Token used to access Maestro API
+ [Parameter(Mandatory=$false)][string] $MaestroApiEndPoint = "https://maestro-prod.westus2.cloudapp.azure.com", # Maestro API URL
+ [Parameter(Mandatory=$false)][string] $MaestroApiVersion = "2019-01-16" # Version of Maestro API to use
+)
+
+. $PSScriptRoot\post-build-utils.ps1
+
+try {
+ Write-Host "Installing DARC ..."
+
+ . $PSScriptRoot\..\darc-init.ps1
+ $exitCode = $LASTEXITCODE
+
+ if ($exitCode -ne 0) {
+ Write-PipelineTaskError "Something failed while running 'darc-init.ps1'. Check for errors above. Exiting now..."
+ ExitWithExitCode $exitCode
+ }
+
+ darc gather-drop --non-shipping `
+ --continue-on-error `
+ --id $BarBuildId `
+ --output-dir $DropLocation `
+ --bar-uri $MaestroApiEndpoint `
+ --password $MaestroApiAccessToken `
+ --latest-location
+}
+catch {
+ Write-Host $_
+ Write-Host $_.Exception
+ Write-Host $_.ScriptStackTrace
+ ExitWithExitCode 1
+}
diff --git a/eng/common/post-build/nuget-validation.ps1 b/eng/common/post-build/nuget-validation.ps1
new file mode 100644
index 00000000000..78ed0d540f5
--- /dev/null
+++ b/eng/common/post-build/nuget-validation.ps1
@@ -0,0 +1,25 @@
+# This script validates NuGet package metadata information using this
+# tool: https://github.com/NuGet/NuGetGallery/tree/jver-verify/src/VerifyMicrosoftPackage
+
+param(
+ [Parameter(Mandatory=$true)][string] $PackagesPath, # Path to where the packages to be validated are
+ [Parameter(Mandatory=$true)][string] $ToolDestinationPath # Where the validation tool should be downloaded to
+)
+
+. $PSScriptRoot\post-build-utils.ps1
+
+try {
+ $url = "https://raw.githubusercontent.com/NuGet/NuGetGallery/jver-verify/src/VerifyMicrosoftPackage/verify.ps1"
+
+ New-Item -ItemType "directory" -Path ${ToolDestinationPath} -Force
+
+ Invoke-WebRequest $url -OutFile ${ToolDestinationPath}\verify.ps1
+
+ & ${ToolDestinationPath}\verify.ps1 ${PackagesPath}\*.nupkg
+}
+catch {
+ Write-PipelineTaskError "NuGet package validation failed. Please check error logs."
+ Write-Host $_
+ Write-Host $_.ScriptStackTrace
+ ExitWithExitCode 1
+}
diff --git a/eng/common/post-build/post-build-utils.ps1 b/eng/common/post-build/post-build-utils.ps1
new file mode 100644
index 00000000000..551ae113f89
--- /dev/null
+++ b/eng/common/post-build/post-build-utils.ps1
@@ -0,0 +1,90 @@
+# Most of the functions in this file require the variables `MaestroApiEndPoint`,
+# `MaestroApiVersion` and `MaestroApiAccessToken` to be globally available.
+
+$ErrorActionPreference = "Stop"
+Set-StrictMode -Version 2.0
+
+# `tools.ps1` checks $ci to perform some actions. Since the post-build
+# scripts don't necessarily execute in the same agent that run the
+# build.ps1/sh script this variable isn't automatically set.
+$ci = $true
+. $PSScriptRoot\..\tools.ps1
+
+function Create-MaestroApiRequestHeaders([string]$ContentType = "application/json") {
+ Validate-MaestroVars
+
+ $headers = New-Object 'System.Collections.Generic.Dictionary[[String],[String]]'
+ $headers.Add('Accept', $ContentType)
+ $headers.Add('Authorization',"Bearer $MaestroApiAccessToken")
+ return $headers
+}
+
+function Get-MaestroChannel([int]$ChannelId) {
+ Validate-MaestroVars
+
+ $apiHeaders = Create-MaestroApiRequestHeaders
+ $apiEndpoint = "$MaestroApiEndPoint/api/channels/${ChannelId}?api-version=$MaestroApiVersion"
+
+ $result = try { Invoke-WebRequest -Method Get -Uri $apiEndpoint -Headers $apiHeaders | ConvertFrom-Json } catch { Write-Host "Error: $_" }
+ return $result
+}
+
+function Get-MaestroBuild([int]$BuildId) {
+ Validate-MaestroVars
+
+ $apiHeaders = Create-MaestroApiRequestHeaders -AuthToken $MaestroApiAccessToken
+ $apiEndpoint = "$MaestroApiEndPoint/api/builds/${BuildId}?api-version=$MaestroApiVersion"
+
+ $result = try { return Invoke-WebRequest -Method Get -Uri $apiEndpoint -Headers $apiHeaders | ConvertFrom-Json } catch { Write-Host "Error: $_" }
+ return $result
+}
+
+function Get-MaestroSubscriptions([string]$SourceRepository, [int]$ChannelId) {
+ Validate-MaestroVars
+
+ $SourceRepository = [System.Web.HttpUtility]::UrlEncode($SourceRepository)
+ $apiHeaders = Create-MaestroApiRequestHeaders -AuthToken $MaestroApiAccessToken
+ $apiEndpoint = "$MaestroApiEndPoint/api/subscriptions?sourceRepository=$SourceRepository&channelId=$ChannelId&api-version=$MaestroApiVersion"
+
+ $result = try { Invoke-WebRequest -Method Get -Uri $apiEndpoint -Headers $apiHeaders | ConvertFrom-Json } catch { Write-Host "Error: $_" }
+ return $result
+}
+
+function Trigger-Subscription([string]$SubscriptionId) {
+ Validate-MaestroVars
+
+ $apiHeaders = Create-MaestroApiRequestHeaders -AuthToken $MaestroApiAccessToken
+ $apiEndpoint = "$MaestroApiEndPoint/api/subscriptions/$SubscriptionId/trigger?api-version=$MaestroApiVersion"
+ Invoke-WebRequest -Uri $apiEndpoint -Headers $apiHeaders -Method Post | Out-Null
+}
+
+function Assign-BuildToChannel([int]$BuildId, [int]$ChannelId) {
+ Validate-MaestroVars
+
+ $apiHeaders = Create-MaestroApiRequestHeaders -AuthToken $MaestroApiAccessToken
+ $apiEndpoint = "$MaestroApiEndPoint/api/channels/${ChannelId}/builds/${BuildId}?api-version=$MaestroApiVersion"
+ Invoke-WebRequest -Method Post -Uri $apiEndpoint -Headers $apiHeaders | Out-Null
+}
+
+function Validate-MaestroVars {
+ try {
+ Get-Variable MaestroApiEndPoint -Scope Global | Out-Null
+ Get-Variable MaestroApiVersion -Scope Global | Out-Null
+ Get-Variable MaestroApiAccessToken -Scope Global | Out-Null
+
+ if (!($MaestroApiEndPoint -Match "^http[s]?://maestro-(int|prod).westus2.cloudapp.azure.com$")) {
+ Write-PipelineTaskError "MaestroApiEndPoint is not a valid Maestro URL. '$MaestroApiEndPoint'"
+ ExitWithExitCode 1
+ }
+
+ if (!($MaestroApiVersion -Match "^[0-9]{4}-[0-9]{2}-[0-9]{2}$")) {
+ Write-PipelineTaskError "MaestroApiVersion does not match a version string in the format yyyy-MM-DD. '$MaestroApiVersion'"
+ ExitWithExitCode 1
+ }
+ }
+ catch {
+ Write-PipelineTaskError "Error: Variables `MaestroApiEndPoint`, `MaestroApiVersion` and `MaestroApiAccessToken` are required while using this script."
+ Write-Host $_
+ ExitWithExitCode 1
+ }
+}
diff --git a/eng/common/post-build/promote-build.ps1 b/eng/common/post-build/promote-build.ps1
new file mode 100644
index 00000000000..e5ae85f2517
--- /dev/null
+++ b/eng/common/post-build/promote-build.ps1
@@ -0,0 +1,48 @@
+param(
+ [Parameter(Mandatory=$true)][int] $BuildId,
+ [Parameter(Mandatory=$true)][int] $ChannelId,
+ [Parameter(Mandatory=$true)][string] $MaestroApiAccessToken,
+ [Parameter(Mandatory=$false)][string] $MaestroApiEndPoint = "https://maestro-prod.westus2.cloudapp.azure.com",
+ [Parameter(Mandatory=$false)][string] $MaestroApiVersion = "2019-01-16"
+)
+
+. $PSScriptRoot\post-build-utils.ps1
+
+try {
+ # Check that the channel we are going to promote the build to exist
+ $channelInfo = Get-MaestroChannel -ChannelId $ChannelId
+
+ if (!$channelInfo) {
+ Write-Host "Channel with BAR ID $ChannelId was not found in BAR!"
+ ExitWithExitCode 1
+ }
+
+ # Get info about which channels the build has already been promoted to
+ $buildInfo = Get-MaestroBuild -BuildId $BuildId
+
+ if (!$buildInfo) {
+ Write-Host "Build with BAR ID $BuildId was not found in BAR!"
+ ExitWithExitCode 1
+ }
+
+ # Find whether the build is already assigned to the channel or not
+ if ($buildInfo.channels) {
+ foreach ($channel in $buildInfo.channels) {
+ if ($channel.Id -eq $ChannelId) {
+ Write-Host "The build with BAR ID $BuildId is already on channel $ChannelId!"
+ ExitWithExitCode 0
+ }
+ }
+ }
+
+ Write-Host "Promoting build '$BuildId' to channel '$ChannelId'."
+
+ Assign-BuildToChannel -BuildId $BuildId -ChannelId $ChannelId
+
+ Write-Host "done."
+}
+catch {
+ Write-Host "There was an error while trying to promote build '$BuildId' to channel '$ChannelId'"
+ Write-Host $_
+ Write-Host $_.ScriptStackTrace
+}
diff --git a/eng/common/post-build/setup-maestro-vars.ps1 b/eng/common/post-build/setup-maestro-vars.ps1
new file mode 100644
index 00000000000..d7f64dc63cb
--- /dev/null
+++ b/eng/common/post-build/setup-maestro-vars.ps1
@@ -0,0 +1,26 @@
+param(
+ [Parameter(Mandatory=$true)][string] $ReleaseConfigsPath # Full path to ReleaseConfigs.txt asset
+)
+
+. $PSScriptRoot\post-build-utils.ps1
+
+try {
+ $Content = Get-Content $ReleaseConfigsPath
+
+ $BarId = $Content | Select -Index 0
+
+ $Channels = ""
+ $Content | Select -Index 1 | ForEach-Object { $Channels += "$_ ," }
+
+ $IsStableBuild = $Content | Select -Index 2
+
+ Write-PipelineSetVariable -Name 'BARBuildId' -Value $BarId
+ Write-PipelineSetVariable -Name 'InitialChannels' -Value "$Channels"
+ Write-PipelineSetVariable -Name 'IsStableBuild' -Value $IsStableBuild
+}
+catch {
+ Write-Host $_
+ Write-Host $_.Exception
+ Write-Host $_.ScriptStackTrace
+ ExitWithExitCode 1
+}
diff --git a/eng/common/post-build/sourcelink-validation.ps1 b/eng/common/post-build/sourcelink-validation.ps1
index 8abd684e9e5..41e01ae6e67 100644
--- a/eng/common/post-build/sourcelink-validation.ps1
+++ b/eng/common/post-build/sourcelink-validation.ps1
@@ -6,10 +6,7 @@ param(
[Parameter(Mandatory=$true)][string] $SourcelinkCliVersion # Version of SourceLink CLI to use
)
-$ErrorActionPreference = "Stop"
-Set-StrictMode -Version 2.0
-
-. $PSScriptRoot\..\tools.ps1
+. $PSScriptRoot\post-build-utils.ps1
# Cache/HashMap (File -> Exist flag) used to consult whether a file exist
# in the repository at a specific commit point. This is populated by inserting
@@ -200,21 +197,27 @@ function ValidateSourceLinkLinks {
}
}
-function CheckExitCode ([string]$stage) {
- $exitCode = $LASTEXITCODE
- if ($exitCode -ne 0) {
- Write-PipelineTaskError "Something failed while '$stage'. Check for errors above. Exiting now..."
- ExitWithExitCode $exitCode
+function InstallSourcelinkCli {
+ $sourcelinkCliPackageName = "sourcelink"
+
+ $dotnetRoot = InitializeDotNetCli -install:$true
+ $dotnet = "$dotnetRoot\dotnet.exe"
+ $toolList = & "$dotnet" tool list --global
+
+ if (($toolList -like "*$sourcelinkCliPackageName*") -and ($toolList -like "*$sourcelinkCliVersion*")) {
+ Write-Host "SourceLink CLI version $sourcelinkCliVersion is already installed."
+ }
+ else {
+ Write-Host "Installing SourceLink CLI version $sourcelinkCliVersion..."
+ Write-Host "You may need to restart your command window if this is the first dotnet tool you have installed."
+ & "$dotnet" tool install $sourcelinkCliPackageName --version $sourcelinkCliVersion --verbosity "minimal" --global
}
}
try {
- Write-Host "Installing SourceLink CLI..."
- Get-Location
- . $PSScriptRoot\sourcelink-cli-init.ps1 -sourcelinkCliVersion $SourcelinkCliVersion
- CheckExitCode "Running sourcelink-cli-init"
+ InstallSourcelinkCli
- Measure-Command { ValidateSourceLinkLinks }
+ ValidateSourceLinkLinks
}
catch {
Write-Host $_
diff --git a/eng/common/post-build/symbols-validation.ps1 b/eng/common/post-build/symbols-validation.ps1
index 69456854e04..d5ec51b150f 100644
--- a/eng/common/post-build/symbols-validation.ps1
+++ b/eng/common/post-build/symbols-validation.ps1
@@ -4,10 +4,7 @@ param(
[Parameter(Mandatory=$true)][string] $DotnetSymbolVersion # Version of dotnet symbol to use
)
-$ErrorActionPreference = "Stop"
-Set-StrictMode -Version 2.0
-
-. $PSScriptRoot\..\tools.ps1
+. $PSScriptRoot\post-build-utils.ps1
Add-Type -AssemblyName System.IO.Compression.FileSystem
@@ -162,19 +159,25 @@ function CheckSymbolsAvailable {
}
}
-function CheckExitCode ([string]$stage) {
- $exitCode = $LASTEXITCODE
- if ($exitCode -ne 0) {
- Write-PipelineTaskError "Something failed while '$stage'. Check for errors above. Exiting now..."
- ExitWithExitCode $exitCode
+function Installdotnetsymbol {
+ $dotnetsymbolPackageName = "dotnet-symbol"
+
+ $dotnetRoot = InitializeDotNetCli -install:$true
+ $dotnet = "$dotnetRoot\dotnet.exe"
+ $toolList = & "$dotnet" tool list --global
+
+ if (($toolList -like "*$dotnetsymbolPackageName*") -and ($toolList -like "*$dotnetsymbolVersion*")) {
+ Write-Host "dotnet-symbol version $dotnetsymbolVersion is already installed."
+ }
+ else {
+ Write-Host "Installing dotnet-symbol version $dotnetsymbolVersion..."
+ Write-Host "You may need to restart your command window if this is the first dotnet tool you have installed."
+ & "$dotnet" tool install $dotnetsymbolPackageName --version $dotnetsymbolVersion --verbosity "minimal" --global
}
}
try {
- Write-Host "Installing dotnet symbol ..."
- Get-Location
- . $PSScriptRoot\dotnetsymbol-init.ps1 -dotnetsymbolVersion $DotnetSymbolVersion
- CheckExitCode "Running dotnetsymbol-init"
+ Installdotnetsymbol
CheckSymbolsAvailable
}
diff --git a/eng/common/post-build/trigger-subscriptions.ps1 b/eng/common/post-build/trigger-subscriptions.ps1
new file mode 100644
index 00000000000..926d5b45513
--- /dev/null
+++ b/eng/common/post-build/trigger-subscriptions.ps1
@@ -0,0 +1,57 @@
+param(
+ [Parameter(Mandatory=$true)][string] $SourceRepo,
+ [Parameter(Mandatory=$true)][int] $ChannelId,
+ [Parameter(Mandatory=$true)][string] $MaestroApiAccessToken,
+ [Parameter(Mandatory=$false)][string] $MaestroApiEndPoint = "https://maestro-prod.westus2.cloudapp.azure.com",
+ [Parameter(Mandatory=$false)][string] $MaestroApiVersion = "2019-01-16"
+)
+
+. $PSScriptRoot\post-build-utils.ps1
+
+# Get all the $SourceRepo subscriptions
+$normalizedSourceRepo = $SourceRepo.Replace('dnceng@', '')
+$subscriptions = Get-MaestroSubscriptions -SourceRepository $normalizedSourceRepo -ChannelId $ChannelId
+
+if (!$subscriptions) {
+ Write-Host "No subscriptions found for source repo '$normalizedSourceRepo' in channel '$ChannelId'"
+ ExitWithExitCode 0
+}
+
+$subscriptionsToTrigger = New-Object System.Collections.Generic.List[string]
+$failedTriggeredSubscription = $false
+
+# Get all enabled subscriptions that need dependency flow on 'everyBuild'
+foreach ($subscription in $subscriptions) {
+ if ($subscription.enabled -and $subscription.policy.updateFrequency -like 'everyBuild' -and $subscription.channel.id -eq $ChannelId) {
+ Write-Host "Should trigger this subscription: $subscription.id"
+ [void]$subscriptionsToTrigger.Add($subscription.id)
+ }
+}
+
+foreach ($subscriptionToTrigger in $subscriptionsToTrigger) {
+ try {
+ Write-Host "Triggering subscription '$subscriptionToTrigger'."
+
+ Trigger-Subscription -SubscriptionId $subscriptionToTrigger
+
+ Write-Host "done."
+ }
+ catch
+ {
+ Write-Host "There was an error while triggering subscription '$subscriptionToTrigger'"
+ Write-Host $_
+ Write-Host $_.ScriptStackTrace
+ $failedTriggeredSubscription = $true
+ }
+}
+
+if ($subscriptionsToTrigger.Count -eq 0) {
+ Write-Host "No subscription matched source repo '$normalizedSourceRepo' and channel ID '$ChannelId'."
+}
+elseif ($failedTriggeredSubscription) {
+ Write-Host "At least one subscription failed to be triggered..."
+ ExitWithExitCode 1
+}
+else {
+ Write-Host "All subscriptions were triggered successfully!"
+}
diff --git a/eng/common/sdl/execute-all-sdl-tools.ps1 b/eng/common/sdl/execute-all-sdl-tools.ps1
index 0635f26fb63..aab7589f2cc 100644
--- a/eng/common/sdl/execute-all-sdl-tools.ps1
+++ b/eng/common/sdl/execute-all-sdl-tools.ps1
@@ -22,7 +22,9 @@ Param(
[string] $TsaCodebaseAdmin, # Optional: only needed if TsaOnboard is true; the aliases which are admins of the TSA codebase (e.g. DOMAIN\alias); TSA is the automated framework used to upload test results as bugs.
[string] $TsaBugAreaPath, # Optional: only needed if TsaOnboard is true; the area path where TSA will file bugs in AzDO; TSA is the automated framework used to upload test results as bugs.
[string] $TsaIterationPath, # Optional: only needed if TsaOnboard is true; the iteration path where TSA will file bugs in AzDO; TSA is the automated framework used to upload test results as bugs.
- [string] $GuardianLoggerLevel="Standard" # Optional: the logger level for the Guardian CLI; options are Trace, Verbose, Standard, Warning, and Error
+ [string] $GuardianLoggerLevel="Standard", # Optional: the logger level for the Guardian CLI; options are Trace, Verbose, Standard, Warning, and Error
+ [string[]] $CrScanAdditionalRunConfigParams, # Optional: Additional Params to custom build a CredScan run config in the format @("xyz:abc","sdf:1")
+ [string[]] $PoliCheckAdditionalRunConfigParams # Optional: Additional Params to custom build a Policheck run config in the format @("xyz:abc","sdf:1")
)
$ErrorActionPreference = "Stop"
@@ -69,10 +71,10 @@ if ($TsaOnboard) {
}
if ($ArtifactToolsList -and $ArtifactToolsList.Count -gt 0) {
- & $(Join-Path $PSScriptRoot "run-sdl.ps1") -GuardianCliLocation $guardianCliLocation -WorkingDirectory $ArtifactsDirectory -TargetDirectory $ArtifactsDirectory -GdnFolder $gdnFolder -ToolsList $ArtifactToolsList -AzureDevOpsAccessToken $AzureDevOpsAccessToken -UpdateBaseline $UpdateBaseline -GuardianLoggerLevel $GuardianLoggerLevel
+ & $(Join-Path $PSScriptRoot "run-sdl.ps1") -GuardianCliLocation $guardianCliLocation -WorkingDirectory $ArtifactsDirectory -TargetDirectory $ArtifactsDirectory -GdnFolder $gdnFolder -ToolsList $ArtifactToolsList -AzureDevOpsAccessToken $AzureDevOpsAccessToken -UpdateBaseline $UpdateBaseline -GuardianLoggerLevel $GuardianLoggerLevel -CrScanAdditionalRunConfigParams $CrScanAdditionalRunConfigParams -PoliCheckAdditionalRunConfigParams $PoliCheckAdditionalRunConfigParams
}
if ($SourceToolsList -and $SourceToolsList.Count -gt 0) {
- & $(Join-Path $PSScriptRoot "run-sdl.ps1") -GuardianCliLocation $guardianCliLocation -WorkingDirectory $ArtifactsDirectory -TargetDirectory $SourceDirectory -GdnFolder $gdnFolder -ToolsList $SourceToolsList -AzureDevOpsAccessToken $AzureDevOpsAccessToken -UpdateBaseline $UpdateBaseline -GuardianLoggerLevel $GuardianLoggerLevel
+ & $(Join-Path $PSScriptRoot "run-sdl.ps1") -GuardianCliLocation $guardianCliLocation -WorkingDirectory $ArtifactsDirectory -TargetDirectory $SourceDirectory -GdnFolder $gdnFolder -ToolsList $SourceToolsList -AzureDevOpsAccessToken $AzureDevOpsAccessToken -UpdateBaseline $UpdateBaseline -GuardianLoggerLevel $GuardianLoggerLevel -CrScanAdditionalRunConfigParams $CrScanAdditionalRunConfigParams -PoliCheckAdditionalRunConfigParams $PoliCheckAdditionalRunConfigParams
}
if ($UpdateBaseline) {
diff --git a/eng/common/sdl/extract-artifact-packages.ps1 b/eng/common/sdl/extract-artifact-packages.ps1
index 0f6a6e49b92..1fdbb14329c 100644
--- a/eng/common/sdl/extract-artifact-packages.ps1
+++ b/eng/common/sdl/extract-artifact-packages.ps1
@@ -44,6 +44,10 @@ $ExtractPackage = {
}
}
function ExtractArtifacts {
+ if (!(Test-Path $InputPath)) {
+ Write-Host "Input Path does not exist: $InputPath"
+ ExitWithExitCode 0
+ }
$Jobs = @()
Get-ChildItem "$InputPath\*.nupkg" |
ForEach-Object {
diff --git a/eng/common/sdl/run-sdl.ps1 b/eng/common/sdl/run-sdl.ps1
index e6a86d03a21..d7b85644581 100644
--- a/eng/common/sdl/run-sdl.ps1
+++ b/eng/common/sdl/run-sdl.ps1
@@ -5,7 +5,9 @@ Param(
[string] $GdnFolder,
[string[]] $ToolsList,
[string] $UpdateBaseline,
- [string] $GuardianLoggerLevel="Standard"
+ [string] $GuardianLoggerLevel="Standard",
+ [string[]] $CrScanAdditionalRunConfigParams,
+ [string[]] $PoliCheckAdditionalRunConfigParams
)
$ErrorActionPreference = "Stop"
@@ -29,8 +31,8 @@ foreach ($tool in $ToolsList) {
Write-Host $tool
# We have to manually configure tools that run on source to look at the source directory only
if ($tool -eq "credscan") {
- Write-Host "$GuardianCliLocation configure --working-directory $WorkingDirectory --tool $tool --output-path $gdnConfigFile --logger-level $GuardianLoggerLevel --noninteractive --force --args `" TargetDirectory : $TargetDirectory `""
- & $GuardianCliLocation configure --working-directory $WorkingDirectory --tool $tool --output-path $gdnConfigFile --logger-level $GuardianLoggerLevel --noninteractive --force --args " TargetDirectory : $TargetDirectory "
+ Write-Host "$GuardianCliLocation configure --working-directory $WorkingDirectory --tool $tool --output-path $gdnConfigFile --logger-level $GuardianLoggerLevel --noninteractive --force --args `" TargetDirectory : $TargetDirectory `" $(If ($CrScanAdditionalRunConfigParams) {$CrScanAdditionalRunConfigParams})"
+ & $GuardianCliLocation configure --working-directory $WorkingDirectory --tool $tool --output-path $gdnConfigFile --logger-level $GuardianLoggerLevel --noninteractive --force --args " TargetDirectory : $TargetDirectory " $(If ($CrScanAdditionalRunConfigParams) {$CrScanAdditionalRunConfigParams})
if ($LASTEXITCODE -ne 0) {
Write-Host "Guardian configure for $tool failed with exit code $LASTEXITCODE."
exit $LASTEXITCODE
@@ -38,8 +40,8 @@ foreach ($tool in $ToolsList) {
$config = $True
}
if ($tool -eq "policheck") {
- Write-Host "$GuardianCliLocation configure --working-directory $WorkingDirectory --tool $tool --output-path $gdnConfigFile --logger-level $GuardianLoggerLevel --noninteractive --force --args `" Target : $TargetDirectory `""
- & $GuardianCliLocation configure --working-directory $WorkingDirectory --tool $tool --output-path $gdnConfigFile --logger-level $GuardianLoggerLevel --noninteractive --force --args " Target : $TargetDirectory "
+ Write-Host "$GuardianCliLocation configure --working-directory $WorkingDirectory --tool $tool --output-path $gdnConfigFile --logger-level $GuardianLoggerLevel --noninteractive --force --args `" Target : $TargetDirectory `" $(If ($PoliCheckAdditionalRunConfigParams) {$PoliCheckAdditionalRunConfigParams})"
+ & $GuardianCliLocation configure --working-directory $WorkingDirectory --tool $tool --output-path $gdnConfigFile --logger-level $GuardianLoggerLevel --noninteractive --force --args " Target : $TargetDirectory " $(If ($PoliCheckAdditionalRunConfigParams) {$PoliCheckAdditionalRunConfigParams})
if ($LASTEXITCODE -ne 0) {
Write-Host "Guardian configure for $tool failed with exit code $LASTEXITCODE."
exit $LASTEXITCODE
diff --git a/eng/common/templates/job/performance.yml b/eng/common/templates/job/performance.yml
new file mode 100644
index 00000000000..ef809253d1a
--- /dev/null
+++ b/eng/common/templates/job/performance.yml
@@ -0,0 +1,93 @@
+parameters:
+ steps: [] # optional -- any additional steps that need to happen before pulling down the performance repo and sending the performance benchmarks to helix (ie building your repo)
+ variables: [] # optional -- list of additional variables to send to the template
+ jobName: '' # required -- job name
+ displayName: '' # optional -- display name for the job. Will use jobName if not passed
+ pool: '' # required -- name of the Build pool
+ container: '' # required -- name of the container
+ extraSetupParameters: '' # optional -- extra arguments to pass to the setup script
+ frameworks: ['netcoreapp3.0'] # optional -- list of frameworks to run against
+ continueOnError: 'false' # optional -- determines whether to continue the build if the step errors
+ dependsOn: '' # optional -- dependencies of the job
+ timeoutInMinutes: 320 # optional -- timeout for the job
+ enableTelemetry: false # optional -- enable for telemetry
+
+jobs:
+- template: ../jobs/jobs.yml
+ parameters:
+ dependsOn: ${{ parameters.dependsOn }}
+ enableTelemetry: ${{ parameters.enableTelemetry }}
+ enablePublishBuildArtifacts: true
+ continueOnError: ${{ parameters.continueOnError }}
+
+ jobs:
+ - job: '${{ parameters.jobName }}'
+
+ ${{ if ne(parameters.displayName, '') }}:
+ displayName: '${{ parameters.displayName }}'
+ ${{ if eq(parameters.displayName, '') }}:
+ displayName: '${{ parameters.jobName }}'
+
+ timeoutInMinutes: ${{ parameters.timeoutInMinutes }}
+
+ variables:
+
+ - ${{ each variable in parameters.variables }}:
+ - ${{ if ne(variable.name, '') }}:
+ - name: ${{ variable.name }}
+ value: ${{ variable.value }}
+ - ${{ if ne(variable.group, '') }}:
+ - group: ${{ variable.group }}
+
+ - IsInternal: ''
+ - HelixApiAccessToken: ''
+ - HelixPreCommand: ''
+
+ - ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
+ - ${{ if eq(variables['Agent.Os'], 'Windows_NT') }}:
+ - HelixPreCommand: 'set "PERFLAB_UPLOAD_TOKEN=$(PerfCommandUploadToken)"'
+ - IsInternal: -Internal
+ - ${{ if ne(variables['Agent.Os'], 'Windows_NT') }}:
+ - HelixPreCommand: 'export PERFLAB_UPLOAD_TOKEN="$(PerfCommandUploadTokenLinux)"'
+ - IsInternal: --internal
+ - group: DotNet-HelixApi-Access
+ - group: dotnet-benchview
+
+ workspace:
+ clean: all
+ pool:
+ ${{ parameters.pool }}
+ container: ${{ parameters.container }}
+ strategy:
+ matrix:
+ ${{ each framework in parameters.frameworks }}:
+ ${{ framework }}:
+ _Framework: ${{ framework }}
+ steps:
+ - checkout: self
+ clean: true
+ # Run all of the steps to setup repo
+ - ${{ each step in parameters.steps }}:
+ - ${{ step }}
+ - powershell: $(Build.SourcesDirectory)\eng\common\performance\performance-setup.ps1 $(IsInternal) -Framework $(_Framework) ${{ parameters.extraSetupParameters }}
+ displayName: Performance Setup (Windows)
+ condition: and(succeeded(), eq(variables['Agent.Os'], 'Windows_NT'))
+ continueOnError: ${{ parameters.continueOnError }}
+ - script: $(Build.SourcesDirectory)/eng/common/performance/performance-setup.sh $(IsInternal) --framework $(_Framework) ${{ parameters.extraSetupParameters }}
+ displayName: Performance Setup (Unix)
+ condition: and(succeeded(), ne(variables['Agent.Os'], 'Windows_NT'))
+ continueOnError: ${{ parameters.continueOnError }}
+ - script: $(Python) $(PerformanceDirectory)/scripts/ci_setup.py $(SetupArguments)
+ displayName: Run ci setup script
+ # Run perf testing in helix
+ - template: /eng/common/templates/steps/perf-send-to-helix.yml
+ parameters:
+ HelixSource: '$(HelixSourcePrefix)/$(Build.Repository.Name)/$(Build.SourceBranch)' # sources must start with pr/, official/, prodcon/, or agent/
+ HelixType: 'test/performance/$(Kind)/$(_Framework)/$(Architecture)'
+ HelixAccessToken: $(HelixApiAccessToken)
+ HelixTargetQueues: $(Queue)
+ HelixPreCommands: $(HelixPreCommand)
+ Creator: $(Creator)
+ WorkItemTimeout: 4:00 # 4 hours
+ WorkItemDirectory: '$(WorkItemDirectory)' # WorkItemDirectory can not be empty, so we send it some docs to keep it happy
+ CorrelationPayloadDirectory: '$(PayloadDirectory)' # it gets checked out to a folder with shorter path than WorkItemDirectory so we can avoid file name too long exceptions
\ No newline at end of file
diff --git a/eng/common/templates/post-build/channels/internal-servicing.yml b/eng/common/templates/post-build/channels/internal-servicing.yml
index 99cd59b1980..12fd2b4653d 100644
--- a/eng/common/templates/post-build/channels/internal-servicing.yml
+++ b/eng/common/templates/post-build/channels/internal-servicing.yml
@@ -36,12 +36,11 @@ stages:
/p:BlobBasePath='$(Build.ArtifactStagingDirectory)/BlobArtifacts/'
/p:Configuration=Release
- - job:
+ - job: publish_assets
displayName: Publish Assets
dependsOn: setupMaestroVars
variables:
- group: DotNet-Blob-Feed
- - group: Publish-Build-Assets
- group: AzureDevOps-Artifact-Feeds-Pats
- name: BARBuildId
value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.BARBuildId'] ]
@@ -81,13 +80,14 @@ stages:
/p:IsInternalBuild=$(IsInternalBuild)
/p:RepositoryName=$(Build.Repository.Name)
/p:CommitSha=$(Build.SourceVersion)
+ /p:AzureStorageAccountName=$(ProxyBackedFeedsAccountName)
+ /p:AzureStorageAccountKey=$(dotnetfeed-storage-access-key-1)
+ /p:AzureDevOpsFeedsBaseUrl=$(dotnetfeed-internal-private-feed-url)
+ /p:StaticInternalFeed=$(dotnetfeed-internal-nonstable-feed-url)
/p:NugetPath=$(Agent.BuildDirectory)\Nuget\NuGet.exe
- /p:AzdoTargetFeedPAT='$(dn-bot-dnceng-unviersal-packages-rw)'
- /p:TargetFeedPAT='$(dn-bot-dnceng-unviersal-packages-rw)'
- /p:AzureStorageTargetFeedPAT='$(dotnetfeed-storage-access-key-1)'
/p:BARBuildId=$(BARBuildId)
- /p:MaestroApiEndpoint='https://maestro-prod.westus2.cloudapp.azure.com'
- /p:BuildAssetRegistryToken='$(MaestroAccessToken)'
+ /p:MaestroApiEndpoint='$(MaestroApiEndPoint)'
+ /p:BuildAssetRegistryToken='$(MaestroApiAccessToken)'
/p:ManifestsBasePath='$(Build.ArtifactStagingDirectory)/AssetManifests/'
/p:BlobBasePath='$(Build.ArtifactStagingDirectory)\BlobArtifacts'
/p:PackageBasePath='$(Build.ArtifactStagingDirectory)\PackageArtifacts'
@@ -111,7 +111,10 @@ stages:
-PersonalAccessToken $(dn-bot-dnceng-unviersal-packages-rw)
enabled: false
-
+ - template: ../trigger-subscription.yml
+ parameters:
+ ChannelId: ${{ variables.InternalServicing_30_Channel_Id }}
+
- stage: IS_PublishValidation
displayName: Publish Validation
variables:
@@ -139,29 +142,6 @@ stages:
filePath: $(Build.SourcesDirectory)/eng/common/post-build/symbols-validation.ps1
arguments: -InputPath $(Build.ArtifactStagingDirectory)/PackageArtifacts/ -ExtractPath $(Agent.BuildDirectory)/Temp/ -DotnetSymbolVersion $(SymbolToolVersion)
- - job:
- displayName: Gather Drop
- dependsOn: setupMaestroVars
- variables:
- BARBuildId: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.BARBuildId'] ]
- condition: contains(dependencies.setupMaestroVars.outputs['setReleaseVars.InitialChannels'], variables.InternalServicing_30_Channel_Id)
- pool:
- vmImage: 'windows-2019'
- steps:
- - task: PowerShell@2
- displayName: Setup Darc CLI
- inputs:
- targetType: filePath
- filePath: '$(Build.SourcesDirectory)/eng/common/darc-init.ps1'
-
- - task: PowerShell@2
- displayName: Run Darc gather-drop
- inputs:
- targetType: inline
- script: |
- darc gather-drop --non-shipping --continue-on-error --id $(BARBuildId) --output-dir $(Agent.BuildDirectory)/Temp/Drop/ --bar-uri https://maestro-prod.westus2.cloudapp.azure.com/ --password $(MaestroAccessToken) --latest-location
- enabled: false
-
- template: ../promote-build.yml
parameters:
ChannelId: ${{ variables.InternalServicing_30_Channel_Id }}
diff --git a/eng/common/templates/post-build/channels/public-dev-release.yml b/eng/common/templates/post-build/channels/public-dev-release.yml
index dfbc246826b..b0f085b1420 100644
--- a/eng/common/templates/post-build/channels/public-dev-release.yml
+++ b/eng/common/templates/post-build/channels/public-dev-release.yml
@@ -41,7 +41,6 @@ stages:
dependsOn: setupMaestroVars
variables:
- group: DotNet-Blob-Feed
- - group: Publish-Build-Assets
- group: AzureDevOps-Artifact-Feeds-Pats
- name: BARBuildId
value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.BARBuildId'] ]
@@ -77,6 +76,7 @@ stages:
filePath: eng\common\sdk-task.ps1
arguments: -task PublishArtifactsInManifest -restore -msbuildEngine dotnet
/p:ChannelId=$(PublicDevRelease_30_Channel_Id)
+ /p:ArtifactsCategory=$(_DotNetArtifactsCategory)
/p:IsStableBuild=$(IsStableBuild)
/p:IsInternalBuild=$(IsInternalBuild)
/p:RepositoryName=$(Build.Repository.Name)
@@ -86,8 +86,8 @@ stages:
/p:TargetFeedPAT='$(dn-bot-dnceng-unviersal-packages-rw)'
/p:AzureStorageTargetFeedPAT='$(dotnetfeed-storage-access-key-1)'
/p:BARBuildId=$(BARBuildId)
- /p:MaestroApiEndpoint='https://maestro-prod.westus2.cloudapp.azure.com'
- /p:BuildAssetRegistryToken='$(MaestroAccessToken)'
+ /p:MaestroApiEndpoint='$(MaestroApiEndPoint)'
+ /p:BuildAssetRegistryToken='$(MaestroApiAccessToken)'
/p:ManifestsBasePath='$(Build.ArtifactStagingDirectory)/AssetManifests/'
/p:BlobBasePath='$(Build.ArtifactStagingDirectory)/BlobArtifacts/'
/p:PackageBasePath='$(Build.ArtifactStagingDirectory)/PackageArtifacts/'
@@ -139,24 +139,10 @@ stages:
filePath: $(Build.SourcesDirectory)/eng/common/post-build/symbols-validation.ps1
arguments: -InputPath $(Build.ArtifactStagingDirectory)/PackageArtifacts/ -ExtractPath $(Agent.BuildDirectory)/Temp/ -DotnetSymbolVersion $(SymbolToolVersion)
- - job:
- displayName: Gather Drop
- dependsOn: setupMaestroVars
- variables:
- BARBuildId: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.BARBuildId'] ]
- condition: contains(dependencies.setupMaestroVars.outputs['setReleaseVars.InitialChannels'], variables.PublicDevRelease_30_Channel_Id)
- pool:
- vmImage: 'windows-2019'
- steps:
- - task: PowerShell@2
- displayName: Setup Darc CLI
- inputs:
- targetType: filePath
- filePath: '$(Build.SourcesDirectory)/eng/common/darc-init.ps1'
+ - template: ../darc-gather-drop.yml
+ parameters:
+ ChannelId: ${{ variables.PublicDevRelease_30_Channel_Id }}
- - task: PowerShell@2
- displayName: Run Darc gather-drop
- inputs:
- targetType: inline
- script: |
- darc gather-drop --non-shipping --continue-on-error --id $(BARBuildId) --output-dir $(Agent.BuildDirectory)/Temp/Drop/ --bar-uri https://maestro-prod.westus2.cloudapp.azure.com/ --password $(MaestroAccessToken) --latest-location
+ - template: ../promote-build.yml
+ parameters:
+ ChannelId: ${{ variables.PublicDevRelease_30_Channel_Id }}
diff --git a/eng/common/templates/post-build/channels/public-release.yml b/eng/common/templates/post-build/channels/public-release.yml
index f23eb3f541a..4c63fb43f0c 100644
--- a/eng/common/templates/post-build/channels/public-release.yml
+++ b/eng/common/templates/post-build/channels/public-release.yml
@@ -36,12 +36,11 @@ stages:
/p:BlobBasePath='$(Build.ArtifactStagingDirectory)/BlobArtifacts/'
/p:Configuration=Release
- - job:
+ - job: publish_assets
displayName: Publish Assets
dependsOn: setupMaestroVars
variables:
- group: DotNet-Blob-Feed
- - group: Publish-Build-Assets
- group: AzureDevOps-Artifact-Feeds-Pats
- name: BARBuildId
value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.BARBuildId'] ]
@@ -81,13 +80,14 @@ stages:
/p:IsInternalBuild=$(IsInternalBuild)
/p:RepositoryName=$(Build.Repository.Name)
/p:CommitSha=$(Build.SourceVersion)
- /p:NugetPath=$(Agent.BuildDirectory)/Nuget/NuGet.exe
- /p:AzdoTargetFeedPAT='$(dn-bot-dnceng-unviersal-packages-rw)'
- /p:TargetFeedPAT='$(dn-bot-dnceng-unviersal-packages-rw)'
- /p:AzureStorageTargetFeedPAT='$(dotnetfeed-storage-access-key-1)'
+ /p:AzureStorageAccountName=$(ProxyBackedFeedsAccountName)
+ /p:AzureStorageAccountKey=$(dotnetfeed-storage-access-key-1)
+ /p:AzureDevOpsFeedsBaseUrl=$(dotnetfeed-internal-private-feed-url)
+ /p:StaticInternalFeed=$(dotnetfeed-internal-nonstable-feed-url)
+ /p:NugetPath=$(Agent.BuildDirectory)\Nuget\NuGet.exe
/p:BARBuildId=$(BARBuildId)
- /p:MaestroApiEndpoint='https://maestro-prod.westus2.cloudapp.azure.com'
- /p:BuildAssetRegistryToken='$(MaestroAccessToken)'
+ /p:MaestroApiEndpoint='$(MaestroApiEndPoint)'
+ /p:BuildAssetRegistryToken='$(MaestroApiAccessToken)'
/p:ManifestsBasePath='$(Build.ArtifactStagingDirectory)/AssetManifests/'
/p:BlobBasePath='$(Build.ArtifactStagingDirectory)\BlobArtifacts'
/p:PackageBasePath='$(Build.ArtifactStagingDirectory)\PackageArtifacts'
@@ -111,6 +111,9 @@ stages:
-PersonalAccessToken $(dn-bot-dnceng-unviersal-packages-rw)
enabled: false
+ - template: ../trigger-subscription.yml
+ parameters:
+ ChannelId: ${{ variables.PublicRelease_30_Channel_Id }}
- stage: PubRel_PublishValidation
displayName: Publish Validation
@@ -139,29 +142,6 @@ stages:
filePath: $(Build.SourcesDirectory)/eng/common/post-build/symbols-validation.ps1
arguments: -InputPath $(Build.ArtifactStagingDirectory)/PackageArtifacts/ -ExtractPath $(Agent.BuildDirectory)/Temp/ -DotnetSymbolVersion $(SymbolToolVersion)
- - job:
- displayName: Gather Drop
- dependsOn: setupMaestroVars
- variables:
- BARBuildId: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.BARBuildId'] ]
- condition: contains(dependencies.setupMaestroVars.outputs['setReleaseVars.InitialChannels'], variables.PublicRelease_30_Channel_Id)
- pool:
- vmImage: 'windows-2019'
- steps:
- - task: PowerShell@2
- displayName: Setup Darc CLI
- inputs:
- targetType: filePath
- filePath: '$(Build.SourcesDirectory)/eng/common/darc-init.ps1'
-
- - task: PowerShell@2
- displayName: Run Darc gather-drop
- inputs:
- targetType: inline
- script: |
- darc gather-drop --non-shipping --continue-on-error --id $(BARBuildId) --output-dir $(Agent.BuildDirectory)/Temp/Drop/ --bar-uri https://maestro-prod.westus2.cloudapp.azure.com/ --password $(MaestroAccessToken) --latest-location
- enabled: false
-
- template: ../promote-build.yml
parameters:
ChannelId: ${{ variables.PublicRelease_30_Channel_Id }}
diff --git a/eng/common/templates/post-build/channels/public-validation-release.yml b/eng/common/templates/post-build/channels/public-validation-release.yml
index 0ef68c2b01b..1089ac5fa6b 100644
--- a/eng/common/templates/post-build/channels/public-validation-release.yml
+++ b/eng/common/templates/post-build/channels/public-validation-release.yml
@@ -12,7 +12,6 @@ stages:
dependsOn: setupMaestroVars
variables:
- group: DotNet-Blob-Feed
- - group: Publish-Build-Assets
- group: AzureDevOps-Artifact-Feeds-Pats
- name: BARBuildId
value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.BARBuildId'] ]
@@ -48,6 +47,7 @@ stages:
filePath: eng\common\sdk-task.ps1
arguments: -task PublishArtifactsInManifest -restore -msbuildEngine dotnet
/p:ChannelId=$(PublicValidationRelease_30_Channel_Id)
+ /p:ArtifactsCategory=$(_DotNetValidationArtifactsCategory)
/p:IsStableBuild=$(IsStableBuild)
/p:IsInternalBuild=$(IsInternalBuild)
/p:RepositoryName=$(Build.Repository.Name)
@@ -57,13 +57,13 @@ stages:
/p:TargetFeedPAT='$(dn-bot-dnceng-unviersal-packages-rw)'
/p:AzureStorageTargetFeedPAT='$(dotnetfeed-storage-access-key-1)'
/p:BARBuildId=$(BARBuildId)
- /p:MaestroApiEndpoint='https://maestro-prod.westus2.cloudapp.azure.com'
- /p:BuildAssetRegistryToken='$(MaestroAccessToken)'
+ /p:MaestroApiEndpoint='$(MaestroApiEndPoint)'
+ /p:BuildAssetRegistryToken='$(MaestroApiAccessToken)'
/p:ManifestsBasePath='$(Build.ArtifactStagingDirectory)/AssetManifests/'
/p:BlobBasePath='$(Build.ArtifactStagingDirectory)\BlobArtifacts'
/p:PackageBasePath='$(Build.ArtifactStagingDirectory)\PackageArtifacts'
/p:Configuration=Release
-
+
- task: NuGetCommand@2
displayName: Publish Packages to AzDO Feed
condition: contains(variables['TargetAzDOFeed'], 'pkgs.visualstudio.com')
@@ -90,26 +90,10 @@ stages:
jobs:
- template: ../setup-maestro-vars.yml
- - job:
- displayName: Gather Drop
- dependsOn: setupMaestroVars
- condition: contains(dependencies.setupMaestroVars.outputs['setReleaseVars.InitialChannels'], variables.PublicValidationRelease_30_Channel_Id)
- variables:
- - name: BARBuildId
- value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.BARBuildId'] ]
- - group: Publish-Build-Assets
- pool:
- vmImage: 'windows-2019'
- steps:
- - task: PowerShell@2
- displayName: Setup Darc CLI
- inputs:
- targetType: filePath
- filePath: '$(Build.SourcesDirectory)/eng/common/darc-init.ps1'
+ - template: ../darc-gather-drop.yml
+ parameters:
+ ChannelId: ${{ variables.PublicValidationRelease_30_Channel_Id }}
- - task: PowerShell@2
- displayName: Run Darc gather-drop
- inputs:
- targetType: inline
- script: |
- darc gather-drop --non-shipping --continue-on-error --id $(BARBuildId) --output-dir $(Agent.BuildDirectory)/Temp/Drop/ --bar-uri https://maestro-prod.westus2.cloudapp.azure.com --password $(MaestroAccessToken) --latest-location
+ - template: ../promote-build.yml
+ parameters:
+ ChannelId: ${{ variables.PublicValidationRelease_30_Channel_Id }}
diff --git a/eng/common/templates/post-build/common-variables.yml b/eng/common/templates/post-build/common-variables.yml
index 82834673520..bd0bc5e4daa 100644
--- a/eng/common/templates/post-build/common-variables.yml
+++ b/eng/common/templates/post-build/common-variables.yml
@@ -1,18 +1,39 @@
variables:
+ - group: Publish-Build-Assets
+
# .NET Core 3 Dev
- PublicDevRelease_30_Channel_Id: 3
+ - name: PublicDevRelease_30_Channel_Id
+ value: 3
# .NET Tools - Validation
- PublicValidationRelease_30_Channel_Id: 9
+ - name: PublicValidationRelease_30_Channel_Id
+ value: 9
# .NET Core 3.0 Internal Servicing
- InternalServicing_30_Channel_Id: 184
+ - name: InternalServicing_30_Channel_Id
+ value: 184
# .NET Core 3.0 Release
- PublicRelease_30_Channel_Id: 19
+ - name: PublicRelease_30_Channel_Id
+ value: 19
# Whether the build is internal or not
- IsInternalBuild: ${{ and(ne(variables['System.TeamProject'], 'public'), contains(variables['Build.SourceBranch'], 'internal')) }}
+ - name: IsInternalBuild
+ value: ${{ and(ne(variables['System.TeamProject'], 'public'), contains(variables['Build.SourceBranch'], 'internal')) }}
+
+ # Storage account name for proxy-backed feeds
+ - name: ProxyBackedFeedsAccountName
+ value: dotnetfeed
+
+ # Default Maestro++ API Endpoint and API Version
+ - name: MaestroApiEndPoint
+ value: "https://maestro-prod.westus2.cloudapp.azure.com"
+ - name: MaestroApiAccessToken
+ value: $(MaestroAccessToken)
+ - name: MaestroApiVersion
+ value: "2019-01-16"
- SourceLinkCLIVersion: 3.0.0
- SymbolToolVersion: 1.0.1
+ - name: SourceLinkCLIVersion
+ value: 3.0.0
+ - name: SymbolToolVersion
+ value: 1.0.1
diff --git a/eng/common/templates/post-build/darc-gather-drop.yml b/eng/common/templates/post-build/darc-gather-drop.yml
new file mode 100644
index 00000000000..f4e3bfcf5cd
--- /dev/null
+++ b/eng/common/templates/post-build/darc-gather-drop.yml
@@ -0,0 +1,23 @@
+parameters:
+ ChannelId: 0
+
+jobs:
+- job: gatherDrop
+ displayName: Gather Drop
+ dependsOn: setupMaestroVars
+ condition: contains(dependencies.setupMaestroVars.outputs['setReleaseVars.InitialChannels'], ${{ parameters.ChannelId }})
+ variables:
+ - name: BARBuildId
+ value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.BARBuildId'] ]
+ pool:
+ vmImage: 'windows-2019'
+ steps:
+ - task: PowerShell@2
+ displayName: Darc gather-drop
+ inputs:
+ filePath: $(Build.SourcesDirectory)/eng/common/post-build/darc-gather-drop.ps1
+ arguments: -BarBuildId $(BARBuildId)
+ -DropLocation $(Agent.BuildDirectory)/Temp/Drop/
+ -MaestroApiAccessToken $(MaestroApiAccessToken)
+ -MaestroApiEndPoint $(MaestroApiEndPoint)
+ -MaestroApiVersion $(MaestroApiVersion)
diff --git a/eng/common/templates/post-build/post-build.yml b/eng/common/templates/post-build/post-build.yml
index 3d7e6776e62..0872db4ed94 100644
--- a/eng/common/templates/post-build/post-build.yml
+++ b/eng/common/templates/post-build/post-build.yml
@@ -2,15 +2,38 @@ parameters:
enableSourceLinkValidation: true
enableSigningValidation: true
enableSymbolValidation: true
+ enableNugetValidation: true
SDLValidationParameters:
enable: false
params: ''
+ # Which stages should finish execution before post-build stages start
+ dependsOn: [build]
+
stages:
- stage: validate
- dependsOn: build
+ dependsOn: ${{ parameters.dependsOn }}
displayName: Validate
jobs:
+ - ${{ if eq(parameters.enableNugetValidation, 'true') }}:
+ - job:
+ displayName: NuGet Validation
+ pool:
+ vmImage: 'windows-2019'
+ steps:
+ - task: DownloadBuildArtifacts@0
+ displayName: Download Package Artifacts
+ inputs:
+ buildType: current
+ artifactName: PackageArtifacts
+
+ - task: PowerShell@2
+ displayName: Validate
+ inputs:
+ filePath: $(Build.SourcesDirectory)/eng/common/post-build/nuget-validation.ps1
+ arguments: -PackagesPath $(Build.ArtifactStagingDirectory)/PackageArtifacts/
+ -ToolDestinationPath $(Agent.BuildDirectory)/Extract/
+
- ${{ if eq(parameters.enableSigningValidation, 'true') }}:
- job:
displayName: Signing Validation
diff --git a/eng/common/templates/post-build/promote-build.yml b/eng/common/templates/post-build/promote-build.yml
index 57241bab88f..9387c583b31 100644
--- a/eng/common/templates/post-build/promote-build.yml
+++ b/eng/common/templates/post-build/promote-build.yml
@@ -11,17 +11,15 @@ jobs:
value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.BARBuildId'] ]
- name: ChannelId
value: ${{ parameters.ChannelId }}
- - group: Publish-Build-Assets
pool:
vmImage: 'windows-2019'
steps:
- task: PowerShell@2
displayName: Add Build to Channel
inputs:
- targetType: inline
- script: |
- $headers = @{
- "Accept" = "application/json"
- "Authorization" = "Bearer $(MaestroAccessToken)"
- }
- Invoke-RestMethod -Method Post -Headers $headers -Uri https://maestro-prod.westus2.cloudapp.azure.com/api/channels/$(ChannelId)/builds/$(BARBuildId)?api-version=2019-01-16
+ filePath: $(Build.SourcesDirectory)/eng/common/post-build/promote-build.ps1
+ arguments: -BuildId $(BARBuildId)
+ -ChannelId $(ChannelId)
+ -MaestroApiAccessToken $(MaestroApiAccessToken)
+ -MaestroApiEndPoint $(MaestroApiEndPoint)
+ -MaestroApiVersion $(MaestroApiVersion)
diff --git a/eng/common/templates/post-build/setup-maestro-vars.yml b/eng/common/templates/post-build/setup-maestro-vars.yml
index f6120dc1e1c..56242b068e1 100644
--- a/eng/common/templates/post-build/setup-maestro-vars.yml
+++ b/eng/common/templates/post-build/setup-maestro-vars.yml
@@ -14,22 +14,5 @@ jobs:
name: setReleaseVars
displayName: Set Release Configs Vars
inputs:
- targetType: inline
- script: |
- # This is needed to make Write-PipelineSetVariable works in this context
- $ci = $true
-
- . "$(Build.SourcesDirectory)/eng/common/tools.ps1"
-
- $Content = Get-Content "$(Build.StagingDirectory)/ReleaseConfigs/ReleaseConfigs.txt"
-
- $BarId = $Content | Select -Index 0
-
- $Channels = ""
- $Content | Select -Index 1 | ForEach-Object { $Channels += "$_ ," }
-
- $IsStableBuild = $Content | Select -Index 2
-
- Write-PipelineSetVariable -Name 'BARBuildId' -Value $BarId
- Write-PipelineSetVariable -Name 'InitialChannels' -Value "$Channels"
- Write-PipelineSetVariable -Name 'IsStableBuild' -Value $IsStableBuild
+ filePath: $(Build.SourcesDirectory)/eng/common/post-build/setup-maestro-vars.ps1
+ arguments: -ReleaseConfigsPath '$(Build.StagingDirectory)/ReleaseConfigs/ReleaseConfigs.txt'
diff --git a/eng/common/templates/post-build/trigger-subscription.yml b/eng/common/templates/post-build/trigger-subscription.yml
new file mode 100644
index 00000000000..da669030daf
--- /dev/null
+++ b/eng/common/templates/post-build/trigger-subscription.yml
@@ -0,0 +1,13 @@
+parameters:
+ ChannelId: 0
+
+steps:
+- task: PowerShell@2
+ displayName: Triggering subscriptions
+ inputs:
+ filePath: $(Build.SourcesDirectory)/eng/common/post-build/trigger-subscriptions.ps1
+ arguments: -SourceRepo $(Build.Repository.Uri)
+ -ChannelId ${{ parameters.ChannelId }}
+ -MaestroApiAccessToken $(MaestroAccessToken)
+ -MaestroApiEndPoint $(MaestroApiEndPoint)
+ -MaestroApiVersion $(MaestroApiVersion)
diff --git a/eng/common/templates/steps/perf-send-to-helix.yml b/eng/common/templates/steps/perf-send-to-helix.yml
new file mode 100644
index 00000000000..b3ea9acf1f1
--- /dev/null
+++ b/eng/common/templates/steps/perf-send-to-helix.yml
@@ -0,0 +1,66 @@
+# Please remember to update the documentation if you make changes to these parameters!
+parameters:
+ HelixSource: 'pr/default' # required -- sources must start with pr/, official/, prodcon/, or agent/
+ HelixType: 'tests/default/' # required -- Helix telemetry which identifies what type of data this is; should include "test" for clarity and must end in '/'
+ HelixBuild: $(Build.BuildNumber) # required -- the build number Helix will use to identify this -- automatically set to the AzDO build number
+ HelixTargetQueues: '' # required -- semicolon delimited list of Helix queues to test on; see https://helix.dot.net/ for a list of queues
+ HelixAccessToken: '' # required -- access token to make Helix API requests; should be provided by the appropriate variable group
+ HelixPreCommands: '' # optional -- commands to run before Helix work item execution
+ HelixPostCommands: '' # optional -- commands to run after Helix work item execution
+ WorkItemDirectory: '' # optional -- a payload directory to zip up and send to Helix; requires WorkItemCommand; incompatible with XUnitProjects
+ CorrelationPayloadDirectory: '' # optional -- a directory to zip up and send to Helix as a correlation payload
+ IncludeDotNetCli: false # optional -- true will download a version of the .NET CLI onto the Helix machine as a correlation payload; requires DotNetCliPackageType and DotNetCliVersion
+ DotNetCliPackageType: '' # optional -- either 'sdk' or 'runtime'; determines whether the sdk or runtime will be sent to Helix; see https://raw.githubusercontent.com/dotnet/core/master/release-notes/releases.json
+ DotNetCliVersion: '' # optional -- version of the CLI to send to Helix; based on this: https://raw.githubusercontent.com/dotnet/core/master/release-notes/releases.json
+ EnableXUnitReporter: false # optional -- true enables XUnit result reporting to Mission Control
+ WaitForWorkItemCompletion: true # optional -- true will make the task wait until work items have been completed and fail the build if work items fail. False is "fire and forget."
+ Creator: '' # optional -- if the build is external, use this to specify who is sending the job
+ DisplayNamePrefix: 'Send job to Helix' # optional -- rename the beginning of the displayName of the steps in AzDO
+ condition: succeeded() # optional -- condition for step to execute; defaults to succeeded()
+ continueOnError: false # optional -- determines whether to continue the build if the step errors; defaults to false
+
+steps:
+ - powershell: $(Build.SourcesDirectory)\eng\common\msbuild.ps1 $(Build.SourcesDirectory)\eng\common\performance\perfhelixpublish.proj /restore /t:Test /bl:$(Build.SourcesDirectory)\artifacts\log\$env:BuildConfig\SendToHelix.binlog
+ displayName: ${{ parameters.DisplayNamePrefix }} (Windows)
+ env:
+ BuildConfig: $(_BuildConfig)
+ HelixSource: ${{ parameters.HelixSource }}
+ HelixType: ${{ parameters.HelixType }}
+ HelixBuild: ${{ parameters.HelixBuild }}
+ HelixTargetQueues: ${{ parameters.HelixTargetQueues }}
+ HelixAccessToken: ${{ parameters.HelixAccessToken }}
+ HelixPreCommands: ${{ parameters.HelixPreCommands }}
+ HelixPostCommands: ${{ parameters.HelixPostCommands }}
+ WorkItemDirectory: ${{ parameters.WorkItemDirectory }}
+ CorrelationPayloadDirectory: ${{ parameters.CorrelationPayloadDirectory }}
+ IncludeDotNetCli: ${{ parameters.IncludeDotNetCli }}
+ DotNetCliPackageType: ${{ parameters.DotNetCliPackageType }}
+ DotNetCliVersion: ${{ parameters.DotNetCliVersion }}
+ EnableXUnitReporter: ${{ parameters.EnableXUnitReporter }}
+ WaitForWorkItemCompletion: ${{ parameters.WaitForWorkItemCompletion }}
+ Creator: ${{ parameters.Creator }}
+ SYSTEM_ACCESSTOKEN: $(System.AccessToken)
+ condition: and(${{ parameters.condition }}, eq(variables['Agent.Os'], 'Windows_NT'))
+ continueOnError: ${{ parameters.continueOnError }}
+ - script: $BUILD_SOURCESDIRECTORY/eng/common/msbuild.sh $BUILD_SOURCESDIRECTORY/eng/common/performance/perfhelixpublish.proj /restore /t:Test /bl:$BUILD_SOURCESDIRECTORY/artifacts/log/$BuildConfig/SendToHelix.binlog
+ displayName: ${{ parameters.DisplayNamePrefix }} (Unix)
+ env:
+ BuildConfig: $(_BuildConfig)
+ HelixSource: ${{ parameters.HelixSource }}
+ HelixType: ${{ parameters.HelixType }}
+ HelixBuild: ${{ parameters.HelixBuild }}
+ HelixTargetQueues: ${{ parameters.HelixTargetQueues }}
+ HelixAccessToken: ${{ parameters.HelixAccessToken }}
+ HelixPreCommands: ${{ parameters.HelixPreCommands }}
+ HelixPostCommands: ${{ parameters.HelixPostCommands }}
+ WorkItemDirectory: ${{ parameters.WorkItemDirectory }}
+ CorrelationPayloadDirectory: ${{ parameters.CorrelationPayloadDirectory }}
+ IncludeDotNetCli: ${{ parameters.IncludeDotNetCli }}
+ DotNetCliPackageType: ${{ parameters.DotNetCliPackageType }}
+ DotNetCliVersion: ${{ parameters.DotNetCliVersion }}
+ EnableXUnitReporter: ${{ parameters.EnableXUnitReporter }}
+ WaitForWorkItemCompletion: ${{ parameters.WaitForWorkItemCompletion }}
+ Creator: ${{ parameters.Creator }}
+ SYSTEM_ACCESSTOKEN: $(System.AccessToken)
+ condition: and(${{ parameters.condition }}, ne(variables['Agent.Os'], 'Windows_NT'))
+ continueOnError: ${{ parameters.continueOnError }}
diff --git a/eng/common/tools.ps1 b/eng/common/tools.ps1
index 60741f03901..8fe2b11ad21 100644
--- a/eng/common/tools.ps1
+++ b/eng/common/tools.ps1
@@ -84,7 +84,7 @@ function Exec-Process([string]$command, [string]$commandArgs) {
return $global:LASTEXITCODE = $process.ExitCode
}
finally {
- # If we didn't finish then an error occured or the user hit ctrl-c. Either
+ # If we didn't finish then an error occurred or the user hit ctrl-c. Either
# way kill the process
if (-not $finished) {
$process.Kill()
@@ -147,7 +147,7 @@ function InitializeDotNetCli([bool]$install) {
# It also ensures that VS msbuild will use the downloaded sdk targets.
$env:PATH = "$dotnetRoot;$env:PATH"
- # Make Sure that our bootstrapped dotnet cli is avaliable in future steps of the Azure Pipelines build
+ # Make Sure that our bootstrapped dotnet cli is available in future steps of the Azure Pipelines build
Write-PipelinePrependPath -Path $dotnetRoot
Write-PipelineSetVariable -Name 'DOTNET_MULTILEVEL_LOOKUP' -Value '0'
Write-PipelineSetVariable -Name 'DOTNET_SKIP_FIRST_TIME_EXPERIENCE' -Value '1'
@@ -169,7 +169,7 @@ function InstallDotNetSdk([string] $dotnetRoot, [string] $version, [string] $arc
InstallDotNet $dotnetRoot $version $architecture
}
-function InstallDotNet([string] $dotnetRoot, [string] $version, [string] $architecture = "", [string] $runtime = "", [bool] $skipNonVersionedFiles = $false) { $installScript = GetDotNetInstallScript $dotnetRoot
+function InstallDotNet([string] $dotnetRoot, [string] $version, [string] $architecture = "", [string] $runtime = "", [bool] $skipNonVersionedFiles = $false) {
$installScript = GetDotNetInstallScript $dotnetRoot
$installParameters = @{
Version = $version
diff --git a/eng/common/tools.sh b/eng/common/tools.sh
old mode 100644
new mode 100755
index 70d92cf85aa..738bb5669da
--- a/eng/common/tools.sh
+++ b/eng/common/tools.sh
@@ -77,7 +77,7 @@ function ReadGlobalVersion {
local pattern="\"$key\" *: *\"(.*)\""
if [[ ! $line =~ $pattern ]]; then
- Write-PipelineTelemetryError -category 'InitializeTools' "Error: Cannot find \"$key\" in $global_json_file"
+ Write-PipelineTelemetryError -category 'InitializeToolset' "Error: Cannot find \"$key\" in $global_json_file"
ExitWithExitCode 1
fi
@@ -146,14 +146,10 @@ function InitializeDotNetCli {
# Add dotnet to PATH. This prevents any bare invocation of dotnet in custom
# build steps from using anything other than what we've downloaded.
- export PATH="$dotnet_root:$PATH"
+ Write-PipelinePrependPath -path "$dotnet_root"
- if [[ $ci == true ]]; then
- # Make Sure that our bootstrapped dotnet cli is available in future steps of the Azure Pipelines build
- echo "##vso[task.prependpath]$dotnet_root"
- echo "##vso[task.setvariable variable=DOTNET_MULTILEVEL_LOOKUP]0"
- echo "##vso[task.setvariable variable=DOTNET_SKIP_FIRST_TIME_EXPERIENCE]1"
- fi
+ Write-PipelineSetVariable -name "DOTNET_MULTILEVEL_LOOKUP" -value "0"
+ Write-PipelineSetVariable -name "DOTNET_SKIP_FIRST_TIME_EXPERIENCE" -value "1"
# return value
_InitializeDotNetCli="$dotnet_root"
@@ -249,7 +245,7 @@ function InitializeNativeTools() {
then
local nativeArgs=""
if [[ "$ci" == true ]]; then
- nativeArgs="-InstallDirectory $tools_dir"
+ nativeArgs="--installDirectory $tools_dir"
fi
"$_script_dir/init-tools-native.sh" $nativeArgs
fi
@@ -387,7 +383,8 @@ mkdir -p "$toolset_dir"
mkdir -p "$temp_dir"
mkdir -p "$log_dir"
-if [[ $ci == true ]]; then
- export TEMP="$temp_dir"
- export TMP="$temp_dir"
-fi
+Write-PipelineSetVariable -name "Artifacts" -value "$artifacts_dir"
+Write-PipelineSetVariable -name "Artifacts.Toolset" -value "$toolset_dir"
+Write-PipelineSetVariable -name "Artifacts.Log" -value "$log_dir"
+Write-PipelineSetVariable -name "Temp" -value "$temp_dir"
+Write-PipelineSetVariable -name "TMP" -value "$temp_dir"
diff --git a/eng/configure-toolset.ps1 b/eng/configure-toolset.ps1
index eae6468189c..bb0244b3841 100644
--- a/eng/configure-toolset.ps1
+++ b/eng/configure-toolset.ps1
@@ -26,4 +26,4 @@ if ($ci) {
# Always generate binary logs
$binaryLog = $true
$DoNotAbortNativeToolsInstallationOnFailure = $true
-
+$DoNotDisplayNativeToolsInstallationWarnings =$true
diff --git a/eng/pipeline.yml b/eng/pipeline.yml
index f63502e41f0..ab7baa07b54 100644
--- a/eng/pipeline.yml
+++ b/eng/pipeline.yml
@@ -4,10 +4,6 @@
#
parameters:
- # Needed because agent pool can't be read from a user-defined variable (Azure DevOps limitation)
- # Defaults to dotnet-internal-vs2019-preview
- agentPool: dotnet-internal-vs2019-preview
-
# Needed because runAsPublic is used in template expressions, which can't read from user-defined variables
# Defaults to true
runAsPublic: true
@@ -27,7 +23,15 @@ jobs:
jobs:
- job: Windows_NT
timeoutInMinutes: 120 # how long to run the job before automatically cancelling; see https://github.com/dotnet/wpf/issues/952
- pool: ${{ parameters.agentPool }}
+ pool:
+ # For public or PR jobs, use the hosted pool. For internal jobs use the internal pool.
+ # Will eventually change this to two BYOC pools.
+ ${{ if or(eq(variables['System.TeamProject'], 'public'), in(variables['Build.Reason'], 'PullRequest')) }}:
+ name: NetCorePublic-Pool
+ queue: BuildPool.Windows.10.Amd64.VS2019.Pre.Open
+ ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
+ name: NetCoreInternal-Pool
+ queue: BuildPool.Windows.10.Amd64.VS2019.Pre
variables:
# needed for signing
- name: _TeamName
@@ -50,6 +54,8 @@ jobs:
value: x86
- name: _PlatformArgs
value: /p:Platform=$(_Platform)
+ - name: _PublicBuildPipeline # We will run Helix tests when building in the open, but do not repeat when building and publishing again using the internal build-pipeline
+ value: true
- name: _TestHelixAgentPool
value: 'Windows.10.Amd64.ClientRS5.Open' # Preferred:'Windows.10.Amd64.Open%3bWindows.7.Amd64.Open%3bWindows.10.Amd64.ClientRS5.Open'; See https://github.com/dotnet/wpf/issues/952
- name: _HelixStagingDir
@@ -60,8 +66,7 @@ jobs:
value: ''
- name: _HelixCreator
value: ${{ parameters.repoName }}
- - name: _HelixPublicBuildPipeline # Run Helix tests when building in the open, do not repeat when building and publishign again using the internal build-pipeline
- value: true
+
# Override some values if we're building internally
- ${{ if eq(parameters.runAsPublic, 'false') }}:
@@ -93,6 +98,8 @@ jobs:
/p:DotNetSymbolServerTokenSymWeb=$(symweb-symbol-server-pat)
- name: _OfficialBuildIdArgs
value: /p:OfficialBuildId=$(BUILD.BUILDNUMBER)
+ - name: _PublicBuildPipeline
+ value: false
- name: _HelixSource
value: official/${{ parameters.repoName }}/$(Build.SourceBranch)
- name: _HelixToken
@@ -101,8 +108,7 @@ jobs:
value: '' #if _HelixToken is set, Creator must be empty
- name: _TestHelixAgentPool
value: 'Windows.10.Amd64.ClientRS5' # Preferred: 'Windows.10.Amd64%3bWindows.7.Amd64%3bWindows.10.Amd64.ClientRS5'
- - name: _HelixPublicBuildPipeline
- value: false
+
strategy:
matrix:
Build_Debug_x86:
@@ -140,6 +146,12 @@ jobs:
$(_OfficialBuildIdArgs)
$(_PlatformArgs)
displayName: Windows Build / Publish
+ # This condition should be kept in sync with the condition for 'Run DRTs' step
+ # When building on a regular pipeline (!_HelixPipeline), build as usual
+ # When building on a Helix pipeline, only build Release configs
+ # (!_HelixPipeline) ||
+ # (_HelixPipeline && _PublicBuildPipeline && _ContinuousIntegrationTestsEnabled && _BuildConfig == Release)
+ condition: or(ne(variables['_HelixPipeline'], 'true'), and(eq(variables['_HelixPipeline'], 'true') ,eq(variables['_BuildConfig'], 'Release'), eq(variables['_PublicBuildPipeline'], 'true'), eq(variables['_ContinuousIntegrationTestsEnabled'], 'true')))
# Run DRTs
- powershell: eng\common\cibuild.cmd
@@ -157,4 +169,10 @@ jobs:
HelixAccessToken: $(_HelixToken) # only defined for internal CI
Creator: $(_HelixCreator)
SYSTEM_ACCESSTOKEN: $(System.AccessToken)
- condition: and(succeeded(), eq(variables['_BuildConfig'], 'Release'), eq(variables['_HelixPublicBuildPipeline'], 'true')) # on helix machine (with real signing) when running on the public build pipeline
+ # This condition should be kept in sync with the condition for cibuild.cmd step with displayName: "Windows Build / Publish"
+ # Only run ...
+ # ...When building on a Helix pipeline, only build Release configs
+ #
+ # (_HelixPipeline && _PublicBuildPipeline && _ContinuousIntegrationTestsEnabled && _BuildConfig == Release)
+ #
+ condition: and(succeeded(), eq(variables['_HelixPipeline'], 'true') ,eq(variables['_BuildConfig'], 'Release'), eq(variables['_PublicBuildPipeline'], 'true'), eq(variables['_ContinuousIntegrationTestsEnabled'], 'true'))
diff --git a/global.json b/global.json
index f4dfe1d1a41..6ff6583ece5 100644
--- a/global.json
+++ b/global.json
@@ -12,13 +12,13 @@
}
},
"msbuild-sdks": {
- "Microsoft.DotNet.Arcade.Sdk": "1.0.0-beta.19326.23",
- "Microsoft.DotNet.Helix.Sdk": "2.0.0-beta.19326.23"
+ "Microsoft.DotNet.Arcade.Sdk": "1.0.0-beta.19378.1",
+ "Microsoft.DotNet.Helix.Sdk": "2.0.0-beta.19378.1"
},
"native-tools": {
"strawberry-perl": "5.28.1.1-1",
"net-framework-48-ref-assemblies": "0.0.0.1",
"dotnet-api-docs_netcoreapp3.0": "0.0.0.1",
- "msvcurt-c1xx": "0.0.0.4"
+ "msvcurt-c1xx": "0.0.0.6"
}
}
diff --git a/packaging/Microsoft.Dotnet.Wpf.ProjectTemplates/content/WpfApplication-CSharp/.template.config/template.json b/packaging/Microsoft.Dotnet.Wpf.ProjectTemplates/content/WpfApplication-CSharp/.template.config/template.json
index 0a16e0681e6..7de4edc5be9 100644
--- a/packaging/Microsoft.Dotnet.Wpf.ProjectTemplates/content/WpfApplication-CSharp/.template.config/template.json
+++ b/packaging/Microsoft.Dotnet.Wpf.ProjectTemplates/content/WpfApplication-CSharp/.template.config/template.json
@@ -59,6 +59,10 @@
{
"condition": "(HostIdentifier != \"dotnetcli\" && HostIdentifier != \"dotnetcli-preview\")",
"path": "MainWindow.xaml.cs"
+ },
+ {
+ "condition": "(HostIdentifier != \"dotnetcli\" && HostIdentifier != \"dotnetcli-preview\")",
+ "path": "MainWindow.xaml"
}
],
"defaultName": "WpfApp1",
@@ -74,11 +78,11 @@
},
{
"condition": "(HostIdentifier != \"dotnetcli\" && HostIdentifier != \"dotnetcli-preview\")",
- "description": "Opens MainWindow.xaml.cs in the editor",
+ "description": "Opens MainWindow.xaml in the editor",
"manualInstructions": [ ],
"actionId": "84C0DA21-51C8-4541-9940-6CA19AF04EE6",
"args": {
- "files": "1"
+ "files": "1;2"
},
"continueOnError": true
}
diff --git a/packaging/Microsoft.Dotnet.Wpf.ProjectTemplates/content/WpfApplication-VisualBasic/.template.config/template.json b/packaging/Microsoft.Dotnet.Wpf.ProjectTemplates/content/WpfApplication-VisualBasic/.template.config/template.json
index 32591b70599..d0697fd107c 100644
--- a/packaging/Microsoft.Dotnet.Wpf.ProjectTemplates/content/WpfApplication-VisualBasic/.template.config/template.json
+++ b/packaging/Microsoft.Dotnet.Wpf.ProjectTemplates/content/WpfApplication-VisualBasic/.template.config/template.json
@@ -59,6 +59,10 @@
{
"condition": "(HostIdentifier != \"dotnetcli\" && HostIdentifier != \"dotnetcli-preview\")",
"path": "MainWindow.xaml.vb"
+ },
+ {
+ "condition": "(HostIdentifier != \"dotnetcli\" && HostIdentifier != \"dotnetcli-preview\")",
+ "path": "MainWindow.xaml"
}
],
"defaultName": "WpfApp1",
@@ -74,11 +78,11 @@
},
{
"condition": "(HostIdentifier != \"dotnetcli\" && HostIdentifier != \"dotnetcli-preview\")",
- "description": "Opens MainWindow.xaml.vb in the editor",
+ "description": "Opens MainWindow.xaml in the editor",
"manualInstructions": [ ],
"actionId": "84C0DA21-51C8-4541-9940-6CA19AF04EE6",
"args": {
- "files": "1"
+ "files": "1;2"
},
"continueOnError": true
}
diff --git a/packaging/Microsoft.Dotnet.Wpf.ProjectTemplates/content/WpfClassLibrary-CSharp/.template.config/dotnetcli.host.json b/packaging/Microsoft.Dotnet.Wpf.ProjectTemplates/content/WpfClassLibrary-CSharp/.template.config/dotnetcli.host.json
new file mode 100644
index 00000000000..22ab4a3929f
--- /dev/null
+++ b/packaging/Microsoft.Dotnet.Wpf.ProjectTemplates/content/WpfClassLibrary-CSharp/.template.config/dotnetcli.host.json
@@ -0,0 +1,24 @@
+{
+ "$schema": "http://json.schemastore.org/dotnetcli.host",
+ "symbolInfo": {
+ "TargetFrameworkOverride": {
+ "isHidden": "true",
+ "longName": "target-framework-override",
+ "shortName": ""
+ },
+ "Framework": {
+ "longName": "framework"
+ },
+ "skipRestore": {
+ "longName": "no-restore",
+ "shortName": ""
+ },
+ "langVersion": {
+ "longName": "langVersion",
+ "shortName": ""
+ }
+ },
+ "usageExamples": [
+ ""
+ ]
+}
diff --git a/packaging/Microsoft.Dotnet.Wpf.ProjectTemplates/content/WpfClassLibrary-CSharp/.template.config/template.json b/packaging/Microsoft.Dotnet.Wpf.ProjectTemplates/content/WpfClassLibrary-CSharp/.template.config/template.json
new file mode 100644
index 00000000000..59493288a3e
--- /dev/null
+++ b/packaging/Microsoft.Dotnet.Wpf.ProjectTemplates/content/WpfClassLibrary-CSharp/.template.config/template.json
@@ -0,0 +1,86 @@
+{
+ "$schema": "http://json.schemastore.org/template",
+ "author": "Microsoft",
+ "classifications": ["Common", "WPF"],
+ "name": "WPF Class library",
+ "generatorVersions": "[1.0.0.0-*)",
+ "description": "A project for creating a class library that targets a .NET Core WPF Application",
+ "groupIdentity": "Microsoft.Common.WPF.Library",
+ "precedence": "3000",
+ "identity": "Microsoft.Common.WPF.Library.CSharp.3.0",
+ "shortName": "wpflib",
+ "tags": {
+ "language": "C#",
+ "type": "project"
+ },
+ "sourceName": "Company.ClassLibrary1",
+ "preferNameDirectory": true,
+ "symbols": {
+ "TargetFrameworkOverride": {
+ "type": "parameter",
+ "description": "Overrides the target framework",
+ "replaces": "TargetFrameworkOverride",
+ "datatype": "string",
+ "defaultValue": ""
+ },
+ "Framework": {
+ "type": "parameter",
+ "description": "The target framework for the project.",
+ "datatype": "choice",
+ "choices": [
+ {
+ "choice": "netcoreapp3.0",
+ "description": "Target netcoreapp3.0"
+ }
+ ],
+ "replaces": "netcoreapp3.0",
+ "defaultValue": "netcoreapp3.0"
+ },
+ "langVersion": {
+ "type": "parameter",
+ "datatype": "text",
+ "description": "Sets langVersion in the created project file",
+ "defaultValue": "",
+ "replaces": "$(ProjectLanguageVersion)"
+ },
+ "HostIdentifier": {
+ "type": "bind",
+ "binding": "HostIdentifier"
+ },
+ "skipRestore": {
+ "type": "parameter",
+ "datatype": "bool",
+ "description": "If specified, skips the automatic restore of the project on create.",
+ "defaultValue": "false"
+ }
+ },
+ "primaryOutputs": [
+ { "path": "Company.ClassLibrary1.csproj" },
+ {
+ "condition": "(HostIdentifier != \"dotnetcli\" && HostIdentifier != \"dotnetcli-preview\")",
+ "path": "Class1.cs"
+ }
+ ],
+ "defaultName": "WpfLibrary1",
+ "postActions": [
+ {
+ "condition": "(!skipRestore)",
+ "description": "Restore NuGet packages required by this project.",
+ "manualInstructions": [
+ { "text": "Run 'dotnet restore'" }
+ ],
+ "actionId": "210D431B-A78B-4D2F-B762-4ED3E3EA9025",
+ "continueOnError": true
+ },
+ {
+ "condition": "(HostIdentifier != \"dotnetcli\" && HostIdentifier != \"dotnetcli-preview\")",
+ "description": "Opens Class1.cs in the editor",
+ "manualInstructions": [ ],
+ "actionId": "84C0DA21-51C8-4541-9940-6CA19AF04EE6",
+ "args": {
+ "files": "1"
+ },
+ "continueOnError": true
+ }
+ ]
+}
diff --git a/packaging/Microsoft.Dotnet.Wpf.ProjectTemplates/content/WpfClassLibrary-CSharp/Class1.cs b/packaging/Microsoft.Dotnet.Wpf.ProjectTemplates/content/WpfClassLibrary-CSharp/Class1.cs
new file mode 100644
index 00000000000..d9f25017aee
--- /dev/null
+++ b/packaging/Microsoft.Dotnet.Wpf.ProjectTemplates/content/WpfClassLibrary-CSharp/Class1.cs
@@ -0,0 +1,8 @@
+using System;
+
+namespace Company.ClassLibrary1
+{
+ public class Class1
+ {
+ }
+}
diff --git a/packaging/Microsoft.Dotnet.Wpf.ProjectTemplates/content/WpfClassLibrary-CSharp/Company.ClassLibrary1.csproj b/packaging/Microsoft.Dotnet.Wpf.ProjectTemplates/content/WpfClassLibrary-CSharp/Company.ClassLibrary1.csproj
new file mode 100644
index 00000000000..65ea6278ce5
--- /dev/null
+++ b/packaging/Microsoft.Dotnet.Wpf.ProjectTemplates/content/WpfClassLibrary-CSharp/Company.ClassLibrary1.csproj
@@ -0,0 +1,11 @@
+
+
+
+ netcoreapp3.0
+ TargetFrameworkOverride
+ Company.ClassLibrary1
+ $(ProjectLanguageVersion)
+ true
+
+
+
diff --git a/packaging/Microsoft.Dotnet.Wpf.ProjectTemplates/content/WpfClassLibrary-VisualBasic/.template.config/dotnetcli.host.json b/packaging/Microsoft.Dotnet.Wpf.ProjectTemplates/content/WpfClassLibrary-VisualBasic/.template.config/dotnetcli.host.json
new file mode 100644
index 00000000000..22ab4a3929f
--- /dev/null
+++ b/packaging/Microsoft.Dotnet.Wpf.ProjectTemplates/content/WpfClassLibrary-VisualBasic/.template.config/dotnetcli.host.json
@@ -0,0 +1,24 @@
+{
+ "$schema": "http://json.schemastore.org/dotnetcli.host",
+ "symbolInfo": {
+ "TargetFrameworkOverride": {
+ "isHidden": "true",
+ "longName": "target-framework-override",
+ "shortName": ""
+ },
+ "Framework": {
+ "longName": "framework"
+ },
+ "skipRestore": {
+ "longName": "no-restore",
+ "shortName": ""
+ },
+ "langVersion": {
+ "longName": "langVersion",
+ "shortName": ""
+ }
+ },
+ "usageExamples": [
+ ""
+ ]
+}
diff --git a/packaging/Microsoft.Dotnet.Wpf.ProjectTemplates/content/WpfClassLibrary-VisualBasic/.template.config/template.json b/packaging/Microsoft.Dotnet.Wpf.ProjectTemplates/content/WpfClassLibrary-VisualBasic/.template.config/template.json
new file mode 100644
index 00000000000..db146b70b98
--- /dev/null
+++ b/packaging/Microsoft.Dotnet.Wpf.ProjectTemplates/content/WpfClassLibrary-VisualBasic/.template.config/template.json
@@ -0,0 +1,86 @@
+{
+ "$schema": "http://json.schemastore.org/template",
+ "author": "Microsoft",
+ "classifications": ["Common", "WPF"],
+ "name": "WPF Class library",
+ "generatorVersions": "[1.0.0.0-*)",
+ "description": "A project for creating a class library that targets a .NET Core WPF Application",
+ "groupIdentity": "Microsoft.Common.WPF.Library",
+ "precedence": "3000",
+ "identity": "Microsoft.Common.WPF.Library.VisualBasic.3.0",
+ "shortName": "wpflib",
+ "tags": {
+ "language": "VB",
+ "type": "project"
+ },
+ "sourceName": "Company.ClassLibrary1",
+ "preferNameDirectory": true,
+ "symbols": {
+ "TargetFrameworkOverride": {
+ "type": "parameter",
+ "description": "Overrides the target framework",
+ "replaces": "TargetFrameworkOverride",
+ "datatype": "string",
+ "defaultValue": ""
+ },
+ "Framework": {
+ "type": "parameter",
+ "description": "The target framework for the project.",
+ "datatype": "choice",
+ "choices": [
+ {
+ "choice": "netcoreapp3.0",
+ "description": "Target netcoreapp3.0"
+ }
+ ],
+ "replaces": "netcoreapp3.0",
+ "defaultValue": "netcoreapp3.0"
+ },
+ "langVersion": {
+ "type": "parameter",
+ "datatype": "text",
+ "description": "Sets langVersion in the created project file",
+ "defaultValue": "",
+ "replaces": "$(ProjectLanguageVersion)"
+ },
+ "HostIdentifier": {
+ "type": "bind",
+ "binding": "HostIdentifier"
+ },
+ "skipRestore": {
+ "type": "parameter",
+ "datatype": "bool",
+ "description": "If specified, skips the automatic restore of the project on create.",
+ "defaultValue": "false"
+ }
+ },
+ "primaryOutputs": [
+ { "path": "Company.ClassLibrary1.csproj" },
+ {
+ "condition": "(HostIdentifier != \"dotnetcli\" && HostIdentifier != \"dotnetcli-preview\")",
+ "path": "Class1.vb"
+ }
+ ],
+ "defaultName": "WpfLibrary1",
+ "postActions": [
+ {
+ "condition": "(!skipRestore)",
+ "description": "Restore NuGet packages required by this project.",
+ "manualInstructions": [
+ { "text": "Run 'dotnet restore'" }
+ ],
+ "actionId": "210D431B-A78B-4D2F-B762-4ED3E3EA9025",
+ "continueOnError": true
+ },
+ {
+ "condition": "(HostIdentifier != \"dotnetcli\" && HostIdentifier != \"dotnetcli-preview\")",
+ "description": "Opens Class1.cs in the editor",
+ "manualInstructions": [ ],
+ "actionId": "84C0DA21-51C8-4541-9940-6CA19AF04EE6",
+ "args": {
+ "files": "1"
+ },
+ "continueOnError": true
+ }
+ ]
+}
diff --git a/packaging/Microsoft.Dotnet.Wpf.ProjectTemplates/content/WpfClassLibrary-VisualBasic/Class1.vb b/packaging/Microsoft.Dotnet.Wpf.ProjectTemplates/content/WpfClassLibrary-VisualBasic/Class1.vb
new file mode 100644
index 00000000000..701656126aa
--- /dev/null
+++ b/packaging/Microsoft.Dotnet.Wpf.ProjectTemplates/content/WpfClassLibrary-VisualBasic/Class1.vb
@@ -0,0 +1,3 @@
+Public Class Class1
+
+End Class
diff --git a/packaging/Microsoft.Dotnet.Wpf.ProjectTemplates/content/WpfClassLibrary-VisualBasic/Company.ClassLibrary1.vbproj b/packaging/Microsoft.Dotnet.Wpf.ProjectTemplates/content/WpfClassLibrary-VisualBasic/Company.ClassLibrary1.vbproj
new file mode 100644
index 00000000000..5222ae5dcde
--- /dev/null
+++ b/packaging/Microsoft.Dotnet.Wpf.ProjectTemplates/content/WpfClassLibrary-VisualBasic/Company.ClassLibrary1.vbproj
@@ -0,0 +1,12 @@
+
+
+
+ Company.ClassLibrary1
+ netcoreapp3.0
+ TargetFrameworkOverride
+ Company.ClassLibrary1
+ $(ProjectLanguageVersion)
+ true
+
+
+
diff --git a/packaging/Microsoft.Dotnet.Wpf.ProjectTemplates/content/WpfCustomControlLibrary-CSharp/.template.config/dotnetcli.host.json b/packaging/Microsoft.Dotnet.Wpf.ProjectTemplates/content/WpfCustomControlLibrary-CSharp/.template.config/dotnetcli.host.json
new file mode 100644
index 00000000000..22ab4a3929f
--- /dev/null
+++ b/packaging/Microsoft.Dotnet.Wpf.ProjectTemplates/content/WpfCustomControlLibrary-CSharp/.template.config/dotnetcli.host.json
@@ -0,0 +1,24 @@
+{
+ "$schema": "http://json.schemastore.org/dotnetcli.host",
+ "symbolInfo": {
+ "TargetFrameworkOverride": {
+ "isHidden": "true",
+ "longName": "target-framework-override",
+ "shortName": ""
+ },
+ "Framework": {
+ "longName": "framework"
+ },
+ "skipRestore": {
+ "longName": "no-restore",
+ "shortName": ""
+ },
+ "langVersion": {
+ "longName": "langVersion",
+ "shortName": ""
+ }
+ },
+ "usageExamples": [
+ ""
+ ]
+}
diff --git a/packaging/Microsoft.Dotnet.Wpf.ProjectTemplates/content/WpfCustomControlLibrary-CSharp/.template.config/template.json b/packaging/Microsoft.Dotnet.Wpf.ProjectTemplates/content/WpfCustomControlLibrary-CSharp/.template.config/template.json
new file mode 100644
index 00000000000..e0fbadfac7a
--- /dev/null
+++ b/packaging/Microsoft.Dotnet.Wpf.ProjectTemplates/content/WpfCustomControlLibrary-CSharp/.template.config/template.json
@@ -0,0 +1,86 @@
+{
+ "$schema": "http://json.schemastore.org/template",
+ "author": "Microsoft",
+ "classifications": ["Common", "WPF"],
+ "name": "WPF Custom Control Library",
+ "generatorVersions": "[1.0.0.0-*)",
+ "description": "A project for creating a custom control library for .NET Core WPF Applications",
+ "groupIdentity": "Microsoft.Common.WPF.CustomControl",
+ "precedence": "3000",
+ "identity": "Microsoft.Common.WPF.CustomControl.CSharp.3.0",
+ "shortName": "wpfcustomcontrollib",
+ "tags": {
+ "language": "C#",
+ "type": "project"
+ },
+ "sourceName": "Company.WpfCustomControlLibrary",
+ "preferNameDirectory": true,
+ "symbols": {
+ "TargetFrameworkOverride": {
+ "type": "parameter",
+ "description": "Overrides the target framework",
+ "replaces": "TargetFrameworkOverride",
+ "datatype": "string",
+ "defaultValue": ""
+ },
+ "Framework": {
+ "type": "parameter",
+ "description": "The target framework for the project.",
+ "datatype": "choice",
+ "choices": [
+ {
+ "choice": "netcoreapp3.0",
+ "description": "Target netcoreapp3.0"
+ }
+ ],
+ "replaces": "netcoreapp3.0",
+ "defaultValue": "netcoreapp3.0"
+ },
+ "langVersion": {
+ "type": "parameter",
+ "datatype": "text",
+ "description": "Sets langVersion in the created project file",
+ "defaultValue": "",
+ "replaces": "$(ProjectLanguageVersion)"
+ },
+ "HostIdentifier": {
+ "type": "bind",
+ "binding": "HostIdentifier"
+ },
+ "skipRestore": {
+ "type": "parameter",
+ "datatype": "bool",
+ "description": "If specified, skips the automatic restore of the project on create.",
+ "defaultValue": "false"
+ }
+ },
+ "primaryOutputs": [
+ { "path": "Company.WpfCustomControlLibrary.csproj" },
+ {
+ "condition": "(HostIdentifier != \"dotnetcli\" && HostIdentifier != \"dotnetcli-preview\")",
+ "path": "CustomControl1.cs"
+ }
+ ],
+ "defaultName": "WpfCustomControlLibrary1",
+ "postActions": [
+ {
+ "condition": "(!skipRestore)",
+ "description": "Restore NuGet packages required by this project.",
+ "manualInstructions": [
+ { "text": "Run 'dotnet restore'" }
+ ],
+ "actionId": "210D431B-A78B-4D2F-B762-4ED3E3EA9025",
+ "continueOnError": true
+ },
+ {
+ "condition": "(HostIdentifier != \"dotnetcli\" && HostIdentifier != \"dotnetcli-preview\")",
+ "description": "Opens CustomControl1.cs in the editor",
+ "manualInstructions": [ ],
+ "actionId": "84C0DA21-51C8-4541-9940-6CA19AF04EE6",
+ "args": {
+ "files": "1"
+ },
+ "continueOnError": true
+ }
+ ]
+}
diff --git a/packaging/Microsoft.Dotnet.Wpf.ProjectTemplates/content/WpfCustomControlLibrary-CSharp/AssemblyInfo.cs b/packaging/Microsoft.Dotnet.Wpf.ProjectTemplates/content/WpfCustomControlLibrary-CSharp/AssemblyInfo.cs
new file mode 100644
index 00000000000..3c50569420d
--- /dev/null
+++ b/packaging/Microsoft.Dotnet.Wpf.ProjectTemplates/content/WpfCustomControlLibrary-CSharp/AssemblyInfo.cs
@@ -0,0 +1,10 @@
+using System.Windows;
+
+[assembly:ThemeInfo(
+ ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located
+ //(used if a resource is not found in the page,
+ // or application resource dictionaries)
+ ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located
+ //(used if a resource is not found in the page,
+ // app, or any theme specific resource dictionaries)
+)]
diff --git a/packaging/Microsoft.Dotnet.Wpf.ProjectTemplates/content/WpfCustomControlLibrary-CSharp/Company.WpfCustomControlLibrary.csproj b/packaging/Microsoft.Dotnet.Wpf.ProjectTemplates/content/WpfCustomControlLibrary-CSharp/Company.WpfCustomControlLibrary.csproj
new file mode 100644
index 00000000000..e01c8a1a755
--- /dev/null
+++ b/packaging/Microsoft.Dotnet.Wpf.ProjectTemplates/content/WpfCustomControlLibrary-CSharp/Company.WpfCustomControlLibrary.csproj
@@ -0,0 +1,11 @@
+
+
+
+ netcoreapp3.0
+ TargetFrameworkOverride
+ Company.WpfCustomControlLibrary
+ $(ProjectLanguageVersion)
+ true
+
+
+
diff --git a/packaging/Microsoft.Dotnet.Wpf.ProjectTemplates/content/WpfCustomControlLibrary-CSharp/CustomControl1.cs b/packaging/Microsoft.Dotnet.Wpf.ProjectTemplates/content/WpfCustomControlLibrary-CSharp/CustomControl1.cs
new file mode 100644
index 00000000000..68361700126
--- /dev/null
+++ b/packaging/Microsoft.Dotnet.Wpf.ProjectTemplates/content/WpfCustomControlLibrary-CSharp/CustomControl1.cs
@@ -0,0 +1,54 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Data;
+using System.Windows.Documents;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Imaging;
+using System.Windows.Navigation;
+using System.Windows.Shapes;
+
+namespace Company.WpfCustomControlLibrary
+{
+ ///
+ /// Follow steps 1a or 1b and then 2 to use this custom control in a XAML file.
+ ///
+ /// Step 1a) Using this custom control in a XAML file that exists in the current project.
+ /// Add this XmlNamespace attribute to the root element of the markup file where it is
+ /// to be used:
+ ///
+ /// xmlns:MyNamespace="clr-namespace:Company.WpfCustomControlLibrary"
+ ///
+ ///
+ /// Step 1b) Using this custom control in a XAML file that exists in a different project.
+ /// Add this XmlNamespace attribute to the root element of the markup file where it is
+ /// to be used:
+ ///
+ /// xmlns:MyNamespace="clr-namespace:Company.WpfCustomControlLibrary;assembly=Company.WpfCustomControlLibrary"
+ ///
+ /// You will also need to add a project reference from the project where the XAML file lives
+ /// to this project and Rebuild to avoid compilation errors:
+ ///
+ /// Right click on the target project in the Solution Explorer and
+ /// "Add Reference"->"Projects"->[Select this project]
+ ///
+ ///
+ /// Step 2)
+ /// Go ahead and use your control in the XAML file.
+ ///
+ ///
+ ///
+ ///
+ public class CustomControl1 : Control
+ {
+ static CustomControl1()
+ {
+ DefaultStyleKeyProperty.OverrideMetadata(typeof(CustomControl1), new FrameworkPropertyMetadata(typeof(CustomControl1)));
+ }
+ }
+}
diff --git a/packaging/Microsoft.Dotnet.Wpf.ProjectTemplates/content/WpfCustomControlLibrary-CSharp/Themes/Generic.xaml b/packaging/Microsoft.Dotnet.Wpf.ProjectTemplates/content/WpfCustomControlLibrary-CSharp/Themes/Generic.xaml
new file mode 100644
index 00000000000..35c5325ad87
--- /dev/null
+++ b/packaging/Microsoft.Dotnet.Wpf.ProjectTemplates/content/WpfCustomControlLibrary-CSharp/Themes/Generic.xaml
@@ -0,0 +1,17 @@
+
+
+
diff --git a/packaging/Microsoft.Dotnet.Wpf.ProjectTemplates/content/WpfCustomControlLibrary-VisualBasic/.template.config/dotnetcli.host.json b/packaging/Microsoft.Dotnet.Wpf.ProjectTemplates/content/WpfCustomControlLibrary-VisualBasic/.template.config/dotnetcli.host.json
new file mode 100644
index 00000000000..22ab4a3929f
--- /dev/null
+++ b/packaging/Microsoft.Dotnet.Wpf.ProjectTemplates/content/WpfCustomControlLibrary-VisualBasic/.template.config/dotnetcli.host.json
@@ -0,0 +1,24 @@
+{
+ "$schema": "http://json.schemastore.org/dotnetcli.host",
+ "symbolInfo": {
+ "TargetFrameworkOverride": {
+ "isHidden": "true",
+ "longName": "target-framework-override",
+ "shortName": ""
+ },
+ "Framework": {
+ "longName": "framework"
+ },
+ "skipRestore": {
+ "longName": "no-restore",
+ "shortName": ""
+ },
+ "langVersion": {
+ "longName": "langVersion",
+ "shortName": ""
+ }
+ },
+ "usageExamples": [
+ ""
+ ]
+}
diff --git a/packaging/Microsoft.Dotnet.Wpf.ProjectTemplates/content/WpfCustomControlLibrary-VisualBasic/.template.config/template.json b/packaging/Microsoft.Dotnet.Wpf.ProjectTemplates/content/WpfCustomControlLibrary-VisualBasic/.template.config/template.json
new file mode 100644
index 00000000000..a9d1c4b8a0b
--- /dev/null
+++ b/packaging/Microsoft.Dotnet.Wpf.ProjectTemplates/content/WpfCustomControlLibrary-VisualBasic/.template.config/template.json
@@ -0,0 +1,86 @@
+{
+ "$schema": "http://json.schemastore.org/template",
+ "author": "Microsoft",
+ "classifications": ["Common", "WPF"],
+ "name": "WPF Custom Control Library",
+ "generatorVersions": "[1.0.0.0-*)",
+ "description": "A project for creating a custom control library for .NET Core WPF Applications",
+ "groupIdentity": "Microsoft.Common.WPF.CustomControl",
+ "precedence": "3000",
+ "identity": "Microsoft.Common.WPF.CustomControl.VisualBasic.3.0",
+ "shortName": "wpfcustomcontrollib",
+ "tags": {
+ "language": "VB",
+ "type": "project"
+ },
+ "sourceName": "Company.WpfCustomControlLibrary",
+ "preferNameDirectory": true,
+ "symbols": {
+ "TargetFrameworkOverride": {
+ "type": "parameter",
+ "description": "Overrides the target framework",
+ "replaces": "TargetFrameworkOverride",
+ "datatype": "string",
+ "defaultValue": ""
+ },
+ "Framework": {
+ "type": "parameter",
+ "description": "The target framework for the project.",
+ "datatype": "choice",
+ "choices": [
+ {
+ "choice": "netcoreapp3.0",
+ "description": "Target netcoreapp3.0"
+ }
+ ],
+ "replaces": "netcoreapp3.0",
+ "defaultValue": "netcoreapp3.0"
+ },
+ "langVersion": {
+ "type": "parameter",
+ "datatype": "text",
+ "description": "Sets langVersion in the created project file",
+ "defaultValue": "",
+ "replaces": "$(ProjectLanguageVersion)"
+ },
+ "HostIdentifier": {
+ "type": "bind",
+ "binding": "HostIdentifier"
+ },
+ "skipRestore": {
+ "type": "parameter",
+ "datatype": "bool",
+ "description": "If specified, skips the automatic restore of the project on create.",
+ "defaultValue": "false"
+ }
+ },
+ "primaryOutputs": [
+ { "path": "Company.WpfCustomControlLibrary.vbproj" },
+ {
+ "condition": "(HostIdentifier != \"dotnetcli\" && HostIdentifier != \"dotnetcli-preview\")",
+ "path": "CustomControl1.vb"
+ }
+ ],
+ "defaultName": "WpfCustomControlLibrary1",
+ "postActions": [
+ {
+ "condition": "(!skipRestore)",
+ "description": "Restore NuGet packages required by this project.",
+ "manualInstructions": [
+ { "text": "Run 'dotnet restore'" }
+ ],
+ "actionId": "210D431B-A78B-4D2F-B762-4ED3E3EA9025",
+ "continueOnError": true
+ },
+ {
+ "condition": "(HostIdentifier != \"dotnetcli\" && HostIdentifier != \"dotnetcli-preview\")",
+ "description": "Opens CustomControl1.vb in the editor",
+ "manualInstructions": [ ],
+ "actionId": "84C0DA21-51C8-4541-9940-6CA19AF04EE6",
+ "args": {
+ "files": "1"
+ },
+ "continueOnError": true
+ }
+ ]
+}
diff --git a/packaging/Microsoft.Dotnet.Wpf.ProjectTemplates/content/WpfCustomControlLibrary-VisualBasic/AssemblyInfo.vb b/packaging/Microsoft.Dotnet.Wpf.ProjectTemplates/content/WpfCustomControlLibrary-VisualBasic/AssemblyInfo.vb
new file mode 100644
index 00000000000..91a0a58fb04
--- /dev/null
+++ b/packaging/Microsoft.Dotnet.Wpf.ProjectTemplates/content/WpfCustomControlLibrary-VisualBasic/AssemblyInfo.vb
@@ -0,0 +1,11 @@
+Imports System.Windows
+
+'The ThemeInfo attribute describes where any theme specific and generic resource dictionaries can be found.
+'1st parameter: where theme specific resource dictionaries are located
+'(used if a resource is not found in the page,
+' or application resource dictionaries)
+
+'2nd parameter: where the generic resource dictionary is located
+'(used if a resource is not found in the page,
+'app, and any theme specific resource dictionaries)
+
diff --git a/packaging/Microsoft.Dotnet.Wpf.ProjectTemplates/content/WpfCustomControlLibrary-VisualBasic/Company.WpfCustomControlLibrary.vbproj b/packaging/Microsoft.Dotnet.Wpf.ProjectTemplates/content/WpfCustomControlLibrary-VisualBasic/Company.WpfCustomControlLibrary.vbproj
new file mode 100644
index 00000000000..c8e6eb5a00b
--- /dev/null
+++ b/packaging/Microsoft.Dotnet.Wpf.ProjectTemplates/content/WpfCustomControlLibrary-VisualBasic/Company.WpfCustomControlLibrary.vbproj
@@ -0,0 +1,23 @@
+
+
+
+ netcoreapp3.0
+ TargetFrameworkOverride
+ Company.WpfCustomControlLibrary
+ $(ProjectLanguageVersion)
+ true
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/packaging/Microsoft.Dotnet.Wpf.ProjectTemplates/content/WpfCustomControlLibrary-VisualBasic/CustomControl1.vb b/packaging/Microsoft.Dotnet.Wpf.ProjectTemplates/content/WpfCustomControlLibrary-VisualBasic/CustomControl1.vb
new file mode 100644
index 00000000000..54b7e34239e
--- /dev/null
+++ b/packaging/Microsoft.Dotnet.Wpf.ProjectTemplates/content/WpfCustomControlLibrary-VisualBasic/CustomControl1.vb
@@ -0,0 +1,18 @@
+Public Class CustomControl1
+ Inherits Control
+
+ ''' To use this custom control in a XAML file in another project, complete the following steps:
+ '''
+ ''' 1. Add a reference to this project
+ ''' 2. Add the following line to the root element of the XAML file where you wish to use this control:
+ ''' xmlns:MyNamespace="clr-namespace:Company.WpfCustomControlLibrary;assembly=Company.WpfCustomControlLibrary"
+ ''' 2. Use the control in the XAML file:
+ '''
+
+ Shared Sub New()
+ 'This OverrideMetadata call tells the system that this element wants to provide a style that is different than its base class.
+ 'This style is defined in Themes\Generic.xaml
+ DefaultStyleKeyProperty.OverrideMetadata(GetType(CustomControl1), New FrameworkPropertyMetadata(GetType(CustomControl1)))
+ End Sub
+
+End Class
diff --git a/packaging/Microsoft.Dotnet.Wpf.ProjectTemplates/content/WpfCustomControlLibrary-VisualBasic/Themes/Generic.xaml b/packaging/Microsoft.Dotnet.Wpf.ProjectTemplates/content/WpfCustomControlLibrary-VisualBasic/Themes/Generic.xaml
new file mode 100644
index 00000000000..35c5325ad87
--- /dev/null
+++ b/packaging/Microsoft.Dotnet.Wpf.ProjectTemplates/content/WpfCustomControlLibrary-VisualBasic/Themes/Generic.xaml
@@ -0,0 +1,17 @@
+
+
+
diff --git a/packaging/Microsoft.Dotnet.Wpf.ProjectTemplates/content/WpfUserControlLibrary-CSharp/.template.config/dotnetcli.host.json b/packaging/Microsoft.Dotnet.Wpf.ProjectTemplates/content/WpfUserControlLibrary-CSharp/.template.config/dotnetcli.host.json
new file mode 100644
index 00000000000..22ab4a3929f
--- /dev/null
+++ b/packaging/Microsoft.Dotnet.Wpf.ProjectTemplates/content/WpfUserControlLibrary-CSharp/.template.config/dotnetcli.host.json
@@ -0,0 +1,24 @@
+{
+ "$schema": "http://json.schemastore.org/dotnetcli.host",
+ "symbolInfo": {
+ "TargetFrameworkOverride": {
+ "isHidden": "true",
+ "longName": "target-framework-override",
+ "shortName": ""
+ },
+ "Framework": {
+ "longName": "framework"
+ },
+ "skipRestore": {
+ "longName": "no-restore",
+ "shortName": ""
+ },
+ "langVersion": {
+ "longName": "langVersion",
+ "shortName": ""
+ }
+ },
+ "usageExamples": [
+ ""
+ ]
+}
diff --git a/packaging/Microsoft.Dotnet.Wpf.ProjectTemplates/content/WpfUserControlLibrary-CSharp/.template.config/template.json b/packaging/Microsoft.Dotnet.Wpf.ProjectTemplates/content/WpfUserControlLibrary-CSharp/.template.config/template.json
new file mode 100644
index 00000000000..bba6d5bafd4
--- /dev/null
+++ b/packaging/Microsoft.Dotnet.Wpf.ProjectTemplates/content/WpfUserControlLibrary-CSharp/.template.config/template.json
@@ -0,0 +1,90 @@
+{
+ "$schema": "http://json.schemastore.org/template",
+ "author": "Microsoft",
+ "classifications": ["Common", "WPF"],
+ "name": "WPF User Control Library",
+ "generatorVersions": "[1.0.0.0-*)",
+ "description": "A project for creating a user control library for .NET Core WPF Applications",
+ "groupIdentity": "Microsoft.Common.WPF.Control",
+ "precedence": "3000",
+ "identity": "Microsoft.Common.WPF.Control.CSharp.3.0",
+ "shortName": "wpfusercontrollib",
+ "tags": {
+ "language": "C#",
+ "type": "project"
+ },
+ "sourceName": "Company.WpfControlLibrary",
+ "preferNameDirectory": true,
+ "symbols": {
+ "TargetFrameworkOverride": {
+ "type": "parameter",
+ "description": "Overrides the target framework",
+ "replaces": "TargetFrameworkOverride",
+ "datatype": "string",
+ "defaultValue": ""
+ },
+ "Framework": {
+ "type": "parameter",
+ "description": "The target framework for the project.",
+ "datatype": "choice",
+ "choices": [
+ {
+ "choice": "netcoreapp3.0",
+ "description": "Target netcoreapp3.0"
+ }
+ ],
+ "replaces": "netcoreapp3.0",
+ "defaultValue": "netcoreapp3.0"
+ },
+ "langVersion": {
+ "type": "parameter",
+ "datatype": "text",
+ "description": "Sets langVersion in the created project file",
+ "defaultValue": "",
+ "replaces": "$(ProjectLanguageVersion)"
+ },
+ "HostIdentifier": {
+ "type": "bind",
+ "binding": "HostIdentifier"
+ },
+ "skipRestore": {
+ "type": "parameter",
+ "datatype": "bool",
+ "description": "If specified, skips the automatic restore of the project on create.",
+ "defaultValue": "false"
+ }
+ },
+ "primaryOutputs": [
+ { "path": "Company.WpfControlLibrary.csproj" },
+ {
+ "condition": "(HostIdentifier != \"dotnetcli\" && HostIdentifier != \"dotnetcli-preview\")",
+ "path": "UserControl1.xaml.cs"
+ },
+ {
+ "condition": "(HostIdentifier != \"dotnetcli\" && HostIdentifier != \"dotnetcli-preview\")",
+ "path": "UserControl1.xaml"
+ }
+ ],
+ "defaultName": "WpfControlLibrary1",
+ "postActions": [
+ {
+ "condition": "(!skipRestore)",
+ "description": "Restore NuGet packages required by this project.",
+ "manualInstructions": [
+ { "text": "Run 'dotnet restore'" }
+ ],
+ "actionId": "210D431B-A78B-4D2F-B762-4ED3E3EA9025",
+ "continueOnError": true
+ },
+ {
+ "condition": "(HostIdentifier != \"dotnetcli\" && HostIdentifier != \"dotnetcli-preview\")",
+ "description": "Opens UserControl1.xaml in the editor",
+ "manualInstructions": [ ],
+ "actionId": "84C0DA21-51C8-4541-9940-6CA19AF04EE6",
+ "args": {
+ "files": "1;2"
+ },
+ "continueOnError": true
+ }
+ ]
+}
diff --git a/packaging/Microsoft.Dotnet.Wpf.ProjectTemplates/content/WpfUserControlLibrary-CSharp/AssemblyInfo.cs b/packaging/Microsoft.Dotnet.Wpf.ProjectTemplates/content/WpfUserControlLibrary-CSharp/AssemblyInfo.cs
new file mode 100644
index 00000000000..3c50569420d
--- /dev/null
+++ b/packaging/Microsoft.Dotnet.Wpf.ProjectTemplates/content/WpfUserControlLibrary-CSharp/AssemblyInfo.cs
@@ -0,0 +1,10 @@
+using System.Windows;
+
+[assembly:ThemeInfo(
+ ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located
+ //(used if a resource is not found in the page,
+ // or application resource dictionaries)
+ ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located
+ //(used if a resource is not found in the page,
+ // app, or any theme specific resource dictionaries)
+)]
diff --git a/packaging/Microsoft.Dotnet.Wpf.ProjectTemplates/content/WpfUserControlLibrary-CSharp/Company.WpfControlLibrary.csproj b/packaging/Microsoft.Dotnet.Wpf.ProjectTemplates/content/WpfUserControlLibrary-CSharp/Company.WpfControlLibrary.csproj
new file mode 100644
index 00000000000..fc46449e179
--- /dev/null
+++ b/packaging/Microsoft.Dotnet.Wpf.ProjectTemplates/content/WpfUserControlLibrary-CSharp/Company.WpfControlLibrary.csproj
@@ -0,0 +1,11 @@
+
+
+
+ netcoreapp3.0
+ TargetFrameworkOverride
+ Company.WpfControlLibrary
+ $(ProjectLanguageVersion)
+ true
+
+
+
diff --git a/packaging/Microsoft.Dotnet.Wpf.ProjectTemplates/content/WpfUserControlLibrary-CSharp/UserControl1.xaml b/packaging/Microsoft.Dotnet.Wpf.ProjectTemplates/content/WpfUserControlLibrary-CSharp/UserControl1.xaml
new file mode 100644
index 00000000000..0525fb85a32
--- /dev/null
+++ b/packaging/Microsoft.Dotnet.Wpf.ProjectTemplates/content/WpfUserControlLibrary-CSharp/UserControl1.xaml
@@ -0,0 +1,12 @@
+
+
+
+
+
diff --git a/packaging/Microsoft.Dotnet.Wpf.ProjectTemplates/content/WpfUserControlLibrary-CSharp/UserControl1.xaml.cs b/packaging/Microsoft.Dotnet.Wpf.ProjectTemplates/content/WpfUserControlLibrary-CSharp/UserControl1.xaml.cs
new file mode 100644
index 00000000000..ed07b7ab973
--- /dev/null
+++ b/packaging/Microsoft.Dotnet.Wpf.ProjectTemplates/content/WpfUserControlLibrary-CSharp/UserControl1.xaml.cs
@@ -0,0 +1,28 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Data;
+using System.Windows.Documents;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Imaging;
+using System.Windows.Navigation;
+using System.Windows.Shapes;
+
+namespace Company.WpfControlLibrary
+{
+ ///
+ /// Interaction logic for UserControl1.xaml
+ ///
+ public partial class UserControl1 : UserControl
+ {
+ public UserControl1()
+ {
+ InitializeComponent();
+ }
+ }
+}
\ No newline at end of file
diff --git a/packaging/Microsoft.Dotnet.Wpf.ProjectTemplates/content/WpfUserControlLibrary-VisualBasic/.template.config/dotnetcli.host.json b/packaging/Microsoft.Dotnet.Wpf.ProjectTemplates/content/WpfUserControlLibrary-VisualBasic/.template.config/dotnetcli.host.json
new file mode 100644
index 00000000000..22ab4a3929f
--- /dev/null
+++ b/packaging/Microsoft.Dotnet.Wpf.ProjectTemplates/content/WpfUserControlLibrary-VisualBasic/.template.config/dotnetcli.host.json
@@ -0,0 +1,24 @@
+{
+ "$schema": "http://json.schemastore.org/dotnetcli.host",
+ "symbolInfo": {
+ "TargetFrameworkOverride": {
+ "isHidden": "true",
+ "longName": "target-framework-override",
+ "shortName": ""
+ },
+ "Framework": {
+ "longName": "framework"
+ },
+ "skipRestore": {
+ "longName": "no-restore",
+ "shortName": ""
+ },
+ "langVersion": {
+ "longName": "langVersion",
+ "shortName": ""
+ }
+ },
+ "usageExamples": [
+ ""
+ ]
+}
diff --git a/packaging/Microsoft.Dotnet.Wpf.ProjectTemplates/content/WpfUserControlLibrary-VisualBasic/.template.config/template.json b/packaging/Microsoft.Dotnet.Wpf.ProjectTemplates/content/WpfUserControlLibrary-VisualBasic/.template.config/template.json
new file mode 100644
index 00000000000..b1553d1f87c
--- /dev/null
+++ b/packaging/Microsoft.Dotnet.Wpf.ProjectTemplates/content/WpfUserControlLibrary-VisualBasic/.template.config/template.json
@@ -0,0 +1,90 @@
+{
+ "$schema": "http://json.schemastore.org/template",
+ "author": "Microsoft",
+ "classifications": ["Common", "WPF"],
+ "name": "WPF User Control Library",
+ "generatorVersions": "[1.0.0.0-*)",
+ "description": "A project for creating a user control library for .NET Core WPF Applications",
+ "groupIdentity": "Microsoft.Common.WPF.Control",
+ "precedence": "3000",
+ "identity": "Microsoft.Common.WPF.Control.VisualBasic.3.0",
+ "shortName": "wpfusercontrollib",
+ "tags": {
+ "language": "VB",
+ "type": "project"
+ },
+ "sourceName": "Company.WpfControlLibrary",
+ "preferNameDirectory": true,
+ "symbols": {
+ "TargetFrameworkOverride": {
+ "type": "parameter",
+ "description": "Overrides the target framework",
+ "replaces": "TargetFrameworkOverride",
+ "datatype": "string",
+ "defaultValue": ""
+ },
+ "Framework": {
+ "type": "parameter",
+ "description": "The target framework for the project.",
+ "datatype": "choice",
+ "choices": [
+ {
+ "choice": "netcoreapp3.0",
+ "description": "Target netcoreapp3.0"
+ }
+ ],
+ "replaces": "netcoreapp3.0",
+ "defaultValue": "netcoreapp3.0"
+ },
+ "langVersion": {
+ "type": "parameter",
+ "datatype": "text",
+ "description": "Sets langVersion in the created project file",
+ "defaultValue": "",
+ "replaces": "$(ProjectLanguageVersion)"
+ },
+ "HostIdentifier": {
+ "type": "bind",
+ "binding": "HostIdentifier"
+ },
+ "skipRestore": {
+ "type": "parameter",
+ "datatype": "bool",
+ "description": "If specified, skips the automatic restore of the project on create.",
+ "defaultValue": "false"
+ }
+ },
+ "primaryOutputs": [
+ { "path": "Company.WpfControlLibrary.vbproj" },
+ {
+ "condition": "(HostIdentifier != \"dotnetcli\" && HostIdentifier != \"dotnetcli-preview\")",
+ "path": "UserControl1.xaml.vb"
+ },
+ {
+ "condition": "(HostIdentifier != \"dotnetcli\" && HostIdentifier != \"dotnetcli-preview\")",
+ "path": "UserControl1.xaml"
+ }
+ ],
+ "defaultName": "WpfControlLibrary1",
+ "postActions": [
+ {
+ "condition": "(!skipRestore)",
+ "description": "Restore NuGet packages required by this project.",
+ "manualInstructions": [
+ { "text": "Run 'dotnet restore'" }
+ ],
+ "actionId": "210D431B-A78B-4D2F-B762-4ED3E3EA9025",
+ "continueOnError": true
+ },
+ {
+ "condition": "(HostIdentifier != \"dotnetcli\" && HostIdentifier != \"dotnetcli-preview\")",
+ "description": "Opens UserControl1.xaml in the editor",
+ "manualInstructions": [ ],
+ "actionId": "84C0DA21-51C8-4541-9940-6CA19AF04EE6",
+ "args": {
+ "files": "1;2"
+ },
+ "continueOnError": true
+ }
+ ]
+}
diff --git a/packaging/Microsoft.Dotnet.Wpf.ProjectTemplates/content/WpfUserControlLibrary-VisualBasic/AssemblyInfo.vb b/packaging/Microsoft.Dotnet.Wpf.ProjectTemplates/content/WpfUserControlLibrary-VisualBasic/AssemblyInfo.vb
new file mode 100644
index 00000000000..91a0a58fb04
--- /dev/null
+++ b/packaging/Microsoft.Dotnet.Wpf.ProjectTemplates/content/WpfUserControlLibrary-VisualBasic/AssemblyInfo.vb
@@ -0,0 +1,11 @@
+Imports System.Windows
+
+'The ThemeInfo attribute describes where any theme specific and generic resource dictionaries can be found.
+'1st parameter: where theme specific resource dictionaries are located
+'(used if a resource is not found in the page,
+' or application resource dictionaries)
+
+'2nd parameter: where the generic resource dictionary is located
+'(used if a resource is not found in the page,
+'app, and any theme specific resource dictionaries)
+
diff --git a/packaging/Microsoft.Dotnet.Wpf.ProjectTemplates/content/WpfUserControlLibrary-VisualBasic/Company.WpfControlLibrary.vbproj b/packaging/Microsoft.Dotnet.Wpf.ProjectTemplates/content/WpfUserControlLibrary-VisualBasic/Company.WpfControlLibrary.vbproj
new file mode 100644
index 00000000000..e90867c207e
--- /dev/null
+++ b/packaging/Microsoft.Dotnet.Wpf.ProjectTemplates/content/WpfUserControlLibrary-VisualBasic/Company.WpfControlLibrary.vbproj
@@ -0,0 +1,23 @@
+
+
+
+ netcoreapp3.0
+ TargetFrameworkOverride
+ Company.WpfControlLibrary
+ $(ProjectLanguageVersion)
+ true
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/packaging/Microsoft.Dotnet.Wpf.ProjectTemplates/content/WpfUserControlLibrary-VisualBasic/UserControl1.xaml b/packaging/Microsoft.Dotnet.Wpf.ProjectTemplates/content/WpfUserControlLibrary-VisualBasic/UserControl1.xaml
new file mode 100644
index 00000000000..1fa88dea680
--- /dev/null
+++ b/packaging/Microsoft.Dotnet.Wpf.ProjectTemplates/content/WpfUserControlLibrary-VisualBasic/UserControl1.xaml
@@ -0,0 +1,12 @@
+
+
+
+
+
diff --git a/packaging/Microsoft.Dotnet.Wpf.ProjectTemplates/content/WpfUserControlLibrary-VisualBasic/UserControl1.xaml.vb b/packaging/Microsoft.Dotnet.Wpf.ProjectTemplates/content/WpfUserControlLibrary-VisualBasic/UserControl1.xaml.vb
new file mode 100644
index 00000000000..29eef617e8d
--- /dev/null
+++ b/packaging/Microsoft.Dotnet.Wpf.ProjectTemplates/content/WpfUserControlLibrary-VisualBasic/UserControl1.xaml.vb
@@ -0,0 +1,2 @@
+Public Class UserControl1
+End Class
\ No newline at end of file
diff --git a/packaging/Microsoft.NET.Sdk.WindowsDesktop/targets/Microsoft.NET.Sdk.WindowsDesktop.props b/packaging/Microsoft.NET.Sdk.WindowsDesktop/targets/Microsoft.NET.Sdk.WindowsDesktop.props
index 985437424fe..923c2d9bdf3 100644
--- a/packaging/Microsoft.NET.Sdk.WindowsDesktop/targets/Microsoft.NET.Sdk.WindowsDesktop.props
+++ b/packaging/Microsoft.NET.Sdk.WindowsDesktop/targets/Microsoft.NET.Sdk.WindowsDesktop.props
@@ -1,6 +1,8 @@
<_MicrosoftNetSdkWindowsDesktop>true
+ true
+ true
diff --git a/packaging/Microsoft.NET.Sdk.WindowsDesktop/targets/Microsoft.NET.Sdk.WindowsDesktop.targets b/packaging/Microsoft.NET.Sdk.WindowsDesktop/targets/Microsoft.NET.Sdk.WindowsDesktop.targets
index 8beb86feab2..69b72c766d3 100644
--- a/packaging/Microsoft.NET.Sdk.WindowsDesktop/targets/Microsoft.NET.Sdk.WindowsDesktop.targets
+++ b/packaging/Microsoft.NET.Sdk.WindowsDesktop/targets/Microsoft.NET.Sdk.WindowsDesktop.targets
@@ -25,7 +25,7 @@
DefaultItemsOfThisTypeEnabled="$(EnableDefaultPageItems)"
PropertyNameToDisableDefaultItems="EnableDefaultPageItems"
MoreInformationLink="$(DefaultItemsMoreInformationLink)"
- ContinueOnError="$(CheckForDuplicateItemsContinueOnError)">
+ ContinueOnError="$(ContinueOnError)">
diff --git a/src/Microsoft.DotNet.Wpf/src/Common/Graphics/wgx_core_types.cs b/src/Microsoft.DotNet.Wpf/src/Common/Graphics/wgx_core_types.cs
index 3ed7983f254..0e703452127 100644
--- a/src/Microsoft.DotNet.Wpf/src/Common/Graphics/wgx_core_types.cs
+++ b/src/Microsoft.DotNet.Wpf/src/Common/Graphics/wgx_core_types.cs
@@ -454,6 +454,15 @@ internal struct MilColorF
internal float g;
internal float b;
internal float a;
+
+ public override int GetHashCode()
+ {
+ return a.GetHashCode() ^ r.GetHashCode() ^ g.GetHashCode() ^ b.GetHashCode();
+ }
+ public override bool Equals(object obj)
+ {
+ return base.Equals(obj);
+ }
};
///
diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationBuildTasks/MS/Internal/Tasks/TaskFileService.cs b/src/Microsoft.DotNet.Wpf/src/PresentationBuildTasks/MS/Internal/Tasks/TaskFileService.cs
index 48b3288c583..6bf2edd2637 100644
--- a/src/Microsoft.DotNet.Wpf/src/PresentationBuildTasks/MS/Internal/Tasks/TaskFileService.cs
+++ b/src/Microsoft.DotNet.Wpf/src/PresentationBuildTasks/MS/Internal/Tasks/TaskFileService.cs
@@ -125,7 +125,7 @@ public Stream GetContent(string srcFile)
if (String.IsNullOrEmpty(srcFile))
{
- throw new ArgumentNullException("srcFile");
+ throw new ArgumentNullException(nameof(srcFile));
}
if (HostFileManager != null)
@@ -217,7 +217,7 @@ public DateTime GetLastChangeTime(string srcFile)
if (String.IsNullOrEmpty(srcFile))
{
- throw new ArgumentNullException("srcFile");
+ throw new ArgumentNullException(nameof(srcFile));
}
if (IsFileInHostManager(srcFile))
@@ -243,7 +243,7 @@ public bool Exists(string fileName)
if (fileName == null)
{
- throw new ArgumentNullException("fileName");
+ throw new ArgumentNullException(nameof(fileName));
}
if (HostFileManager != null)
@@ -265,7 +265,7 @@ public void Delete(string fileName)
{
if (fileName == null)
{
- throw new ArgumentNullException("fileName");
+ throw new ArgumentNullException(nameof(fileName));
}
if (IsFileInHostManager(fileName))
@@ -287,12 +287,12 @@ public void WriteFile(byte[] contentArray, string destinationFile)
{
if (String.IsNullOrEmpty(destinationFile))
{
- throw new ArgumentNullException("destinationFile");
+ throw new ArgumentNullException(nameof(destinationFile));
}
if (contentArray == null)
{
- throw new ArgumentNullException("contentArray");
+ throw new ArgumentNullException(nameof(contentArray));
}
UTF8Encoding utf8Encoding = new UTF8Encoding();
@@ -331,12 +331,12 @@ public void WriteGeneratedCodeFile(byte[] contentArray, string destinationFileBa
{
if (String.IsNullOrEmpty(destinationFileBaseName))
{
- throw new ArgumentNullException("destinationFileBaseName");
+ throw new ArgumentNullException(nameof(destinationFileBaseName));
}
if (contentArray == null)
{
- throw new ArgumentNullException("contentArray");
+ throw new ArgumentNullException(nameof(contentArray));
}
string buildFile = destinationFileBaseName + generatedExtension + languageSourceExtension;
diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationBuildTasks/Microsoft.WinFx.targets b/src/Microsoft.DotNet.Wpf/src/PresentationBuildTasks/Microsoft.WinFx.targets
index 5496449671b..e69dc43047d 100644
--- a/src/Microsoft.DotNet.Wpf/src/PresentationBuildTasks/Microsoft.WinFx.targets
+++ b/src/Microsoft.DotNet.Wpf/src/PresentationBuildTasks/Microsoft.WinFx.targets
@@ -573,7 +573,10 @@
-
+
diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/ILLinkTrim.xml b/src/Microsoft.DotNet.Wpf/src/PresentationCore/ILLinkTrim.xml
new file mode 100644
index 00000000000..a488f34ce05
--- /dev/null
+++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/ILLinkTrim.xml
@@ -0,0 +1,7 @@
+
+
+
+
+
+
diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/CoreAppContextSwitches.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/CoreAppContextSwitches.cs
index 69fa8116692..2202f636325 100644
--- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/CoreAppContextSwitches.cs
+++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/CoreAppContextSwitches.cs
@@ -337,25 +337,6 @@ public static bool AllowExternalProcessToBlockAccessToTemporaryFiles
#endregion
- #region EnableLegacyDangerousClipboardDeserializationMode
-
- internal const string EnableLegacyDangerousClipboardDeserializationModeSwitchName = "Switch.System.Windows.EnableLegacyDangerousClipboardDeserializationMode";
- private static int _enableLegacyDangerousClipboardDeserializationMode;
- public static bool EnableLegacyDangerousClipboardDeserializationMode
- {
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- get
- {
- ///
- /// Malicious managed objects could be placed in the clipboard lying about its format,
- /// to fix this OleConverter now restricts object deserialization in some cases.
- /// When this switch is enabled behavior falls back to deserializing without restriction.
- ///
- return LocalAppContext.GetCachedSwitchValue(EnableLegacyDangerousClipboardDeserializationModeSwitchName, ref _enableLegacyDangerousClipboardDeserializationMode);
- }
- }
-
- #endregion
}
#pragma warning restore 436
}
diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/PresentationCore.csproj b/src/Microsoft.DotNet.Wpf/src/PresentationCore/PresentationCore.csproj
index 1e14b2e0eb7..c01546b7fe3 100644
--- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/PresentationCore.csproj
+++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/PresentationCore.csproj
@@ -1448,6 +1448,29 @@
false
ColorProfiles
+
+
+
+ false
+ $(AssemblyName).xml
+
-
-
-
-
-
@@ -408,7 +402,6 @@
-
@@ -507,7 +500,6 @@
-
@@ -1427,6 +1419,7 @@
+
diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/Resources/Strings.resx b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/Resources/Strings.resx
index 34bee49cf74..37dc5a6fbc8 100644
--- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/Resources/Strings.resx
+++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/Resources/Strings.resx
@@ -1027,10 +1027,12 @@
Too many files selected. Select fewer files and try again.
- '{0}' does not exist.\r\nDo you want to create it?
+ '{0}' does not exist.
+Do you want to create it?
- '{0}' does not exist.\r\nVerify that the file name is correct.
+ '{0}' does not exist.
+Verify that the file name is correct.
'{0}' is not a valid file name.
@@ -1042,7 +1044,8 @@
Filter index is not valid.
- '{0}' already exists.\r\nDo you want to replace it?
+ '{0}' already exists.
+Do you want to replace it?
Cannot subclass a file dialog because sufficient memory is not available.
diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/Resources/xlf/Strings.cs.xlf b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/Resources/xlf/Strings.cs.xlf
index 9ae812bbd24..c5808961d95 100644
--- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/Resources/xlf/Strings.cs.xlf
+++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/Resources/xlf/Strings.cs.xlf
@@ -1613,13 +1613,17 @@
- '{0}' does not exist.\r\nDo you want to create it?
- Prvek {0} neexistuje.\r\nChcete ho vytvořit?
+ '{0}' does not exist.
+Do you want to create it?
+ Prvek {0} neexistuje.
+Chcete ho vytvořit?
- '{0}' does not exist.\r\nVerify that the file name is correct.
- Prvek {0} neexistuje.\r\nOvěřte, zda je správný název souboru.
+ '{0}' does not exist.
+Verify that the file name is correct.
+ Prvek {0} neexistuje.
+Ověřte, zda je správný název souboru.
@@ -1638,8 +1642,10 @@
- '{0}' already exists.\r\nDo you want to replace it?
- Prvek {0} již existuje.\r\nChcete ho nahradit?
+ '{0}' already exists.
+Do you want to replace it?
+ Prvek {0} již existuje.
+Chcete ho nahradit?
@@ -6469,4 +6475,4 @@