diff --git a/.azure/pipelines/ci.yml b/.azure/pipelines/ci.yml
index a9b8019ab76c..e356ab3d42e1 100644
--- a/.azure/pipelines/ci.yml
+++ b/.azure/pipelines/ci.yml
@@ -7,9 +7,9 @@ trigger:
batch: true
branches:
include:
+ - blazor-wasm
- master
- release/*
- - internal/release/3.*
# Run PR validation on all branches
pr:
@@ -32,6 +32,8 @@ variables:
- name: _DotNetValidationArtifactsCategory
value: .NETCORE
- ${{ if ne(variables['System.TeamProject'], 'internal') }}:
+ - name: _UseHelixOpenQueues
+ value: 'true'
- name: _BuildArgs
value: ''
- name: _PublishArgs
@@ -51,8 +53,10 @@ variables:
# to have it in two different forms
- name: _InternalRuntimeDownloadCodeSignArgs
value: /p:DotNetRuntimeSourceFeed=https://dotnetclimsrc.blob.core.windows.net/dotnet /p:DotNetRuntimeSourceFeedKey=$(dotnetclimsrc-read-sas-token-base64)
-- ${{ if eq(variables['System.TeamProject'], 'internal') }}:
- - ${{ if ne(variables['Build.Reason'], 'PullRequest') }}:
+ - group: DotNet-HelixApi-Access
+ - name: _UseHelixOpenQueues
+ value: 'false'
+ - ${{ if notin(variables['Build.Reason'], 'PullRequest') }}:
# DotNet-Blob-Feed provides: dotnetfeed-storage-access-key-1
# Publish-Build-Assets provides: MaestroAccessToken, BotAccount-dotnet-maestro-bot-PAT
- group: DotNet-Blob-Feed
@@ -72,7 +76,7 @@ variables:
/p:DotNetPublishToBlobFeed=$(_DotNetPublishToBlobFeed)
/p:DotNetPublishUsingPipelines=$(_PublishUsingPipelines)
/p:DotNetArtifactsCategory=$(_DotNetArtifactsCategory)
- - ${{ if eq(variables['Build.Reason'], 'PullRequest') }}:
+ - ${{ if in(variables['Build.Reason'], 'PullRequest') }}:
- name: _BuildArgs
value: ''
- name: _SignType
@@ -82,7 +86,7 @@ variables:
# used for post-build phases, internal builds only
- ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
- group: DotNet-AspNet-SDLValidation-Params
-
+
stages:
- stage: build
displayName: Build
@@ -119,10 +123,10 @@ stages:
agentOs: Windows
steps:
- script: "echo ##vso[build.addbuildtag]daily-build"
- condition: and(ne(variables['Build.Reason'], 'PullRequest'), notin(variables['DotNetFinalVersionKind'], 'release', 'prerelease'))
+ condition: and(notin(variables['Build.Reason'], 'PullRequest'), notin(variables['DotNetFinalVersionKind'], 'release', 'prerelease'))
displayName: 'Set CI tags'
- script: "echo ##vso[build.addbuildtag]release-candidate"
- condition: and(ne(variables['Build.Reason'], 'PullRequest'), in(variables['DotNetFinalVersionKind'], 'release', 'prerelease'))
+ condition: and(notin(variables['Build.Reason'], 'PullRequest'), in(variables['DotNetFinalVersionKind'], 'release', 'prerelease'))
displayName: 'Set CI tags'
# !!! NOTE !!! Some of these steps have disabled code signing.
@@ -150,8 +154,7 @@ stages:
displayName: Build x64
# Build the x86 shared framework
- # TODO: make it possible to build for one Windows architecture at a time
- # This is going to actually build x86 native assets. See https://github.com/aspnet/AspNetCore/issues/7196
+ # This is going to actually build x86 native assets.
- script: ./build.cmd
-ci
-arch x86
@@ -172,6 +175,8 @@ stages:
-noBuildDeps
$(_BuildArgs)
$(_InternalRuntimeDownloadArgs)
+ # Disabled until 3.1.3 is released
+ condition: false
displayName: Build SiteExtension
# This runs code-signing on all packages, zips, and jar files as defined in build/CodeSign.targets. If https://github.com/dotnet/arcade/issues/1957 is resolved,
@@ -249,6 +254,38 @@ stages:
- name: Windows_arm_Packages
path: artifacts/packages/
+ # Build Windows ARM64
+ - template: jobs/default-build.yml
+ parameters:
+ codeSign: true
+ jobName: Windows_64_build
+ jobDisplayName: "Build: Windows ARM64"
+ agentOs: Windows
+ buildArgs:
+ -arch arm64
+ -sign
+ -pack
+ -noBuildNodeJS
+ -noBuildJava
+ /bl:artifacts/log/build.win-arm64.binlog
+ /p:DotNetSignType=$(_SignType)
+ /p:OnlyPackPlatformSpecificPackages=true
+ /p:AssetManifestFileName=aspnetcore-win-arm64.xml
+ $(_BuildArgs)
+ $(_PublishArgs)
+ $(_InternalRuntimeDownloadArgs)
+ installNodeJs: false
+ installJdk: false
+ artifacts:
+ - name: Windows_arm64_Logs
+ path: artifacts/log/
+ publishOnError: true
+ includeForks: true
+ - name: Windows_arm64_Packages
+ path: artifacts/packages/
+ - name: Windows_arm64_Installers
+ path: artifacts/installers/
+
# Build MacOS
- template: jobs/default-build.yml
parameters:
@@ -489,25 +526,25 @@ stages:
jobDisplayName: "Test: Windows Server 2016 x64"
agentOs: Windows
isTestingJob: true
- buildArgs: -all -pack -test -BuildNative "/p:SkipIISNewHandlerTests=true /p:SkipIISTests=true /p:SkipIISExpressTests=true /p:SkipIISNewShimTests=true /p:RunTemplateTests=false" $(_InternalRuntimeDownloadArgs)
+ buildArgs: -all -pack -test -BuildNative "/p:SkipHelixReadyTests=true /p:SkipIISNewHandlerTests=true /p:SkipIISTests=true /p:SkipIISExpressTests=true /p:SkipIISNewShimTests=true /p:RunTemplateTests=false" $(_InternalRuntimeDownloadArgs)
beforeBuild:
- powershell: "& ./src/Servers/IIS/tools/UpdateIISExpressCertificate.ps1; & ./src/Servers/IIS/tools/update_schema.ps1"
displayName: Setup IISExpress test certificates and schema
afterBuild:
- - powershell: "& ./build.ps1 -CI -NoBuild -Test /p:RunFlakyTests=true"
- displayName: Run Flaky Tests
+ - powershell: "& ./build.ps1 -CI -NoBuild -Test /p:RunQuarantinedTests=true"
+ displayName: Run Quarantined Tests
continueOnError: true
- task: PublishTestResults@2
- displayName: Publish Flaky Test Results
+ displayName: Publish Quarantined Test Results
inputs:
testResultsFormat: 'xUnit'
testResultsFiles: '*.xml'
- searchFolder: '$(Build.SourcesDirectory)/artifacts/TestResults/$(_BuildConfig)/Flaky'
+ searchFolder: '$(Build.SourcesDirectory)/artifacts/TestResults/$(_BuildConfig)/Quarantined'
artifacts:
- name: Windows_Test_Dumps
path: artifacts/dumps/
publishOnError: true
- includeForks: false
+ includeForks: true
- name: Windows_Test_Logs
path: artifacts/log/
publishOnError: true
@@ -543,7 +580,7 @@ stages:
- name: Windows_Test_Templates_Dumps
path: artifacts/dumps/
publishOnError: true
- includeForks: false
+ includeForks: true
- name: Windows_Test_Templates_Logs
path: artifacts/log/
publishOnError: true
@@ -560,7 +597,7 @@ stages:
jobDisplayName: "Test: macOS 10.13"
agentOs: macOS
isTestingJob: true
- buildArgs: --all --test "/p:RunTemplateTests=false" $(_InternalRuntimeDownloadArgs)
+ buildArgs: --all --test "/p:RunTemplateTests=false /p:SkipHelixReadyTests=true" $(_InternalRuntimeDownloadArgs)
beforeBuild:
- bash: "./eng/scripts/install-nginx-mac.sh"
displayName: Installing Nginx
@@ -569,15 +606,15 @@ stages:
displayName: Pack Packages (for Template tests)
- bash: ./src/ProjectTemplates/build.sh --ci --pack --no-restore --no-build-deps "/bl:artifacts/log/template.pack.binlog"
displayName: Pack Templates (for Template tests)
- - bash: ./build.sh --no-build --ci --test -p:RunFlakyTests=true
- displayName: Run Flaky Tests
+ - bash: ./build.sh --no-build --ci --test -p:RunQuarantinedTests=true
+ displayName: Run Quarantined Tests
continueOnError: true
- task: PublishTestResults@2
- displayName: Publish Flaky Test Results
+ displayName: Publish Quarantined Test Results
inputs:
testResultsFormat: 'xUnit'
testResultsFiles: '*.xml'
- searchFolder: '$(Build.SourcesDirectory)/artifacts/TestResults/$(_BuildConfig)/Flaky'
+ searchFolder: '$(Build.SourcesDirectory)/artifacts/TestResults/$(_BuildConfig)/Quarantined'
artifacts:
- name: MacOS_Test_Logs
path: artifacts/log/
@@ -595,7 +632,7 @@ stages:
jobDisplayName: "Test: Ubuntu 16.04 x64"
agentOs: Linux
isTestingJob: true
- buildArgs: --all --test "/p:RunTemplateTests=false" $(_InternalRuntimeDownloadArgs)
+ buildArgs: --all --test "/p:RunTemplateTests=false /p:SkipHelixReadyTests=true" $(_InternalRuntimeDownloadArgs)
beforeBuild:
- bash: "./eng/scripts/install-nginx-linux.sh"
displayName: Installing Nginx
@@ -606,15 +643,15 @@ stages:
displayName: Pack Packages (for Template tests)
- bash: ./src/ProjectTemplates/build.sh --ci --pack --no-restore --no-build-deps "/bl:artifacts/log/template.pack.binlog"
displayName: Pack Templates (for Template tests)
- - bash: ./build.sh --no-build --ci --test -p:RunFlakyTests=true
- displayName: Run Flaky Tests
+ - bash: ./build.sh --no-build --ci --test -p:RunQuarantinedTests=true
+ displayName: Run Quarantined Tests
continueOnError: true
- task: PublishTestResults@2
- displayName: Publish Flaky Test Results
+ displayName: Publish Quarantined Test Results
inputs:
testResultsFormat: 'xUnit'
testResultsFiles: '*.xml'
- searchFolder: '$(Build.SourcesDirectory)/artifacts/TestResults/$(_BuildConfig)/Flaky'
+ searchFolder: '$(Build.SourcesDirectory)/artifacts/TestResults/$(_BuildConfig)/Quarantined'
artifacts:
- name: Linux_Test_Logs
path: artifacts/log/
@@ -625,6 +662,80 @@ stages:
publishOnError: true
includeForks: true
+ # Helix x64
+ - template: jobs/default-build.yml
+ parameters:
+ condition: in(variables['Build.Reason'], 'PullRequest')
+ jobName: Helix_x64
+ jobDisplayName: 'Tests: Helix x64'
+ agentOs: Windows
+ timeoutInMinutes: 180
+ steps:
+ # Build the shared framework
+ - script: ./build.cmd -ci -all -pack -arch x64 -buildNative /p:ASPNETCORE_TEST_LOG_DIR=artifacts/log /bl:artifacts/log/helix.build.x64.binlog
+ displayName: Build shared fx
+ - script: .\restore.cmd -ci /p:BuildInteropProjects=true
+ displayName: Restore
+ - script: .\build.cmd -ci -NoRestore -test -projects eng\helix\helix.proj /p:IsRequiredCheck=true /p:IsHelixJob=true /p:BuildAllProjects=true /p:BuildInteropProjects=true /p:BuildNative=true /p:RunTemplateTests=true /p:ASPNETCORE_TEST_LOG_DIR=artifacts/log -bl
+ displayName: Run build.cmd helix target
+ env:
+ HelixApiAccessToken: $(HelixApiAccessToken) # Needed for internal queues
+ SYSTEM_ACCESSTOKEN: $(System.AccessToken) # We need to set this env var to publish helix results to Azure Dev Ops
+ artifacts:
+ - name: Helix_logs
+ path: artifacts/log/
+ publishOnError: true
+ includeForks: true
+
+ - template: jobs/default-build.yml
+ parameters:
+ condition: notin(variables['Build.Reason'], 'PullRequest')
+ jobName: Helix_x64_daily
+ jobDisplayName: 'Tests: Helix x64 Daily'
+ agentOs: Windows
+ timeoutInMinutes: 180
+ steps:
+ # Build the shared framework
+ - script: ./build.cmd -ci -all -pack -arch x64 -buildNative /p:ASPNETCORE_TEST_LOG_DIR=artifacts/log /bl:artifacts/log/helix.daily.build.x64.binlog
+ displayName: Build shared fx
+ # Build the x86 shared framework
+ - script: .\restore.cmd -ci /p:BuildInteropProjects=true
+ displayName: Restore
+ - script: .\build.cmd -ci -NoRestore -test -projects eng\helix\helix.proj /p:IsHelixJob=true /p:IsHelixDaily=true /p:BuildAllProjects=true /p:BuildInteropProjects=true /p:BuildNative=true /p:RunTemplateTests=true /p:ASPNETCORE_TEST_LOG_DIR=artifacts/log -bl
+ displayName: Run build.cmd helix target
+ env:
+ HelixApiAccessToken: $(HelixApiAccessToken) # Needed for internal queues
+ SYSTEM_ACCESSTOKEN: $(System.AccessToken) # We need to set this env var to publish helix results to Azure Dev Ops
+ artifacts:
+ - name: Helix_logs
+ path: artifacts/log/
+ publishOnError: true
+ includeForks: true
+
+ # Helix ARM64
+ - template: jobs/default-build.yml
+ parameters:
+ condition: and(eq(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest'))
+ jobName: Helix_arm64_daily
+ jobDisplayName: "Tests: Helix ARM64 Daily"
+ agentOs: Linux
+ timeoutInMinutes: 180
+ steps:
+ # Build the shared framework
+ - script: ./restore.sh -ci
+ displayName: Restore
+ - script: ./build.sh -ci --arch arm64 -test --no-build-nodejs -projects $(Build.SourcesDirectory)/eng/helix/helix.proj /p:IsHelixJob=true /p:IsHelixDaily=true /p:BuildAllProjects=true /p:BuildNative=true /p:ASPNETCORE_TEST_LOG_DIR=artifacts/log -bl
+ displayName: Run build.sh helix arm64 target
+ env:
+ HelixApiAccessToken: $(HelixApiAccessToken) # Needed for internal queues
+ SYSTEM_ACCESSTOKEN: $(System.AccessToken) # We need to set this env var to publish helix results to Azure Dev Ops
+ installNodeJs: false
+ artifacts:
+ - name: Helix_arm64_logs
+ path: artifacts/log/
+ publishOnError: true
+ includeForks: true
+
# Source build
- job: Source_Build
displayName: 'Test: Linux Source Build'
@@ -642,17 +753,6 @@ stages:
chmod +x $HOME/bin/jq
echo "##vso[task.prependpath]$HOME/bin"
displayName: Install jq
- - task: UseDotNet@2
- displayName: 'Use .NET Core sdk'
- inputs:
- packageType: sdk
- # The SDK version selected here is intentionally supposed to use the latest release
- # For the purpose of building Linux distros, we can't depend on features of the SDK
- # which may not exist in pre-built versions of the SDK
- # Pinning to preview 8 since preview 9 has breaking changes
- version: 3.1.100
- installationPath: $(DotNetCoreSdkDir)
- includePreviewVersions: true
- ${{ if ne(variables['System.TeamProject'], 'public') }}:
- task: Bash@3
displayName: Setup Private Feeds Credentials
@@ -676,7 +776,7 @@ stages:
displayName: Upload package artifacts
# Only capture source build artifacts in PRs for the sake of inspecting
# changes that impact source-build. The artifacts from this build pipeline are never actually used.
- condition: and(succeeded(), eq(variables['Build.Reason'], 'PullRequest'))
+ condition: and(succeeded(), in(variables['Build.Reason'], 'PullRequest'))
inputs:
pathtoPublish: artifacts/packages/
artifactName: Source_Build_Packages
diff --git a/.azure/pipelines/devBuilds.yml b/.azure/pipelines/devBuilds.yml
new file mode 100644
index 000000000000..61cb699a4ec4
--- /dev/null
+++ b/.azure/pipelines/devBuilds.yml
@@ -0,0 +1,118 @@
+#
+# See https://docs.microsoft.com/en-us/vsts/pipelines/yaml-schema for details on this file.
+#
+
+# Configure which branches trigger builds
+trigger: none
+
+# no PR builds
+pr: none
+
+# Schedule this pipeline to run every midnight
+schedules:
+- cron: "0 8 * * *"
+ displayName: Daily midnight Dev builds
+ branches:
+ include:
+ - master
+ always: true
+
+stages:
+- stage: build_components
+ displayName: Build Components
+ jobs:
+ # Build components on Windows (x64)
+ - template: jobs/default-build.yml
+ parameters:
+ codeSign: false
+ jobName: Windows_build
+ jobDisplayName: "Build: Components"
+ agentOs: Windows
+ steps:
+ - script: git submodule init
+ - script: git submodule update --recursive
+ - script: cd ./src/Components
+ - script: ./build.cmd
+ -ci
+ -arch x64
+ /bl:artifacts/log/build.components.x64.binlog
+ displayName: Build x64
+ artifacts:
+ - name: Windows_Logs
+ path: artifacts/log/
+ publishOnError: true
+ includeForks: true
+
+- stage: build_servers
+ displayName: Build Servers
+ jobs:
+ # Build servers on Windows (x64)
+ - template: jobs/default-build.yml
+ parameters:
+ codeSign: false
+ jobName: Windows_build
+ jobDisplayName: "Build: Servers"
+ agentOs: Windows
+ steps:
+ - script: git submodule init
+ - script: git submodule update --recursive
+ - script: cd ./src/Servers
+ - script: ./build.cmd
+ -ci
+ -arch x64
+ /bl:artifacts/log/build.servers.x64.binlog
+ displayName: Build x64
+ artifacts:
+ - name: Windows_Logs
+ path: artifacts/log/
+ publishOnError: true
+ includeForks: true
+
+- stage: build_project_templates
+ displayName: Build Project Templates
+ jobs:
+ # Build servers on Windows (x64)
+ - template: jobs/default-build.yml
+ parameters:
+ codeSign: false
+ jobName: Windows_build
+ jobDisplayName: "Build: Project Templates"
+ agentOs: Windows
+ steps:
+ - script: git submodule init
+ - script: git submodule update --recursive
+ - script: cd ./src/ProjectTemplates
+ - script: ./build.cmd
+ -ci
+ -arch x64
+ /bl:artifacts/log/build.projectTemplates.x64.binlog
+ displayName: Build x64
+ artifacts:
+ - name: Windows_Logs
+ path: artifacts/log/
+ publishOnError: true
+ includeForks: true
+
+- stage: build_all
+ displayName: Build Everything
+ jobs:
+ # Build servers on Windows (x64)
+ - template: jobs/default-build.yml
+ parameters:
+ codeSign: false
+ jobName: Windows_build
+ jobDisplayName: "Build: Everything"
+ agentOs: Windows
+ steps:
+ - script: git submodule init
+ - script: git submodule update --recursive
+ - script: ./build.cmd
+ -ci
+ -arch x64
+ /bl:artifacts/log/build.all.x64.binlog
+ displayName: Build x64
+ artifacts:
+ - name: Windows_Logs
+ path: artifacts/log/
+ publishOnError: true
+ includeForks: true
diff --git a/.azure/pipelines/helix-test.yml b/.azure/pipelines/helix-test.yml
deleted file mode 100644
index ad17b9963eac..000000000000
--- a/.azure/pipelines/helix-test.yml
+++ /dev/null
@@ -1,27 +0,0 @@
-# Don't run CI for this config yet. We're not ready to move official builds on to Azure Pipelines
-trigger: none
-
-# Run PR validation on all branches
-pr:
- branches:
- include:
- - '*'
-
-jobs:
-- template: jobs/default-build.yml
- parameters:
- jobName: Helix_x64
- jobDisplayName: 'Tests: Helix x64'
- agentOs: Windows
- timeoutInMinutes: 240
- steps:
- - script: .\restore.cmd -ci
- displayName: Restore
- - script: .\build.cmd -ci -NoRestore -test -projects eng\helix\helix.proj /p:IsHelixJob=true /p:BuildAllProjects=true /p:BuildNative=true -bl
- displayName: Run build.cmd helix target
- env:
- SYSTEM_ACCESSTOKEN: $(System.AccessToken) # We need to set this env var to publish helix results to Azure Dev Ops
- artifacts:
- - name: Helix_logs
- path: artifacts/log/
- publishOnError: true
diff --git a/.azure/pipelines/jobs/default-build.yml b/.azure/pipelines/jobs/default-build.yml
index cba72a653c94..f1596a7b10b1 100644
--- a/.azure/pipelines/jobs/default-build.yml
+++ b/.azure/pipelines/jobs/default-build.yml
@@ -81,7 +81,7 @@ jobs:
enablePublishUsingPipelines: ${{ variables._PublishUsingPipelines }}
enablePublishTestResults: true # publish test results to AzDO (populates AzDO Tests tab)
enableTelemetry: true
- helixRepo: aspnet/AspNetCore
+ helixRepo: dotnet/aspnetcore
helixType: build.product/
workspace:
clean: all
@@ -89,7 +89,7 @@ jobs:
# See https://github.com/dotnet/arcade/blob/master/Documentation/ChoosingAMachinePool.md
pool:
${{ if eq(parameters.agentOs, 'macOS') }}:
- vmImage: macOS-10.13
+ vmImage: macOS-10.14
${{ if eq(parameters.agentOs, 'Linux') }}:
vmImage: ubuntu-16.04
${{ if eq(parameters.agentOs, 'Windows') }}:
@@ -97,14 +97,14 @@ jobs:
name: NetCorePublic-Pool
${{ if ne(parameters.isTestingJob, true) }}:
# Visual Studio Build Tools
- queue: BuildPool.Windows.10.Amd64.VS2019.BT.Open
+ queue: BuildPool.Server.Amd64.VS2019.BT.Open
${{ if eq(parameters.isTestingJob, true) }}:
# Visual Studio Enterprise - contains some stuff, like SQL Server and IIS Express, that we use for testing
- queue: BuildPool.Windows.10.Amd64.VS2019.Open
+ queue: BuildPool.Server.Amd64.VS2019.Open
${{ if eq(variables['System.TeamProject'], 'internal') }}:
name: NetCoreInternal-Pool
# Visual Studio Enterprise - contains some stuff, like SQL Server and IIS Express, that we use for testing
- queue: BuildPool.Windows.10.Amd64.VS2019
+ queue: BuildPool.Server.Amd64.VS2019
variables:
- AgentOsName: ${{ parameters.agentOs }}
- ASPNETCORE_TEST_LOG_MAXPATH: "200" # Keep test log file name length low enough for artifact zipping
@@ -120,9 +120,9 @@ jobs:
- ${{ if or(ne(parameters.codeSign, true), ne(variables['System.TeamProject'], 'internal')) }}:
- _SignType: ''
- ${{ if and(eq(parameters.codeSign, true), eq(variables['System.TeamProject'], 'internal')) }}:
- - ${{ if ne(variables['Build.Reason'], 'PullRequest') }}:
+ - ${{ if notin(variables['Build.Reason'], 'PullRequest') }}:
- _SignType: real
- - ${{ if eq(variables['Build.Reason'], 'PullRequest') }}:
+ - ${{ if in(variables['Build.Reason'], 'PullRequest') }}:
- _SignType: test
steps:
- checkout: self
@@ -251,6 +251,7 @@ jobs:
condition: always()
inputs:
testRunner: junit
- testResultsFiles: '**/TEST-com.microsoft.signalr*.xml'
+ testResultsFiles: '**/TEST-junit-jupiter.xml'
buildConfiguration: $(BuildConfiguration)
buildPlatform: $(AgentOsName)
+ mergeTestResults: true
diff --git a/.azure/pipelines/quarantined-tests.yml b/.azure/pipelines/quarantined-tests.yml
new file mode 100644
index 000000000000..3666d8fd8ca9
--- /dev/null
+++ b/.azure/pipelines/quarantined-tests.yml
@@ -0,0 +1,46 @@
+# We want to run quarantined tests on master as well as on PRs
+trigger:
+ batch: true
+ branches:
+ include:
+ - master
+
+schedules:
+- cron: "0 */4 * * *"
+ displayName: Every 4 hours test run
+ branches:
+ include:
+ - master
+ always: true
+
+variables:
+- ${{ if ne(variables['System.TeamProject'], 'internal') }}:
+ - name: _UseHelixOpenQueues
+ value: 'true'
+- ${{ if eq(variables['System.TeamProject'], 'internal') }}:
+ - group: DotNet-HelixApi-Access
+ - name: _UseHelixOpenQueues
+ value: 'false'
+
+jobs:
+- template: jobs/default-build.yml
+ parameters:
+ jobName: Helix_quarantine_x64
+ jobDisplayName: 'Tests: Helix Quarantine x64'
+ agentOs: Windows
+ timeoutInMinutes: 240
+ steps:
+ # Build the shared framework
+ - script: ./build.cmd -ci -all -pack -arch x64 -buildNative /p:ASPNETCORE_TEST_LOG_DIR=artifacts/log /bl:artifacts/log/helix.build.x64.binlog
+ displayName: Build shared fx
+ - script: .\restore.cmd -ci /p:BuildInteropProjects=true
+ displayName: Restore
+ - script: .\build.cmd -ci -NoRestore -test -noBuildJava -projects eng\helix\helix.proj /p:RunQuarantinedTests=true /p:IsRequiredCheck=true /p:IsHelixJob=true /p:BuildAllProjects=true /p:BuildInteropProjects=true /p:BuildNative=true /p:RunTemplateTests=true /p:ASPNETCORE_TEST_LOG_DIR=artifacts/log -bl
+ displayName: Run build.cmd helix target
+ env:
+ HelixApiAccessToken: $(HelixApiAccessToken) # Needed for internal queues
+ SYSTEM_ACCESSTOKEN: $(System.AccessToken) # We need to set this env var to publish helix results to Azure Dev Ops
+ artifacts:
+ - name: Helix_logs
+ path: artifacts/log/
+ publishOnError: true
diff --git a/.config/CredScanSuppressions.json b/.config/CredScanSuppressions.json
index 2f6299934db2..4c68f893d703 100644
--- a/.config/CredScanSuppressions.json
+++ b/.config/CredScanSuppressions.json
@@ -20,6 +20,10 @@
{
"placeholder": "1qaz@WSX",
"_justification": "This is a fake password used in test code."
+ },
+ {
+ "file": "\\src\\Servers\\Kestrel\\shared\\test\\TestCertificates\\testCert.pfx",
+ "_justification": "Legitimate UT certificate file with private key"
}
]
}
diff --git a/.config/dotnet-tools.json b/.config/dotnet-tools.json
new file mode 100644
index 000000000000..be95a01fc500
--- /dev/null
+++ b/.config/dotnet-tools.json
@@ -0,0 +1,12 @@
+{
+ "version": 1,
+ "isRoot": true,
+ "tools": {
+ "dotnet-serve": {
+ "version": "1.5.0",
+ "commands": [
+ "dotnet-serve"
+ ]
+ }
+ }
+}
\ No newline at end of file
diff --git a/.gitattributes b/.gitattributes
index ff67a9158f13..3225eae5e086 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -8,6 +8,11 @@
###############################################################################
*.sh eol=lf
+###############################################################################
+# Make gradlew always have LF as line endings
+###############################################################################
+gradlew eol=lf
+
###############################################################################
# Set default behavior for command prompt diff.
#
diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS
index 103c64248fc0..ce75c6821d3e 100644
--- a/.github/CODEOWNERS
+++ b/.github/CODEOWNERS
@@ -14,9 +14,11 @@
/src/Hosting/ @tratcher @anurse
/src/Http/ @tratcher @jkotalik @anurse
/src/Middleware/ @tratcher @anurse
-/src/ProjectTemplates/ @ryanbrandenburg
+/src/Middleware/HttpsPolicy/ @jkotalik @anurse
+/src/Middleware/Rewrite/ @jkotalik @anurse
+# /src/ProjectTemplates/ @ryanbrandenburg
/src/Security/ @tratcher @anurse
/src/Servers/ @tratcher @jkotalik @anurse @halter73
-/src/Middleware/Rewrite @jkotalik @anurse
-/src/Middleware/HttpsPolicy @jkotalik @anurse
+/src/Shared/runtime/ @dotnet/http
+/src/Shared/test/Shared.Tests/runtime/ @dotnet/http
/src/SignalR/ @BrennanConroy @halter73 @anurse
diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md
index ed23a80be29e..86f53b9a8a26 100644
--- a/.github/ISSUE_TEMPLATE/bug_report.md
+++ b/.github/ISSUE_TEMPLATE/bug_report.md
@@ -3,24 +3,34 @@ name: Bug report
about: Create a report about something that is not working
---
-### If you believe you have an issue that affects the security of the platform please do NOT create an issue and instead email your issue details to secure@microsoft.com. Your report may be eligible for our [bug bounty](https://technet.microsoft.com/en-us/mt764065.aspx) but ONLY if it is reported through email.
+
### Describe the bug
A clear and concise description of what the bug is.
### To Reproduce
-Steps to reproduce the behavior:
-1. Using this version of ASP.NET Core '...'
-2. Run this code '....'
-3. With these arguments '....'
-4. See error
+
-### Additional context
-Add any other context about the problem here.
-Include the output of `dotnet --info`
+### Further technical details
+- ASP.NET Core version
+- Include the output of `dotnet --info`
+- The IDE (VS / VS Code/ VS4Mac) you're running on, and it's version
diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md
index d2dac5f2dad2..d7991eb1e0cb 100644
--- a/.github/ISSUE_TEMPLATE/feature_request.md
+++ b/.github/ISSUE_TEMPLATE/feature_request.md
@@ -3,6 +3,12 @@ name: Feature request
about: Suggest an idea for this project
---
+
+
### Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is.
Example: I am trying to do [...] but [...]
diff --git a/.github/workflows/ReportDiff.ps1 b/.github/workflows/ReportDiff.ps1
new file mode 100644
index 000000000000..2093a9dd863d
--- /dev/null
+++ b/.github/workflows/ReportDiff.ps1
@@ -0,0 +1,29 @@
+# Check the code is in sync
+$changed = (select-string "nothing to commit" artifacts\status.txt).count -eq 0
+if (-not $changed) { return $changed }
+# Check if tracking issue is open/closed
+$Headers = @{ Authorization = 'token {0}' -f $ENV:GITHUB_TOKEN; };
+$result = Invoke-RestMethod -Uri $issue
+if ($result.state -eq "closed") {
+ $json = "{ `"state`": `"open`" }"
+ $result = Invoke-RestMethod -Method PATCH -Headers $Headers -Uri $issue -Body $json
+}
+# Add a comment
+$status = [IO.File]::ReadAllText("artifacts\status.txt")
+$diff = [IO.File]::ReadAllText("artifacts\diff.txt")
+$body = @"
+The shared code is out of sync.
+
+ The Diff
+
+``````
+$status
+$diff
+``````
+
+
+"@
+$json = ConvertTo-Json -InputObject @{ 'body' = $body }
+$issue = $issue + '/comments'
+$result = Invoke-RestMethod -Method POST -Headers $Headers -Uri $issue -Body $json
+return $changed
\ No newline at end of file
diff --git a/.github/workflows/runtime-sync.yml b/.github/workflows/runtime-sync.yml
new file mode 100644
index 000000000000..b7cd3e4c3132
--- /dev/null
+++ b/.github/workflows/runtime-sync.yml
@@ -0,0 +1,69 @@
+name: AspNetCore-Runtime Code Sync
+on:
+ # Test this script using on: push
+ # push:
+ schedule:
+ # * is a special character in YAML so you have to quote this string
+ # https://help.github.com/en/actions/automating-your-workflow-with-github-actions/events-that-trigger-workflows#scheduled-events-schedule
+ # Once per day at midnight PST (8 UTC)
+ - cron: '0 8 * * *'
+
+jobs:
+ compare_repos:
+ # Comment out this line to test the scripts in a fork
+ if: github.repository == 'dotnet/aspnetcore'
+ name: Compare the shared code in the AspNetCore and Runtime repos and notify if they're out of sync.
+ runs-on: windows-latest
+ steps:
+ - name: Checkout aspnetcore
+ uses: actions/checkout@v2.0.0
+ with:
+ # Test this script using changes in a fork
+ repository: 'dotnet/aspnetcore'
+ path: aspnetcore
+ - name: Checkout runtime
+ uses: actions/checkout@v2.0.0
+ with:
+ # Test this script using changes in a fork
+ repository: 'dotnet/runtime'
+ path: runtime
+ - name: Copy
+ shell: cmd
+ working-directory: .\runtime\src\libraries\Common\src\System\Net\Http\aspnetcore\
+ env:
+ ASPNETCORE_REPO: d:\a\aspnetcore\aspnetcore\aspnetcore\
+ run: CopyToAspNetCore.cmd
+ - name: Diff
+ shell: cmd
+ working-directory: .\aspnetcore\
+ run: |
+ mkdir ..\artifacts
+ git status > ..\artifacts\status.txt
+ git diff > ..\artifacts\diff.txt
+ - uses: actions/upload-artifact@v1
+ with:
+ name: results
+ path: artifacts
+ - name: Check and Notify
+ id: check
+ shell: pwsh
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ run: |
+ # Test this script using an issue in the local forked repo
+ $issue = 'https://api.github.com/repos/dotnet/aspnetcore/issues/18943'
+ $changed = .\aspnetcore\.github\workflows\ReportDiff.ps1
+ echo "::set-output name=changed::$changed"
+ - name: Send PR
+ if: steps.check.outputs.changed == 'true'
+ # https://github.com/marketplace/actions/create-pull-request
+ uses: peter-evans/create-pull-request@v2
+ with:
+ token: ${{ secrets.GITHUB_TOKEN }}
+ path: .\aspnetcore
+ commit-message: 'Sync shared code from runtime'
+ title: 'Sync shared code from runtime'
+ body: 'This PR was automatically generated to sync shared code changes from runtime. Fixes #18943'
+ labels: area-servers
+ branch: github-action/sync-runtime
+ branch-suffix: timestamp
diff --git a/.gitignore b/.gitignore
index 8a2385174b34..99e05dccb927 100644
--- a/.gitignore
+++ b/.gitignore
@@ -13,6 +13,7 @@ BenchmarkDotNet.Artifacts/
.gradle/
src/SignalR/clients/**/dist/
modules/
+.ionide/
# File extensions
*.aps
@@ -29,6 +30,7 @@ modules/
*.psess
*.res
*.snk
+*.so
*.suo
*.tlog
*.user
@@ -40,3 +42,4 @@ launchSettings.json
msbuild.ProjectImports.zip
StyleCop.Cache
UpgradeLog.htm
+.idea
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 222522b092d3..238c74186d9e 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -3,16 +3,16 @@
One of the easiest ways to contribute is to participate in discussions on GitHub issues. You can also contribute by submitting pull requests with code changes.
## General feedback and discussions?
-Start a discussion on the [repository issue tracker](https://github.com/aspnet/AspNetCore/issues).
+Start a discussion on the [repository issue tracker](https://github.com/dotnet/aspnetcore/issues).
## Bugs and feature requests?
For non-security related bugs, log a new issue in the appropriate GitHub repository. Here are some of the most common repositories:
* [Docs](https://github.com/aspnet/Docs)
-* [AspNetCore](https://github.com/aspnet/AspNetCore)
-* [Entity Framework Core](https://github.com/aspnet/EntityFrameworkCore)
+* [AspNetCore](https://github.com/dotnet/aspnetcore)
+* [Entity Framework Core](https://github.com/dotnet/efcore)
* [Tooling](https://github.com/aspnet/Tooling)
-* [Extensions](https://github.com/aspnet/Extensions)
+* [Extensions](https://github.com/dotnet/extensions)
Or browse the full list of repositories in the [aspnet](https://github.com/aspnet/) organization.
@@ -31,8 +31,8 @@ Our team members also monitor several other discussion forums:
We accept fixes and features! Here are some resources to help you get started on how to contribute code or new content.
* Look at the [Contributor documentation](/docs/) to get started on building the source code on your own.
-* ["Help wanted" issues](https://github.com/aspnet/AspNetCore/labels/help%20wanted) - these issues are up for grabs. Comment on an issue if you want to create a fix.
-* ["Good first issue" issues](https://github.com/aspnet/AspNetCore/labels/good%20first%20issue) - we think these are a good for newcomers.
+* ["Help wanted" issues](https://github.com/dotnet/aspnetcore/labels/help%20wanted) - these issues are up for grabs. Comment on an issue if you want to create a fix.
+* ["Good first issue" issues](https://github.com/dotnet/aspnetcore/labels/good%20first%20issue) - we think these are a good for newcomers.
### Identifying the scale
@@ -42,7 +42,7 @@ If you would like to contribute to one of our repositories, first identify the s
You will need to sign a [Contributor License Agreement](https://cla.dotnetfoundation.org/) when submitting your pull request. To complete the Contributor License Agreement (CLA), you will need to follow the instructions provided by the CLA bot when you send the pull request. This needs to only be done once for any .NET Foundation OSS project.
-If you don't know what a pull request is read this article: https://help.github.com/articles/using-pull-requests. Make sure the repository can build and all tests pass. Familiarize yourself with the project workflow and our coding conventions. The coding, style, and general engineering guidelines are published on the [Engineering guidelines](https://github.com/aspnet/AspNetCore/wiki/Engineering-guidelines) page.
+If you don't know what a pull request is read this article: https://help.github.com/articles/using-pull-requests. Make sure the repository can build and all tests pass. Familiarize yourself with the project workflow and our coding conventions. The coding, style, and general engineering guidelines are published on the [Engineering guidelines](https://github.com/dotnet/aspnetcore/wiki/Engineering-guidelines) page.
### Tests
diff --git a/Directory.Build.props b/Directory.Build.props
index 47f318869392..c40d2034415a 100644
--- a/Directory.Build.props
+++ b/Directory.Build.props
@@ -1,7 +1,7 @@
$(MSBuildThisFileDirectory)
- https://github.com/aspnet/AspNetCore
+ https://github.com/dotnet/aspnetcore
git
@@ -30,11 +30,14 @@
-->
false
true
+
+
+ true
-
+
-
+
Microsoft ASP.NET Core
@@ -51,7 +54,7 @@
true
- netcoreapp3.1
+ netcoreapp5.0
@@ -61,6 +64,10 @@
$(WarningsNotAsErrors);CS1591
$(WarningsNotAsErrors);xUnit1004
+
+ $(NoWarn);NU5131
+
+ $(NoWarn);NU5048
@@ -84,11 +91,8 @@
aspnetcore-runtime
aspnetcore-targeting-pack
-
-
+
false
- true
false
true
@@ -110,6 +114,7 @@
win
osx
linux
+ $([System.Runtime.InteropServices.RuntimeInformation]::ProcessArchitecture.ToString().ToLowerInvariant())
x64
$(TargetOsName)-$(TargetArchitecture)
@@ -118,6 +123,7 @@
win-x64;
win-x86;
win-arm;
+ win-arm64;
osx-x64;
linux-musl-x64;
linux-musl-arm64;
@@ -185,5 +191,6 @@
+
diff --git a/Directory.Build.targets b/Directory.Build.targets
index bc8bb5dfc815..ccef1aa25c70 100644
--- a/Directory.Build.targets
+++ b/Directory.Build.targets
@@ -102,14 +102,16 @@
false
true
+ true
-
+
+
$(AspNetCoreMajorVersion).$(AspNetCoreMinorVersion).0.0
@@ -132,10 +134,6 @@
$(SharedFxVersion)
-
- $(NETStandardLibraryRefPackageVersion)
-
-
+
+
+
diff --git a/NuGet.config b/NuGet.config
index d71bb19d797c..618ac88e7026 100644
--- a/NuGet.config
+++ b/NuGet.config
@@ -2,19 +2,14 @@
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
diff --git a/README.md b/README.md
index 4b954c6076bf..4c2e975c4268 100644
--- a/README.md
+++ b/README.md
@@ -1,7 +1,7 @@
ASP.NET Core
============
-ASP.NET Core is an open-source and cross-platform framework for building modern cloud based internet connected applications, such as web apps, IoT apps and mobile backends. ASP.NET Core apps can run on .NET Core or on the full .NET Framework. It was architected to provide an optimized development framework for apps that are deployed to the cloud or run on-premises. It consists of modular components with minimal overhead, so you retain flexibility while constructing your solutions. You can develop and run your ASP.NET Core apps cross-platform on Windows, Mac and Linux. [Learn more about ASP.NET Core](https://docs.microsoft.com/aspnet/core/).
+ASP.NET Core is an open-source and cross-platform framework for building modern cloud based internet connected applications, such as web apps, IoT apps and mobile backends. ASP.NET Core apps run on [.NET Core](https://dot.net), a free, cross-platform and open-source application runtime. It was architected to provide an optimized development framework for apps that are deployed to the cloud or run on-premises. It consists of modular components with minimal overhead, so you retain flexibility while constructing your solutions. You can develop and run your ASP.NET Core apps cross-platform on Windows, Mac and Linux. [Learn more about ASP.NET Core](https://docs.microsoft.com/aspnet/core/).
## Get Started
@@ -9,6 +9,8 @@ Follow the [Getting Started](https://docs.microsoft.com/aspnet/core/getting-star
Also check out the [.NET Homepage](https://www.microsoft.com/net) for released versions of .NET, getting started guides, and learning resources.
+See the [Issue Management Policies](https://github.com/dotnet/aspnetcore/blob/anurse/issue-policies/docs/IssueManagementPolicies.md) document for more information on how we handle incoming issues.
+
## How to Engage, Contribute, and Give Feedback
Some of the best ways to contribute are to try things out, file issues, join in design conversations,
@@ -17,7 +19,7 @@ and make pull-requests.
* [Download our latest daily builds](./docs/DailyBuilds.md)
* Follow along with the development of ASP.NET Core:
* [Community Standup](https://live.asp.net): The community standup is held every week and streamed live to YouTube. You can view past standups in the linked playlist.
- * [Roadmap](https://github.com/aspnet/AspNetCore/wiki/Roadmap): The schedule and milestone themes for ASP.NET Core.
+ * [Roadmap](https://github.com/dotnet/aspnetcore/wiki/Roadmap): The schedule and milestone themes for ASP.NET Core.
* [Build ASP.NET Core source code](./docs/BuildFromSource.md)
* Check out the [contributing](CONTRIBUTING.md) page to see the best places to log issues and start discussions.
@@ -30,8 +32,8 @@ Security issues and bugs should be reported privately, via email, to the Microso
These are some other repos for related projects:
* [Documentation](https://github.com/aspnet/Docs) - documentation sources for https://docs.microsoft.com/aspnet/core/
-* [Entity Framework Core](https://github.com/aspnet/EntityFrameworkCore) - data access technology
-* [Extensions](https://github.com/aspnet/Extensions) - Logging, configuration, dependency injection, and more.
+* [Entity Framework Core](https://github.com/dotnet/efcore) - data access technology
+* [Extensions](https://github.com/dotnet/extensions) - Logging, configuration, dependency injection, and more.
## Code of conduct
diff --git a/SECURITY.md b/SECURITY.md
index 92d052767fc0..5a9569ce1f58 100644
--- a/SECURITY.md
+++ b/SECURITY.md
@@ -6,9 +6,9 @@ The .NET Core and ASP.NET Core support policy, including supported versions can
## Reporting a Vulnerability
-Security issues and bugs should be reported privately, via email, to the Microsoft Security Response Center (MSRC) secure@microsoft.com.
+Security issues and bugs should be reported privately, via email, to the Microsoft Security Response Center (MSRC) through https://msrc.microsoft.com or by emailing secure@microsoft.com.
You should receive a response within 24 hours. If for some reason you do not, please follow up via email to ensure we received your
-original message. Further information, including the MSRC PGP key, can be found in the [Security TechCenter](https://technet.microsoft.com/en-us/security/ff852094.aspx).
+original message. Further information, including the MSRC PGP key, can be found in the [MSRC Report an Issue FAQ](https://www.microsoft.com/en-us/msrc/faqs-report-an-issue).
Reports via MSRC may qualify for the .NET Core Bug Bounty. Details of the .NET Core Bug Bounty including terms and conditions are at [https://aka.ms/corebounty](https://aka.ms/corebounty).
diff --git a/THIRD-PARTY-NOTICES.txt b/THIRD-PARTY-NOTICES.txt
index 81fadeae227f..99d1e377217f 100644
--- a/THIRD-PARTY-NOTICES.txt
+++ b/THIRD-PARTY-NOTICES.txt
@@ -189,3 +189,31 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
+
+License notice for corefx
+
+------------------------------------------------
+
+The MIT License (MIT)
+
+Copyright (c) .NET Foundation and Contributors
+
+All rights reserved.
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/build.ps1 b/build.ps1
index cf854f54b4c3..f371d266734b 100644
--- a/build.ps1
+++ b/build.ps1
@@ -99,7 +99,7 @@ Running tests.
build.ps1 -test
.LINK
-Online version: https://github.com/aspnet/AspNetCore/blob/master/docs/BuildFromSource.md
+Online version: https://github.com/dotnet/aspnetcore/blob/master/docs/BuildFromSource.md
#>
[CmdletBinding(PositionalBinding = $false, DefaultParameterSetName='Groups')]
param(
@@ -118,7 +118,7 @@ param(
[ValidateSet('Debug', 'Release')]
$Configuration,
- [ValidateSet('x64', 'x86', 'arm')]
+ [ValidateSet('x64', 'x86', 'arm', 'arm64')]
$Architecture = 'x64',
# A list of projects which should be built.
@@ -157,7 +157,7 @@ param(
# Other lifecycle targets
[switch]$Help, # Show help
-
+
# Optional arguments that enable downloading an internal
# runtime or runtime from a non-default location
[string]$DotNetRuntimeSourceFeed,
@@ -336,7 +336,7 @@ $env:MSBUILDDISABLENODEREUSE=1
# Our build often has warnings that we can't fix, like "MSB3026: Could not copy" due to race
# conditions in building C++
-# Fixing this is tracked by https://github.com/aspnet/AspNetCore-Internal/issues/601
+# Fixing this is tracked by https://github.com/dotnet/aspnetcore-internal/issues/601
$warnAsError = $false
if ($ForceCoreMsbuild) {
diff --git a/build.sh b/build.sh
index b97417c4fae0..92ef856d4759 100755
--- a/build.sh
+++ b/build.sh
@@ -304,7 +304,7 @@ nodeReuse=false
export MSBUILDDISABLENODEREUSE=1
# Our build often has warnings that we can't fix
-# Fixing this is tracked by https://github.com/aspnet/AspNetCore-Internal/issues/601
+# Fixing this is tracked by https://github.com/dotnet/aspnetcore-internal/issues/601
warn_as_error=false
# Workaround Arcade check which asserts BinaryLog is true on CI.
diff --git a/docs/APIReviewProcess.md b/docs/APIReviewProcess.md
new file mode 100644
index 000000000000..2340d8097baf
--- /dev/null
+++ b/docs/APIReviewProcess.md
@@ -0,0 +1,71 @@
+## Description
+Starting in 5.0, certain areas within the dotnet/aspnetcore and dotnet/extensions repos will require formal *incremental* API reviews before any PRs that change APIs are merged.
+
+API changes to the following areas are required to go follow this process:
+
+* area-azure
+* area-hosting
+* area-installers
+* area-middleware
+* area-mvc
+ * feature-model-binding
+ * feature-razor-pages
+ * feature-JSONPatch
+ * feature-discovery
+ * feature-formatters
+ * feature-api-explorer
+ * feature-tag-helpers
+* area-security
+* area-servers
+* area-signalr
+* area-websockets
+
+## Process
+The goal of the API Review process is to ensure that the new APIs are following common patterns and the best practices.
+Also, it's aimed to help and guide engineers towards better API design decisions. People should feel empowered to submit their APIs for review as besides all the benefits it's also a learning and knowledge sharing experience.
+
+The process is visualized in the below diagram:
+
+
+
+1. API review process kicks in after the owner for the issue identifies that the work required for the issue will need an API change or addition. In such cases, the issue owner will handle (either himself/herself, or with the community member who has expressed interest in handling the work) driving a design proposal. When working with a community member, the issue owner is responsible for guiding them to an acceptable design.
+1. If the proposed design adds new APIs, mark those issues with the `api-suggestion` label
+1. When the issue owner thinks the proposal is in a good shape, he/she marks the issue with `api-ready-for-review` label. Also, the @asp-net-api-reviews team should be notified on the issue.
+1. The `asp-net-api-reviews` team will host a weekly API review meeting and will review your proposed API change during the next meeting. If you have an API scheduled for review, you must have a representative in the meeting.
+1. Some API reviews can happen through a shorter process. For these situations, simply ping the API review crew for a quicker review, so that it can happen as a conversation.
+1. When an API change/suggestion gets approved, the `api-approved` label should be added to the issue.
+1. The owner of the issue is now free to work on the implementation of the proposed API.
+1. In case during implementation changes to the original proposal are required, the review should become obsolete and the process should start from the beginning.
+
+## What Makes an issue/PR "ready-for-review"?
+
+Before marking an issue as `api-ready-for-review`, make sure that the issue has the following:
+
+- A short description that will help reviewers not familiar with this area.
+- The API changes in ref-assembly format. It's fine to link this to the generated ref-assembly-code in the PR. If the changes are to an area that does produce ref-assemblies, please write out what it would look like in ref-assembly format for us to review.
+
+```txt
+Good: This is the API for the widget factory, users use it in startup code to
+configure how their widgets work. We have an overload that accepts URI, but
+not one that accepts string, so we're adding it for convenience.
+
+Bad: Adding a string overload for Widget.ConfigureFactory.
+```
+
+Note: Ideally all of the following would be in the top comment on an issue, but that's not always possible when the issue was opened by a user. As a rule, we don't edit or replace user comments except for formatting, or if they break the rules. In this case it's fine to post a new comment on the issue, OR to edit the top post and insert a link. If you edit an external contributor's post to add a link make sure you explain why it was done!
+
+In general, larger changes should have more explanation and context provided, and small changes need less explanation. A really large change or feature-area design should probably come with a lot of explanation: [example](https://github.com/dotnet/aspnetcore/issues/17160)
+
+### Why do we do this?
+
+Putting this information in an issue with all of the context makes it possible for discussion to take place before the api-review meeting. Writing things down and posting them online enables remote work as well as our community to give feedback on designs as well. We want to provide enough context for people *working outside that feature area* to understand what the change is about and give meaningful feedback. If you're ready to present an change in the meeting, then you should definitely be ready to explain why it matters.
+
+We use the ref-assembly format because it's more readable and useful for the kinds of things that come up in api-review discussions. Using a more compact format (without docs and implementations) makes it easier to notice patterns. In the rare case that you have to manually transcribe this format, think of this as you spending a little time to save a lot of others time in the meeting.
+
+## If you are the "champion" for a community-submitted change
+
+If you are assigned a community-submitted change to *champion* in our API-review then just put on your pretend pajamas and pretend that it was your change to begin with. Come to the meeting ready to explain why this addition is needed, and why it's the best approach.
+
+## API Review Meeting
+
+The API Review meeting should be open to any member of the ASP.NET Core team. And invite will be sent to all the team with pre-booked meeting room and time-slot for these meetings to be hosted. Each API review should include the area owners as mandatory attendees.
diff --git a/docs/BuildFromSource.md b/docs/BuildFromSource.md
index 5cc74a5f9d71..3fc873b9392d 100644
--- a/docs/BuildFromSource.md
+++ b/docs/BuildFromSource.md
@@ -1,11 +1,10 @@
-Build ASP.NET Core from Source
-==============================
+# Build ASP.NET Core from Source
-Building ASP.NET Core from source allows you tweak and customize ASP.NET Core, and to contribute your improvements back to the project.
+Building ASP.NET Core from source allows you to tweak and customize ASP.NET Core, and to contribute your improvements back to the project.
-See https://github.com/aspnet/AspNetCore/labels/area-infrastructure for known issues and to track ongoing work.
+See for known issues and to track ongoing work.
-## Install pre-requistes
+## Install pre-requisites
### Windows
@@ -14,20 +13,27 @@ Building ASP.NET Core on Windows requires:
* Windows 10, version 1803 or newer
* At least 10 GB of disk space and a good internet connection (our build scripts download a lot of tools and dependencies)
* Visual Studio 2019.
- * To install the exact required components, run [eng/scripts/InstallVisualStudio.ps1](/eng/scripts/InstallVisualStudio.ps1).
- ```ps1
- PS> ./eng/scripts/InstallVisualStudio.ps1
- ```
+ * To install the exact required components, run [eng/scripts/InstallVisualStudio.ps1](/eng/scripts/InstallVisualStudio.ps1).
+
+ ```ps1
+ PS> ./eng/scripts/InstallVisualStudio.ps1
+ ```
+
+ However, any Visual Studio 2019 instance that meets the requirements should be fine. See [global.json](/global.json)
+ and [eng/scripts/vs.json](/eng/scripts/vs.json) for those requirements. By default, the script will install Visual Studio Enterprise Edition, however you can use a different edition by passing the `-Edition` flag.
* Git.
* NodeJS. LTS version of 10.14.2 or newer
* Java Development Kit 11 or newer. Either:
- * OpenJDK
- * Oracle's JDK
- * To install a version of the JDK that will only be used by this repo, run [eng/scripts/InstallJdk.ps1](/eng/scripts/InstallJdk.ps1)
- ```ps1
- PS> ./eng/scripts/InstallJdk.ps1
- ```
-* Chrome - Selenium-based tests require a version of Chrome to be installed. Download and install it from [https://www.google.com/chrome]
+ * OpenJDK
+ * Oracle's JDK
+ * To install a version of the JDK that will only be used by this repo, run [eng/scripts/InstallJdk.ps1](/eng/scripts/InstallJdk.ps1)
+
+ ```ps1
+ PS> ./eng/scripts/InstallJdk.ps1
+ ```
+
+ However, the build should find any JDK 11 or newer installation on the machine.
+* Chrome - Selenium-based tests require a version of Chrome to be installed. Download and install it from
### macOS/Linux
@@ -39,20 +45,22 @@ Building ASP.NET Core on macOS or Linux requires:
* Git
* NodeJS. LTS version of 10.14.2 or newer
* Java Development Kit 11 or newer. Either:
- * OpenJDK
- * Oracle's JDK
+ * OpenJDK
+ * Oracle's JDK
## Clone the source code
-ASP.NET Core uses git submodules to include source from a few other projects.
+ASP.NET Core uses git submodules to include the source from a few other projects.
For a new copy of the project, run:
-```
-git clone --recursive https://github.com/aspnet/AspNetCore
+
+```ps1
+git clone --recursive https://github.com/dotnet/aspnetcore
```
To update an existing copy, run:
-```
+
+```ps1
git submodule update --init --recursive
```
@@ -61,22 +69,24 @@ git submodule update --init --recursive
Before opening our .sln files in Visual Studio or VS Code, you need to perform the following actions.
1. Executing the following on command-line:
- ```
+
+ ```ps1
.\restore.cmd
```
- This will download required tools and build the entire repository once. At that point, you should be able to open .sln files to work on the projects you care about.
+
+ This will download the required tools and build the entire repository once. At that point, you should be able to open .sln files to work on the projects you care about.
> :bulb: Pro tip: you will also want to run this command after pulling large sets of changes. On the master branch, we regularly update the versions of .NET Core SDK required to build the repo.
> You will need to restart Visual Studio every time we update the .NET Core SDK.
-2. Use the `startvs.cmd` script to open Visual Studio .sln files. This script first sets required environment variables.
+2. Use the `startvs.cmd` script to open Visual Studio .sln files. This script first sets the required environment variables.
### Solution files
We don't have a single .sln file for all of ASP.NET Core because Visual Studio doesn't currently handle projects of this scale.
-Instead, we have many .sln files which include a sub-set of projects. These principles guide how we create and manage .slns:
+Instead, we have many .sln files which include a sub-set of projects. These principles guide how we create and manage .sln files:
-1. Solution files are not used by CI or command line build scripts. They are for meant for use by developers only.
+1. Solution files are not used by CI or command line build scripts. They are meant for use by developers only.
2. Solution files group together projects which are frequently edited at the same time.
3. Can't find a solution that has the projects you care about? Feel free to make a PR to add a new .sln file.
@@ -90,10 +100,12 @@ Opening solution files and building may produce an error code CS0006 with a mess
The cause of this problem is that the solution you are using does not include the project that produces this .dll. This most often occurs after we have added new projects to the repo, but failed to update our .sln files to include the new project. In some cases, it is sometimes the intended behavior of the .sln which has been crafted to only include a subset of projects.
-**You can fix this in one of two ways**
-1. Build the project on command line. In most cases, running `build.cmd` on command line solve this problem.
+#### You can fix this in one of two ways
+
+1. Build the project on command line. In most cases, running `build.cmd` on command line solves this problem.
2. Update the solution to include the missing project. You can either do this one by one using `dotnet sln`
- ```
+
+ ```ps1
dotnet sln add C:\src\AspNetCore\src\Hosting\Abstractions\src\Microsoft.AspNetCore.Hosting.Abstractions.csproj
```
@@ -112,6 +124,7 @@ Using Visual Studio Code with this repo requires setting environment variables o
Use these command to launch VS Code with the right settings.
On Windows (requires PowerShell):
+
```ps1
# The extra dot at the beginning is required to 'dot source' this file into the right scope.
@@ -120,26 +133,34 @@ code .
```
On macOS/Linux:
-```
+
+```bash
source activate.sh
code .
```
+Note that if you are using the "Remote-WSL" extension in VSCode, the environment is not supplied
+to the process in WSL. You can workaround this by explicitly setting the environment variables
+in `~/.vscode-server/server-env-setup`.
+See https://code.visualstudio.com/docs/remote/wsl#_advanced-environment-setup-script for details.
+
## Building on command-line
You can also build the entire project on command line with the `build.cmd`/`.sh` scripts.
On Windows:
-```
+
+```ps1
.\build.cmd
```
On macOS/Linux:
-```
+
+```bash
./build.sh
```
-By default, all of the C# projects are built. Some C# projects requires NodeJS to be installed to compile JavaScript assets which are then checked in as source. If NodeJS is detected on the path, the NodeJS projects will be compiled as part of building C# projects. If NodeJS is not detected on the path, the JavaScript assets checked in previously will be used instead. To disable building NodeJS projects, specify /p:BuildNodeJs=false on the command line.
+By default, all of the C# projects are built. Some C# projects require NodeJS to be installed to compile JavaScript assets which are then checked in as source. If NodeJS is detected on the path, the NodeJS projects will be compiled as part of building C# projects. If NodeJS is not detected on the path, the JavaScript assets checked in previously will be used instead. To disable building NodeJS projects, specify /p:BuildNodeJs=false on the command line.
### Using `dotnet` on command line in this repo
@@ -155,6 +176,7 @@ On Windows (requires PowerShell):
```
On macOS/Linux:
+
```bash
source ./activate.sh
```
@@ -164,12 +186,14 @@ source ./activate.sh
Tests are not run by default. Use the `-test` option to run tests in addition to building.
On Windows:
-```
+
+```ps1
.\build.cmd -test
```
On macOS/Linux:
-```
+
+```bash
./build.sh --test
```
@@ -182,7 +206,8 @@ Furthermore, you can use flags on `build.cmd`/`.sh` to build subsets based on la
## Build properties
Additional properties can be added as an argument in the form `/property:$name=$value`, or `/p:$name=$value` for short. For example:
-```
+
+```ps1
.\build.cmd /p:Configuration=Release
```
@@ -199,8 +224,8 @@ TargetOsName | The base runtime identifier to build for (win, linux,
After building ASP.NET Core from source, you will need to install and use your local version of ASP.NET Core.
See ["Artifacts"](./Artifacts.md) for more explanation of the different folders produced by a build.
-- Run the installers produced in `artifacts/installers/{Debug, Release}/` for your platform.
-- Add a NuGet.Config to your project directory with the following content:
+* Run the installers produced in `artifacts/installers/{Debug, Release}/` for your platform.
+* Add a NuGet.Config to your project directory with the following content:
```xml
@@ -215,7 +240,8 @@ See ["Artifacts"](./Artifacts.md) for more explanation of the different folders
*NOTE: This NuGet.Config should be with your application unless you want nightly packages to potentially start being restored for other apps on the machine.*
-- Update the versions on `PackageReference` items in your .csproj project file to point to the version from your local build.
+* Update the versions on `PackageReference` items in your .csproj project file to point to the version from your local build.
+
```xml
diff --git a/docs/DailyBuilds.md b/docs/DailyBuilds.md
index 7e727df9e48d..6c0c734bf8e0 100644
--- a/docs/DailyBuilds.md
+++ b/docs/DailyBuilds.md
@@ -13,13 +13,7 @@ If you want to download the latest daily build and use it in a project, then you
-
-
-
-
-
-
-
+
diff --git a/docs/Helix.md b/docs/Helix.md
index e8261acc854a..a7e759cb4251 100644
--- a/docs/Helix.md
+++ b/docs/Helix.md
@@ -12,17 +12,10 @@ For more info about helix see: [SDK](https://github.com/dotnet/arcade/blob/maste
To run Helix tests for one particular test project:
```
-cd src/MyCode/test
-dotnet msbuild /t:Helix
+.\eng\scripts\RunHelix.ps1 -Project path\mytestproject.csproj
```
-To run tests for the entire repo, run:
-
-```
-.\eng\scripts\TestHelix.ps1
-```
-
-This will restore, and then publish all of the test projects including some bootstrapping scripts that will install the correct dotnet runtime/sdk before running the test assemblies on the helix machine, and upload the job to helix.
+This will restore, and then publish all the test project including some bootstrapping scripts that will install the correct dotnet runtime/sdk before running the test assembly on the helix machine(s), and upload the job to helix.
## How do I look at the results of a helix run on Azure Pipelines?
diff --git a/docs/IssueManagementPolicies.md b/docs/IssueManagementPolicies.md
new file mode 100644
index 000000000000..e71c96993877
--- /dev/null
+++ b/docs/IssueManagementPolicies.md
@@ -0,0 +1,27 @@
+# Issue Management Policies
+
+We have a lot of issue traffic to manage, so we have a few policies in place to help us do that. This is a brief summary of some of the policies we have in place and the justification for them.
+
+## Commenting on closed issues
+
+In general, we recommend you open a new issue if you have a bug, feature request, or question to discuss. If you find a closed issue that is related, open a *new issue* and link to the closed issue rather than posting on the closed issue. Closed issues don't appear in our triage process, so only the people who have been active on the original thread will be notified of your comment. A new issue will get more attention from the team.
+
+*In general* we don't mind getting duplicate issues. It's easier for us to close duplicate issues than to discuss multiple root causes on a single issue! We may close your issue as a duplicate if we determine it has the same root cause as another. Don't worry! It's not a waste of our time!
+
+## Needs Author Feedback
+
+If a contributor reviews an issue and determines that more information is needed from the author, they will post a comment requesting that information and apply the `Needs: Author Feedback` label. This label indicates that the author needs to post a response in order for us to continue investigating the issue.
+
+If the author does not post a response within **7 days**, the issue will be automatically closed. If the author responds within **7 days** after the issue is closed, the issue will be automatically re-opened. We recognize that you may not be able to respond immediately to our requests, we're happy to hear from you whenever you're able to provide the new information.
+
+## Duplicate issues
+
+If we determine that the issue is a duplicate of another, we will label it with the `Resolution: Duplicate` label. The issue will be automatically closed in 1 day of inactivity.
+
+## Answered questions
+
+If we determine that the issue is a question and have posted an answer, we will label it with the `Resolution: Answered` label. The issue will be automatically closed in 1 day of inactivity.
+
+## Locking closed issues
+
+After an issue has been closed and had no activity for **30 days** it will be automatically locked as *resolved*. This is done in order to reduce confusion as to where to post new comments. If you are still encountering the problem reported in an issue, or have a related question or bug report, feel free to open a *new issue* and link to the original (now locked) issue!
diff --git a/docs/ReferenceAssemblies.md b/docs/ReferenceAssemblies.md
index 1ef20699e689..593682a29ecf 100644
--- a/docs/ReferenceAssemblies.md
+++ b/docs/ReferenceAssemblies.md
@@ -22,4 +22,4 @@ Set `false ` in the implementation (
### Regenerate reference assemblies for all projects
-Run `.\eng\scripts\GenerateReferenceAssemblies.ps1` from repository root.
+Run `.\eng\scripts\GenerateReferenceAssemblies.ps1` from repository root. Make sure you've run `.\restore.cmd` first.
diff --git a/docs/ReferenceResolution.md b/docs/ReferenceResolution.md
index 043082f4ec63..d84215a6d365 100644
--- a/docs/ReferenceResolution.md
+++ b/docs/ReferenceResolution.md
@@ -68,7 +68,7 @@ Steps for adding a new package dependency to an existing project. Let's say I'm
If you don't know the commit hash of the source code used to produce "0.0.1-beta-1", you can use `000000` as a placeholder for `Sha`
as its value is unimportant and will be updated the next time the bot runs.
- If the new dependency comes from dotnet/CoreFx, dotnet/code-setup or aspnet/Extensions, add a
+ If the new dependency comes from dotnet/CoreFx, dotnet/code-setup or dotnet/extensions, add a
`CoherentParentDependency` attribute to the `` element as shown below. This example indicates the
dotnet/CoreFx dependency version should be determined based on the build that produced the chosen
Microsoft.NETCore.App. That is, the dotnet/CoreFx dependency and Microsoft.NETCore.App should be
@@ -81,7 +81,7 @@ Steps for adding a new package dependency to an existing project. Let's say I'm
```
The attribute value should be `"Microsoft.Extensions.Logging"` for dotnet/core-setup dependencies and
- `"Microsoft.CodeAnalysis.Razor"` for aspnet/Extensions dependencies.
+ `"Microsoft.CodeAnalysis.Razor"` for dotnet/extensions dependencies.
## Example: make a breaking change to references
diff --git a/docs/Servicing.md b/docs/Servicing.md
new file mode 100644
index 000000000000..f257322fab99
--- /dev/null
+++ b/docs/Servicing.md
@@ -0,0 +1,80 @@
+# Servicing Process
+
+We maintain several on-going releases at once and produce patches for them. An essential part of our support committment to users is that we build high-quality patches that avoid breaking applications. This means we have to be extremely cautious with taking changes in patch releases. This document describes the "bar" (criteria for accepting servicing fixes) and the process for managing these changes.
+
+See the [.NET Core release lifecycle](https://dotnet.microsoft.com/platform/support/policy/dotnet-core#lifecycle) for more details on the currently-supported .NET releases.
+
+The status of current servicing fixes can be found on the [Servicing Status](https://github.com/dotnet/aspnetcore/projects/11) GitHub project.
+
+## Servicing Bar
+
+The servicing bar is defined as any fixes the .NET "Shiproom" (see below) approves. We use certain criteria to evaluate fixes (described below) but still reserve the right to accept/reject bugs despite this criteria in certain circumstances.
+
+A fix is generally suitable for accepting in a servicing release if **all** of the below are true:
+
+* It impacts a "significant" number of users. There's no formal definition here, but generally means multiple users have reported the issue, or the team is confident that a large number of users would be affected.
+* It has no suitable workaround. Since any change comes with risk, having users apply a workaround is generally preferable to shipping an update that may cause more issues.
+* It does not change public API (removing/adding/changing APIs). Applications should be binary-compatible with **all** patches for a given major.minor version, so API changes cannot be made in patches.
+* Any behavioral changes are fixing unexpected exceptions/failures/crashes/etc. or are behind opt-in configuration. In rare cases, where the value is high, we will take changes that are not opt-in, but will provide opt-out configuration to disable them and restore previous behavior.
+
+In addition, the following factors make a particular servicing fix *more likely* to be accepted:
+
+* It fixes a regression introduced in a previous release
+* It is necessary to meet key "tenants" (Security, Compliance, Geopolitical issues, etc.)
+* It is required to support new OS distributions
+* If the issue is reported through [Microsoft Product Support](https://dotnet.microsoft.com/platform/support).
+
+Finally, infrastructure and test-only fixes are generally acceptable since they do not impact the customer use of the product. However, these should generally be focused on fixes that improve the *reliability* of building/testing the product.
+
+### Long-Term Support Releases
+
+In general, Long-Term Support releases are very risk-averse. Users choose these releases over the "Current" releases because their applications can't take the risks involved in frequent updates. We want users to feel very confident installing patches.
+
+As a result, in general, requests for servicing fixes in Long-Term Support releases should come through [Microsoft Support](https://dotnet.microsoft.com/platform/support).
+
+## Submitting a fix to Shiproom
+
+**External Contributors**: In general, this will be done by a team member. Reach out to the team members reviewing your change to ask for help with this process.
+
+To request Shiproom approval for a fix, open a **Pull Request** to the target `release/` branch (for example `release/3.1` for 3.1.x). Prior to submitting to shiproom, ensure all of the following:
+
+* The PR is "ready-to-merge" (Has at least one review approval, passing builds, is not a draft)
+* The PR description contains the following template:
+
+```
+#### Description
+
+
+
+#### Customer Impact
+
+
+
+#### Regression?
+
+
+
+#### Risk
+
+
+```
+
+Once the above conditions are met, apply the `servicing-consider` label.
+
+## Shiproom
+
+The .NET Shiproom meets regularly (approximately twice a week) and reviews PRs labelled `servicing-consider`. The Shiproom attendees include stakeholders from across the stack (runtime, libraries, app models, sdk, etc.). Any PR with this label will be considered. Having a fully-complete template is important to ensuring the PR can be properly reviewed. Generally, someone familiar with the PR should be present at the meeting, but having the template filled out helps ensure that if that person is unavailable, the bug is well-represented.
+
+After reviewing a PR, Shiproom will take one of the following actions:
+
+* Apply the `servicing-approved` label and place it in the appropriate milestone based on the target patch release. The change is approved and can be merged when branches are open for the target patch.
+* Apply the `servicing-more-info` label (or just leave `servicing-consider`) and request additional information or better representation at a subsequent meeting for approval.
+* Apply the `servicing-rejected` label. The change has been declined and should not be merged. It can be resubmitted if there is new information to consider.
+
+## Merging
+
+Only a repository admin can merge changes to `release/*` branches. Once branches open for a particular patch release, the admins will go through and merge PRs labelled `servicing-approved` and targeting that patch release. Sometimes we are tracking multiple patch releases at once (rare, but it happens) so it's possible that only some approved PRs will be merged at the same time.
diff --git a/docs/Submodules.md b/docs/Submodules.md
index 8d24c40ff552..18e0a87caf1a 100644
--- a/docs/Submodules.md
+++ b/docs/Submodules.md
@@ -9,7 +9,7 @@ For full information, see the [official docs for git submodules](https://git-scm
## Fundamental concept
-The parent repo (aspnet/AspNetCore) stores two pieces of info about each submodule.
+The parent repo (dotnet/aspnetcore) stores two pieces of info about each submodule.
1. Where to clone the submodule from. This is stored in the .gitmodules file
2. The commit hash of the submodule to use.
@@ -22,7 +22,7 @@ Other info may appear in the .gitmodules file, but it is only used when attempti
By default, submodules will not be present. Use `--recursive` to clone all submodules.
- git clone https://github.com/aspnet/AspNetCore.git --recursive
+ git clone https://github.com/dotnet/aspnetcore.git --recursive
If you have already cloned, run this to initialize all submodules.
@@ -72,7 +72,7 @@ that contains the new commit.
git add modules/KestrelhttpServer/
git commit -m "Update Kestrel to latest version"
-## PowerShell is slow in aspnet/AspNetCore
+## PowerShell is slow in dotnet/aspnetcore
Many users have post-git, and extension that shows git status on the prompt line. Because `git status` with submodules
on Windows is very slow, it can make PowerShell unbearable to use.
diff --git a/docs/area-owners.md b/docs/area-owners.md
new file mode 100644
index 000000000000..e4d6e72071e0
--- /dev/null
+++ b/docs/area-owners.md
@@ -0,0 +1,23 @@
+The below table lists all the `area-`labels used in the `aspnetcore` repository and their owners:
+
+| Area label | Owner | Description|
+|--- | ---| --- |
+| area-azure | anurse | |
+| area-blazor | mkArtakMSFT | Blazor server and Blazor WASM related |
+| area-commandlinetools | anurse, mkArtakMSFT | dev certs, dotnet watch, |
+| area-dataprotection | anurse | |
+| area-grpc | shirhatti | |
+| area-healthchecks | rynowak | |
+| area-hosting | anurse | |
+| area-httpclientfactory | anurse | |
+| area-identity | blowdart | |
+| area-infrastructure | dougbu | |
+| area-installers | anurse | |
+| area-middleware | anurse | |
+| area-mvc | mkArtakMSFT | |
+| area-perf | anurse | |
+| area-platform | anurse | |
+| area-security | blowdart | |
+| area-servers | anurse | |
+| area-signalr | anurse | |
+| area-websockets | anurse | |
diff --git a/eng/Baseline.xml b/eng/Baseline.xml
index a77163f5726e..a199b6c3de4b 100644
--- a/eng/Baseline.xml
+++ b/eng/Baseline.xml
@@ -86,4 +86,4 @@ Update this list when preparing for a new patch.
-
\ No newline at end of file
+
diff --git a/eng/Build.props b/eng/Build.props
index 42a4992e7de1..6f1b3f190898 100644
--- a/eng/Build.props
+++ b/eng/Build.props
@@ -34,7 +34,8 @@
$(RepoRoot)src\Installers\**\*.*proj;
$(RepoRoot)src\SignalR\clients\ts\**\node_modules\**\*.*proj;
$(RepoRoot)src\Components\Web.JS\node_modules\**\*.*proj;
- $(RepoRoot)src\Components\Blazor\Templates\src\content\**\*.*proj;
+ $(RepoRoot)src\Components\Blazor\Build\testassets\**\*.*proj;
+ $(RepoRoot)src\ProjectTemplates\BlazorWasm.ProjectTemplates\content\**\*.csproj;
$(RepoRoot)src\ProjectTemplates\Web.ProjectTemplates\content\**\*.csproj;
$(RepoRoot)src\ProjectTemplates\Web.ProjectTemplates\content\**\*.fsproj;
$(RepoRoot)src\ProjectTemplates\Web.Spa.ProjectTemplates\content\**\*.csproj;
@@ -42,7 +43,7 @@
@@ -121,6 +123,13 @@
+
+
+
+
+
+
+
@@ -120,9 +108,10 @@ and are generated based on the last package release.
-
+
+
-
+
@@ -143,6 +132,7 @@ and are generated based on the last package release.
+
@@ -164,8 +154,13 @@ and are generated based on the last package release.
+
-
+
+
+
+
+
@@ -173,12 +168,8 @@ and are generated based on the last package release.
-
-
-
-
+
-
diff --git a/eng/FlakyTests.AfterArcade.props b/eng/FlakyTests.AfterArcade.props
deleted file mode 100644
index 12f631127e8b..000000000000
--- a/eng/FlakyTests.AfterArcade.props
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
- $(ArtifactsDir)log\$(Configuration)\Flaky\
- $(ArtifactsDir)TestResults\$(Configuration)\Flaky\
-
-
diff --git a/eng/FlakyTests.BeforeArcade.props b/eng/FlakyTests.BeforeArcade.props
deleted file mode 100644
index 02f9fb6c5963..000000000000
--- a/eng/FlakyTests.BeforeArcade.props
+++ /dev/null
@@ -1,18 +0,0 @@
-
-
-
- <_FlakyRunAdditionalArgs>-trait "Flaky:All=true"
- <_NonFlakyRunAdditionalArgs>-notrait "Flaky:All=true"
-
-
-
-
- <_FlakyRunAdditionalArgs>$(_FlakyRunAdditionalArgs) -trait "Flaky:AzP:All=true" -trait "Flaky:AzP:OS:$(AGENT_OS)=true"
- <_NonFlakyRunAdditionalArgs>$(_NonFlakyRunAdditionalArgs) -notrait "Flaky:AzP:All=true" -notrait "Flaky:AzP:OS:$(AGENT_OS)=true"
-
-
-
- $(_NonFlakyRunAdditionalArgs) $(TestRunnerAdditionalArguments)
- $(_FlakyRunAdditionalArgs) $(TestRunnerAdditionalArguments)
-
-
diff --git a/eng/GenAPI.exclusions.txt b/eng/GenAPI.exclusions.txt
index 810c09e52c57..ebabc0ac7de5 100644
--- a/eng/GenAPI.exclusions.txt
+++ b/eng/GenAPI.exclusions.txt
@@ -2,24 +2,4 @@
T:Microsoft.AspNetCore.Components.RenderTree.RenderTreeFrame
# Manually implemented - https://github.com/dotnet/arcade/issues/2066
T:Microsoft.AspNetCore.Mvc.ApplicationModels.PageParameterModel
-T:Microsoft.AspNetCore.Mvc.ApplicationModels.PagePropertyModel
-# Manually implemented - Need to include internal setter
-P:Microsoft.AspNetCore.Mvc.Razor.Infrastructure.TagHelperMemoryCacheProvider.Cache
-P:Microsoft.AspNetCore.Mvc.RazorPages.RazorPagesOptions.Conventions
-P:Microsoft.AspNetCore.Routing.Matching.CandidateState.Values
-P:Microsoft.AspNetCore.Server.Kestrel.Core.ListenOptions.KestrelServerOptions
-# public structs with public fields that GenAPI doesn't handle
-T:Microsoft.AspNetCore.Components.EventCallback
-T:Microsoft.AspNetCore.Components.EventCallback`1
-# Break GenAPI - https://github.com/dotnet/arcade/issues/4488
-T:Microsoft.AspNetCore.Components.Rendering.HtmlRenderer.d__17
-T:Microsoft.AspNetCore.Components.Rendering.HtmlRenderer.d__8
-T:Microsoft.AspNetCore.Mvc.ApplicationModels.ActionAttributeRouteModel.<>c
-T:Microsoft.AspNetCore.Mvc.ApplicationModels.ActionAttributeRouteModel.d__3
-T:Microsoft.AspNetCore.Mvc.ControllerBase.d__181`1
-T:Microsoft.AspNetCore.Mvc.ControllerBase.d__183`1
-T:Microsoft.AspNetCore.Mvc.ControllerBase.d__184`1
-T:Microsoft.AspNetCore.Mvc.ControllerBase.d__187
-T:Microsoft.AspNetCore.Mvc.Controllers.ControllerBinderDelegateProvider.<>c__DisplayClass0_0
-T:Microsoft.AspNetCore.Mvc.ModelBinding.CompositeValueProvider.d__4
-T:Microsoft.AspNetCore.Mvc.Routing.ConsumesMatcherPolicy.<>c
+T:Microsoft.AspNetCore.Mvc.ApplicationModels.PagePropertyModel
\ No newline at end of file
diff --git a/eng/PlatformManifest.txt b/eng/PlatformManifest.txt
deleted file mode 100644
index 1d5a81f5172a..000000000000
--- a/eng/PlatformManifest.txt
+++ /dev/null
@@ -1,131 +0,0 @@
-aspnetcorev2_inprocess.dll|Microsoft.AspNetCore.App.Ref||13.1.19320.0
-Microsoft.AspNetCore.Antiforgery.dll|Microsoft.AspNetCore.App.Ref|3.1.0.0|3.100.19.56601
-Microsoft.AspNetCore.Authentication.Abstractions.dll|Microsoft.AspNetCore.App.Ref|3.1.0.0|3.100.19.56601
-Microsoft.AspNetCore.Authentication.Cookies.dll|Microsoft.AspNetCore.App.Ref|3.1.0.0|3.100.19.56601
-Microsoft.AspNetCore.Authentication.Core.dll|Microsoft.AspNetCore.App.Ref|3.1.0.0|3.100.19.56601
-Microsoft.AspNetCore.Authentication.dll|Microsoft.AspNetCore.App.Ref|3.1.0.0|3.100.19.56601
-Microsoft.AspNetCore.Authentication.OAuth.dll|Microsoft.AspNetCore.App.Ref|3.1.0.0|3.100.19.56601
-Microsoft.AspNetCore.Authorization.dll|Microsoft.AspNetCore.App.Ref|3.1.0.0|3.100.19.56601
-Microsoft.AspNetCore.Authorization.Policy.dll|Microsoft.AspNetCore.App.Ref|3.1.0.0|3.100.19.56601
-Microsoft.AspNetCore.Components.Authorization.dll|Microsoft.AspNetCore.App.Ref|3.1.0.0|3.100.19.56601
-Microsoft.AspNetCore.Components.dll|Microsoft.AspNetCore.App.Ref|3.1.0.0|3.100.19.56601
-Microsoft.AspNetCore.Components.Forms.dll|Microsoft.AspNetCore.App.Ref|3.1.0.0|3.100.19.56601
-Microsoft.AspNetCore.Components.Server.dll|Microsoft.AspNetCore.App.Ref|3.1.0.0|3.100.19.56601
-Microsoft.AspNetCore.Components.Web.dll|Microsoft.AspNetCore.App.Ref|3.1.0.0|3.100.19.56601
-Microsoft.AspNetCore.Connections.Abstractions.dll|Microsoft.AspNetCore.App.Ref|3.1.0.0|3.100.19.56601
-Microsoft.AspNetCore.CookiePolicy.dll|Microsoft.AspNetCore.App.Ref|3.1.0.0|3.100.19.56601
-Microsoft.AspNetCore.Cors.dll|Microsoft.AspNetCore.App.Ref|3.1.0.0|3.100.19.56601
-Microsoft.AspNetCore.Cryptography.Internal.dll|Microsoft.AspNetCore.App.Ref|3.1.0.0|3.100.19.56601
-Microsoft.AspNetCore.Cryptography.KeyDerivation.dll|Microsoft.AspNetCore.App.Ref|3.1.0.0|3.100.19.56601
-Microsoft.AspNetCore.DataProtection.Abstractions.dll|Microsoft.AspNetCore.App.Ref|3.1.0.0|3.100.19.56601
-Microsoft.AspNetCore.DataProtection.dll|Microsoft.AspNetCore.App.Ref|3.1.0.0|3.100.19.56601
-Microsoft.AspNetCore.DataProtection.Extensions.dll|Microsoft.AspNetCore.App.Ref|3.1.0.0|3.100.19.56601
-Microsoft.AspNetCore.Diagnostics.Abstractions.dll|Microsoft.AspNetCore.App.Ref|3.1.0.0|3.100.19.56601
-Microsoft.AspNetCore.Diagnostics.dll|Microsoft.AspNetCore.App.Ref|3.1.0.0|3.100.19.56601
-Microsoft.AspNetCore.Diagnostics.HealthChecks.dll|Microsoft.AspNetCore.App.Ref|3.1.0.0|3.100.19.56601
-Microsoft.AspNetCore.dll|Microsoft.AspNetCore.App.Ref|3.1.0.0|3.100.19.56601
-Microsoft.AspNetCore.HostFiltering.dll|Microsoft.AspNetCore.App.Ref|3.1.0.0|3.100.19.56601
-Microsoft.AspNetCore.Hosting.Abstractions.dll|Microsoft.AspNetCore.App.Ref|3.1.0.0|3.100.19.56601
-Microsoft.AspNetCore.Hosting.dll|Microsoft.AspNetCore.App.Ref|3.1.0.0|3.100.19.56601
-Microsoft.AspNetCore.Hosting.Server.Abstractions.dll|Microsoft.AspNetCore.App.Ref|3.1.0.0|3.100.19.56601
-Microsoft.AspNetCore.Html.Abstractions.dll|Microsoft.AspNetCore.App.Ref|3.1.0.0|3.100.19.56601
-Microsoft.AspNetCore.Http.Abstractions.dll|Microsoft.AspNetCore.App.Ref|3.1.0.0|3.100.19.56601
-Microsoft.AspNetCore.Http.Connections.Common.dll|Microsoft.AspNetCore.App.Ref|3.1.0.0|3.100.19.56601
-Microsoft.AspNetCore.Http.Connections.dll|Microsoft.AspNetCore.App.Ref|3.1.0.0|3.100.19.56601
-Microsoft.AspNetCore.Http.dll|Microsoft.AspNetCore.App.Ref|3.1.0.0|3.100.19.56601
-Microsoft.AspNetCore.Http.Extensions.dll|Microsoft.AspNetCore.App.Ref|3.1.0.0|3.100.19.56601
-Microsoft.AspNetCore.Http.Features.dll|Microsoft.AspNetCore.App.Ref|3.1.0.0|3.100.19.56601
-Microsoft.AspNetCore.HttpOverrides.dll|Microsoft.AspNetCore.App.Ref|3.1.0.0|3.100.19.56601
-Microsoft.AspNetCore.HttpsPolicy.dll|Microsoft.AspNetCore.App.Ref|3.1.0.0|3.100.19.56601
-Microsoft.AspNetCore.Identity.dll|Microsoft.AspNetCore.App.Ref|3.1.0.0|3.100.19.56601
-Microsoft.AspNetCore.Localization.dll|Microsoft.AspNetCore.App.Ref|3.1.0.0|3.100.19.56601
-Microsoft.AspNetCore.Localization.Routing.dll|Microsoft.AspNetCore.App.Ref|3.1.0.0|3.100.19.56601
-Microsoft.AspNetCore.Metadata.dll|Microsoft.AspNetCore.App.Ref|3.1.0.0|3.100.19.56601
-Microsoft.AspNetCore.Mvc.Abstractions.dll|Microsoft.AspNetCore.App.Ref|3.1.0.0|3.100.19.56601
-Microsoft.AspNetCore.Mvc.ApiExplorer.dll|Microsoft.AspNetCore.App.Ref|3.1.0.0|3.100.19.56601
-Microsoft.AspNetCore.Mvc.Core.dll|Microsoft.AspNetCore.App.Ref|3.1.0.0|3.100.19.56601
-Microsoft.AspNetCore.Mvc.Cors.dll|Microsoft.AspNetCore.App.Ref|3.1.0.0|3.100.19.56601
-Microsoft.AspNetCore.Mvc.DataAnnotations.dll|Microsoft.AspNetCore.App.Ref|3.1.0.0|3.100.19.56601
-Microsoft.AspNetCore.Mvc.dll|Microsoft.AspNetCore.App.Ref|3.1.0.0|3.100.19.56601
-Microsoft.AspNetCore.Mvc.Formatters.Json.dll|Microsoft.AspNetCore.App.Ref|3.1.0.0|3.100.19.56601
-Microsoft.AspNetCore.Mvc.Formatters.Xml.dll|Microsoft.AspNetCore.App.Ref|3.1.0.0|3.100.19.56601
-Microsoft.AspNetCore.Mvc.Localization.dll|Microsoft.AspNetCore.App.Ref|3.1.0.0|3.100.19.56601
-Microsoft.AspNetCore.Mvc.Razor.dll|Microsoft.AspNetCore.App.Ref|3.1.0.0|3.100.19.56601
-Microsoft.AspNetCore.Mvc.RazorPages.dll|Microsoft.AspNetCore.App.Ref|3.1.0.0|3.100.19.56601
-Microsoft.AspNetCore.Mvc.TagHelpers.dll|Microsoft.AspNetCore.App.Ref|3.1.0.0|3.100.19.56601
-Microsoft.AspNetCore.Mvc.ViewFeatures.dll|Microsoft.AspNetCore.App.Ref|3.1.0.0|3.100.19.56601
-Microsoft.AspNetCore.Razor.dll|Microsoft.AspNetCore.App.Ref|3.1.0.0|3.100.19.56601
-Microsoft.AspNetCore.Razor.Runtime.dll|Microsoft.AspNetCore.App.Ref|3.1.0.0|3.100.19.56601
-Microsoft.AspNetCore.ResponseCaching.Abstractions.dll|Microsoft.AspNetCore.App.Ref|3.1.0.0|3.100.19.56601
-Microsoft.AspNetCore.ResponseCaching.dll|Microsoft.AspNetCore.App.Ref|3.1.0.0|3.100.19.56601
-Microsoft.AspNetCore.ResponseCompression.dll|Microsoft.AspNetCore.App.Ref|3.1.0.0|3.100.19.56601
-Microsoft.AspNetCore.Rewrite.dll|Microsoft.AspNetCore.App.Ref|3.1.0.0|3.100.19.56601
-Microsoft.AspNetCore.Routing.Abstractions.dll|Microsoft.AspNetCore.App.Ref|3.1.0.0|3.100.19.56601
-Microsoft.AspNetCore.Routing.dll|Microsoft.AspNetCore.App.Ref|3.1.0.0|3.100.19.56601
-Microsoft.AspNetCore.Server.HttpSys.dll|Microsoft.AspNetCore.App.Ref|3.1.0.0|3.100.19.56601
-Microsoft.AspNetCore.Server.IIS.dll|Microsoft.AspNetCore.App.Ref|3.1.0.0|3.100.19.56601
-Microsoft.AspNetCore.Server.IISIntegration.dll|Microsoft.AspNetCore.App.Ref|3.1.0.0|3.100.19.56601
-Microsoft.AspNetCore.Server.Kestrel.Core.dll|Microsoft.AspNetCore.App.Ref|3.1.0.0|3.100.19.56601
-Microsoft.AspNetCore.Server.Kestrel.dll|Microsoft.AspNetCore.App.Ref|3.1.0.0|3.100.19.56601
-Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.dll|Microsoft.AspNetCore.App.Ref|3.1.0.0|3.100.19.56601
-Microsoft.AspNetCore.Session.dll|Microsoft.AspNetCore.App.Ref|3.1.0.0|3.100.19.56601
-Microsoft.AspNetCore.SignalR.Common.dll|Microsoft.AspNetCore.App.Ref|3.1.0.0|3.100.19.56601
-Microsoft.AspNetCore.SignalR.Core.dll|Microsoft.AspNetCore.App.Ref|3.1.0.0|3.100.19.56601
-Microsoft.AspNetCore.SignalR.dll|Microsoft.AspNetCore.App.Ref|3.1.0.0|3.100.19.56601
-Microsoft.AspNetCore.SignalR.Protocols.Json.dll|Microsoft.AspNetCore.App.Ref|3.1.0.0|3.100.19.56601
-Microsoft.AspNetCore.StaticFiles.dll|Microsoft.AspNetCore.App.Ref|3.1.0.0|3.100.19.56601
-Microsoft.AspNetCore.WebSockets.dll|Microsoft.AspNetCore.App.Ref|3.1.0.0|3.100.19.56601
-Microsoft.AspNetCore.WebUtilities.dll|Microsoft.AspNetCore.App.Ref|3.1.0.0|3.100.19.56601
-Microsoft.Extensions.Caching.Abstractions.dll|Microsoft.AspNetCore.App.Ref|3.1.0.0|3.100.19.56504
-Microsoft.Extensions.Caching.Memory.dll|Microsoft.AspNetCore.App.Ref|3.1.0.0|3.100.19.56504
-Microsoft.Extensions.Configuration.Abstractions.dll|Microsoft.AspNetCore.App.Ref|3.1.0.0|3.100.19.56504
-Microsoft.Extensions.Configuration.Binder.dll|Microsoft.AspNetCore.App.Ref|3.1.0.0|3.100.19.56504
-Microsoft.Extensions.Configuration.CommandLine.dll|Microsoft.AspNetCore.App.Ref|3.1.0.0|3.100.19.56504
-Microsoft.Extensions.Configuration.dll|Microsoft.AspNetCore.App.Ref|3.1.0.0|3.100.19.56504
-Microsoft.Extensions.Configuration.EnvironmentVariables.dll|Microsoft.AspNetCore.App.Ref|3.1.0.0|3.100.19.56504
-Microsoft.Extensions.Configuration.FileExtensions.dll|Microsoft.AspNetCore.App.Ref|3.1.0.0|3.100.19.56504
-Microsoft.Extensions.Configuration.Ini.dll|Microsoft.AspNetCore.App.Ref|3.1.0.0|3.100.19.56504
-Microsoft.Extensions.Configuration.Json.dll|Microsoft.AspNetCore.App.Ref|3.1.0.0|3.100.19.56504
-Microsoft.Extensions.Configuration.KeyPerFile.dll|Microsoft.AspNetCore.App.Ref|3.1.0.0|3.100.19.56504
-Microsoft.Extensions.Configuration.UserSecrets.dll|Microsoft.AspNetCore.App.Ref|3.1.0.0|3.100.19.56504
-Microsoft.Extensions.Configuration.Xml.dll|Microsoft.AspNetCore.App.Ref|3.1.0.0|3.100.19.56504
-Microsoft.Extensions.DependencyInjection.Abstractions.dll|Microsoft.AspNetCore.App.Ref|3.1.0.0|3.100.19.56504
-Microsoft.Extensions.DependencyInjection.dll|Microsoft.AspNetCore.App.Ref|3.1.0.0|3.100.19.56504
-Microsoft.Extensions.Diagnostics.HealthChecks.Abstractions.dll|Microsoft.AspNetCore.App.Ref|3.1.0.0|3.100.19.56504
-Microsoft.Extensions.Diagnostics.HealthChecks.dll|Microsoft.AspNetCore.App.Ref|3.1.0.0|3.100.19.56504
-Microsoft.Extensions.FileProviders.Abstractions.dll|Microsoft.AspNetCore.App.Ref|3.1.0.0|3.100.19.56504
-Microsoft.Extensions.FileProviders.Composite.dll|Microsoft.AspNetCore.App.Ref|3.1.0.0|3.100.19.56504
-Microsoft.Extensions.FileProviders.Embedded.dll|Microsoft.AspNetCore.App.Ref|3.1.0.0|3.100.19.56504
-Microsoft.Extensions.FileProviders.Physical.dll|Microsoft.AspNetCore.App.Ref|3.1.0.0|3.100.19.56504
-Microsoft.Extensions.FileSystemGlobbing.dll|Microsoft.AspNetCore.App.Ref|3.1.0.0|3.100.19.56504
-Microsoft.Extensions.Hosting.Abstractions.dll|Microsoft.AspNetCore.App.Ref|3.1.0.0|3.100.19.56504
-Microsoft.Extensions.Hosting.dll|Microsoft.AspNetCore.App.Ref|3.1.0.0|3.100.19.56504
-Microsoft.Extensions.Http.dll|Microsoft.AspNetCore.App.Ref|3.1.0.0|3.100.19.56504
-Microsoft.Extensions.Identity.Core.dll|Microsoft.AspNetCore.App.Ref|3.1.0.0|3.100.19.56601
-Microsoft.Extensions.Identity.Stores.dll|Microsoft.AspNetCore.App.Ref|3.1.0.0|3.100.19.56601
-Microsoft.Extensions.Localization.Abstractions.dll|Microsoft.AspNetCore.App.Ref|3.1.0.0|3.100.19.56504
-Microsoft.Extensions.Localization.dll|Microsoft.AspNetCore.App.Ref|3.1.0.0|3.100.19.56504
-Microsoft.Extensions.Logging.Abstractions.dll|Microsoft.AspNetCore.App.Ref|3.1.0.0|3.100.19.56504
-Microsoft.Extensions.Logging.Configuration.dll|Microsoft.AspNetCore.App.Ref|3.1.0.0|3.100.19.56504
-Microsoft.Extensions.Logging.Console.dll|Microsoft.AspNetCore.App.Ref|3.1.0.0|3.100.19.56504
-Microsoft.Extensions.Logging.Debug.dll|Microsoft.AspNetCore.App.Ref|3.1.0.0|3.100.19.56504
-Microsoft.Extensions.Logging.dll|Microsoft.AspNetCore.App.Ref|3.1.0.0|3.100.19.56504
-Microsoft.Extensions.Logging.EventLog.dll|Microsoft.AspNetCore.App.Ref|3.1.0.0|3.100.19.56504
-Microsoft.Extensions.Logging.EventSource.dll|Microsoft.AspNetCore.App.Ref|3.1.0.0|3.100.19.56504
-Microsoft.Extensions.Logging.TraceSource.dll|Microsoft.AspNetCore.App.Ref|3.1.0.0|3.100.19.56504
-Microsoft.Extensions.ObjectPool.dll|Microsoft.AspNetCore.App.Ref|3.1.0.0|3.100.19.56504
-Microsoft.Extensions.Options.ConfigurationExtensions.dll|Microsoft.AspNetCore.App.Ref|3.1.0.0|3.100.19.56504
-Microsoft.Extensions.Options.DataAnnotations.dll|Microsoft.AspNetCore.App.Ref|3.1.0.0|3.100.19.56504
-Microsoft.Extensions.Options.dll|Microsoft.AspNetCore.App.Ref|3.1.0.0|3.100.19.56504
-Microsoft.Extensions.Primitives.dll|Microsoft.AspNetCore.App.Ref|3.1.0.0|3.100.19.56504
-Microsoft.Extensions.WebEncoders.dll|Microsoft.AspNetCore.App.Ref|3.1.0.0|3.100.19.56504
-Microsoft.JSInterop.dll|Microsoft.AspNetCore.App.Ref|3.1.0.0|3.100.19.56504
-Microsoft.Net.Http.Headers.dll|Microsoft.AspNetCore.App.Ref|3.1.0.0|3.100.19.56601
-Microsoft.Win32.SystemEvents.dll|Microsoft.AspNetCore.App.Ref|4.0.2.0|4.700.19.56404
-System.Diagnostics.EventLog.dll|Microsoft.AspNetCore.App.Ref|4.0.2.0|4.700.19.56404
-System.Drawing.Common.dll|Microsoft.AspNetCore.App.Ref|4.0.2.0|4.700.19.56404
-System.IO.Pipelines.dll|Microsoft.AspNetCore.App.Ref|4.0.2.0|4.700.19.56404
-System.Security.Cryptography.Pkcs.dll|Microsoft.AspNetCore.App.Ref|4.1.1.0|4.700.19.56404
-System.Security.Cryptography.Xml.dll|Microsoft.AspNetCore.App.Ref|4.0.3.0|4.700.19.56404
-System.Security.Permissions.dll|Microsoft.AspNetCore.App.Ref|4.0.3.0|4.700.19.56404
-System.Windows.Extensions.dll|Microsoft.AspNetCore.App.Ref|4.0.1.0|4.700.19.56404
\ No newline at end of file
diff --git a/eng/ProjectReferences.props b/eng/ProjectReferences.props
index dedf038e0b51..dda9b06ce8f1 100644
--- a/eng/ProjectReferences.props
+++ b/eng/ProjectReferences.props
@@ -6,8 +6,6 @@
-
-
@@ -18,6 +16,7 @@
+
@@ -58,9 +57,11 @@
+
+
@@ -141,5 +142,14 @@
+
+
+
+
+
+
+
+
+
diff --git a/eng/Publishing.props b/eng/Publishing.props
index 74434eeea5dc..ab7456c178c5 100644
--- a/eng/Publishing.props
+++ b/eng/Publishing.props
@@ -34,6 +34,7 @@
+
+
+ $(ArtifactsDir)log\$(Configuration)\Quarantined\
+ $(ArtifactsDir)TestResults\$(Configuration)\Quarantined\
+
+
diff --git a/eng/QuarantinedTests.BeforeArcade.props b/eng/QuarantinedTests.BeforeArcade.props
new file mode 100644
index 000000000000..5fa5fdcaf657
--- /dev/null
+++ b/eng/QuarantinedTests.BeforeArcade.props
@@ -0,0 +1,11 @@
+
+
+ <_QuarantinedTestRunAdditionalArgs>-trait "Quarantined=true"
+ <_NonQuarantinedTestRunAdditionalArgs>-notrait "Quarantined=true"
+
+
+
+ $(_NonQuarantinedTestRunAdditionalArgs) $(TestRunnerAdditionalArguments)
+ $(_QuarantinedTestRunAdditionalArgs) $(TestRunnerAdditionalArguments)
+
+
diff --git a/eng/SharedFramework.External.props b/eng/SharedFramework.External.props
index e46f5c1120d0..9812152edd7b 100644
--- a/eng/SharedFramework.External.props
+++ b/eng/SharedFramework.External.props
@@ -7,7 +7,7 @@
-
+
$(SystemIOPipelinesPackageVersion.Split('.')[0]).$(SystemIOPipelinesPackageVersion.Split('.')[1]).0
$(SystemSecurityCryptographyXmlPackageVersion.Split('.')[0]).$(SystemSecurityCryptographyXmlPackageVersion.Split('.')[1]).0
$(MicrosoftWin32SystemEventsPackageVersion.Split('.')[0]).$(MicrosoftWin32SystemEventsPackageVersion.Split('.')[1]).0
@@ -20,7 +20,7 @@
-
+
@@ -30,24 +30,18 @@
-
-
-
-
-
-
@@ -56,13 +50,10 @@
-
-
-
diff --git a/eng/SharedFramework.Local.props b/eng/SharedFramework.Local.props
index ddfe60ecfb73..49d28f78f0f2 100644
--- a/eng/SharedFramework.Local.props
+++ b/eng/SharedFramework.Local.props
@@ -26,6 +26,15 @@
+
+
+
+
+
+
+
+
+
diff --git a/eng/Signing.props b/eng/Signing.props
index 3b61e9205f8c..024a5c8a0aaa 100644
--- a/eng/Signing.props
+++ b/eng/Signing.props
@@ -93,9 +93,11 @@
<_DotNetFilesToExclude Include="$(BaseRedistNetCorePath)win-x64\shared\Microsoft.NETCore.App\**\*.dll" CertificateName="None" />
<_DotNetFilesToExclude Include="$(BaseRedistNetCorePath)win-x86\shared\Microsoft.NETCore.App\**\*.dll" CertificateName="None" />
<_DotNetFilesToExclude Include="$(BaseRedistNetCorePath)win-arm\shared\Microsoft.NETCore.App\**\*.dll" CertificateName="None" />
+ <_DotNetFilesToExclude Include="$(BaseRedistNetCorePath)win-arm64\shared\Microsoft.NETCore.App\**\*.dll" CertificateName="None" />
<_DotNetFilesToExclude Include="$(BaseRedistNetCorePath)win-x64\host\**\*.dll" CertificateName="None" />
<_DotNetFilesToExclude Include="$(BaseRedistNetCorePath)win-x86\host\**\*.dll" CertificateName="None" />
<_DotNetFilesToExclude Include="$(BaseRedistNetCorePath)win-arm\host\**\*.dll" CertificateName="None" />
+ <_DotNetFilesToExclude Include="$(BaseRedistNetCorePath)win-arm64\host\**\*.dll" CertificateName="None" />
<_DotNetFilesToExclude Include="$(RedistNetCorePath)dotnet.exe" CertificateName="None" />
diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml
index 82eb3734a2c8..ea6eee484713 100644
--- a/eng/Version.Details.xml
+++ b/eng/Version.Details.xml
@@ -9,429 +9,340 @@
-->
-
- https://github.com/aspnet/Blazor
- 7868699de745fd30a654c798a99dc541b77b95c0
+
+ https://github.com/dotnet/blazor
+ dd7fb4d3931d556458f62642c2edfc59f6295bfb
-
+
https://github.com/dotnet/aspnetcore-tooling
- 5ecfad7e0515ee580f7e1b51d1558fc2a1d27ee5
+ dcbab464643d971765e77562d2d0854c6ae112f7
-
+
https://github.com/dotnet/aspnetcore-tooling
- 5ecfad7e0515ee580f7e1b51d1558fc2a1d27ee5
+ dcbab464643d971765e77562d2d0854c6ae112f7
-
+
https://github.com/dotnet/aspnetcore-tooling
- 5ecfad7e0515ee580f7e1b51d1558fc2a1d27ee5
+ dcbab464643d971765e77562d2d0854c6ae112f7
-
+
https://github.com/dotnet/aspnetcore-tooling
- 5ecfad7e0515ee580f7e1b51d1558fc2a1d27ee5
+ dcbab464643d971765e77562d2d0854c6ae112f7
-
+
https://github.com/dotnet/efcore
- 6f4f078e8f92ee8e2ca497fa4b83d4ecebdd643b
+ fc5681407e88f3a0bcb5e657aa390a08b0169b6f
-
+
https://github.com/dotnet/efcore
- 6f4f078e8f92ee8e2ca497fa4b83d4ecebdd643b
+ fc5681407e88f3a0bcb5e657aa390a08b0169b6f
-
+
https://github.com/dotnet/efcore
- 6f4f078e8f92ee8e2ca497fa4b83d4ecebdd643b
+ fc5681407e88f3a0bcb5e657aa390a08b0169b6f
-
+
https://github.com/dotnet/efcore
- 6f4f078e8f92ee8e2ca497fa4b83d4ecebdd643b
+ fc5681407e88f3a0bcb5e657aa390a08b0169b6f
-
+
https://github.com/dotnet/efcore
- 6f4f078e8f92ee8e2ca497fa4b83d4ecebdd643b
+ fc5681407e88f3a0bcb5e657aa390a08b0169b6f
-
+
https://github.com/dotnet/efcore
- 6f4f078e8f92ee8e2ca497fa4b83d4ecebdd643b
+ fc5681407e88f3a0bcb5e657aa390a08b0169b6f
-
+
https://github.com/dotnet/efcore
- 6f4f078e8f92ee8e2ca497fa4b83d4ecebdd643b
+ fc5681407e88f3a0bcb5e657aa390a08b0169b6f
-
+
https://github.com/dotnet/extensions
- 7d9baaf617741d775578c8018729ac5b75734c69
+ 8a574d2004260c3cd8e373937bb9659b81e6bc8d
-
+
https://github.com/dotnet/extensions
- 7d9baaf617741d775578c8018729ac5b75734c69
+ 8a574d2004260c3cd8e373937bb9659b81e6bc8d
-
+
https://github.com/dotnet/extensions
- 7d9baaf617741d775578c8018729ac5b75734c69
+ 8a574d2004260c3cd8e373937bb9659b81e6bc8d
-
+
https://github.com/dotnet/extensions
- 7d9baaf617741d775578c8018729ac5b75734c69
+ 8a574d2004260c3cd8e373937bb9659b81e6bc8d
-
+
https://github.com/dotnet/extensions
- 7d9baaf617741d775578c8018729ac5b75734c69
+ 8a574d2004260c3cd8e373937bb9659b81e6bc8d
-
+
https://github.com/dotnet/extensions
- 7d9baaf617741d775578c8018729ac5b75734c69
+ 8a574d2004260c3cd8e373937bb9659b81e6bc8d
-
+
https://github.com/dotnet/extensions
- 7d9baaf617741d775578c8018729ac5b75734c69
+ 8a574d2004260c3cd8e373937bb9659b81e6bc8d
-
+
https://github.com/dotnet/extensions
- 7d9baaf617741d775578c8018729ac5b75734c69
+ 8a574d2004260c3cd8e373937bb9659b81e6bc8d
-
+
https://github.com/dotnet/extensions
- 7d9baaf617741d775578c8018729ac5b75734c69
+ 8a574d2004260c3cd8e373937bb9659b81e6bc8d
-
+
https://github.com/dotnet/extensions
- 7d9baaf617741d775578c8018729ac5b75734c69
+ 8a574d2004260c3cd8e373937bb9659b81e6bc8d
-
+
https://github.com/dotnet/extensions
- 7d9baaf617741d775578c8018729ac5b75734c69
+ 8a574d2004260c3cd8e373937bb9659b81e6bc8d
-
+
https://github.com/dotnet/extensions
- 7d9baaf617741d775578c8018729ac5b75734c69
+ 8a574d2004260c3cd8e373937bb9659b81e6bc8d
-
+
https://github.com/dotnet/extensions
- 7d9baaf617741d775578c8018729ac5b75734c69
+ 8a574d2004260c3cd8e373937bb9659b81e6bc8d
-
+
https://github.com/dotnet/extensions
- 7d9baaf617741d775578c8018729ac5b75734c69
+ 8a574d2004260c3cd8e373937bb9659b81e6bc8d
-
+
https://github.com/dotnet/extensions
- 7d9baaf617741d775578c8018729ac5b75734c69
+ 8a574d2004260c3cd8e373937bb9659b81e6bc8d
-
+
https://github.com/dotnet/extensions
- 7d9baaf617741d775578c8018729ac5b75734c69
+ 8a574d2004260c3cd8e373937bb9659b81e6bc8d
-
+
https://github.com/dotnet/extensions
- 7d9baaf617741d775578c8018729ac5b75734c69
+ 8a574d2004260c3cd8e373937bb9659b81e6bc8d
-
+
https://github.com/dotnet/extensions
- 7d9baaf617741d775578c8018729ac5b75734c69
+ 8a574d2004260c3cd8e373937bb9659b81e6bc8d
-
+
https://github.com/dotnet/extensions
- 7d9baaf617741d775578c8018729ac5b75734c69
+ 8a574d2004260c3cd8e373937bb9659b81e6bc8d
-
+
https://github.com/dotnet/extensions
- 7d9baaf617741d775578c8018729ac5b75734c69
+ 8a574d2004260c3cd8e373937bb9659b81e6bc8d
-
+
https://github.com/dotnet/extensions
- 7d9baaf617741d775578c8018729ac5b75734c69
+ 8a574d2004260c3cd8e373937bb9659b81e6bc8d
-
+
https://github.com/dotnet/extensions
- 7d9baaf617741d775578c8018729ac5b75734c69
+ 8a574d2004260c3cd8e373937bb9659b81e6bc8d
-
+
https://github.com/dotnet/extensions
- 7d9baaf617741d775578c8018729ac5b75734c69
+ 8a574d2004260c3cd8e373937bb9659b81e6bc8d
-
+
https://github.com/dotnet/extensions
- 7d9baaf617741d775578c8018729ac5b75734c69
+ 8a574d2004260c3cd8e373937bb9659b81e6bc8d
-
+
https://github.com/dotnet/extensions
- 7d9baaf617741d775578c8018729ac5b75734c69
+ 8a574d2004260c3cd8e373937bb9659b81e6bc8d
-
+
https://github.com/dotnet/extensions
- 7d9baaf617741d775578c8018729ac5b75734c69
+ 8a574d2004260c3cd8e373937bb9659b81e6bc8d
-
+
https://github.com/dotnet/extensions
- 7d9baaf617741d775578c8018729ac5b75734c69
+ 8a574d2004260c3cd8e373937bb9659b81e6bc8d
-
+
https://github.com/dotnet/extensions
- 7d9baaf617741d775578c8018729ac5b75734c69
+ 8a574d2004260c3cd8e373937bb9659b81e6bc8d
-
+
https://github.com/dotnet/extensions
- 7d9baaf617741d775578c8018729ac5b75734c69
+ 8a574d2004260c3cd8e373937bb9659b81e6bc8d
-
+
https://github.com/dotnet/extensions
- 7d9baaf617741d775578c8018729ac5b75734c69
+ 8a574d2004260c3cd8e373937bb9659b81e6bc8d
-
+
https://github.com/dotnet/extensions
- 7d9baaf617741d775578c8018729ac5b75734c69
+ 8a574d2004260c3cd8e373937bb9659b81e6bc8d
-
+
https://github.com/dotnet/extensions
- 7d9baaf617741d775578c8018729ac5b75734c69
+ 8a574d2004260c3cd8e373937bb9659b81e6bc8d
-
+
https://github.com/dotnet/extensions
- 7d9baaf617741d775578c8018729ac5b75734c69
+ 8a574d2004260c3cd8e373937bb9659b81e6bc8d
-
+
https://github.com/dotnet/extensions
- 7d9baaf617741d775578c8018729ac5b75734c69
+ 8a574d2004260c3cd8e373937bb9659b81e6bc8d
-
+
https://github.com/dotnet/extensions
- 7d9baaf617741d775578c8018729ac5b75734c69
+ 8a574d2004260c3cd8e373937bb9659b81e6bc8d
-
+
https://github.com/dotnet/extensions
- 7d9baaf617741d775578c8018729ac5b75734c69
+ 8a574d2004260c3cd8e373937bb9659b81e6bc8d
-
+
https://github.com/dotnet/extensions
- 7d9baaf617741d775578c8018729ac5b75734c69
+ 8a574d2004260c3cd8e373937bb9659b81e6bc8d
-
+
https://github.com/dotnet/extensions
- 7d9baaf617741d775578c8018729ac5b75734c69
+ 8a574d2004260c3cd8e373937bb9659b81e6bc8d
-
+
https://github.com/dotnet/extensions
- 7d9baaf617741d775578c8018729ac5b75734c69
+ 8a574d2004260c3cd8e373937bb9659b81e6bc8d
-
+
https://github.com/dotnet/extensions
- 7d9baaf617741d775578c8018729ac5b75734c69
+ 8a574d2004260c3cd8e373937bb9659b81e6bc8d
-
- https://github.com/dotnet/extensions
- 7d9baaf617741d775578c8018729ac5b75734c69
-
-
- https://github.com/dotnet/extensions
- 7d9baaf617741d775578c8018729ac5b75734c69
-
-
- https://github.com/dotnet/extensions
- 7d9baaf617741d775578c8018729ac5b75734c69
-
-
- https://github.com/dotnet/extensions
- 7d9baaf617741d775578c8018729ac5b75734c69
-
-
- https://github.com/dotnet/extensions
- 7d9baaf617741d775578c8018729ac5b75734c69
-
-
- https://github.com/dotnet/extensions
- 7d9baaf617741d775578c8018729ac5b75734c69
-
-
- https://github.com/dotnet/extensions
- 7d9baaf617741d775578c8018729ac5b75734c69
-
-
- https://github.com/dotnet/extensions
- 7d9baaf617741d775578c8018729ac5b75734c69
-
-
- https://github.com/dotnet/extensions
- 7d9baaf617741d775578c8018729ac5b75734c69
-
-
- https://github.com/dotnet/extensions
- 7d9baaf617741d775578c8018729ac5b75734c69
-
-
- https://github.com/dotnet/extensions
- 7d9baaf617741d775578c8018729ac5b75734c69
-
-
- https://github.com/dotnet/extensions
- 7d9baaf617741d775578c8018729ac5b75734c69
-
-
- https://github.com/dotnet/extensions
- 7d9baaf617741d775578c8018729ac5b75734c69
-
-
- https://github.com/dotnet/extensions
- 7d9baaf617741d775578c8018729ac5b75734c69
-
-
- https://github.com/dotnet/extensions
- 7d9baaf617741d775578c8018729ac5b75734c69
-
-
- https://github.com/dotnet/extensions
- 7d9baaf617741d775578c8018729ac5b75734c69
-
-
- https://github.com/dotnet/extensions
- 7d9baaf617741d775578c8018729ac5b75734c69
-
-
- https://github.com/dotnet/corefx
- 0f7f38c4fd323b26da10cce95f857f77f0f09b48
-
-
- https://github.com/dotnet/corefx
- 0f7f38c4fd323b26da10cce95f857f77f0f09b48
+
+ https://github.com/dotnet/runtime
+ 35df31cc5564964617669cb0d6bcce48b90998b4
-
- https://github.com/dotnet/corefx
- 0f7f38c4fd323b26da10cce95f857f77f0f09b48
+
+ https://github.com/dotnet/runtime
+ 35df31cc5564964617669cb0d6bcce48b90998b4
-
- https://github.com/dotnet/corefx
- 0f7f38c4fd323b26da10cce95f857f77f0f09b48
+
+ https://github.com/dotnet/runtime
+ 35df31cc5564964617669cb0d6bcce48b90998b4
-
- https://github.com/dotnet/corefx
- 0f7f38c4fd323b26da10cce95f857f77f0f09b48
+
+ https://github.com/dotnet/runtime
+ 35df31cc5564964617669cb0d6bcce48b90998b4
-
- https://github.com/dotnet/corefx
- 0f7f38c4fd323b26da10cce95f857f77f0f09b48
+
+ https://github.com/dotnet/runtime
+ 35df31cc5564964617669cb0d6bcce48b90998b4
-
- https://github.com/dotnet/corefx
- 0f7f38c4fd323b26da10cce95f857f77f0f09b48
+
+ https://github.com/dotnet/runtime
+ 35df31cc5564964617669cb0d6bcce48b90998b4
-
- https://github.com/dotnet/corefx
- 8a3ffed558ddf943c1efa87d693227722d6af094
+
+ https://github.com/dotnet/runtime
+ 35df31cc5564964617669cb0d6bcce48b90998b4
-
- https://github.com/dotnet/corefx
- 0f7f38c4fd323b26da10cce95f857f77f0f09b48
+
+ https://github.com/dotnet/runtime
+ 35df31cc5564964617669cb0d6bcce48b90998b4
-
- https://github.com/dotnet/corefx
- 0f7f38c4fd323b26da10cce95f857f77f0f09b48
+
+ https://github.com/dotnet/runtime
+ 35df31cc5564964617669cb0d6bcce48b90998b4
-
- https://github.com/dotnet/corefx
- 0f7f38c4fd323b26da10cce95f857f77f0f09b48
+
+ https://github.com/dotnet/runtime
+ 35df31cc5564964617669cb0d6bcce48b90998b4
-
- https://github.com/dotnet/corefx
- 8a3ffed558ddf943c1efa87d693227722d6af094
+
+ https://github.com/dotnet/runtime
+ 35df31cc5564964617669cb0d6bcce48b90998b4
-
- https://github.com/dotnet/corefx
- 0f7f38c4fd323b26da10cce95f857f77f0f09b48
+
+ https://github.com/dotnet/runtime
+ 35df31cc5564964617669cb0d6bcce48b90998b4
-
- https://github.com/dotnet/corefx
- 0f7f38c4fd323b26da10cce95f857f77f0f09b48
+
+ https://github.com/dotnet/runtime
+ 35df31cc5564964617669cb0d6bcce48b90998b4
-
- https://github.com/dotnet/corefx
- 0f7f38c4fd323b26da10cce95f857f77f0f09b48
+
+ https://github.com/dotnet/runtime
+ 35df31cc5564964617669cb0d6bcce48b90998b4
-
- https://github.com/dotnet/corefx
- 0f7f38c4fd323b26da10cce95f857f77f0f09b48
+
+ https://github.com/dotnet/runtime
+ 35df31cc5564964617669cb0d6bcce48b90998b4
-
- https://github.com/dotnet/corefx
- 0f7f38c4fd323b26da10cce95f857f77f0f09b48
+
+ https://github.com/dotnet/runtime
+ 35df31cc5564964617669cb0d6bcce48b90998b4
-
- https://github.com/dotnet/corefx
- 0f7f38c4fd323b26da10cce95f857f77f0f09b48
+
+ https://github.com/dotnet/runtime
+ 35df31cc5564964617669cb0d6bcce48b90998b4
-
- https://github.com/dotnet/corefx
- 0f7f38c4fd323b26da10cce95f857f77f0f09b48
+
+ https://github.com/dotnet/runtime
+ 35df31cc5564964617669cb0d6bcce48b90998b4
-
- https://github.com/dotnet/corefx
- e946cebe43a510e8c6476bbc8185d1445df33a1a
+
+ https://github.com/dotnet/runtime
+ 35df31cc5564964617669cb0d6bcce48b90998b4
-
- https://github.com/dotnet/corefx
- 0f7f38c4fd323b26da10cce95f857f77f0f09b48
+
+ https://github.com/dotnet/runtime
+ 35df31cc5564964617669cb0d6bcce48b90998b4
-
- https://github.com/dotnet/corefx
- 0f7f38c4fd323b26da10cce95f857f77f0f09b48
+
+ https://github.com/dotnet/runtime
+ 35df31cc5564964617669cb0d6bcce48b90998b4
-
- https://github.com/dotnet/core-setup
- 4a9f85e9f89d7f686fef2ae2109d876b1e2eed2a
+
+ https://github.com/dotnet/runtime
+ 35df31cc5564964617669cb0d6bcce48b90998b4
-
- https://github.com/dotnet/core-setup
- 4a9f85e9f89d7f686fef2ae2109d876b1e2eed2a
+
+ https://github.com/dotnet/runtime
+ 35df31cc5564964617669cb0d6bcce48b90998b4
-
- https://github.com/dotnet/core-setup
- 7d57652f33493fa022125b7f63aad0d70c52d810
-
-
- https://github.com/dotnet/core-setup
- 4a9f85e9f89d7f686fef2ae2109d876b1e2eed2a
-
-
-
- https://github.com/dotnet/core-setup
- 65f04fb6db7a5e198d05dbebd5c4ad21eb018f89
-
-
- https://github.com/aspnet/Extensions
- 4e1be2fb546751c773968d7b40ff7f4b62887153
+
+ https://github.com/dotnet/runtime
+ 35df31cc5564964617669cb0d6bcce48b90998b4
-
- https://github.com/dotnet/corefx
- 0f7f38c4fd323b26da10cce95f857f77f0f09b48
+
+ https://github.com/dotnet/runtime
+ 35df31cc5564964617669cb0d6bcce48b90998b4
-
+
https://github.com/dotnet/extensions
- 7d9baaf617741d775578c8018729ac5b75734c69
+ 8a574d2004260c3cd8e373937bb9659b81e6bc8d
-
+
https://github.com/dotnet/arcade
- 15f00efd583eab4372b2e9ca25bd80ace5b119ad
+ 16d4350184cf362cd59807b589d1c93803025abc
-
+
https://github.com/dotnet/arcade
- 15f00efd583eab4372b2e9ca25bd80ace5b119ad
+ 16d4350184cf362cd59807b589d1c93803025abc
-
+
https://github.com/dotnet/arcade
- 15f00efd583eab4372b2e9ca25bd80ace5b119ad
-
-
- https://github.com/dotnet/extensions
- 7d9baaf617741d775578c8018729ac5b75734c69
+ 16d4350184cf362cd59807b589d1c93803025abc
-
+
https://github.com/dotnet/roslyn
- d8180a5ecafb92adcfbfe8cf9199eb23be1a1ccf
+ c0fc88e0ddd03abbdac8fc7e0d280b70d7208382
diff --git a/eng/Versions.props b/eng/Versions.props
index d28960c8370e..3ebbda029f27 100644
--- a/eng/Versions.props
+++ b/eng/Versions.props
@@ -6,34 +6,34 @@
-->
- 3
- 1
- 3
- 0
+ 5
+ 0
+ 0
+ 3
- true
+ false
release
+ preview
+ Preview $(PreReleaseVersionIteration)
true
false
- servicing
- Servicing
-
- 4
- preview$(BlazorClientPreReleasePreviewNumber)
$(AspNetCoreMajorVersion).$(AspNetCoreMinorVersion)
-
- 3.1.0
false
-
- true
+
+ true
+
+ true
$(AspNetCoreMajorVersion).$(AspNetCoreMinorVersion).$(AspNetCorePatchVersion)
$(VersionPrefix)
- $(AspNetCoreMajorVersion).$(AspNetCoreMinorVersion).3
+ $(AspNetCoreMajorVersion).$(AspNetCoreMinorVersion).0
0.3.$(AspNetCorePatchVersion)
$([MSBuild]::Add(10, $(AspNetCoreMajorVersion)))
@@ -62,116 +62,94 @@
-->
- 1.0.0-beta.20113.5
+ 5.0.0-beta.20162.3
- 3.4.1-beta4-20127-10
+ 3.6.0-2.20166.3
- 3.1.3
- 3.1.3-servicing.20128.1
- 3.1.0
- 3.1.3
- 2.1.0
+ 5.0.0-preview.3-runtime.20169.13
+ 5.0.0-preview.3.20169.13
+ 5.0.0-preview.3.20169.13
+ 5.0.0-preview.3.20169.13
- 1.1.0
- 4.7.0
- 4.7.0
- 4.7.0
- 4.7.0
- 4.7.0
- 4.7.0
- 4.7.1
- 4.7.0
- 4.7.0
- 1.8.0
- 4.7.1
- 4.7.0
- 4.7.0
- 4.7.0
- 4.7.0
- 4.7.0
- 4.7.0
- 4.7.0
- 4.7.1
- 4.7.0
- 4.7.0
+ 5.0.0-preview.3.20169.13
+ 5.0.0-preview.3.20169.13
+ 5.0.0-preview.3.20169.13
+ 5.0.0-preview.3.20169.13
+ 5.0.0-preview.3.20169.13
+ 5.0.0-preview.3.20169.13
+ 5.0.0-preview.3.20169.13
+ 5.0.0-preview.3.20169.13
+ 5.0.0-preview.3.20169.13
+ 5.0.0-preview.3.20169.13
+ 5.0.0-preview.3.20169.13
+ 5.0.0-preview.3.20169.13
+ 5.0.0-preview.3.20169.13
+ 5.0.0-preview.3.20169.13
+ 5.0.0-preview.3.20169.13
+ 5.0.0-preview.3.20169.13
+ 5.0.0-preview.3.20169.13
+ 5.0.0-preview.3.20169.13
+ 5.0.0-preview.3.20169.13
+ 5.0.0-preview.3.20169.13
- 3.1.0
-
- 3.1.0-preview4.19605.1
-
- 3.1.3-servicing.20128.2
- 3.1.3-servicing.20128.2
- 3.1.3-servicing.20128.2
- 3.1.3-servicing.20128.2
- 3.1.3-servicing.20128.2
- 3.1.3
- 3.1.3
- 3.1.3
- 3.1.3
- 3.1.3-servicing.20128.2
- 3.1.3
- 3.1.3
- 3.1.3
- 3.1.3
- 3.1.3
- 3.1.3
- 3.1.3
- 3.1.3
- 3.1.3
- 3.1.3
- 3.1.3
- 3.1.3
- 3.1.3
- 3.1.3
- 3.1.3
- 3.1.3
- 3.1.3
- 3.1.3
- 3.1.3
- 3.1.3
- 3.1.3
- 3.1.3
- 3.1.3-servicing.20128.2
- 3.1.3
- 3.1.3
- 3.1.3-servicing.20128.2
- 3.1.3
- 3.1.3
- 3.1.3
- 3.1.3
- 3.1.3
- 3.1.3
- 3.1.3
- 3.1.3
- 3.1.3
- 3.1.3
- 3.1.3
- 3.1.3-servicing.20128.2
- 3.1.3
- 3.1.3
- 3.1.3
- 3.1.3
- 3.1.3
- 3.1.3-servicing.20128.2
- 3.1.3
- 3.1.3-servicing.20128.2
- 3.1.3-servicing.20128.2
- 3.1.3
- 3.1.0-rtm.19565.4
- 3.1.3
-
- 3.1.3
- 3.1.3
- 3.1.3
- 3.1.3
- 3.1.3
- 3.1.3
- 3.1.3
-
- 3.1.3
- 3.1.3
- 3.1.3
- 3.1.3
+ 5.0.0-preview.3.20169.13
+
+ 3.2.0-preview1.20067.1
+
+ 5.0.0-preview.3.20170.1
+ 5.0.0-preview.3.20170.1
+ 5.0.0-preview.3.20170.1
+ 5.0.0-preview.3.20170.1
+ 5.0.0-preview.3.20170.1
+ 5.0.0-preview.3.20170.1
+ 5.0.0-preview.3.20170.1
+ 5.0.0-preview.3.20170.1
+ 5.0.0-preview.3.20170.1
+ 5.0.0-preview.3.20170.1
+ 5.0.0-preview.3.20170.1
+ 5.0.0-preview.3.20170.1
+ 5.0.0-preview.3.20170.1
+ 5.0.0-preview.3.20170.1
+ 5.0.0-preview.3.20170.1
+ 5.0.0-preview.3.20170.1
+ 5.0.0-preview.3.20170.1
+ 5.0.0-preview.3.20170.1
+ 5.0.0-preview.3.20170.1
+ 5.0.0-preview.3.20170.1
+ 5.0.0-preview.3.20170.1
+ 5.0.0-preview.3.20170.1
+ 5.0.0-preview.3.20170.1
+ 5.0.0-preview.3.20170.1
+ 5.0.0-preview.3.20170.1
+ 5.0.0-preview.3.20170.1
+ 5.0.0-preview.3.20170.1
+ 5.0.0-preview.3.20170.1
+ 5.0.0-preview.3.20170.1
+ 5.0.0-preview.3.20170.1
+ 5.0.0-preview.3.20170.1
+ 5.0.0-preview.3.20170.1
+ 5.0.0-preview.3.20170.1
+ 5.0.0-preview.3.20170.1
+ 5.0.0-preview.3.20170.1
+ 5.0.0-preview.3.20170.1
+ 5.0.0-preview.3.20170.1
+ 5.0.0-preview.3.20170.1
+ 5.0.0-preview.3.20170.1
+ 5.0.0-preview.3.20170.1
+ 5.0.0-preview.3.20170.1
+
+ 5.0.0-preview.3.20174.9
+ 5.0.0-preview.3.20174.9
+ 5.0.0-preview.3.20174.9
+ 5.0.0-preview.3.20174.9
+ 5.0.0-preview.3.20174.9
+ 5.0.0-preview.3.20174.9
+ 5.0.0-preview.3.20174.9
+
+ 5.0.0-preview.3.20170.3
+ 5.0.0-preview.3.20170.3
+ 5.0.0-preview.3.20170.3
+ 5.0.0-preview.3.20170.3
+ 4.7.0
+ 2.0.3
4.5.0
4.4.0
0.3.0-alpha.19317.1
4.3.0
4.3.2
- 4.5.2
+ 4.3.0
+ 4.5.3
+ 4.5.0
1.10.0
5.2.6
3.1.1-preview4.19614.4
- 2.3.2
- 10.0.1
+ 1.0.0
15.8.166
+ 1.2.0
15.8.166
1.2.6
15.8.166
3.0.0
3.0.0
3.0.0
- 5.8.4
- 5.8.4
3.19.8
5.5.0
5.5.0
@@ -231,19 +211,24 @@
2.1.1
2.2.0
+ 3.1.3
0.9.9
- 0.10.13
+ 0.12.0
4.2.1
+ 2.3.0
4.2.1
- 3.8.0
+ 3.10.0
2.27.0
+ 2.27.0
+ 2.27.0
+ 2.27.0
3.0.0
3.0.0
3.0.0
3.0.0
3.0.0
- 1.7.3.7
+ 2.1.90
4.10.0
0.10.1
1.0.2
diff --git a/eng/Workarounds.props b/eng/Workarounds.props
index 3ed1473baff2..eeb9004c6d23 100644
--- a/eng/Workarounds.props
+++ b/eng/Workarounds.props
@@ -21,7 +21,7 @@
$(NoWarn);NU5131
-
+
$(NoWarn);NU5048
diff --git a/eng/Workarounds.targets b/eng/Workarounds.targets
index 8f51713dc010..0e2159fd3c25 100644
--- a/eng/Workarounds.targets
+++ b/eng/Workarounds.targets
@@ -1,8 +1,8 @@
-
+
- 3.1
+ 5.0
@@ -16,7 +16,7 @@
@@ -25,12 +25,7 @@
-
-
- $(MicrosoftNETCorePlatformsPackageVersion)
-
-
-
+
+
+
+
+
+
+
diff --git a/eng/common/CheckSymbols.ps1 b/eng/common/CheckSymbols.ps1
deleted file mode 100644
index b8d84607b89b..000000000000
--- a/eng/common/CheckSymbols.ps1
+++ /dev/null
@@ -1,158 +0,0 @@
-param(
- [Parameter(Mandatory=$true)][string] $InputPath, # Full path to directory where NuGet packages to be checked are stored
- [Parameter(Mandatory=$true)][string] $ExtractPath, # Full path to directory where the packages will be extracted during validation
- [Parameter(Mandatory=$true)][string] $SymbolToolPath # Full path to directory where dotnet symbol-tool was installed
-)
-
-Add-Type -AssemblyName System.IO.Compression.FileSystem
-
-function FirstMatchingSymbolDescriptionOrDefault {
- param(
- [string] $FullPath, # Full path to the module that has to be checked
- [string] $TargetServerParam, # Parameter to pass to `Symbol Tool` indicating the server to lookup for symbols
- [string] $SymbolsPath
- )
-
- $FileName = [System.IO.Path]::GetFileName($FullPath)
- $Extension = [System.IO.Path]::GetExtension($FullPath)
-
- # Those below are potential symbol files that the `dotnet symbol` might
- # return. Which one will be returned depend on the type of file we are
- # checking and which type of file was uploaded.
-
- # The file itself is returned
- $SymbolPath = $SymbolsPath + "\" + $FileName
-
- # PDB file for the module
- $PdbPath = $SymbolPath.Replace($Extension, ".pdb")
-
- # PDB file for R2R module (created by crossgen)
- $NGenPdb = $SymbolPath.Replace($Extension, ".ni.pdb")
-
- # DBG file for a .so library
- $SODbg = $SymbolPath.Replace($Extension, ".so.dbg")
-
- # DWARF file for a .dylib
- $DylibDwarf = $SymbolPath.Replace($Extension, ".dylib.dwarf")
-
- .\dotnet-symbol.exe --symbols --modules --windows-pdbs $TargetServerParam $FullPath -o $SymbolsPath | Out-Null
-
- if (Test-Path $PdbPath) {
- return "PDB"
- }
- elseif (Test-Path $NGenPdb) {
- return "NGen PDB"
- }
- elseif (Test-Path $SODbg) {
- return "DBG for SO"
- }
- elseif (Test-Path $DylibDwarf) {
- return "Dwarf for Dylib"
- }
- elseif (Test-Path $SymbolPath) {
- return "Module"
- }
- else {
- return $null
- }
-}
-
-function CountMissingSymbols {
- param(
- [string] $PackagePath # Path to a NuGet package
- )
-
- # Ensure input file exist
- if (!(Test-Path $PackagePath)) {
- throw "Input file does not exist: $PackagePath"
- }
-
- # Extensions for which we'll look for symbols
- $RelevantExtensions = @(".dll", ".exe", ".so", ".dylib")
-
- # How many files are missing symbol information
- $MissingSymbols = 0
-
- $PackageId = [System.IO.Path]::GetFileNameWithoutExtension($PackagePath)
- $PackageGuid = New-Guid
- $ExtractPath = Join-Path -Path $ExtractPath -ChildPath $PackageGuid
- $SymbolsPath = Join-Path -Path $ExtractPath -ChildPath "Symbols"
-
- [System.IO.Compression.ZipFile]::ExtractToDirectory($PackagePath, $ExtractPath)
-
- # Makes easier to reference `symbol tool`
- Push-Location $SymbolToolPath
-
- Get-ChildItem -Recurse $ExtractPath |
- Where-Object {$RelevantExtensions -contains $_.Extension} |
- ForEach-Object {
- if ($_.FullName -Match "\\ref\\") {
- Write-Host "`t Ignoring reference assembly file" $_.FullName
- return
- }
-
- $SymbolsOnMSDL = FirstMatchingSymbolDescriptionOrDefault $_.FullName "--microsoft-symbol-server" $SymbolsPath
- $SymbolsOnSymWeb = FirstMatchingSymbolDescriptionOrDefault $_.FullName "--internal-server" $SymbolsPath
-
- Write-Host -NoNewLine "`t Checking file" $_.FullName "... "
-
- if ($SymbolsOnMSDL -ne $null -and $SymbolsOnSymWeb -ne $null) {
- Write-Host "Symbols found on MSDL (" $SymbolsOnMSDL ") and SymWeb (" $SymbolsOnSymWeb ")"
- }
- else {
- $MissingSymbols++
-
- if ($SymbolsOnMSDL -eq $null -and $SymbolsOnSymWeb -eq $null) {
- Write-Host "No symbols found on MSDL or SymWeb!"
- }
- else {
- if ($SymbolsOnMSDL -eq $null) {
- Write-Host "No symbols found on MSDL!"
- }
- else {
- Write-Host "No symbols found on SymWeb!"
- }
- }
- }
- }
-
- Pop-Location
-
- return $MissingSymbols
-}
-
-function CheckSymbolsAvailable {
- if (Test-Path $ExtractPath) {
- Remove-Item $ExtractPath -Force -Recurse -ErrorAction SilentlyContinue
- }
-
- Get-ChildItem "$InputPath\*.nupkg" |
- ForEach-Object {
- $FileName = $_.Name
-
- # These packages from Arcade-Services include some native libraries that
- # our current symbol uploader can't handle. Below is a workaround until
- # we get issue: https://github.com/dotnet/arcade/issues/2457 sorted.
- if ($FileName -Match "Microsoft\.DotNet\.Darc\.") {
- Write-Host "Ignoring Arcade-services file: $FileName"
- Write-Host
- return
- }
- elseif ($FileName -Match "Microsoft\.DotNet\.Maestro\.Tasks\.") {
- Write-Host "Ignoring Arcade-services file: $FileName"
- Write-Host
- return
- }
-
- Write-Host "Validating $FileName "
- $Status = CountMissingSymbols "$InputPath\$FileName"
-
- if ($Status -ne 0) {
- Write-Error "Missing symbols for $Status modules in the package $FileName"
- }
-
- Write-Host
- }
-}
-
-CheckSymbolsAvailable
diff --git a/eng/common/PublishToPackageFeed.proj b/eng/common/PublishToPackageFeed.proj
deleted file mode 100644
index a1b1333723eb..000000000000
--- a/eng/common/PublishToPackageFeed.proj
+++ /dev/null
@@ -1,83 +0,0 @@
-
-
-
-
-
- netcoreapp2.1
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- https://dotnetfeed.blob.core.windows.net/dotnet-core/index.json
- https://dotnetfeed.blob.core.windows.net/arcade-validation/index.json
- https://dotnetfeed.blob.core.windows.net/aspnet-aspnetcore/index.json
- https://dotnetfeed.blob.core.windows.net/aspnet-aspnetcore-tooling/index.json
- https://dotnetfeed.blob.core.windows.net/aspnet-entityframeworkcore/index.json
- https://dotnetfeed.blob.core.windows.net/aspnet-extensions/index.json
- https://dotnetfeed.blob.core.windows.net/dotnet-coreclr/index.json
- https://dotnetfeed.blob.core.windows.net/dotnet-sdk/index.json
- https://dotnetfeed.blob.core.windows.net/dotnet-tools-internal/index.json
- https://dotnetfeed.blob.core.windows.net/dotnet-toolset/index.json
- https://dotnetfeed.blob.core.windows.net/dotnet-windowsdesktop/index.json
- https://dotnetfeed.blob.core.windows.net/nuget-nugetclient/index.json
- https://dotnetfeed.blob.core.windows.net/aspnet-entityframework6/index.json
- https://dotnetfeed.blob.core.windows.net/aspnet-blazor/index.json
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/eng/common/PublishToSymbolServers.proj b/eng/common/PublishToSymbolServers.proj
deleted file mode 100644
index 5d55e312b012..000000000000
--- a/eng/common/PublishToSymbolServers.proj
+++ /dev/null
@@ -1,82 +0,0 @@
-
-
-
-
-
- netcoreapp2.1
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 3650
- true
- false
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/eng/common/SetupNugetSources.ps1 b/eng/common/SetupNugetSources.ps1
index a8b5280d9ddd..a5a1e711d79c 100644
--- a/eng/common/SetupNugetSources.ps1
+++ b/eng/common/SetupNugetSources.ps1
@@ -83,7 +83,7 @@ function AddCredential($creds, $source, $username, $password) {
$passwordElement.SetAttribute("value", $Password)
}
-function InsertMaestroPrivateFeedCredentials($Sources, $Creds, $Username, $Password) {
+function InsertMaestroPrivateFeedCredentials($Sources, $Creds, $Password) {
$maestroPrivateSources = $Sources.SelectNodes("add[contains(@key,'darc-int')]")
Write-Host "Inserting credentials for $($maestroPrivateSources.Count) Maestro's private feeds."
@@ -123,21 +123,19 @@ if ($creds -eq $null) {
$doc.DocumentElement.AppendChild($creds) | Out-Null
}
-$userName = "dn-bot"
-
# Insert credential nodes for Maestro's private feeds
-InsertMaestroPrivateFeedCredentials -Sources $sources -Creds $creds -Username $userName -Password $Password
+InsertMaestroPrivateFeedCredentials -Sources $sources -Creds $creds -Password $Password
$dotnet3Source = $sources.SelectSingleNode("add[@key='dotnet3']")
if ($dotnet3Source -ne $null) {
- AddPackageSource -Sources $sources -SourceName "dotnet3-internal" -SourceEndPoint "https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3-internal/nuget/v2" -Creds $creds -Username $userName -Password $Password
- AddPackageSource -Sources $sources -SourceName "dotnet3-internal-transport" -SourceEndPoint "https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3-internal-transport/nuget/v2" -Creds $creds -Username $userName -Password $Password
+ AddPackageSource -Sources $sources -SourceName "dotnet3-internal" -SourceEndPoint "https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3-internal/nuget/v2" -Creds $creds -Username "dn-bot" -Password $Password
+ AddPackageSource -Sources $sources -SourceName "dotnet3-internal-transport" -SourceEndPoint "https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3-internal-transport/nuget/v2" -Creds $creds -Username "dn-bot" -Password $Password
}
$dotnet31Source = $sources.SelectSingleNode("add[@key='dotnet3.1']")
if ($dotnet31Source -ne $null) {
- AddPackageSource -Sources $sources -SourceName "dotnet3.1-internal" -SourceEndPoint "https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3.1-internal/nuget/v2" -Creds $creds -Username $userName -Password $Password
- AddPackageSource -Sources $sources -SourceName "dotnet3.1-internal-transport" -SourceEndPoint "https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3.1-internal-transport/nuget/v2" -Creds $creds -Username $userName -Password $Password
+ AddPackageSource -Sources $sources -SourceName "dotnet3.1-internal" -SourceEndPoint "https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3.1-internal/nuget/v2" -Creds $creds -Username "dn-bot" -Password $Password
+ AddPackageSource -Sources $sources -SourceName "dotnet3.1-internal-transport" -SourceEndPoint "https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3.1-internal-transport/nuget/v2" -Creds $creds -Username "dn-bot" -Password $Password
}
-$doc.Save($filename)
\ No newline at end of file
+$doc.Save($filename)
diff --git a/eng/common/SetupNugetSources.sh b/eng/common/SetupNugetSources.sh
index 4ebb1e5a4400..7d6fef27fe49 100644
--- a/eng/common/SetupNugetSources.sh
+++ b/eng/common/SetupNugetSources.sh
@@ -146,4 +146,4 @@ for FeedName in ${PackageSources[@]} ; do
sed -i.bak "s|$PackageSourceCredentialsNodeFooter|$NewCredential${NL}$PackageSourceCredentialsNodeFooter|" $ConfigFile
fi
-done
\ No newline at end of file
+done
diff --git a/eng/common/SigningValidation.proj b/eng/common/SigningValidation.proj
deleted file mode 100644
index 3d0ac80af3ff..000000000000
--- a/eng/common/SigningValidation.proj
+++ /dev/null
@@ -1,83 +0,0 @@
-
-
-
-
-
- netcoreapp2.1
-
-
-
-
-
-
-
- $(NuGetPackageRoot)Microsoft.DotNet.SignCheck\$(SignCheckVersion)\tools\Microsoft.DotNet.SignCheck.exe
-
- $(PackageBasePath)
- signcheck.log
- signcheck.errors.log
- signcheck.exclusions.txt
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/eng/common/SourceLinkValidation.ps1 b/eng/common/SourceLinkValidation.ps1
deleted file mode 100644
index cb2d28cb99e1..000000000000
--- a/eng/common/SourceLinkValidation.ps1
+++ /dev/null
@@ -1,184 +0,0 @@
-param(
- [Parameter(Mandatory=$true)][string] $InputPath, # Full path to directory where Symbols.NuGet packages to be checked are stored
- [Parameter(Mandatory=$true)][string] $ExtractPath, # Full path to directory where the packages will be extracted during validation
- [Parameter(Mandatory=$true)][string] $SourceLinkToolPath, # Full path to directory where dotnet SourceLink CLI was installed
- [Parameter(Mandatory=$true)][string] $GHRepoName, # GitHub name of the repo including the Org. E.g., dotnet/arcade
- [Parameter(Mandatory=$true)][string] $GHCommit # GitHub commit SHA used to build the packages
-)
-
-# 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
-# all files present in the repo at a specific commit point.
-$global:RepoFiles = @{}
-
-$ValidatePackage = {
- param(
- [string] $PackagePath # Full path to a Symbols.NuGet package
- )
-
- # Ensure input file exist
- if (!(Test-Path $PackagePath)) {
- throw "Input file does not exist: $PackagePath"
- }
-
- # Extensions for which we'll look for SourceLink information
- # For now we'll only care about Portable & Embedded PDBs
- $RelevantExtensions = @(".dll", ".exe", ".pdb")
-
- Write-Host -NoNewLine "Validating" ([System.IO.Path]::GetFileName($PackagePath)) "... "
-
- $PackageId = [System.IO.Path]::GetFileNameWithoutExtension($PackagePath)
- $ExtractPath = Join-Path -Path $using:ExtractPath -ChildPath $PackageId
- $FailedFiles = 0
-
- Add-Type -AssemblyName System.IO.Compression.FileSystem
-
- [System.IO.Directory]::CreateDirectory($ExtractPath);
-
- $zip = [System.IO.Compression.ZipFile]::OpenRead($PackagePath)
-
- $zip.Entries |
- Where-Object {$RelevantExtensions -contains [System.IO.Path]::GetExtension($_.Name)} |
- ForEach-Object {
- $FileName = $_.FullName
- $Extension = [System.IO.Path]::GetExtension($_.Name)
- $FakeName = -Join((New-Guid), $Extension)
- $TargetFile = Join-Path -Path $ExtractPath -ChildPath $FakeName
-
- # We ignore resource DLLs
- if ($FileName.EndsWith(".resources.dll")) {
- return
- }
-
- [System.IO.Compression.ZipFileExtensions]::ExtractToFile($_, $TargetFile, $true)
-
- $ValidateFile = {
- param(
- [string] $FullPath, # Full path to the module that has to be checked
- [string] $RealPath,
- [ref] $FailedFiles
- )
-
- # Makes easier to reference `sourcelink cli`
- Push-Location $using:SourceLinkToolPath
-
- $SourceLinkInfos = .\sourcelink.exe print-urls $FullPath | Out-String
-
- if ($LASTEXITCODE -eq 0 -and -not ([string]::IsNullOrEmpty($SourceLinkInfos))) {
- $NumFailedLinks = 0
-
- # We only care about Http addresses
- $Matches = (Select-String '(http[s]?)(:\/\/)([^\s,]+)' -Input $SourceLinkInfos -AllMatches).Matches
-
- if ($Matches.Count -ne 0) {
- $Matches.Value |
- ForEach-Object {
- $Link = $_
- $CommitUrl = -Join("https://raw.githubusercontent.com/", $using:GHRepoName, "/", $using:GHCommit, "/")
- $FilePath = $Link.Replace($CommitUrl, "")
- $Status = 200
- $Cache = $using:RepoFiles
-
- if ( !($Cache.ContainsKey($FilePath)) ) {
- try {
- $Uri = $Link -as [System.URI]
-
- # Only GitHub links are valid
- if ($Uri.AbsoluteURI -ne $null -and $Uri.Host -match "github") {
- $Status = (Invoke-WebRequest -Uri $Link -UseBasicParsing -Method HEAD -TimeoutSec 5).StatusCode
- }
- else {
- $Status = 0
- }
- }
- catch {
- $Status = 0
- }
- }
-
- if ($Status -ne 200) {
- if ($NumFailedLinks -eq 0) {
- if ($FailedFiles.Value -eq 0) {
- Write-Host
- }
-
- Write-Host "`tFile $RealPath has broken links:"
- }
-
- Write-Host "`t`tFailed to retrieve $Link"
-
- $NumFailedLinks++
- }
- }
- }
-
- if ($NumFailedLinks -ne 0) {
- $FailedFiles.value++
- $global:LASTEXITCODE = 1
- }
- }
-
- Pop-Location
- }
-
- &$ValidateFile $TargetFile $FileName ([ref]$FailedFiles)
- }
-
- $zip.Dispose()
-
- if ($FailedFiles -eq 0) {
- Write-Host "Passed."
- }
-}
-
-function ValidateSourceLinkLinks {
- if (!($GHRepoName -Match "^[^\s\/]+/[^\s\/]+$")) {
- Write-Host "GHRepoName should be in the format /"
- $global:LASTEXITCODE = 1
- return
- }
-
- if (!($GHCommit -Match "^[0-9a-fA-F]{40}$")) {
- Write-Host "GHCommit should be a 40 chars hexadecimal string"
- $global:LASTEXITCODE = 1
- return
- }
-
- $RepoTreeURL = -Join("https://api.github.com/repos/", $GHRepoName, "/git/trees/", $GHCommit, "?recursive=1")
- $CodeExtensions = @(".cs", ".vb", ".fs", ".fsi", ".fsx", ".fsscript")
-
- try {
- # Retrieve the list of files in the repo at that particular commit point and store them in the RepoFiles hash
- $Data = Invoke-WebRequest $RepoTreeURL | ConvertFrom-Json | Select-Object -ExpandProperty tree
-
- foreach ($file in $Data) {
- $Extension = [System.IO.Path]::GetExtension($file.path)
-
- if ($CodeExtensions.Contains($Extension)) {
- $RepoFiles[$file.path] = 1
- }
- }
- }
- catch {
- Write-Host "Problems downloading the list of files from the repo. Url used: $RepoTreeURL"
- $global:LASTEXITCODE = 1
- return
- }
-
- if (Test-Path $ExtractPath) {
- Remove-Item $ExtractPath -Force -Recurse -ErrorAction SilentlyContinue
- }
-
- # Process each NuGet package in parallel
- $Jobs = @()
- Get-ChildItem "$InputPath\*.symbols.nupkg" |
- ForEach-Object {
- $Jobs += Start-Job -ScriptBlock $ValidatePackage -ArgumentList $_.FullName
- }
-
- foreach ($Job in $Jobs) {
- Wait-Job -Id $Job.Id | Receive-Job
- }
-}
-
-Measure-Command { ValidateSourceLinkLinks }
diff --git a/eng/common/build.ps1 b/eng/common/build.ps1
index e001ccb481cf..813d440d2a83 100644
--- a/eng/common/build.ps1
+++ b/eng/common/build.ps1
@@ -18,6 +18,7 @@ Param(
[switch] $sign,
[switch] $pack,
[switch] $publish,
+ [switch] $clean,
[switch][Alias('bl')]$binaryLog,
[switch] $ci,
[switch] $prepareMachine,
@@ -25,49 +26,55 @@ Param(
[Parameter(ValueFromRemainingArguments=$true)][String[]]$properties
)
-. $PSScriptRoot\tools.ps1
-
+# Unset 'Platform' environment variable to avoid unwanted collision in InstallDotNetCore.targets file
+# some computer has this env var defined (e.g. Some HP)
+if($env:Platform) {
+ $env:Platform=""
+}
function Print-Usage() {
- Write-Host "Common settings:"
- Write-Host " -configuration Build configuration: 'Debug' or 'Release' (short: -c)"
- Write-Host " -platform Platform configuration: 'x86', 'x64' or any valid Platform value to pass to msbuild"
- Write-Host " -verbosity Msbuild verbosity: q[uiet], m[inimal], n[ormal], d[etailed], and diag[nostic] (short: -v)"
- Write-Host " -binaryLog Output binary log (short: -bl)"
- Write-Host " -help Print help and exit"
- Write-Host ""
-
- Write-Host "Actions:"
- Write-Host " -restore Restore dependencies (short: -r)"
- Write-Host " -build Build solution (short: -b)"
- Write-Host " -rebuild Rebuild solution"
- Write-Host " -deploy Deploy built VSIXes"
- Write-Host " -deployDeps Deploy dependencies (e.g. VSIXes for integration tests)"
- Write-Host " -test Run all unit tests in the solution (short: -t)"
- Write-Host " -integrationTest Run all integration tests in the solution"
- Write-Host " -performanceTest Run all performance tests in the solution"
- Write-Host " -pack Package build outputs into NuGet packages and Willow components"
- Write-Host " -sign Sign build outputs"
- Write-Host " -publish Publish artifacts (e.g. symbols)"
- Write-Host ""
-
- Write-Host "Advanced settings:"
- Write-Host " -projects Semi-colon delimited list of sln/proj's to build. Globbing is supported (*.sln)"
- Write-Host " -ci Set when running on CI server"
- Write-Host " -prepareMachine Prepare machine for CI run, clean up processes after build"
- Write-Host " -warnAsError Sets warnaserror msbuild parameter ('true' or 'false')"
- Write-Host " -msbuildEngine Msbuild engine to use to run build ('dotnet', 'vs', or unspecified)."
- Write-Host ""
-
- Write-Host "Command line arguments not listed above are passed thru to msbuild."
- Write-Host "The above arguments can be shortened as much as to be unambiguous (e.g. -co for configuration, -t for test, etc.)."
+ Write-Host "Common settings:"
+ Write-Host " -configuration Build configuration: 'Debug' or 'Release' (short: -c)"
+ Write-Host " -platform Platform configuration: 'x86', 'x64' or any valid Platform value to pass to msbuild"
+ Write-Host " -verbosity Msbuild verbosity: q[uiet], m[inimal], n[ormal], d[etailed], and diag[nostic] (short: -v)"
+ Write-Host " -binaryLog Output binary log (short: -bl)"
+ Write-Host " -help Print help and exit"
+ Write-Host ""
+
+ Write-Host "Actions:"
+ Write-Host " -restore Restore dependencies (short: -r)"
+ Write-Host " -build Build solution (short: -b)"
+ Write-Host " -rebuild Rebuild solution"
+ Write-Host " -deploy Deploy built VSIXes"
+ Write-Host " -deployDeps Deploy dependencies (e.g. VSIXes for integration tests)"
+ Write-Host " -test Run all unit tests in the solution (short: -t)"
+ Write-Host " -integrationTest Run all integration tests in the solution"
+ Write-Host " -performanceTest Run all performance tests in the solution"
+ Write-Host " -pack Package build outputs into NuGet packages and Willow components"
+ Write-Host " -sign Sign build outputs"
+ Write-Host " -publish Publish artifacts (e.g. symbols)"
+ Write-Host " -clean Clean the solution"
+ Write-Host ""
+
+ Write-Host "Advanced settings:"
+ Write-Host " -projects Semi-colon delimited list of sln/proj's to build. Globbing is supported (*.sln)"
+ Write-Host " -ci Set when running on CI server"
+ Write-Host " -prepareMachine Prepare machine for CI run, clean up processes after build"
+ Write-Host " -warnAsError Sets warnaserror msbuild parameter ('true' or 'false')"
+ Write-Host " -msbuildEngine Msbuild engine to use to run build ('dotnet', 'vs', or unspecified)."
+ Write-Host ""
+
+ Write-Host "Command line arguments not listed above are passed thru to msbuild."
+ Write-Host "The above arguments can be shortened as much as to be unambiguous (e.g. -co for configuration, -t for test, etc.)."
}
+. $PSScriptRoot\tools.ps1
+
function InitializeCustomToolset {
if (-not $restore) {
return
}
- $script = Join-Path $EngRoot "restore-toolset.ps1"
+ $script = Join-Path $EngRoot 'restore-toolset.ps1'
if (Test-Path $script) {
. $script
@@ -78,8 +85,8 @@ function Build {
$toolsetBuildProj = InitializeToolset
InitializeCustomToolset
- $bl = if ($binaryLog) { "/bl:" + (Join-Path $LogDir "Build.binlog") } else { "" }
- $platformArg = if ($platform) { "/p:Platform=$platform" } else { "" }
+ $bl = if ($binaryLog) { '/bl:' + (Join-Path $LogDir 'Build.binlog') } else { '' }
+ $platformArg = if ($platform) { "/p:Platform=$platform" } else { '' }
if ($projects) {
# Re-assign properties to a new variable because PowerShell doesn't let us append properties directly for unclear reasons.
@@ -113,7 +120,15 @@ function Build {
}
try {
- if ($help -or (($null -ne $properties) -and ($properties.Contains("/help") -or $properties.Contains("/?")))) {
+ if ($clean) {
+ if (Test-Path $ArtifactsDir) {
+ Remove-Item -Recurse -Force $ArtifactsDir
+ Write-Host 'Artifacts directory deleted.'
+ }
+ exit 0
+ }
+
+ if ($help -or (($null -ne $properties) -and ($properties.Contains('/help') -or $properties.Contains('/?')))) {
Print-Usage
exit 0
}
@@ -123,14 +138,7 @@ try {
$nodeReuse = $false
}
- # Import custom tools configuration, if present in the repo.
- # Note: Import in global scope so that the script set top-level variables without qualification.
- $configureToolsetScript = Join-Path $EngRoot "configure-toolset.ps1"
- if (Test-Path $configureToolsetScript) {
- . $configureToolsetScript
- }
-
- if (($restore) -and ($null -eq $env:DisableNativeToolsetInstalls)) {
+ if ($restore) {
InitializeNativeTools
}
@@ -138,7 +146,7 @@ try {
}
catch {
Write-Host $_.ScriptStackTrace
- Write-PipelineTelemetryError -Category "InitializeToolset" -Message $_
+ Write-PipelineTelemetryError -Category 'InitializeToolset' -Message $_
ExitWithExitCode 1
}
diff --git a/eng/common/build.sh b/eng/common/build.sh
index 6236fc4d38cd..36f9aa0462ee 100755
--- a/eng/common/build.sh
+++ b/eng/common/build.sh
@@ -26,6 +26,7 @@ usage()
echo " --pack Package build outputs into NuGet packages and Willow components"
echo " --sign Sign build outputs"
echo " --publish Publish artifacts (e.g. symbols)"
+ echo " --clean Clean the solution"
echo ""
echo "Advanced settings:"
@@ -62,6 +63,7 @@ publish=false
sign=false
public=false
ci=false
+clean=false
warn_as_error=true
node_reuse=true
@@ -82,6 +84,9 @@ while [[ $# > 0 ]]; do
usage
exit 0
;;
+ -clean)
+ clean=true
+ ;;
-configuration|-c)
configuration=$2
shift
@@ -196,20 +201,15 @@ function Build {
ExitWithExitCode 0
}
-# Import custom tools configuration, if present in the repo.
-configure_toolset_script="$eng_root/configure-toolset.sh"
-if [[ -a "$configure_toolset_script" ]]; then
- . "$configure_toolset_script"
-fi
-
-# TODO: https://github.com/dotnet/arcade/issues/1468
-# Temporary workaround to avoid breaking change.
-# Remove once repos are updated.
-if [[ -n "${useInstalledDotNetCli:-}" ]]; then
- use_installed_dotnet_cli="$useInstalledDotNetCli"
+if [[ "$clean" == true ]]; then
+ if [ -d "$artifacts_dir" ]; then
+ rm -rf $artifacts_dir
+ echo "Artifacts directory deleted."
+ fi
+ exit 0
fi
-if [[ "$restore" == true && -z ${DisableNativeToolsetInstalls:-} ]]; then
+if [[ "$restore" == true ]]; then
InitializeNativeTools
fi
diff --git a/eng/common/cross/android/arm/toolchain.cmake b/eng/common/cross/android/arm/toolchain.cmake
deleted file mode 100644
index a7e1c73501b3..000000000000
--- a/eng/common/cross/android/arm/toolchain.cmake
+++ /dev/null
@@ -1,41 +0,0 @@
-set(CROSS_NDK_TOOLCHAIN $ENV{ROOTFS_DIR}/../)
-set(CROSS_ROOTFS ${CROSS_NDK_TOOLCHAIN}/sysroot)
-set(CLR_CMAKE_PLATFORM_ANDROID "Android")
-
-set(CMAKE_SYSTEM_NAME Linux)
-set(CMAKE_SYSTEM_VERSION 1)
-set(CMAKE_SYSTEM_PROCESSOR arm)
-
-## Specify the toolchain
-set(TOOLCHAIN "arm-linux-androideabi")
-set(CMAKE_PREFIX_PATH ${CROSS_NDK_TOOLCHAIN})
-set(TOOLCHAIN_PREFIX ${TOOLCHAIN}-)
-
-find_program(CMAKE_C_COMPILER ${TOOLCHAIN_PREFIX}clang)
-find_program(CMAKE_CXX_COMPILER ${TOOLCHAIN_PREFIX}clang++)
-find_program(CMAKE_ASM_COMPILER ${TOOLCHAIN_PREFIX}clang)
-find_program(CMAKE_AR ${TOOLCHAIN_PREFIX}ar)
-find_program(CMAKE_LD ${TOOLCHAIN_PREFIX}ar)
-find_program(CMAKE_OBJCOPY ${TOOLCHAIN_PREFIX}objcopy)
-find_program(CMAKE_OBJDUMP ${TOOLCHAIN_PREFIX}objdump)
-
-add_compile_options(--sysroot=${CROSS_ROOTFS})
-add_compile_options(-fPIE)
-add_compile_options(-mfloat-abi=soft)
-include_directories(SYSTEM ${CROSS_NDK_TOOLCHAIN}/include/c++/4.9.x/)
-include_directories(SYSTEM ${CROSS_NDK_TOOLCHAIN}/include/c++/4.9.x/arm-linux-androideabi/)
-
-set(CROSS_LINK_FLAGS "${CROSS_LINK_FLAGS} -B ${CROSS_ROOTFS}/usr/lib/gcc/${TOOLCHAIN}")
-set(CROSS_LINK_FLAGS "${CROSS_LINK_FLAGS} -L${CROSS_ROOTFS}/lib/${TOOLCHAIN}")
-set(CROSS_LINK_FLAGS "${CROSS_LINK_FLAGS} --sysroot=${CROSS_ROOTFS}")
-set(CROSS_LINK_FLAGS "${CROSS_LINK_FLAGS} -fPIE -pie")
-
-set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${CROSS_LINK_FLAGS}" CACHE STRING "" FORCE)
-set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} ${CROSS_LINK_FLAGS}" CACHE STRING "" FORCE)
-set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} ${CROSS_LINK_FLAGS}" CACHE STRING "" FORCE)
-
-set(CMAKE_FIND_ROOT_PATH "${CROSS_ROOTFS}")
-set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
-set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
-set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
-set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)
diff --git a/eng/common/cross/android/arm64/toolchain.cmake b/eng/common/cross/android/arm64/toolchain.cmake
deleted file mode 100644
index 29415899c1c6..000000000000
--- a/eng/common/cross/android/arm64/toolchain.cmake
+++ /dev/null
@@ -1,42 +0,0 @@
-set(CROSS_NDK_TOOLCHAIN $ENV{ROOTFS_DIR}/../)
-set(CROSS_ROOTFS ${CROSS_NDK_TOOLCHAIN}/sysroot)
-set(CLR_CMAKE_PLATFORM_ANDROID "Android")
-
-set(CMAKE_SYSTEM_NAME Linux)
-set(CMAKE_SYSTEM_VERSION 1)
-set(CMAKE_SYSTEM_PROCESSOR aarch64)
-
-## Specify the toolchain
-set(TOOLCHAIN "aarch64-linux-android")
-set(CMAKE_PREFIX_PATH ${CROSS_NDK_TOOLCHAIN})
-set(TOOLCHAIN_PREFIX ${TOOLCHAIN}-)
-
-find_program(CMAKE_C_COMPILER ${TOOLCHAIN_PREFIX}clang)
-find_program(CMAKE_CXX_COMPILER ${TOOLCHAIN_PREFIX}clang++)
-find_program(CMAKE_ASM_COMPILER ${TOOLCHAIN_PREFIX}clang)
-find_program(CMAKE_AR ${TOOLCHAIN_PREFIX}ar)
-find_program(CMAKE_LD ${TOOLCHAIN_PREFIX}ar)
-find_program(CMAKE_OBJCOPY ${TOOLCHAIN_PREFIX}objcopy)
-find_program(CMAKE_OBJDUMP ${TOOLCHAIN_PREFIX}objdump)
-
-add_compile_options(--sysroot=${CROSS_ROOTFS})
-add_compile_options(-fPIE)
-
-## Needed for Android or bionic specific conditionals
-add_compile_options(-D__ANDROID__)
-add_compile_options(-D__BIONIC__)
-
-set(CROSS_LINK_FLAGS "${CROSS_LINK_FLAGS} -B ${CROSS_ROOTFS}/usr/lib/gcc/${TOOLCHAIN}")
-set(CROSS_LINK_FLAGS "${CROSS_LINK_FLAGS} -L${CROSS_ROOTFS}/lib/${TOOLCHAIN}")
-set(CROSS_LINK_FLAGS "${CROSS_LINK_FLAGS} --sysroot=${CROSS_ROOTFS}")
-set(CROSS_LINK_FLAGS "${CROSS_LINK_FLAGS} -fPIE -pie")
-
-set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${CROSS_LINK_FLAGS}" CACHE STRING "" FORCE)
-set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} ${CROSS_LINK_FLAGS}" CACHE STRING "" FORCE)
-set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} ${CROSS_LINK_FLAGS}" CACHE STRING "" FORCE)
-
-set(CMAKE_FIND_ROOT_PATH "${CROSS_ROOTFS}")
-set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
-set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
-set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
-set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)
diff --git a/eng/common/cross/build-android-rootfs.sh b/eng/common/cross/build-android-rootfs.sh
index adceda877add..5e74881eb24c 100755
--- a/eng/common/cross/build-android-rootfs.sh
+++ b/eng/common/cross/build-android-rootfs.sh
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
set -e
-__NDK_Version=r14
+__NDK_Version=r21
usage()
{
@@ -16,11 +16,11 @@ usage()
echo.
echo "By default, the NDK will be downloaded into the cross/android-rootfs/android-ndk-$__NDK_Version directory. If you already have an NDK installation,"
echo "you can set the NDK_DIR environment variable to have this script use that installation of the NDK."
- echo "By default, this script will generate a file, android_platform, in the root of the ROOTFS_DIR directory that contains the RID for the supported and tested Android build: android.21-arm64. This file is to replace '/etc/os-release', which is not available for Android."
+ echo "By default, this script will generate a file, android_platform, in the root of the ROOTFS_DIR directory that contains the RID for the supported and tested Android build: android.28-arm64. This file is to replace '/etc/os-release', which is not available for Android."
exit 1
}
-__ApiLevel=21 # The minimum platform for arm64 is API level 21
+__ApiLevel=28 # The minimum platform for arm64 is API level 21 but the minimum version that support glob(3) is 28. See $ANDROID_NDK/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/glob.h
__BuildArch=arm64
__AndroidArch=aarch64
__AndroidToolchain=aarch64-linux-android
@@ -54,12 +54,11 @@ done
# Obtain the location of the bash script to figure out where the root of the repo is.
__CrossDir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
+__Android_Cross_Dir="$(cd "$__CrossDir/../../../.tools/android-rootfs" && pwd)"
-__Android_Cross_Dir="$__CrossDir/android-rootfs"
__NDK_Dir="$__Android_Cross_Dir/android-ndk-$__NDK_Version"
-__libunwind_Dir="$__Android_Cross_Dir/libunwind"
__lldb_Dir="$__Android_Cross_Dir/lldb"
-__ToolchainDir="$__Android_Cross_Dir/toolchain/$__BuildArch"
+__ToolchainDir="$__Android_Cross_Dir/android-ndk-$__NDK_Version"
if [[ -n "$TOOLCHAIN_DIR" ]]; then
__ToolchainDir=$TOOLCHAIN_DIR
@@ -89,49 +88,33 @@ if [ ! -d $__lldb_Dir ]; then
unzip -q $__Android_Cross_Dir/lldb-2.3.3614996-linux-x86_64.zip -d $__lldb_Dir
fi
-# Create the RootFS for both arm64 as well as aarch
-rm -rf $__Android_Cross_Dir/toolchain
+echo "Download dependencies..."
+mkdir -p $__Android_Cross_Dir/tmp/$arch/
-echo Generating the $__BuildArch toolchain
-$__NDK_Dir/build/tools/make_standalone_toolchain.py --arch $__BuildArch --api $__ApiLevel --install-dir $__ToolchainDir
+# combined dependencies for coreclr, installer and libraries
+__AndroidPackages="libicu"
+__AndroidPackages+=" libandroid-glob"
+__AndroidPackages+=" liblzma"
+__AndroidPackages+=" krb5"
+__AndroidPackages+=" openssl"
-# Install the required packages into the toolchain
-# TODO: Add logic to get latest pkg version instead of specific version number
-rm -rf $__Android_Cross_Dir/deb/
-rm -rf $__Android_Cross_Dir/tmp
+for path in $(wget -qO- http://termux.net/dists/stable/main/binary-$__AndroidArch/Packages |\
+ grep -A15 "Package: \(${__AndroidPackages// /\\|}\)" | grep -v "static\|tool" | grep Filename); do
-mkdir -p $__Android_Cross_Dir/deb/
-mkdir -p $__Android_Cross_Dir/tmp/$arch/
-wget -nv -nc http://termux.net/dists/stable/main/binary-$__AndroidArch/libicu_60.2_$__AndroidArch.deb -O $__Android_Cross_Dir/deb/libicu_60.2_$__AndroidArch.deb
-wget -nv -nc http://termux.net/dists/stable/main/binary-$__AndroidArch/libicu-dev_60.2_$__AndroidArch.deb -O $__Android_Cross_Dir/deb/libicu-dev_60.2_$__AndroidArch.deb
-
-wget -nv -nc http://termux.net/dists/stable/main/binary-$__AndroidArch/libandroid-glob-dev_0.4_$__AndroidArch.deb -O $__Android_Cross_Dir/deb/libandroid-glob-dev_0.4_$__AndroidArch.deb
-wget -nv -nc http://termux.net/dists/stable/main/binary-$__AndroidArch/libandroid-glob_0.4_$__AndroidArch.deb -O $__Android_Cross_Dir/deb/libandroid-glob_0.4_$__AndroidArch.deb
-wget -nv -nc http://termux.net/dists/stable/main/binary-$__AndroidArch/libandroid-support-dev_22_$__AndroidArch.deb -O $__Android_Cross_Dir/deb/libandroid-support-dev_22_$__AndroidArch.deb
-wget -nv -nc http://termux.net/dists/stable/main/binary-$__AndroidArch/libandroid-support_22_$__AndroidArch.deb -O $__Android_Cross_Dir/deb/libandroid-support_22_$__AndroidArch.deb
-wget -nv -nc http://termux.net/dists/stable/main/binary-$__AndroidArch/liblzma-dev_5.2.3_$__AndroidArch.deb -O $__Android_Cross_Dir/deb/liblzma-dev_5.2.3_$__AndroidArch.deb
-wget -nv -nc http://termux.net/dists/stable/main/binary-$__AndroidArch/liblzma_5.2.3_$__AndroidArch.deb -O $__Android_Cross_Dir/deb/liblzma_5.2.3_$__AndroidArch.deb
-wget -nv -nc http://termux.net/dists/stable/main/binary-$__AndroidArch/libunwind-dev_1.2.20170304_$__AndroidArch.deb -O $__Android_Cross_Dir/deb/libunwind-dev_1.2.20170304_$__AndroidArch.deb
-wget -nv -nc http://termux.net/dists/stable/main/binary-$__AndroidArch/libunwind_1.2.20170304_$__AndroidArch.deb -O $__Android_Cross_Dir/deb/libunwind_1.2.20170304_$__AndroidArch.deb
-
-echo Unpacking Termux packages
-dpkg -x $__Android_Cross_Dir/deb/libicu_60.2_$__AndroidArch.deb $__Android_Cross_Dir/tmp/$__AndroidArch/
-dpkg -x $__Android_Cross_Dir/deb/libicu-dev_60.2_$__AndroidArch.deb $__Android_Cross_Dir/tmp/$__AndroidArch/
-dpkg -x $__Android_Cross_Dir/deb/libandroid-glob-dev_0.4_$__AndroidArch.deb $__Android_Cross_Dir/tmp/$__AndroidArch/
-dpkg -x $__Android_Cross_Dir/deb/libandroid-glob_0.4_$__AndroidArch.deb $__Android_Cross_Dir/tmp/$__AndroidArch/
-dpkg -x $__Android_Cross_Dir/deb/libandroid-support-dev_22_$__AndroidArch.deb $__Android_Cross_Dir/tmp/$__AndroidArch/
-dpkg -x $__Android_Cross_Dir/deb/libandroid-support_22_$__AndroidArch.deb $__Android_Cross_Dir/tmp/$__AndroidArch/
-dpkg -x $__Android_Cross_Dir/deb/liblzma-dev_5.2.3_$__AndroidArch.deb $__Android_Cross_Dir/tmp/$__AndroidArch/
-dpkg -x $__Android_Cross_Dir/deb/liblzma_5.2.3_$__AndroidArch.deb $__Android_Cross_Dir/tmp/$__AndroidArch/
-dpkg -x $__Android_Cross_Dir/deb/libunwind-dev_1.2.20170304_$__AndroidArch.deb $__Android_Cross_Dir/tmp/$__AndroidArch/
-dpkg -x $__Android_Cross_Dir/deb/libunwind_1.2.20170304_$__AndroidArch.deb $__Android_Cross_Dir/tmp/$__AndroidArch/
+ if [[ "$path" != "Filename:" ]]; then
+ echo "Working on: $path"
+ wget -qO- http://termux.net/$path | dpkg -x - $__Android_Cross_Dir/tmp/$__AndroidArch/
+ fi
+done
cp -R $__Android_Cross_Dir/tmp/$__AndroidArch/data/data/com.termux/files/usr/* $__ToolchainDir/sysroot/usr/
# Generate platform file for build.sh script to assign to __DistroRid
echo "Generating platform file..."
+echo "RID=android.${__ApiLevel}-${__BuildArch}" > $__ToolchainDir/sysroot/android_platform
-echo "RID=android.21-arm64" > $__ToolchainDir/sysroot/android_platform
-echo Now run:
-echo CONFIG_DIR=\`realpath cross/android/$__BuildArch\` ROOTFS_DIR=\`realpath $__ToolchainDir/sysroot\` ./build.sh cross $__BuildArch skipgenerateversion skipnuget cmakeargs -DENABLE_LLDBPLUGIN=0
-
+echo "Now to build coreclr, libraries and installers; run:"
+echo ROOTFS_DIR=\$\(realpath $__ToolchainDir/sysroot\) ./build.sh --cross --arch $__BuildArch \
+ --subsetCategory coreclr \
+ --subsetCategory libraries \
+ --subsetCategory installer
diff --git a/eng/common/cross/build-rootfs.sh b/eng/common/cross/build-rootfs.sh
index d7d5d7d5f449..a23f895ba1c3 100755
--- a/eng/common/cross/build-rootfs.sh
+++ b/eng/common/cross/build-rootfs.sh
@@ -25,8 +25,9 @@ __UbuntuPackages="build-essential"
__AlpinePackages="alpine-base"
__AlpinePackages+=" build-base"
__AlpinePackages+=" linux-headers"
-__AlpinePackages+=" lldb-dev"
-__AlpinePackages+=" llvm-dev"
+__AlpinePackagesEdgeTesting=" lldb-dev"
+__AlpinePackagesEdgeMain=" llvm9-libs"
+__AlpinePackagesEdgeMain+=" python3"
# symlinks fixer
__UbuntuPackages+=" symlinks"
@@ -193,19 +194,29 @@ fi
if [[ "$__LinuxCodeName" == "alpine" ]]; then
__ApkToolsVersion=2.9.1
- __AlpineVersion=3.7
+ __AlpineVersion=3.9
__ApkToolsDir=$(mktemp -d)
wget https://github.com/alpinelinux/apk-tools/releases/download/v$__ApkToolsVersion/apk-tools-$__ApkToolsVersion-x86_64-linux.tar.gz -P $__ApkToolsDir
tar -xf $__ApkToolsDir/apk-tools-$__ApkToolsVersion-x86_64-linux.tar.gz -C $__ApkToolsDir
mkdir -p $__RootfsDir/usr/bin
cp -v /usr/bin/qemu-$__QEMUArch-static $__RootfsDir/usr/bin
+
$__ApkToolsDir/apk-tools-$__ApkToolsVersion/apk \
-X http://dl-cdn.alpinelinux.org/alpine/v$__AlpineVersion/main \
-X http://dl-cdn.alpinelinux.org/alpine/v$__AlpineVersion/community \
- -X http://dl-cdn.alpinelinux.org/alpine/edge/testing \
- -X http://dl-cdn.alpinelinux.org/alpine/edge/main \
-U --allow-untrusted --root $__RootfsDir --arch $__AlpineArch --initdb \
add $__AlpinePackages
+
+ $__ApkToolsDir/apk-tools-$__ApkToolsVersion/apk \
+ -X http://dl-cdn.alpinelinux.org/alpine/edge/main \
+ -U --allow-untrusted --root $__RootfsDir --arch $__AlpineArch --initdb \
+ add $__AlpinePackagesEdgeMain
+
+ $__ApkToolsDir/apk-tools-$__ApkToolsVersion/apk \
+ -X http://dl-cdn.alpinelinux.org/alpine/edge/testing \
+ -U --allow-untrusted --root $__RootfsDir --arch $__AlpineArch --initdb \
+ add $__AlpinePackagesEdgeTesting
+
rm -r $__ApkToolsDir
elif [[ -n $__LinuxCodeName ]]; then
qemu-debootstrap --arch $__UbuntuArch $__LinuxCodeName $__RootfsDir $__UbuntuRepo
diff --git a/eng/common/cross/toolchain.cmake b/eng/common/cross/toolchain.cmake
index 071d4112419b..1823804da45f 100644
--- a/eng/common/cross/toolchain.cmake
+++ b/eng/common/cross/toolchain.cmake
@@ -31,6 +31,10 @@ else()
message(FATAL_ERROR "Arch is ${TARGET_ARCH_NAME}. Only armel, arm, arm64 and x86 are supported!")
endif()
+if(DEFINED ENV{TOOLCHAIN})
+ set(TOOLCHAIN $ENV{TOOLCHAIN})
+endif()
+
# Specify include paths
if(TARGET_ARCH_NAME STREQUAL "armel")
if(DEFINED TIZEN_TOOLCHAIN)
@@ -39,50 +43,47 @@ if(TARGET_ARCH_NAME STREQUAL "armel")
endif()
endif()
-# add_compile_param - adds only new options without duplicates.
-# arg0 - list with result options, arg1 - list with new options.
-# arg2 - optional argument, quick summary string for optional using CACHE FORCE mode.
-macro(add_compile_param)
- if(NOT ${ARGC} MATCHES "^(2|3)$")
- message(FATAL_ERROR "Wrong using add_compile_param! Two or three parameters must be given! See add_compile_param description.")
- endif()
- foreach(OPTION ${ARGV1})
- if(NOT ${ARGV0} MATCHES "${OPTION}($| )")
- set(${ARGV0} "${${ARGV0}} ${OPTION}")
- if(${ARGC} EQUAL "3") # CACHE FORCE mode
- set(${ARGV0} "${${ARGV0}}" CACHE STRING "${ARGV2}" FORCE)
- endif()
+if("$ENV{__DistroRid}" MATCHES "android.*")
+ if(TARGET_ARCH_NAME STREQUAL "arm")
+ set(ANDROID_ABI armeabi-v7a)
+ elseif(TARGET_ARCH_NAME STREQUAL "arm64")
+ set(ANDROID_ABI arm64-v8a)
endif()
- endforeach()
-endmacro()
+
+ # extract platform number required by the NDK's toolchain
+ string(REGEX REPLACE ".*\\.([0-9]+)-.*" "\\1" ANDROID_PLATFORM "$ENV{__DistroRid}")
+
+ set(ANDROID_TOOLCHAIN clang)
+ set(FEATURE_EVENT_TRACE 0) # disable event trace as there is no lttng-ust package in termux repository
+ set(CMAKE_SYSTEM_LIBRARY_PATH "${CROSS_ROOTFS}/usr/lib")
+ set(CMAKE_SYSTEM_INCLUDE_PATH "${CROSS_ROOTFS}/usr/include")
+
+ # include official NDK toolchain script
+ include(${CROSS_ROOTFS}/../build/cmake/android.toolchain.cmake)
+else()
+ set(CMAKE_SYSROOT "${CROSS_ROOTFS}")
+
+ set(CMAKE_C_COMPILER_EXTERNAL_TOOLCHAIN "${CROSS_ROOTFS}/usr")
+ set(CMAKE_CXX_COMPILER_EXTERNAL_TOOLCHAIN "${CROSS_ROOTFS}/usr")
+ set(CMAKE_ASM_COMPILER_EXTERNAL_TOOLCHAIN "${CROSS_ROOTFS}/usr")
+endif()
# Specify link flags
-add_compile_param(CROSS_LINK_FLAGS "--sysroot=${CROSS_ROOTFS}")
-add_compile_param(CROSS_LINK_FLAGS "--gcc-toolchain=${CROSS_ROOTFS}/usr")
-add_compile_param(CROSS_LINK_FLAGS "--target=${TOOLCHAIN}")
-add_compile_param(CROSS_LINK_FLAGS "-fuse-ld=gold")
if(TARGET_ARCH_NAME STREQUAL "armel")
if(DEFINED TIZEN_TOOLCHAIN) # For Tizen only
- add_compile_param(CROSS_LINK_FLAGS "-B${CROSS_ROOTFS}/usr/lib/gcc/${TIZEN_TOOLCHAIN}")
- add_compile_param(CROSS_LINK_FLAGS "-L${CROSS_ROOTFS}/lib")
- add_compile_param(CROSS_LINK_FLAGS "-L${CROSS_ROOTFS}/usr/lib")
- add_compile_param(CROSS_LINK_FLAGS "-L${CROSS_ROOTFS}/usr/lib/gcc/${TIZEN_TOOLCHAIN}")
+ add_link_options("-B${CROSS_ROOTFS}/usr/lib/gcc/${TIZEN_TOOLCHAIN}")
+ add_link_options("-L${CROSS_ROOTFS}/lib")
+ add_link_options("-L${CROSS_ROOTFS}/usr/lib")
+ add_link_options("-L${CROSS_ROOTFS}/usr/lib/gcc/${TIZEN_TOOLCHAIN}")
endif()
elseif(TARGET_ARCH_NAME STREQUAL "x86")
- add_compile_param(CROSS_LINK_FLAGS "-m32")
+ add_link_options(-m32)
endif()
-add_compile_param(CMAKE_EXE_LINKER_FLAGS "${CROSS_LINK_FLAGS}" "TOOLCHAIN_EXE_LINKER_FLAGS")
-add_compile_param(CMAKE_SHARED_LINKER_FLAGS "${CROSS_LINK_FLAGS}" "TOOLCHAIN_EXE_LINKER_FLAGS")
-add_compile_param(CMAKE_MODULE_LINKER_FLAGS "${CROSS_LINK_FLAGS}" "TOOLCHAIN_EXE_LINKER_FLAGS")
-
# Specify compile options
-add_compile_options("--sysroot=${CROSS_ROOTFS}")
-add_compile_options("--target=${TOOLCHAIN}")
-add_compile_options("--gcc-toolchain=${CROSS_ROOTFS}/usr")
-if(TARGET_ARCH_NAME MATCHES "^(arm|armel|arm64)$")
+if(TARGET_ARCH_NAME MATCHES "^(arm|armel|arm64)$" AND NOT "$ENV{__DistroRid}" MATCHES "android.*")
set(CMAKE_C_COMPILER_TARGET ${TOOLCHAIN})
set(CMAKE_CXX_COMPILER_TARGET ${TOOLCHAIN})
set(CMAKE_ASM_COMPILER_TARGET ${TOOLCHAIN})
@@ -90,7 +91,17 @@ endif()
if(TARGET_ARCH_NAME MATCHES "^(arm|armel)$")
add_compile_options(-mthumb)
- add_compile_options(-mfpu=vfpv3)
+ if (NOT DEFINED CLR_ARM_FPU_TYPE)
+ set (CLR_ARM_FPU_TYPE vfpv3)
+ endif (NOT DEFINED CLR_ARM_FPU_TYPE)
+
+ add_compile_options (-mfpu=${CLR_ARM_FPU_TYPE})
+ if (NOT DEFINED CLR_ARM_FPU_CAPABILITY)
+ set (CLR_ARM_FPU_CAPABILITY 0x7)
+ endif (NOT DEFINED CLR_ARM_FPU_CAPABILITY)
+
+ add_definitions (-DCLR_ARM_FPU_CAPABILITY=${CLR_ARM_FPU_CAPABILITY})
+
if(TARGET_ARCH_NAME STREQUAL "armel")
add_compile_options(-mfloat-abi=softfp)
if(DEFINED TIZEN_TOOLCHAIN)
@@ -103,7 +114,7 @@ elseif(TARGET_ARCH_NAME STREQUAL "x86")
add_compile_options(-Wno-error=unused-command-line-argument)
endif()
-# Set LLDB include and library paths
+# Set LLDB include and library paths for builds that need lldb.
if(TARGET_ARCH_NAME MATCHES "^(arm|armel|x86)$")
if(TARGET_ARCH_NAME STREQUAL "x86")
set(LLVM_CROSS_DIR "$ENV{LLVM_CROSS_HOME}")
@@ -131,7 +142,7 @@ if(TARGET_ARCH_NAME MATCHES "^(arm|armel|x86)$")
endif()
endif()
-set(CMAKE_FIND_ROOT_PATH "${CROSS_ROOTFS}")
+
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
diff --git a/eng/common/darc-init.ps1 b/eng/common/darc-init.ps1
index b94c2f4e411d..435e7641341b 100644
--- a/eng/common/darc-init.ps1
+++ b/eng/common/darc-init.ps1
@@ -1,13 +1,14 @@
param (
$darcVersion = $null,
- $versionEndpoint = "https://maestro-prod.westus2.cloudapp.azure.com/api/assets/darc-version?api-version=2019-01-16",
- $verbosity = "m"
+ $versionEndpoint = 'https://maestro-prod.westus2.cloudapp.azure.com/api/assets/darc-version?api-version=2019-01-16',
+ $verbosity = 'minimal',
+ $toolpath = $null
)
. $PSScriptRoot\tools.ps1
-function InstallDarcCli ($darcVersion) {
- $darcCliPackageName = "microsoft.dotnet.darc"
+function InstallDarcCli ($darcVersion, $toolpath) {
+ $darcCliPackageName = 'microsoft.dotnet.darc'
$dotnetRoot = InitializeDotNetCli -install:$true
$dotnet = "$dotnetRoot\dotnet.exe"
@@ -23,11 +24,24 @@ function InstallDarcCli ($darcVersion) {
$darcVersion = $(Invoke-WebRequest -Uri $versionEndpoint -UseBasicParsing).Content
}
- $arcadeServicesSource = 'https://dotnetfeed.blob.core.windows.net/dotnet-core/index.json'
+ $arcadeServicesSource = 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json'
Write-Host "Installing Darc CLI version $darcVersion..."
- Write-Host "You may need to restart your command window if this is the first dotnet tool you have installed."
- & "$dotnet" tool install $darcCliPackageName --version $darcVersion --add-source "$arcadeServicesSource" -v $verbosity -g --framework netcoreapp2.1
+ Write-Host 'You may need to restart your command window if this is the first dotnet tool you have installed.'
+ if (-not $toolpath) {
+ Write-Host "'$dotnet' tool install $darcCliPackageName --version $darcVersion --add-source '$arcadeServicesSource' -v $verbosity -g"
+ & "$dotnet" tool install $darcCliPackageName --version $darcVersion --add-source "$arcadeServicesSource" -v $verbosity -g
+ }else {
+ Write-Host "'$dotnet' tool install $darcCliPackageName --version $darcVersion --add-source '$arcadeServicesSource' -v $verbosity --tool-path '$toolpath'"
+ & "$dotnet" tool install $darcCliPackageName --version $darcVersion --add-source "$arcadeServicesSource" -v $verbosity --tool-path "$toolpath"
+ }
}
-InstallDarcCli $darcVersion
+try {
+ InstallDarcCli $darcVersion $toolpath
+}
+catch {
+ Write-Host $_.ScriptStackTrace
+ Write-PipelineTelemetryError -Category 'Darc' -Message $_
+ ExitWithExitCode 1
+}
\ No newline at end of file
diff --git a/eng/common/darc-init.sh b/eng/common/darc-init.sh
index 242429bca65e..d981d7bbf38d 100755
--- a/eng/common/darc-init.sh
+++ b/eng/common/darc-init.sh
@@ -2,8 +2,8 @@
source="${BASH_SOURCE[0]}"
darcVersion=''
-versionEndpoint="https://maestro-prod.westus2.cloudapp.azure.com/api/assets/darc-version?api-version=2019-01-16"
-verbosity=m
+versionEndpoint='https://maestro-prod.westus2.cloudapp.azure.com/api/assets/darc-version?api-version=2019-01-16'
+verbosity='minimal'
while [[ $# > 0 ]]; do
opt="$(echo "$1" | awk '{print tolower($0)}')"
@@ -20,6 +20,10 @@ while [[ $# > 0 ]]; do
verbosity=$2
shift
;;
+ --toolpath)
+ toolpath=$2
+ shift
+ ;;
*)
echo "Invalid argument: $1"
usage
@@ -52,17 +56,27 @@ function InstallDarcCli {
InitializeDotNetCli
local dotnet_root=$_InitializeDotNetCli
- local uninstall_command=`$dotnet_root/dotnet tool uninstall $darc_cli_package_name -g`
- local tool_list=$($dotnet_root/dotnet tool list -g)
- if [[ $tool_list = *$darc_cli_package_name* ]]; then
- echo $($dotnet_root/dotnet tool uninstall $darc_cli_package_name -g)
+ if [ -z "$toolpath" ]; then
+ local tool_list=$($dotnet_root/dotnet tool list -g)
+ if [[ $tool_list = *$darc_cli_package_name* ]]; then
+ echo $($dotnet_root/dotnet tool uninstall $darc_cli_package_name -g)
+ fi
+ else
+ local tool_list=$($dotnet_root/dotnet tool list --tool-path "$toolpath")
+ if [[ $tool_list = *$darc_cli_package_name* ]]; then
+ echo $($dotnet_root/dotnet tool uninstall $darc_cli_package_name --tool-path "$toolpath")
+ fi
fi
- local arcadeServicesSource="https://dotnetfeed.blob.core.windows.net/dotnet-core/index.json"
+ local arcadeServicesSource="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json"
echo "Installing Darc CLI version $darcVersion..."
echo "You may need to restart your command shell if this is the first dotnet tool you have installed."
- echo $($dotnet_root/dotnet tool install $darc_cli_package_name --version $darcVersion --add-source "$arcadeServicesSource" -v $verbosity -g)
+ if [ -z "$toolpath" ]; then
+ echo $($dotnet_root/dotnet tool install $darc_cli_package_name --version $darcVersion --add-source "$arcadeServicesSource" -v $verbosity -g)
+ else
+ echo $($dotnet_root/dotnet tool install $darc_cli_package_name --version $darcVersion --add-source "$arcadeServicesSource" -v $verbosity --tool-path "$toolpath")
+ fi
}
InstallDarcCli
diff --git a/eng/common/dotnet-install.ps1 b/eng/common/dotnet-install.ps1
index ec3e739fe836..811f0f717f73 100644
--- a/eng/common/dotnet-install.ps1
+++ b/eng/common/dotnet-install.ps1
@@ -1,28 +1,27 @@
[CmdletBinding(PositionalBinding=$false)]
Param(
- [string] $verbosity = "minimal",
- [string] $architecture = "",
- [string] $version = "Latest",
- [string] $runtime = "dotnet",
- [string] $RuntimeSourceFeed = "",
- [string] $RuntimeSourceFeedKey = ""
+ [string] $verbosity = 'minimal',
+ [string] $architecture = '',
+ [string] $version = 'Latest',
+ [string] $runtime = 'dotnet',
+ [string] $RuntimeSourceFeed = '',
+ [string] $RuntimeSourceFeedKey = ''
)
. $PSScriptRoot\tools.ps1
-$dotnetRoot = Join-Path $RepoRoot ".dotnet"
+$dotnetRoot = Join-Path $RepoRoot '.dotnet'
$installdir = $dotnetRoot
try {
- if ($architecture -and $architecture.Trim() -eq "x86") {
- $installdir = Join-Path $installdir "x86"
+ if ($architecture -and $architecture.Trim() -eq 'x86') {
+ $installdir = Join-Path $installdir 'x86'
}
- InstallDotNet $installdir $version $architecture $runtime $true -RuntimeSourceFeed $RuntimeSourceFeed -RuntimeSourceFeedKey $RuntimeSourceFeedKey
-}
+ InstallDotNet $installdir $version $architecture $runtime $true -RuntimeSourceFeed $RuntimeSourceFeed -RuntimeSourceFeedKey $RuntimeSourceFeedKey
+}
catch {
- Write-Host $_
- Write-Host $_.Exception
Write-Host $_.ScriptStackTrace
+ Write-PipelineTelemetryError -Category 'InitializeToolset' -Message $_
ExitWithExitCode 1
}
diff --git a/eng/common/dotnet-install.sh b/eng/common/dotnet-install.sh
index d259a274c780..ead6a1d9a24b 100755
--- a/eng/common/dotnet-install.sh
+++ b/eng/common/dotnet-install.sh
@@ -11,6 +11,8 @@ while [[ -h "$source" ]]; do
done
scriptroot="$( cd -P "$( dirname "$source" )" && pwd )"
+. "$scriptroot/tools.sh"
+
version='Latest'
architecture=''
runtime='dotnet'
@@ -40,18 +42,47 @@ while [[ $# > 0 ]]; do
runtimeSourceFeedKey="$1"
;;
*)
- echo "Invalid argument: $1"
+ Write-PipelineTelemetryError -Category 'Build' -Message "Invalid argument: $1"
exit 1
;;
esac
shift
done
-. "$scriptroot/tools.sh"
+# Use uname to determine what the CPU is.
+cpuname=$(uname -p)
+# Some Linux platforms report unknown for platform, but the arch for machine.
+if [[ "$cpuname" == "unknown" ]]; then
+ cpuname=$(uname -m)
+fi
+
+case $cpuname in
+ aarch64)
+ buildarch=arm64
+ ;;
+ amd64|x86_64)
+ buildarch=x64
+ ;;
+ armv*l)
+ buildarch=arm
+ ;;
+ i686)
+ buildarch=x86
+ ;;
+ *)
+ echo "Unknown CPU $cpuname detected, treating it as x64"
+ buildarch=x64
+ ;;
+esac
+
dotnetRoot="$repo_root/.dotnet"
+if [[ $architecture != "" ]] && [[ $architecture != $buildarch ]]; then
+ dotnetRoot="$dotnetRoot/$architecture"
+fi
+
InstallDotNet $dotnetRoot $version "$architecture" $runtime true $runtimeSourceFeed $runtimeSourceFeedKey || {
local exit_code=$?
- echo "dotnet-install.sh failed (exit code '$exit_code')." >&2
+ Write-PipelineTelemetryError -Category 'InitializeToolset' -Message "dotnet-install.sh failed (exit code '$exit_code')." >&2
ExitWithExitCode $exit_code
}
diff --git a/eng/common/enable-cross-org-publishing.ps1 b/eng/common/enable-cross-org-publishing.ps1
index eccbf9f1b16d..da09da4f1fc4 100644
--- a/eng/common/enable-cross-org-publishing.ps1
+++ b/eng/common/enable-cross-org-publishing.ps1
@@ -2,5 +2,12 @@ param(
[string] $token
)
-Write-Host "##vso[task.setvariable variable=VSS_NUGET_ACCESSTOKEN]$token"
-Write-Host "##vso[task.setvariable variable=VSS_NUGET_URI_PREFIXES]https://dnceng.pkgs.visualstudio.com/;https://pkgs.dev.azure.com/dnceng/;https://devdiv.pkgs.visualstudio.com/;https://pkgs.dev.azure.com/devdiv/"
+
+. $PSScriptRoot\pipeline-logging-functions.ps1
+
+# Write-PipelineSetVariable will no-op if a variable named $ci is not defined
+# Since this script is only ever called in AzDO builds, just universally set it
+$ci = $true
+
+Write-PipelineSetVariable -Name 'VSS_NUGET_ACCESSTOKEN' -Value $token -IsMultiJobVariable $false
+Write-PipelineSetVariable -Name 'VSS_NUGET_URI_PREFIXES' -Value 'https://dnceng.pkgs.visualstudio.com/;https://pkgs.dev.azure.com/dnceng/;https://devdiv.pkgs.visualstudio.com/;https://pkgs.dev.azure.com/devdiv/' -IsMultiJobVariable $false
diff --git a/eng/common/generate-graph-files.ps1 b/eng/common/generate-graph-files.ps1
index b056e4c1ac2a..0728b1a8b570 100644
--- a/eng/common/generate-graph-files.ps1
+++ b/eng/common/generate-graph-files.ps1
@@ -3,39 +3,39 @@ Param(
[Parameter(Mandatory=$true)][string] $gitHubPat, # GitHub personal access token from https://github.com/settings/tokens (no auth scopes needed)
[Parameter(Mandatory=$true)][string] $azdoPat, # Azure Dev Ops tokens from https://dev.azure.com/dnceng/_details/security/tokens (code read scope needed)
[Parameter(Mandatory=$true)][string] $outputFolder, # Where the graphviz.txt file will be created
- [string] $darcVersion = '1.1.0-beta.19175.6', # darc's version
+ [string] $darcVersion, # darc's version
[string] $graphvizVersion = '2.38', # GraphViz version
[switch] $includeToolset # Whether the graph should include toolset dependencies or not. i.e. arcade, optimization. For more about
# toolset dependencies see https://github.com/dotnet/arcade/blob/master/Documentation/Darc.md#toolset-vs-product-dependencies
)
-$ErrorActionPreference = "Stop"
-. $PSScriptRoot\tools.ps1
-
-Import-Module -Name (Join-Path $PSScriptRoot "native\CommonLibrary.psm1")
-
function CheckExitCode ([string]$stage)
{
$exitCode = $LASTEXITCODE
if ($exitCode -ne 0) {
- Write-Host "Something failed in stage: '$stage'. Check for errors above. Exiting now..."
+ Write-PipelineTelemetryError -Category 'Arcade' -Message "Something failed in stage: '$stage'. Check for errors above. Exiting now..."
ExitWithExitCode $exitCode
}
}
try {
+ $ErrorActionPreference = 'Stop'
+ . $PSScriptRoot\tools.ps1
+
+ Import-Module -Name (Join-Path $PSScriptRoot 'native\CommonLibrary.psm1')
+
Push-Location $PSScriptRoot
- Write-Host "Installing darc..."
+ Write-Host 'Installing darc...'
. .\darc-init.ps1 -darcVersion $darcVersion
- CheckExitCode "Running darc-init"
+ CheckExitCode 'Running darc-init'
- $engCommonBaseDir = Join-Path $PSScriptRoot "native\"
+ $engCommonBaseDir = Join-Path $PSScriptRoot 'native\'
$graphvizInstallDir = CommonLibrary\Get-NativeInstallDirectory
- $nativeToolBaseUri = "https://netcorenativeassets.blob.core.windows.net/resource-packages/external"
- $installBin = Join-Path $graphvizInstallDir "bin"
+ $nativeToolBaseUri = 'https://netcorenativeassets.blob.core.windows.net/resource-packages/external'
+ $installBin = Join-Path $graphvizInstallDir 'bin'
- Write-Host "Installing dot..."
+ Write-Host 'Installing dot...'
.\native\install-tool.ps1 -ToolName graphviz -InstallPath $installBin -BaseUri $nativeToolBaseUri -CommonLibraryDirectory $engCommonBaseDir -Version $graphvizVersion -Verbose
$darcExe = "$env:USERPROFILE\.dotnet\tools"
@@ -51,37 +51,36 @@ try {
$graphVizImageFilePath = "$outputFolder\graph.png"
$normalGraphFilePath = "$outputFolder\graph-full.txt"
$flatGraphFilePath = "$outputFolder\graph-flat.txt"
- $baseOptions = @( "--github-pat", "$gitHubPat", "--azdev-pat", "$azdoPat", "--password", "$barToken" )
+ $baseOptions = @( '--github-pat', "$gitHubPat", '--azdev-pat', "$azdoPat", '--password', "$barToken" )
if ($includeToolset) {
- Write-Host "Toolsets will be included in the graph..."
- $baseOptions += @( "--include-toolset" )
+ Write-Host 'Toolsets will be included in the graph...'
+ $baseOptions += @( '--include-toolset' )
}
- Write-Host "Generating standard dependency graph..."
+ Write-Host 'Generating standard dependency graph...'
& "$darcExe" get-dependency-graph @baseOptions --output-file $normalGraphFilePath
- CheckExitCode "Generating normal dependency graph"
+ CheckExitCode 'Generating normal dependency graph'
- Write-Host "Generating flat dependency graph and graphviz file..."
+ Write-Host 'Generating flat dependency graph and graphviz file...'
& "$darcExe" get-dependency-graph @baseOptions --flat --coherency --graphviz $graphVizFilePath --output-file $flatGraphFilePath
- CheckExitCode "Generating flat and graphviz dependency graph"
+ CheckExitCode 'Generating flat and graphviz dependency graph'
Write-Host "Generating graph image $graphVizFilePath"
$dotFilePath = Join-Path $installBin "graphviz\$graphvizVersion\release\bin\dot.exe"
& "$dotFilePath" -Tpng -o"$graphVizImageFilePath" "$graphVizFilePath"
- CheckExitCode "Generating graphviz image"
+ CheckExitCode 'Generating graphviz image'
Write-Host "'$graphVizFilePath', '$flatGraphFilePath', '$normalGraphFilePath' and '$graphVizImageFilePath' created!"
}
catch {
if (!$includeToolset) {
- Write-Host "This might be a toolset repo which includes only toolset dependencies. " -NoNewline -ForegroundColor Yellow
- Write-Host "Since -includeToolset is not set there is no graph to create. Include -includeToolset and try again..." -ForegroundColor Yellow
+ Write-Host 'This might be a toolset repo which includes only toolset dependencies. ' -NoNewline -ForegroundColor Yellow
+ Write-Host 'Since -includeToolset is not set there is no graph to create. Include -includeToolset and try again...' -ForegroundColor Yellow
}
- Write-Host $_
- Write-Host $_.Exception
Write-Host $_.ScriptStackTrace
+ Write-PipelineTelemetryError -Category 'Arcade' -Message $_
ExitWithExitCode 1
} finally {
- Pop-Location
+ Pop-Location
}
\ No newline at end of file
diff --git a/eng/common/init-tools-native.ps1 b/eng/common/init-tools-native.ps1
index 8cf18bcfebae..db830c00a6f8 100644
--- a/eng/common/init-tools-native.ps1
+++ b/eng/common/init-tools-native.ps1
@@ -35,7 +35,7 @@ File path to global.json file
#>
[CmdletBinding(PositionalBinding=$false)]
Param (
- [string] $BaseUri = "https://netcorenativeassets.blob.core.windows.net/resource-packages/external",
+ [string] $BaseUri = 'https://netcorenativeassets.blob.core.windows.net/resource-packages/external',
[string] $InstallDirectory,
[switch] $Clean = $False,
[switch] $Force = $False,
@@ -45,26 +45,27 @@ Param (
)
if (!$GlobalJsonFile) {
- $GlobalJsonFile = Join-Path (Get-Item $PSScriptRoot).Parent.Parent.FullName "global.json"
+ $GlobalJsonFile = Join-Path (Get-Item $PSScriptRoot).Parent.Parent.FullName 'global.json'
}
Set-StrictMode -version 2.0
-$ErrorActionPreference="Stop"
+$ErrorActionPreference='Stop'
-Import-Module -Name (Join-Path $PSScriptRoot "native\CommonLibrary.psm1")
+. $PSScriptRoot\pipeline-logging-functions.ps1
+Import-Module -Name (Join-Path $PSScriptRoot 'native\CommonLibrary.psm1')
try {
# Define verbose switch if undefined
- $Verbose = $VerbosePreference -Eq "Continue"
+ $Verbose = $VerbosePreference -Eq 'Continue'
- $EngCommonBaseDir = Join-Path $PSScriptRoot "native\"
+ $EngCommonBaseDir = Join-Path $PSScriptRoot 'native\'
$NativeBaseDir = $InstallDirectory
if (!$NativeBaseDir) {
$NativeBaseDir = CommonLibrary\Get-NativeInstallDirectory
}
$Env:CommonLibrary_NativeInstallDir = $NativeBaseDir
- $InstallBin = Join-Path $NativeBaseDir "bin"
- $InstallerPath = Join-Path $EngCommonBaseDir "install-tool.ps1"
+ $InstallBin = Join-Path $NativeBaseDir 'bin'
+ $InstallerPath = Join-Path $EngCommonBaseDir 'install-tool.ps1'
# Process tools list
Write-Host "Processing $GlobalJsonFile"
@@ -74,7 +75,7 @@ try {
}
$NativeTools = Get-Content($GlobalJsonFile) -Raw |
ConvertFrom-Json |
- Select-Object -Expand "native-tools" -ErrorAction SilentlyContinue
+ Select-Object -Expand 'native-tools' -ErrorAction SilentlyContinue
if ($NativeTools) {
$NativeTools.PSObject.Properties | ForEach-Object {
$ToolName = $_.Name
@@ -112,18 +113,21 @@ try {
}
$toolInstallationFailure = $true
} else {
- Write-Error $errMsg
+ # We cannot change this to Write-PipelineTelemetryError because of https://github.com/dotnet/arcade/issues/4482
+ Write-Host $errMsg
exit 1
}
}
}
if ((Get-Variable 'toolInstallationFailure' -ErrorAction 'SilentlyContinue') -and $toolInstallationFailure) {
+ # We cannot change this to Write-PipelineTelemetryError because of https://github.com/dotnet/arcade/issues/4482
+ Write-Host 'Native tools bootstrap failed'
exit 1
}
}
else {
- Write-Host "No native tools defined in global.json"
+ Write-Host 'No native tools defined in global.json'
exit 0
}
@@ -131,17 +135,18 @@ try {
exit 0
}
if (Test-Path $InstallBin) {
- Write-Host "Native tools are available from" (Convert-Path -Path $InstallBin)
+ Write-Host 'Native tools are available from ' (Convert-Path -Path $InstallBin)
Write-Host "##vso[task.prependpath]$(Convert-Path -Path $InstallBin)"
+ return $InstallBin
}
else {
- Write-Error "Native tools install directory does not exist, installation failed"
+ Write-PipelineTelemetryError -Category 'NativeToolsBootstrap' -Message 'Native tools install directory does not exist, installation failed'
exit 1
}
exit 0
}
catch {
- Write-Host $_
- Write-Host $_.Exception
- exit 1
+ Write-Host $_.ScriptStackTrace
+ Write-PipelineTelemetryError -Category 'NativeToolsBootstrap' -Message $_
+ ExitWithExitCode 1
}
diff --git a/eng/common/init-tools-native.sh b/eng/common/init-tools-native.sh
index 4dafaaca130f..29fc5db8ae07 100755
--- a/eng/common/init-tools-native.sh
+++ b/eng/common/init-tools-native.sh
@@ -12,6 +12,7 @@ retry_wait_time_seconds=30
global_json_file="$(dirname "$(dirname "${scriptroot}")")/global.json"
declare -A native_assets
+. $scriptroot/pipeline-logging-functions.sh
. $scriptroot/native/common-library.sh
while (($# > 0)); do
@@ -33,6 +34,14 @@ while (($# > 0)); do
force=true
shift 1
;;
+ --donotabortonfailure)
+ donotabortonfailure=true
+ shift 1
+ ;;
+ --donotdisplaywarnings)
+ donotdisplaywarnings=true
+ shift 1
+ ;;
--downloadretries)
download_retries=$2
shift 2
@@ -51,6 +60,8 @@ while (($# > 0)); do
echo " - (default) %USERPROFILE%/.netcoreeng/native"
echo ""
echo " --clean Switch specifying not to install anything, but cleanup native asset folders"
+ echo " --donotabortonfailure Switch specifiying whether to abort native tools installation on failure"
+ echo " --donotdisplaywarnings Switch specifiying whether to display warnings during native tools installation on failure"
echo " --force Clean and then install tools"
echo " --help Print help and exit"
echo ""
@@ -91,6 +102,7 @@ if [[ -z $install_directory ]]; then
fi
install_bin="${native_base_dir}/bin"
+installed_any=false
ReadGlobalJsonNativeTools
@@ -102,8 +114,8 @@ else
for tool in "${!native_assets[@]}"
do
tool_version=${native_assets[$tool]}
- installer_name="install-$tool.sh"
- installer_command="$native_installer_dir/$installer_name"
+ installer_path="$native_installer_dir/install-$tool.sh"
+ installer_command="$installer_path"
installer_command+=" --baseuri $base_uri"
installer_command+=" --installpath $install_bin"
installer_command+=" --version $tool_version"
@@ -117,11 +129,29 @@ else
installer_command+=" --clean"
fi
- $installer_command
-
- if [[ $? != 0 ]]; then
- echo "Execution Failed" >&2
- exit 1
+ if [[ -a $installer_path ]]; then
+ $installer_command
+ if [[ $? != 0 ]]; then
+ if [[ $donotabortonfailure = true ]]; then
+ if [[ $donotdisplaywarnings != true ]]; then
+ Write-PipelineTelemetryError -category 'NativeToolsBootstrap' "Execution Failed"
+ fi
+ else
+ Write-PipelineTelemetryError -category 'NativeToolsBootstrap' "Execution Failed"
+ exit 1
+ fi
+ else
+ $installed_any = true
+ fi
+ else
+ if [[ $donotabortonfailure == true ]]; then
+ if [[ $donotdisplaywarnings != true ]]; then
+ Write-PipelineTelemetryError -category 'NativeToolsBootstrap' "Execution Failed: no install script"
+ fi
+ else
+ Write-PipelineTelemetryError -category 'NativeToolsBootstrap' "Execution Failed: no install script"
+ exit 1
+ fi
fi
done
fi
@@ -134,8 +164,10 @@ if [[ -d $install_bin ]]; then
echo "Native tools are available from $install_bin"
echo "##vso[task.prependpath]$install_bin"
else
- echo "Native tools install directory does not exist, installation failed" >&2
- exit 1
+ if [[ $installed_any = true ]]; then
+ Write-PipelineTelemetryError -category 'NativeToolsBootstrap' "Native tools install directory does not exist, installation failed"
+ exit 1
+ fi
fi
exit 0
diff --git a/eng/common/internal-feed-operations.ps1 b/eng/common/internal-feed-operations.ps1
index 8b8bafd6a896..db0baac9a445 100644
--- a/eng/common/internal-feed-operations.ps1
+++ b/eng/common/internal-feed-operations.ps1
@@ -6,9 +6,8 @@ param(
[switch] $IsFeedPrivate
)
-$ErrorActionPreference = "Stop"
+$ErrorActionPreference = 'Stop'
Set-StrictMode -Version 2.0
-
. $PSScriptRoot\tools.ps1
# Sets VSS_NUGET_EXTERNAL_FEED_ENDPOINTS based on the "darc-int-*" feeds defined in NuGet.config. This is needed
@@ -21,7 +20,7 @@ function SetupCredProvider {
)
# Install the Cred Provider NuGet plugin
- Write-Host "Setting up Cred Provider NuGet plugin in the agent..."
+ Write-Host 'Setting up Cred Provider NuGet plugin in the agent...'
Write-Host "Getting 'installcredprovider.ps1' from 'https://github.com/microsoft/artifacts-credprovider'..."
$url = 'https://raw.githubusercontent.com/microsoft/artifacts-credprovider/master/helpers/installcredprovider.ps1'
@@ -29,18 +28,18 @@ function SetupCredProvider {
Write-Host "Writing the contents of 'installcredprovider.ps1' locally..."
Invoke-WebRequest $url -OutFile installcredprovider.ps1
- Write-Host "Installing plugin..."
+ Write-Host 'Installing plugin...'
.\installcredprovider.ps1 -Force
Write-Host "Deleting local copy of 'installcredprovider.ps1'..."
Remove-Item .\installcredprovider.ps1
if (-Not("$env:USERPROFILE\.nuget\plugins\netcore")) {
- Write-Host "CredProvider plugin was not installed correctly!"
+ Write-PipelineTelemetryError -Category 'Arcade' -Message 'CredProvider plugin was not installed correctly!'
ExitWithExitCode 1
}
else {
- Write-Host "CredProvider plugin was installed correctly!"
+ Write-Host 'CredProvider plugin was installed correctly!'
}
# Then, we set the 'VSS_NUGET_EXTERNAL_FEED_ENDPOINTS' environment variable to restore from the stable
@@ -49,7 +48,7 @@ function SetupCredProvider {
$nugetConfigPath = "$RepoRoot\NuGet.config"
if (-Not (Test-Path -Path $nugetConfigPath)) {
- Write-Host "NuGet.config file not found in repo's root!"
+ Write-PipelineTelemetryError -Category 'Build' -Message 'NuGet.config file not found in repo root!'
ExitWithExitCode 1
}
@@ -81,7 +80,7 @@ function SetupCredProvider {
}
else
{
- Write-Host "No internal endpoints found in NuGet.config"
+ Write-Host 'No internal endpoints found in NuGet.config'
}
}
@@ -99,7 +98,7 @@ function InstallDotNetSdkAndRestoreArcade {
& $dotnet restore $restoreProjPath
- Write-Host "Arcade SDK restored!"
+ Write-Host 'Arcade SDK restored!'
if (Test-Path -Path $restoreProjPath) {
Remove-Item $restoreProjPath
@@ -113,23 +112,22 @@ function InstallDotNetSdkAndRestoreArcade {
try {
Push-Location $PSScriptRoot
- if ($Operation -like "setup") {
+ if ($Operation -like 'setup') {
SetupCredProvider $AuthToken
}
- elseif ($Operation -like "install-restore") {
+ elseif ($Operation -like 'install-restore') {
InstallDotNetSdkAndRestoreArcade
}
else {
- Write-Host "Unknown operation '$Operation'!"
+ Write-PipelineTelemetryError -Category 'Arcade' -Message "Unknown operation '$Operation'!"
ExitWithExitCode 1
}
}
catch {
- Write-Host $_
- Write-Host $_.Exception
Write-Host $_.ScriptStackTrace
+ Write-PipelineTelemetryError -Category 'Arcade' -Message $_
ExitWithExitCode 1
}
finally {
- Pop-Location
+ Pop-Location
}
diff --git a/eng/common/internal-feed-operations.sh b/eng/common/internal-feed-operations.sh
index 1ff654d2ffcd..5941ea283358 100755
--- a/eng/common/internal-feed-operations.sh
+++ b/eng/common/internal-feed-operations.sh
@@ -30,7 +30,7 @@ function SetupCredProvider {
rm installcredprovider.sh
if [ ! -d "$HOME/.nuget/plugins" ]; then
- echo "CredProvider plugin was not installed correctly!"
+ Write-PipelineTelemetryError -category 'Build' 'CredProvider plugin was not installed correctly!'
ExitWithExitCode 1
else
echo "CredProvider plugin was installed correctly!"
@@ -42,7 +42,7 @@ function SetupCredProvider {
local nugetConfigPath="$repo_root/NuGet.config"
if [ ! "$nugetConfigPath" ]; then
- echo "NuGet.config file not found in repo's root!"
+ Write-PipelineTelemetryError -category 'Build' "NuGet.config file not found in repo's root!"
ExitWithExitCode 1
fi
diff --git a/eng/common/msbuild.ps1 b/eng/common/msbuild.ps1
index b37fd3d5e977..c6401230002f 100644
--- a/eng/common/msbuild.ps1
+++ b/eng/common/msbuild.ps1
@@ -1,6 +1,6 @@
[CmdletBinding(PositionalBinding=$false)]
Param(
- [string] $verbosity = "minimal",
+ [string] $verbosity = 'minimal',
[bool] $warnAsError = $true,
[bool] $nodeReuse = $true,
[switch] $ci,
@@ -18,9 +18,8 @@ try {
MSBuild @extraArgs
}
catch {
- Write-Host $_
- Write-Host $_.Exception
Write-Host $_.ScriptStackTrace
+ Write-PipelineTelemetryError -Category 'Build' -Message $_
ExitWithExitCode 1
}
diff --git a/eng/common/native/common-library.sh b/eng/common/native/common-library.sh
index 271bddfac5a9..bf272dcf55a5 100755
--- a/eng/common/native/common-library.sh
+++ b/eng/common/native/common-library.sh
@@ -34,7 +34,7 @@ function ExpandZip {
echo "'Force flag enabled, but '$output_directory' exists. Removing directory"
rm -rf $output_directory
if [[ $? != 0 ]]; then
- echo Unable to remove '$output_directory'>&2
+ Write-PipelineTelemetryError -category 'NativeToolsBootstrap' "Unable to remove '$output_directory'"
return 1
fi
fi
@@ -45,7 +45,7 @@ function ExpandZip {
echo "Extracting archive"
tar -xf $zip_path -C $output_directory
if [[ $? != 0 ]]; then
- echo "Unable to extract '$zip_path'" >&2
+ Write-PipelineTelemetryError -category 'NativeToolsBootstrap' "Unable to extract '$zip_path'"
return 1
fi
@@ -117,7 +117,7 @@ function DownloadAndExtract {
# Download file
GetFile "$uri" "$temp_tool_path" $force $download_retries $retry_wait_time_seconds
if [[ $? != 0 ]]; then
- echo "Failed to download '$uri' to '$temp_tool_path'." >&2
+ Write-PipelineTelemetryError -category 'NativeToolsBootstrap' "Failed to download '$uri' to '$temp_tool_path'."
return 1
fi
@@ -125,7 +125,7 @@ function DownloadAndExtract {
echo "extracting from $temp_tool_path to $installDir"
ExpandZip "$temp_tool_path" "$installDir" $force $download_retries $retry_wait_time_seconds
if [[ $? != 0 ]]; then
- echo "Failed to extract '$temp_tool_path' to '$installDir'." >&2
+ Write-PipelineTelemetryError -category 'NativeToolsBootstrap' "Failed to extract '$temp_tool_path' to '$installDir'."
return 1
fi
@@ -148,7 +148,7 @@ function NewScriptShim {
fi
if [[ ! -f $tool_file_path ]]; then
- echo "Specified tool file path:'$tool_file_path' does not exist" >&2
+ Write-PipelineTelemetryError -category 'NativeToolsBootstrap' "Specified tool file path:'$tool_file_path' does not exist"
return 1
fi
diff --git a/eng/common/native/install-cmake-test.sh b/eng/common/native/install-cmake-test.sh
index 53ddf4e68601..12339a40761d 100755
--- a/eng/common/native/install-cmake-test.sh
+++ b/eng/common/native/install-cmake-test.sh
@@ -101,7 +101,7 @@ fi
DownloadAndExtract $uri $tool_install_directory $force $download_retries $retry_wait_time_seconds
if [[ $? != 0 ]]; then
- echo "Installation failed" >&2
+ Write-PipelineTelemetryError -category 'NativeToolsBootstrap' 'Installation failed'
exit 1
fi
@@ -110,7 +110,7 @@ fi
NewScriptShim $shim_path $tool_file_path true
if [[ $? != 0 ]]; then
- echo "Shim generation failed" >&2
+ Write-PipelineTelemetryError -category 'NativeToolsBootstrap' 'Shim generation failed'
exit 1
fi
diff --git a/eng/common/native/install-cmake.sh b/eng/common/native/install-cmake.sh
index 5f1a182fa9f7..18041be87633 100755
--- a/eng/common/native/install-cmake.sh
+++ b/eng/common/native/install-cmake.sh
@@ -101,7 +101,7 @@ fi
DownloadAndExtract $uri $tool_install_directory $force $download_retries $retry_wait_time_seconds
if [[ $? != 0 ]]; then
- echo "Installation failed" >&2
+ Write-PipelineTelemetryError -category 'NativeToolsBootstrap' 'Installation failed'
exit 1
fi
@@ -110,7 +110,7 @@ fi
NewScriptShim $shim_path $tool_file_path true
if [[ $? != 0 ]]; then
- echo "Shim generation failed" >&2
+ Write-PipelineTelemetryError -category 'NativeToolsBootstrap' 'Shim generation failed'
exit 1
fi
diff --git a/eng/common/native/install-tool.ps1 b/eng/common/native/install-tool.ps1
index 635ab3fd414b..f397e1c75d41 100644
--- a/eng/common/native/install-tool.ps1
+++ b/eng/common/native/install-tool.ps1
@@ -46,6 +46,8 @@ Param (
[int] $RetryWaitTimeInSeconds = 30
)
+. $PSScriptRoot\..\pipeline-logging-functions.ps1
+
# Import common library modules
Import-Module -Name (Join-Path $CommonLibraryDirectory "CommonLibrary.psm1")
@@ -93,7 +95,7 @@ try {
-Verbose:$Verbose
if ($InstallStatus -Eq $False) {
- Write-Error "Installation failed"
+ Write-PipelineTelemetryError "Installation failed" -Category "NativeToolsetBootstrapping"
exit 1
}
}
@@ -103,7 +105,7 @@ try {
Write-Error "There are multiple copies of $ToolName in $($ToolInstallDirectory): `n$(@($ToolFilePath | out-string))"
exit 1
} elseif (@($ToolFilePath).Length -Lt 1) {
- Write-Error "$ToolName was not found in $ToolFilePath."
+ Write-Host "$ToolName was not found in $ToolFilePath."
exit 1
}
@@ -117,14 +119,14 @@ try {
-Verbose:$Verbose
if ($GenerateShimStatus -Eq $False) {
- Write-Error "Generate shim failed"
+ Write-PipelineTelemetryError "Generate shim failed" -Category "NativeToolsetBootstrapping"
return 1
}
exit 0
}
catch {
- Write-Host $_
- Write-Host $_.Exception
+ Write-Host $_.ScriptStackTrace
+ Write-PipelineTelemetryError -Category "NativeToolsetBootstrapping" -Message $_
exit 1
}
diff --git a/eng/common/performance/perfhelixpublish.proj b/eng/common/performance/perfhelixpublish.proj
index e5826b532370..cf5941e1b645 100644
--- a/eng/common/performance/perfhelixpublish.proj
+++ b/eng/common/performance/perfhelixpublish.proj
@@ -6,7 +6,7 @@
py -3
%HELIX_CORRELATION_PAYLOAD%\Core_Root\CoreRun.exe
%HELIX_CORRELATION_PAYLOAD%\Baseline_Core_Root\CoreRun.exe
- $(HelixPreCommands);call %HELIX_CORRELATION_PAYLOAD%\performance\tools\machine-setup.cmd
+ $(HelixPreCommands);call %HELIX_CORRELATION_PAYLOAD%\performance\tools\machine-setup.cmd;set PYTHONPATH=%HELIX_WORKITEM_PAYLOAD%\scripts%3B%HELIX_WORKITEM_PAYLOAD%
%HELIX_CORRELATION_PAYLOAD%\artifacts\BenchmarkDotNet.Artifacts
%HELIX_CORRELATION_PAYLOAD%\artifacts\BenchmarkDotNet.Artifacts_Baseline
%HELIX_CORRELATION_PAYLOAD%\performance\src\tools\ResultsComparer\ResultsComparer.csproj
@@ -99,4 +99,23 @@
4:00
+
+
+
+ $(WorkItemDirectory)\ScenarioCorrelation
+ $(Python) %HELIX_CORRELATION_PAYLOAD%\performance\src\scenarios\crossgen\test.py crossgen --test-name System.Private.Xml.dll --core-root %HELIX_CORRELATION_PAYLOAD%\Core_Root
+
+
+ $(WorkItemDirectory)\ScenarioCorrelation
+ $(Python) %HELIX_CORRELATION_PAYLOAD%\performance\src\scenarios\crossgen\test.py crossgen --test-name System.Linq.Expressions.dll --core-root %HELIX_CORRELATION_PAYLOAD%\Core_Root
+
+
+ $(WorkItemDirectory)\ScenarioCorrelation
+ $(Python) %HELIX_CORRELATION_PAYLOAD%\performance\src\scenarios\crossgen\test.py crossgen --test-name Microsoft.CodeAnalysis.VisualBasic.dll --core-root %HELIX_CORRELATION_PAYLOAD%\Core_Root
+
+
+ $(WorkItemDirectory)\ScenarioCorrelation
+ $(Python) %HELIX_CORRELATION_PAYLOAD%\performance\src\scenarios\crossgen\test.py crossgen --test-name Microsoft.CodeAnalysis.CSharp.dll --core-root %HELIX_CORRELATION_PAYLOAD%\Core_Root
+
+
\ No newline at end of file
diff --git a/eng/common/performance/performance-setup.ps1 b/eng/common/performance/performance-setup.ps1
index ec41965fc895..e33766992945 100644
--- a/eng/common/performance/performance-setup.ps1
+++ b/eng/common/performance/performance-setup.ps1
@@ -9,12 +9,12 @@ Param(
[string] $Branch=$env:BUILD_SOURCEBRANCH,
[string] $CommitSha=$env:BUILD_SOURCEVERSION,
[string] $BuildNumber=$env:BUILD_BUILDNUMBER,
- [string] $RunCategories="coreclr corefx",
+ [string] $RunCategories="Libraries Runtime",
[string] $Csproj="src\benchmarks\micro\MicroBenchmarks.csproj",
[string] $Kind="micro",
[switch] $Internal,
[switch] $Compare,
- [string] $Configurations="CompilationMode=$CompilationMode"
+ [string] $Configurations="CompilationMode=$CompilationMode RunKind=$Kind"
)
$RunFromPerformanceRepo = ($Repository -eq "dotnet/performance") -or ($Repository -eq "dotnet-performance")
@@ -49,7 +49,8 @@ if ($Internal) {
$HelixSourcePrefix = "official"
}
-$CommonSetupArguments="--frameworks $Framework --queue $Queue --build-number $BuildNumber --build-configs $Configurations"
+# FIX ME: This is a workaround until we get this from the actual pipeline
+$CommonSetupArguments="--channel master --queue $Queue --build-number $BuildNumber --build-configs $Configurations --architecture $Architecture"
$SetupArguments = "--repository https://github.com/$Repository --branch $Branch --get-perf-hash --commit-sha $CommitSha $CommonSetupArguments"
if ($RunFromPerformanceRepo) {
diff --git a/eng/common/performance/performance-setup.sh b/eng/common/performance/performance-setup.sh
index 2f2092166e43..94a04e0fe551 100755
--- a/eng/common/performance/performance-setup.sh
+++ b/eng/common/performance/performance-setup.sh
@@ -13,9 +13,9 @@ build_number=$BUILD_BUILDNUMBER
internal=false
compare=false
kind="micro"
-run_categories="coreclr corefx"
+run_categories="Libraries Runtime"
csproj="src\benchmarks\micro\MicroBenchmarks.csproj"
-configurations=
+configurations="CompliationMode=$compilation_mode RunKind=$kind"
run_from_perf_repo=false
use_core_run=true
use_baseline_core_run=true
@@ -164,7 +164,7 @@ if [[ "$internal" == true ]]; then
fi
fi
-common_setup_arguments="--frameworks $framework --queue $queue --build-number $build_number --build-configs $configurations"
+common_setup_arguments="--channel master --queue $queue --build-number $build_number --build-configs $configurations --architecture $architecture"
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
diff --git a/eng/common/pipeline-logging-functions.ps1 b/eng/common/pipeline-logging-functions.ps1
index af5f48aacebc..5042baebf11d 100644
--- a/eng/common/pipeline-logging-functions.ps1
+++ b/eng/common/pipeline-logging-functions.ps1
@@ -12,6 +12,7 @@ $script:loggingCommandEscapeMappings = @( # TODO: WHAT ABOUT "="? WHAT ABOUT "%"
# TODO: BUG: Escape % ???
# TODO: Add test to verify don't need to escape "=".
+# Specify "-Force" to force pipeline formatted output even if "$ci" is false or not set
function Write-PipelineTelemetryError {
[CmdletBinding()]
param(
@@ -25,49 +26,55 @@ function Write-PipelineTelemetryError {
[string]$SourcePath,
[string]$LineNumber,
[string]$ColumnNumber,
- [switch]$AsOutput)
-
- $PSBoundParameters.Remove("Category") | Out-Null
+ [switch]$AsOutput,
+ [switch]$Force)
- $Message = "(NETCORE_ENGINEERING_TELEMETRY=$Category) $Message"
- $PSBoundParameters.Remove("Message") | Out-Null
- $PSBoundParameters.Add("Message", $Message)
+ $PSBoundParameters.Remove('Category') | Out-Null
+ if($Force -Or ((Test-Path variable:ci) -And $ci)) {
+ $Message = "(NETCORE_ENGINEERING_TELEMETRY=$Category) $Message"
+ }
+ $PSBoundParameters.Remove('Message') | Out-Null
+ $PSBoundParameters.Add('Message', $Message)
Write-PipelineTaskError @PSBoundParameters
}
+# Specify "-Force" to force pipeline formatted output even if "$ci" is false or not set
function Write-PipelineTaskError {
[CmdletBinding()]
param(
- [Parameter(Mandatory = $true)]
- [string]$Message,
- [Parameter(Mandatory = $false)]
- [string]$Type = 'error',
- [string]$ErrCode,
- [string]$SourcePath,
- [string]$LineNumber,
- [string]$ColumnNumber,
- [switch]$AsOutput)
-
- if(!$ci) {
+ [Parameter(Mandatory = $true)]
+ [string]$Message,
+ [Parameter(Mandatory = $false)]
+ [string]$Type = 'error',
+ [string]$ErrCode,
+ [string]$SourcePath,
+ [string]$LineNumber,
+ [string]$ColumnNumber,
+ [switch]$AsOutput,
+ [switch]$Force
+ )
+
+ if(!$Force -And (-Not (Test-Path variable:ci) -Or !$ci)) {
if($Type -eq 'error') {
- Write-Host $Message -ForegroundColor Red
- return
+ Write-Host $Message -ForegroundColor Red
+ return
}
elseif ($Type -eq 'warning') {
- Write-Host $Message -ForegroundColor Yellow
- return
+ Write-Host $Message -ForegroundColor Yellow
+ return
}
- }
-
- if(($Type -ne 'error') -and ($Type -ne 'warning')) {
- Write-Host $Message
- return
- }
- if(-not $PSBoundParameters.ContainsKey('Type')) {
- $PSBoundParameters.Add('Type', 'error')
- }
- Write-LogIssue @PSBoundParameters
+ }
+
+ if(($Type -ne 'error') -and ($Type -ne 'warning')) {
+ Write-Host $Message
+ return
+ }
+ $PSBoundParameters.Remove('Force') | Out-Null
+ if(-not $PSBoundParameters.ContainsKey('Type')) {
+ $PSBoundParameters.Add('Type', 'error')
+ }
+ Write-LogIssue @PSBoundParameters
}
function Write-PipelineSetVariable {
@@ -80,7 +87,7 @@ function Write-PipelineTaskError {
[switch]$AsOutput,
[bool]$IsMultiJobVariable=$true)
- if($ci) {
+ if((Test-Path variable:ci) -And $ci) {
Write-LoggingCommand -Area 'task' -Event 'setvariable' -Data $Value -Properties @{
'variable' = $Name
'isSecret' = $Secret
@@ -95,7 +102,8 @@ function Write-PipelineTaskError {
[Parameter(Mandatory=$true)]
[string]$Path,
[switch]$AsOutput)
- if($ci) {
+
+ if((Test-Path variable:ci) -And $ci) {
Write-LoggingCommand -Area 'task' -Event 'prependpath' -Data $Path -AsOutput:$AsOutput
}
}
@@ -231,4 +239,4 @@ function Write-LogIssue {
}
Write-Host $command -ForegroundColor $foregroundColor -BackgroundColor $backgroundColor
-}
\ No newline at end of file
+}
diff --git a/eng/common/pipeline-logging-functions.sh b/eng/common/pipeline-logging-functions.sh
index 1c560a506132..33c3f0d8072a 100755
--- a/eng/common/pipeline-logging-functions.sh
+++ b/eng/common/pipeline-logging-functions.sh
@@ -2,6 +2,7 @@
function Write-PipelineTelemetryError {
local telemetry_category=''
+ local force=false
local function_args=()
local message=''
while [[ $# -gt 0 ]]; do
@@ -11,6 +12,9 @@ function Write-PipelineTelemetryError {
telemetry_category=$2
shift
;;
+ -force|-f)
+ force=true
+ ;;
-*)
function_args+=("$1 $2")
shift
@@ -22,19 +26,22 @@ function Write-PipelineTelemetryError {
shift
done
- if [[ "$ci" != true ]]; then
+ if [[ $force != true ]] && [[ "$ci" != true ]]; then
echo "$message" >&2
return
fi
message="(NETCORE_ENGINEERING_TELEMETRY=$telemetry_category) $message"
function_args+=("$message")
+ if [[ $force == true ]]; then
+ function_args+=("-force")
+ fi
Write-PipelineTaskError $function_args
}
function Write-PipelineTaskError {
- if [[ "$ci" != true ]]; then
+ if [[ $force != true ]] && [[ "$ci" != true ]]; then
echo "$@" >&2
return
fi
diff --git a/eng/common/post-build/promote-build.ps1 b/eng/common/post-build/add-build-to-channel.ps1
similarity index 55%
rename from eng/common/post-build/promote-build.ps1
rename to eng/common/post-build/add-build-to-channel.ps1
index e5ae85f25179..de2d957922a6 100644
--- a/eng/common/post-build/promote-build.ps1
+++ b/eng/common/post-build/add-build-to-channel.ps1
@@ -2,26 +2,26 @@ 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"
+ [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 {
+ . $PSScriptRoot\post-build-utils.ps1
+
# 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!"
+ Write-PipelineTelemetryCategory -Category 'PromoteBuild' -Message "Channel with BAR ID $ChannelId was not found in BAR!"
ExitWithExitCode 1
}
- # Get info about which channels the build has already been promoted to
+ # Get info about which channel(s) 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!"
+ Write-PipelineTelemetryError -Category 'PromoteBuild' -Message "Build with BAR ID $BuildId was not found in BAR!"
ExitWithExitCode 1
}
@@ -39,10 +39,10 @@ try {
Assign-BuildToChannel -BuildId $BuildId -ChannelId $ChannelId
- Write-Host "done."
+ Write-Host 'done.'
}
catch {
- Write-Host "There was an error while trying to promote build '$BuildId' to channel '$ChannelId'"
Write-Host $_
- Write-Host $_.ScriptStackTrace
+ Write-PipelineTelemetryError -Category 'PromoteBuild' -Message "There was an error while trying to promote build '$BuildId' to channel '$ChannelId'"
+ ExitWithExitCode 1
}
diff --git a/eng/common/post-build/check-channel-consistency.ps1 b/eng/common/post-build/check-channel-consistency.ps1
new file mode 100644
index 000000000000..7e6618d64ad9
--- /dev/null
+++ b/eng/common/post-build/check-channel-consistency.ps1
@@ -0,0 +1,25 @@
+param(
+ [Parameter(Mandatory=$true)][string] $PromoteToChannels, # List of channels that the build should be promoted to
+ [Parameter(Mandatory=$true)][array] $AvailableChannelIds # List of channel IDs available in the YAML implementation
+)
+
+try {
+ . $PSScriptRoot\post-build-utils.ps1
+
+ # Check that every channel that Maestro told to promote the build to
+ # is available in YAML
+ $PromoteToChannelsIds = $PromoteToChannels -split "\D" | Where-Object { $_ }
+
+ foreach ($id in $PromoteToChannelsIds) {
+ if (($id -ne 0) -and ($id -notin $AvailableChannelIds)) {
+ Write-PipelineTaskError -Type 'warning' -Message "Channel $id is not present in the post-build YAML configuration!"
+ }
+ }
+
+ Write-Host 'done.'
+}
+catch {
+ Write-Host $_
+ Write-PipelineTelemetryError -Category 'CheckChannelConsistency' -Message "There was an error while trying to check consistency of Maestro default channels for the build and post-build YAML configuration."
+ ExitWithExitCode 1
+}
diff --git a/eng/common/post-build/darc-gather-drop.ps1 b/eng/common/post-build/darc-gather-drop.ps1
deleted file mode 100644
index 89854d3c1c2a..000000000000
--- a/eng/common/post-build/darc-gather-drop.ps1
+++ /dev/null
@@ -1,45 +0,0 @@
-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
- }
-
- # For now, only use a dry run.
- # Ideally we would change darc to enable a quick request that
- # would check whether the file exists that you can download it,
- # and that it won't conflict with other files.
- # https://github.com/dotnet/arcade/issues/3674
- # Right now we can't remove continue-on-error because we ocassionally will have
- # dependencies that have no associated builds (e.g. an old dependency).
- # We need to add an option to baseline specific dependencies away, or add them manually
- # to the BAR.
- darc gather-drop --non-shipping `
- --dry-run `
- --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
index 78ed0d540f50..dab3534ab538 100644
--- a/eng/common/post-build/nuget-validation.ps1
+++ b/eng/common/post-build/nuget-validation.ps1
@@ -6,20 +6,19 @@ param(
[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"
+ . $PSScriptRoot\post-build-utils.ps1
+
+ $url = 'https://raw.githubusercontent.com/NuGet/NuGetGallery/3e25ad135146676bcab0050a516939d9958bfa5d/src/VerifyMicrosoftPackage/verify.ps1'
- New-Item -ItemType "directory" -Path ${ToolDestinationPath} -Force
+ 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
+ Write-PipelineTelemetryError -Category 'NuGetValidation' -Message $_
ExitWithExitCode 1
}
diff --git a/eng/common/post-build/post-build-utils.ps1 b/eng/common/post-build/post-build-utils.ps1
index 551ae113f89f..7d49744795f6 100644
--- a/eng/common/post-build/post-build-utils.ps1
+++ b/eng/common/post-build/post-build-utils.ps1
@@ -1,16 +1,17 @@
# Most of the functions in this file require the variables `MaestroApiEndPoint`,
# `MaestroApiVersion` and `MaestroApiAccessToken` to be globally available.
-$ErrorActionPreference = "Stop"
+$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
+$disableConfigureToolsetImport = $true
. $PSScriptRoot\..\tools.ps1
-function Create-MaestroApiRequestHeaders([string]$ContentType = "application/json") {
+function Create-MaestroApiRequestHeaders([string]$ContentType = 'application/json') {
Validate-MaestroVars
$headers = New-Object 'System.Collections.Generic.Dictionary[[String],[String]]'
@@ -50,20 +51,20 @@ function Get-MaestroSubscriptions([string]$SourceRepository, [int]$ChannelId) {
return $result
}
-function Trigger-Subscription([string]$SubscriptionId) {
+function Assign-BuildToChannel([int]$BuildId, [int]$ChannelId) {
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
+ $apiEndpoint = "$MaestroApiEndPoint/api/channels/${ChannelId}/builds/${BuildId}?api-version=$MaestroApiVersion"
+ Invoke-WebRequest -Method Post -Uri $apiEndpoint -Headers $apiHeaders | Out-Null
}
-function Assign-BuildToChannel([int]$BuildId, [int]$ChannelId) {
+function Trigger-Subscription([string]$SubscriptionId) {
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
+ $apiEndpoint = "$MaestroApiEndPoint/api/subscriptions/$SubscriptionId/trigger?api-version=$MaestroApiVersion"
+ Invoke-WebRequest -Uri $apiEndpoint -Headers $apiHeaders -Method Post | Out-Null
}
function Validate-MaestroVars {
@@ -72,18 +73,18 @@ function Validate-MaestroVars {
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'"
+ if (!($MaestroApiEndPoint -Match '^http[s]?://maestro-(int|prod).westus2.cloudapp.azure.com$')) {
+ Write-PipelineTelemetryError -Category 'MaestroVars' -Message "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'"
+ if (!($MaestroApiVersion -Match '^[0-9]{4}-[0-9]{2}-[0-9]{2}$')) {
+ Write-PipelineTelemetryError -Category 'MaestroVars' -Message "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-PipelineTelemetryError -Category 'MaestroVars' -Message 'Error: Variables `MaestroApiEndPoint`, `MaestroApiVersion` and `MaestroApiAccessToken` are required while using this script.'
Write-Host $_
ExitWithExitCode 1
}
diff --git a/eng/common/post-build/setup-maestro-vars.ps1 b/eng/common/post-build/setup-maestro-vars.ps1
deleted file mode 100644
index d7f64dc63cbc..000000000000
--- a/eng/common/post-build/setup-maestro-vars.ps1
+++ /dev/null
@@ -1,26 +0,0 @@
-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 bbfdacca1307..cc9d059d04f3 100644
--- a/eng/common/post-build/sourcelink-validation.ps1
+++ b/eng/common/post-build/sourcelink-validation.ps1
@@ -34,9 +34,9 @@ $ValidatePackage = {
# Extensions for which we'll look for SourceLink information
# For now we'll only care about Portable & Embedded PDBs
- $RelevantExtensions = @(".dll", ".exe", ".pdb")
+ $RelevantExtensions = @('.dll', '.exe', '.pdb')
- Write-Host -NoNewLine "Validating" ([System.IO.Path]::GetFileName($PackagePath)) "... "
+ Write-Host -NoNewLine 'Validating ' ([System.IO.Path]::GetFileName($PackagePath)) '...'
$PackageId = [System.IO.Path]::GetFileNameWithoutExtension($PackagePath)
$ExtractPath = Join-Path -Path $using:ExtractPath -ChildPath $PackageId
@@ -58,7 +58,7 @@ $ValidatePackage = {
$TargetFile = Join-Path -Path $ExtractPath -ChildPath $FakeName
# We ignore resource DLLs
- if ($FileName.EndsWith(".resources.dll")) {
+ if ($FileName.EndsWith('.resources.dll')) {
return
}
@@ -96,7 +96,7 @@ $ValidatePackage = {
$Uri = $Link -as [System.URI]
# Only GitHub links are valid
- if ($Uri.AbsoluteURI -ne $null -and ($Uri.Host -match "github" -or $Uri.Host -match "githubusercontent")) {
+ if ($Uri.AbsoluteURI -ne $null -and ($Uri.Host -match 'github' -or $Uri.Host -match 'githubusercontent')) {
$Status = (Invoke-WebRequest -Uri $Link -UseBasicParsing -Method HEAD -TimeoutSec 5).StatusCode
}
else {
@@ -143,19 +143,19 @@ $ValidatePackage = {
}
if ($FailedFiles -eq 0) {
- Write-Host "Passed."
+ Write-Host 'Passed.'
return 0
}
else {
- Write-Host "$PackagePath has broken SourceLink links."
+ Write-PipelineTelemetryError -Category 'SourceLink' -Message "$PackagePath has broken SourceLink links."
return 1
}
}
function ValidateSourceLinkLinks {
- if ($GHRepoName -ne "" -and !($GHRepoName -Match "^[^\s\/]+/[^\s\/]+$")) {
- if (!($GHRepoName -Match "^[^\s-]+-[^\s]+$")) {
- Write-PipelineTaskError "GHRepoName should be in the format / or -. '$GHRepoName'"
+ if ($GHRepoName -ne '' -and !($GHRepoName -Match '^[^\s\/]+/[^\s\/]+$')) {
+ if (!($GHRepoName -Match '^[^\s-]+-[^\s]+$')) {
+ Write-PipelineTelemetryError -Category 'SourceLink' -Message "GHRepoName should be in the format / or -. '$GHRepoName'"
ExitWithExitCode 1
}
else {
@@ -163,14 +163,14 @@ function ValidateSourceLinkLinks {
}
}
- if ($GHCommit -ne "" -and !($GHCommit -Match "^[0-9a-fA-F]{40}$")) {
- Write-PipelineTaskError "GHCommit should be a 40 chars hexadecimal string. '$GHCommit'"
+ if ($GHCommit -ne '' -and !($GHCommit -Match '^[0-9a-fA-F]{40}$')) {
+ Write-PipelineTelemetryError -Category 'SourceLink' -Message "GHCommit should be a 40 chars hexadecimal string. '$GHCommit'"
ExitWithExitCode 1
}
- if ($GHRepoName -ne "" -and $GHCommit -ne "") {
- $RepoTreeURL = -Join("http://api.github.com/repos/", $GHRepoName, "/git/trees/", $GHCommit, "?recursive=1")
- $CodeExtensions = @(".cs", ".vb", ".fs", ".fsi", ".fsx", ".fsscript")
+ if ($GHRepoName -ne '' -and $GHCommit -ne '') {
+ $RepoTreeURL = -Join('http://api.github.com/repos/', $GHRepoName, '/git/trees/', $GHCommit, '?recursive=1')
+ $CodeExtensions = @('.cs', '.vb', '.fs', '.fsi', '.fsx', '.fsscript')
try {
# Retrieve the list of files in the repo at that particular commit point and store them in the RepoFiles hash
@@ -188,8 +188,8 @@ function ValidateSourceLinkLinks {
Write-Host "Problems downloading the list of files from the repo. Url used: $RepoTreeURL . Execution will proceed without caching."
}
}
- elseif ($GHRepoName -ne "" -or $GHCommit -ne "") {
- Write-Host "For using the http caching mechanism both GHRepoName and GHCommit should be informed."
+ elseif ($GHRepoName -ne '' -or $GHCommit -ne '') {
+ Write-Host 'For using the http caching mechanism both GHRepoName and GHCommit should be informed.'
}
if (Test-Path $ExtractPath) {
@@ -217,18 +217,18 @@ function ValidateSourceLinkLinks {
$ValidationFailures = 0
foreach ($Job in @(Get-Job)) {
$jobResult = Wait-Job -Id $Job.Id | Receive-Job
- if ($jobResult -ne "0") {
+ if ($jobResult -ne '0') {
$ValidationFailures++
}
}
if ($ValidationFailures -gt 0) {
- Write-PipelineTaskError " $ValidationFailures package(s) failed validation."
+ Write-PipelineTelemetryError -Category 'SourceLink' -Message "$ValidationFailures package(s) failed validation."
ExitWithExitCode 1
}
}
function InstallSourcelinkCli {
- $sourcelinkCliPackageName = "sourcelink"
+ $sourcelinkCliPackageName = 'sourcelink'
$dotnetRoot = InitializeDotNetCli -install:$true
$dotnet = "$dotnetRoot\dotnet.exe"
@@ -239,7 +239,7 @@ function InstallSourcelinkCli {
}
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."
+ 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
}
}
@@ -250,8 +250,8 @@ try {
ValidateSourceLinkLinks
}
catch {
- Write-Host $_
Write-Host $_.Exception
Write-Host $_.ScriptStackTrace
+ Write-PipelineTelemetryError -Category 'SourceLink' -Message $_
ExitWithExitCode 1
}
diff --git a/eng/common/post-build/symbols-validation.ps1 b/eng/common/post-build/symbols-validation.ps1
index 096ac321d129..f7cfe986ddd3 100644
--- a/eng/common/post-build/symbols-validation.ps1
+++ b/eng/common/post-build/symbols-validation.ps1
@@ -4,10 +4,6 @@ param(
[Parameter(Mandatory=$true)][string] $DotnetSymbolVersion # Version of dotnet symbol to use
)
-. $PSScriptRoot\post-build-utils.ps1
-
-Add-Type -AssemblyName System.IO.Compression.FileSystem
-
function FirstMatchingSymbolDescriptionOrDefault {
param(
[string] $FullPath, # Full path to the module that has to be checked
@@ -23,19 +19,19 @@ function FirstMatchingSymbolDescriptionOrDefault {
# checking and which type of file was uploaded.
# The file itself is returned
- $SymbolPath = $SymbolsPath + "\" + $FileName
+ $SymbolPath = $SymbolsPath + '\' + $FileName
# PDB file for the module
- $PdbPath = $SymbolPath.Replace($Extension, ".pdb")
+ $PdbPath = $SymbolPath.Replace($Extension, '.pdb')
# PDB file for R2R module (created by crossgen)
- $NGenPdb = $SymbolPath.Replace($Extension, ".ni.pdb")
+ $NGenPdb = $SymbolPath.Replace($Extension, '.ni.pdb')
# DBG file for a .so library
- $SODbg = $SymbolPath.Replace($Extension, ".so.dbg")
+ $SODbg = $SymbolPath.Replace($Extension, '.so.dbg')
# DWARF file for a .dylib
- $DylibDwarf = $SymbolPath.Replace($Extension, ".dylib.dwarf")
+ $DylibDwarf = $SymbolPath.Replace($Extension, '.dylib.dwarf')
$dotnetSymbolExe = "$env:USERPROFILE\.dotnet\tools"
$dotnetSymbolExe = Resolve-Path "$dotnetSymbolExe\dotnet-symbol.exe"
@@ -43,19 +39,19 @@ function FirstMatchingSymbolDescriptionOrDefault {
& $dotnetSymbolExe --symbols --modules --windows-pdbs $TargetServerParam $FullPath -o $SymbolsPath | Out-Null
if (Test-Path $PdbPath) {
- return "PDB"
+ return 'PDB'
}
elseif (Test-Path $NGenPdb) {
- return "NGen PDB"
+ return 'NGen PDB'
}
elseif (Test-Path $SODbg) {
- return "DBG for SO"
+ return 'DBG for SO'
}
elseif (Test-Path $DylibDwarf) {
- return "Dwarf for Dylib"
+ return 'Dwarf for Dylib'
}
elseif (Test-Path $SymbolPath) {
- return "Module"
+ return 'Module'
}
else {
return $null
@@ -74,7 +70,7 @@ function CountMissingSymbols {
}
# Extensions for which we'll look for symbols
- $RelevantExtensions = @(".dll", ".exe", ".so", ".dylib")
+ $RelevantExtensions = @('.dll', '.exe', '.so', '.dylib')
# How many files are missing symbol information
$MissingSymbols = 0
@@ -82,38 +78,38 @@ function CountMissingSymbols {
$PackageId = [System.IO.Path]::GetFileNameWithoutExtension($PackagePath)
$PackageGuid = New-Guid
$ExtractPath = Join-Path -Path $ExtractPath -ChildPath $PackageGuid
- $SymbolsPath = Join-Path -Path $ExtractPath -ChildPath "Symbols"
+ $SymbolsPath = Join-Path -Path $ExtractPath -ChildPath 'Symbols'
[System.IO.Compression.ZipFile]::ExtractToDirectory($PackagePath, $ExtractPath)
Get-ChildItem -Recurse $ExtractPath |
Where-Object {$RelevantExtensions -contains $_.Extension} |
ForEach-Object {
- if ($_.FullName -Match "\\ref\\") {
- Write-Host "`t Ignoring reference assembly file" $_.FullName
+ if ($_.FullName -Match '\\ref\\') {
+ Write-Host "`t Ignoring reference assembly file " $_.FullName
return
}
- $SymbolsOnMSDL = FirstMatchingSymbolDescriptionOrDefault $_.FullName "--microsoft-symbol-server" $SymbolsPath
- $SymbolsOnSymWeb = FirstMatchingSymbolDescriptionOrDefault $_.FullName "--internal-server" $SymbolsPath
+ $SymbolsOnMSDL = FirstMatchingSymbolDescriptionOrDefault $_.FullName '--microsoft-symbol-server' $SymbolsPath
+ $SymbolsOnSymWeb = FirstMatchingSymbolDescriptionOrDefault $_.FullName '--internal-server' $SymbolsPath
- Write-Host -NoNewLine "`t Checking file" $_.FullName "... "
+ Write-Host -NoNewLine "`t Checking file " $_.FullName "... "
if ($SymbolsOnMSDL -ne $null -and $SymbolsOnSymWeb -ne $null) {
- Write-Host "Symbols found on MSDL (" $SymbolsOnMSDL ") and SymWeb (" $SymbolsOnSymWeb ")"
+ Write-Host "Symbols found on MSDL ($SymbolsOnMSDL) and SymWeb ($SymbolsOnSymWeb)"
}
else {
$MissingSymbols++
if ($SymbolsOnMSDL -eq $null -and $SymbolsOnSymWeb -eq $null) {
- Write-Host "No symbols found on MSDL or SymWeb!"
+ Write-Host 'No symbols found on MSDL or SymWeb!'
}
else {
if ($SymbolsOnMSDL -eq $null) {
- Write-Host "No symbols found on MSDL!"
+ Write-Host 'No symbols found on MSDL!'
}
else {
- Write-Host "No symbols found on SymWeb!"
+ Write-Host 'No symbols found on SymWeb!'
}
}
}
@@ -132,27 +128,27 @@ function CheckSymbolsAvailable {
Get-ChildItem "$InputPath\*.nupkg" |
ForEach-Object {
$FileName = $_.Name
-
+
# These packages from Arcade-Services include some native libraries that
# our current symbol uploader can't handle. Below is a workaround until
# we get issue: https://github.com/dotnet/arcade/issues/2457 sorted.
- if ($FileName -Match "Microsoft\.DotNet\.Darc\.") {
+ if ($FileName -Match 'Microsoft\.DotNet\.Darc\.') {
Write-Host "Ignoring Arcade-services file: $FileName"
Write-Host
return
}
- elseif ($FileName -Match "Microsoft\.DotNet\.Maestro\.Tasks\.") {
+ elseif ($FileName -Match 'Microsoft\.DotNet\.Maestro\.Tasks\.') {
Write-Host "Ignoring Arcade-services file: $FileName"
Write-Host
return
}
-
+
Write-Host "Validating $FileName "
$Status = CountMissingSymbols "$InputPath\$FileName"
-
+
if ($Status -ne 0) {
- Write-PipelineTaskError "Missing symbols for $Status modules in the package $FileName"
- ExitWithExitCode $exitCode
+ Write-PipelineTelemetryError -Category 'CheckSymbols' -Message "Missing symbols for $Status modules in the package $FileName"
+ ExitWithExitCode $exitCode
}
Write-Host
@@ -160,7 +156,7 @@ function CheckSymbolsAvailable {
}
function InstallDotnetSymbol {
- $dotnetSymbolPackageName = "dotnet-symbol"
+ $dotnetSymbolPackageName = 'dotnet-symbol'
$dotnetRoot = InitializeDotNetCli -install:$true
$dotnet = "$dotnetRoot\dotnet.exe"
@@ -171,19 +167,22 @@ function InstallDotnetSymbol {
}
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."
+ 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 {
+ . $PSScriptRoot\post-build-utils.ps1
+
+ Add-Type -AssemblyName System.IO.Compression.FileSystem
+
InstallDotnetSymbol
CheckSymbolsAvailable
}
catch {
- Write-Host $_
- Write-Host $_.Exception
Write-Host $_.ScriptStackTrace
+ Write-PipelineTelemetryError -Category 'CheckSymbols' -Message $_
ExitWithExitCode 1
}
diff --git a/eng/common/post-build/trigger-subscriptions.ps1 b/eng/common/post-build/trigger-subscriptions.ps1
index 926d5b455131..55dea518ac58 100644
--- a/eng/common/post-build/trigger-subscriptions.ps1
+++ b/eng/common/post-build/trigger-subscriptions.ps1
@@ -2,56 +2,63 @@ 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"
+ [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 {
+ . $PSScriptRoot\post-build-utils.ps1
-# Get all the $SourceRepo subscriptions
-$normalizedSourceRepo = $SourceRepo.Replace('dnceng@', '')
-$subscriptions = Get-MaestroSubscriptions -SourceRepository $normalizedSourceRepo -ChannelId $ChannelId
+ # 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
-}
+ if (!$subscriptions) {
+ Write-PipelineTelemetryError -Category 'TriggerSubscriptions' -Message "No subscriptions found for source repo '$normalizedSourceRepo' in channel '$ChannelId'"
+ ExitWithExitCode 0
+ }
-$subscriptionsToTrigger = New-Object System.Collections.Generic.List[string]
-$failedTriggeredSubscription = $false
+ $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)
+ # 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
+ 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'."
+ if ($subscriptionsToTrigger.Count -eq 0) {
+ Write-Host "No subscription matched source repo '$normalizedSourceRepo' and channel ID '$ChannelId'."
+ }
+ elseif ($failedTriggeredSubscription) {
+ Write-PipelineTelemetryError -Category 'TriggerSubscriptions' -Message 'At least one subscription failed to be triggered...'
+ ExitWithExitCode 1
+ }
+ else {
+ Write-Host 'All subscriptions were triggered successfully!'
+ }
}
-elseif ($failedTriggeredSubscription) {
- Write-Host "At least one subscription failed to be triggered..."
+catch {
+ Write-Host $_.ScriptStackTrace
+ Write-PipelineTelemetryError -Category 'TriggerSubscriptions' -Message $_
ExitWithExitCode 1
}
-else {
- Write-Host "All subscriptions were triggered successfully!"
-}
diff --git a/eng/common/sdk-task.ps1 b/eng/common/sdk-task.ps1
index d0eec5163efe..3872af59b972 100644
--- a/eng/common/sdk-task.ps1
+++ b/eng/common/sdk-task.ps1
@@ -1,8 +1,8 @@
[CmdletBinding(PositionalBinding=$false)]
Param(
- [string] $configuration = "Debug",
+ [string] $configuration = 'Debug',
[string] $task,
- [string] $verbosity = "minimal",
+ [string] $verbosity = 'minimal',
[string] $msbuildEngine = $null,
[switch] $restore,
[switch] $prepareMachine,
@@ -32,7 +32,7 @@ function Print-Usage() {
}
function Build([string]$target) {
- $logSuffix = if ($target -eq "Execute") { "" } else { ".$target" }
+ $logSuffix = if ($target -eq 'Execute') { '' } else { ".$target" }
$log = Join-Path $LogDir "$task$logSuffix.binlog"
$outputPath = Join-Path $ToolsetDir "$task\\"
@@ -46,33 +46,32 @@ function Build([string]$target) {
}
try {
- if ($help -or (($null -ne $properties) -and ($properties.Contains("/help") -or $properties.Contains("/?")))) {
+ if ($help -or (($null -ne $properties) -and ($properties.Contains('/help') -or $properties.Contains('/?')))) {
Print-Usage
exit 0
}
if ($task -eq "") {
- Write-Host "Missing required parameter '-task '" -ForegroundColor Red
+ Write-PipelineTelemetryError -Category 'Build' -Message "Missing required parameter '-task '" -ForegroundColor Red
Print-Usage
ExitWithExitCode 1
}
$taskProject = GetSdkTaskProject $task
if (!(Test-Path $taskProject)) {
- Write-Host "Unknown task: $task" -ForegroundColor Red
+ Write-PipelineTelemetryError -Category 'Build' -Message "Unknown task: $task" -ForegroundColor Red
ExitWithExitCode 1
}
if ($restore) {
- Build "Restore"
+ Build 'Restore'
}
- Build "Execute"
+ Build 'Execute'
}
catch {
- Write-Host $_
- Write-Host $_.Exception
Write-Host $_.ScriptStackTrace
+ Write-PipelineTelemetryError -Category 'Build' -Message $_
ExitWithExitCode 1
}
diff --git a/eng/common/sdl/execute-all-sdl-tools.ps1 b/eng/common/sdl/execute-all-sdl-tools.ps1
index 01799d63ff36..9db582f279ee 100644
--- a/eng/common/sdl/execute-all-sdl-tools.ps1
+++ b/eng/common/sdl/execute-all-sdl-tools.ps1
@@ -1,100 +1,110 @@
Param(
- [string] $GuardianPackageName, # Required: the name of guardian CLI package (not needed if GuardianCliLocation is specified)
- [string] $NugetPackageDirectory, # Required: directory where NuGet packages are installed (not needed if GuardianCliLocation is specified)
- [string] $GuardianCliLocation, # Optional: Direct location of Guardian CLI executable if GuardianPackageName & NugetPackageDirectory are not specified
- [string] $Repository=$env:BUILD_REPOSITORY_NAME, # Required: the name of the repository (e.g. dotnet/arcade)
- [string] $BranchName=$env:BUILD_SOURCEBRANCH, # Optional: name of branch or version of gdn settings; defaults to master
- [string] $SourceDirectory=$env:BUILD_SOURCESDIRECTORY, # Required: the directory where source files are located
- [string] $ArtifactsDirectory = (Join-Path $env:BUILD_SOURCESDIRECTORY ("artifacts")), # Required: the directory where build artifacts are located
- [string] $AzureDevOpsAccessToken, # Required: access token for dnceng; should be provided via KeyVault
- [string[]] $SourceToolsList, # Optional: list of SDL tools to run on source code
- [string[]] $ArtifactToolsList, # Optional: list of SDL tools to run on built artifacts
- [bool] $TsaPublish=$False, # Optional: true will publish results to TSA; only set to true after onboarding to TSA; TSA is the automated framework used to upload test results as bugs.
- [string] $TsaBranchName=$env:BUILD_SOURCEBRANCH, # Optional: required for TSA publish; defaults to $(Build.SourceBranchName); TSA is the automated framework used to upload test results as bugs.
- [string] $TsaRepositoryName=$env:BUILD_REPOSITORY_NAME, # Optional: TSA repository name; will be generated automatically if not submitted; TSA is the automated framework used to upload test results as bugs.
- [string] $BuildNumber=$env:BUILD_BUILDNUMBER, # Optional: required for TSA publish; defaults to $(Build.BuildNumber)
- [bool] $UpdateBaseline=$False, # Optional: if true, will update the baseline in the repository; should only be run after fixing any issues which need to be fixed
- [bool] $TsaOnboard=$False, # Optional: if true, will onboard the repository to TSA; should only be run once; TSA is the automated framework used to upload test results as bugs.
- [string] $TsaInstanceUrl, # Optional: only needed if TsaOnboard or TsaPublish is true; the instance-url registered with TSA; TSA is the automated framework used to upload test results as bugs.
- [string] $TsaCodebaseName, # Optional: only needed if TsaOnboard or TsaPublish is true; the name of the codebase registered with TSA; TSA is the automated framework used to upload test results as bugs.
- [string] $TsaProjectName, # Optional: only needed if TsaOnboard or TsaPublish is true; the name of the project registered with TSA; TSA is the automated framework used to upload test results as bugs.
- [string] $TsaNotificationEmail, # Optional: only needed if TsaOnboard is true; the email(s) which will receive notifications of TSA bug filings (e.g. alias@microsoft.com); TSA is the automated framework used to upload test results as bugs.
- [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[]] $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")
+ [string] $GuardianPackageName, # Required: the name of guardian CLI package (not needed if GuardianCliLocation is specified)
+ [string] $NugetPackageDirectory, # Required: directory where NuGet packages are installed (not needed if GuardianCliLocation is specified)
+ [string] $GuardianCliLocation, # Optional: Direct location of Guardian CLI executable if GuardianPackageName & NugetPackageDirectory are not specified
+ [string] $Repository=$env:BUILD_REPOSITORY_NAME, # Required: the name of the repository (e.g. dotnet/arcade)
+ [string] $BranchName=$env:BUILD_SOURCEBRANCH, # Optional: name of branch or version of gdn settings; defaults to master
+ [string] $SourceDirectory=$env:BUILD_SOURCESDIRECTORY, # Required: the directory where source files are located
+ [string] $ArtifactsDirectory = (Join-Path $env:BUILD_ARTIFACTSTAGINGDIRECTORY ('artifacts')), # Required: the directory where build artifacts are located
+ [string] $AzureDevOpsAccessToken, # Required: access token for dnceng; should be provided via KeyVault
+ [string[]] $SourceToolsList, # Optional: list of SDL tools to run on source code
+ [string[]] $ArtifactToolsList, # Optional: list of SDL tools to run on built artifacts
+ [bool] $TsaPublish=$False, # Optional: true will publish results to TSA; only set to true after onboarding to TSA; TSA is the automated framework used to upload test results as bugs.
+ [string] $TsaBranchName=$env:BUILD_SOURCEBRANCH, # Optional: required for TSA publish; defaults to $(Build.SourceBranchName); TSA is the automated framework used to upload test results as bugs.
+ [string] $TsaRepositoryName=$env:BUILD_REPOSITORY_NAME, # Optional: TSA repository name; will be generated automatically if not submitted; TSA is the automated framework used to upload test results as bugs.
+ [string] $BuildNumber=$env:BUILD_BUILDNUMBER, # Optional: required for TSA publish; defaults to $(Build.BuildNumber)
+ [bool] $UpdateBaseline=$False, # Optional: if true, will update the baseline in the repository; should only be run after fixing any issues which need to be fixed
+ [bool] $TsaOnboard=$False, # Optional: if true, will onboard the repository to TSA; should only be run once; TSA is the automated framework used to upload test results as bugs.
+ [string] $TsaInstanceUrl, # Optional: only needed if TsaOnboard or TsaPublish is true; the instance-url registered with TSA; TSA is the automated framework used to upload test results as bugs.
+ [string] $TsaCodebaseName, # Optional: only needed if TsaOnboard or TsaPublish is true; the name of the codebase registered with TSA; TSA is the automated framework used to upload test results as bugs.
+ [string] $TsaProjectName, # Optional: only needed if TsaOnboard or TsaPublish is true; the name of the project registered with TSA; TSA is the automated framework used to upload test results as bugs.
+ [string] $TsaNotificationEmail, # Optional: only needed if TsaOnboard is true; the email(s) which will receive notifications of TSA bug filings (e.g. alias@microsoft.com); TSA is the automated framework used to upload test results as bugs.
+ [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[]] $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"
-Set-StrictMode -Version 2.0
-$LASTEXITCODE = 0
+try {
+ $ErrorActionPreference = 'Stop'
+ Set-StrictMode -Version 2.0
+ $disableConfigureToolsetImport = $true
+ $LASTEXITCODE = 0
-#Replace repo names to the format of org/repo
-if (!($Repository.contains('/'))) {
- $RepoName = $Repository -replace '(.*?)-(.*)', '$1/$2';
-}
-else{
- $RepoName = $Repository;
-}
+ . $PSScriptRoot\..\tools.ps1
-if ($GuardianPackageName) {
- $guardianCliLocation = Join-Path $NugetPackageDirectory (Join-Path $GuardianPackageName (Join-Path "tools" "guardian.cmd"))
-} else {
- $guardianCliLocation = $GuardianCliLocation
-}
+ #Replace repo names to the format of org/repo
+ if (!($Repository.contains('/'))) {
+ $RepoName = $Repository -replace '(.*?)-(.*)', '$1/$2';
+ }
+ else{
+ $RepoName = $Repository;
+ }
+
+ if ($GuardianPackageName) {
+ $guardianCliLocation = Join-Path $NugetPackageDirectory (Join-Path $GuardianPackageName (Join-Path 'tools' 'guardian.cmd'))
+ } else {
+ $guardianCliLocation = $GuardianCliLocation
+ }
-$workingDirectory = (Split-Path $SourceDirectory -Parent)
-$ValidPath = Test-Path $guardianCliLocation
+ $workingDirectory = (Split-Path $SourceDirectory -Parent)
+ $ValidPath = Test-Path $guardianCliLocation
-if ($ValidPath -eq $False)
-{
- Write-Host "Invalid Guardian CLI Location."
- exit 1
-}
+ if ($ValidPath -eq $False)
+ {
+ Write-PipelineTelemetryError -Force -Category 'Sdl' -Message 'Invalid Guardian CLI Location.'
+ ExitWithExitCode 1
+ }
-& $(Join-Path $PSScriptRoot "init-sdl.ps1") -GuardianCliLocation $guardianCliLocation -Repository $RepoName -BranchName $BranchName -WorkingDirectory $workingDirectory -AzureDevOpsAccessToken $AzureDevOpsAccessToken -GuardianLoggerLevel $GuardianLoggerLevel
-$gdnFolder = Join-Path $workingDirectory ".gdn"
+ & $(Join-Path $PSScriptRoot 'init-sdl.ps1') -GuardianCliLocation $guardianCliLocation -Repository $RepoName -BranchName $BranchName -WorkingDirectory $workingDirectory -AzureDevOpsAccessToken $AzureDevOpsAccessToken -GuardianLoggerLevel $GuardianLoggerLevel
+ $gdnFolder = Join-Path $workingDirectory '.gdn'
-if ($TsaOnboard) {
- if ($TsaCodebaseName -and $TsaNotificationEmail -and $TsaCodebaseAdmin -and $TsaBugAreaPath) {
- Write-Host "$guardianCliLocation tsa-onboard --codebase-name `"$TsaCodebaseName`" --notification-alias `"$TsaNotificationEmail`" --codebase-admin `"$TsaCodebaseAdmin`" --instance-url `"$TsaInstanceUrl`" --project-name `"$TsaProjectName`" --area-path `"$TsaBugAreaPath`" --iteration-path `"$TsaIterationPath`" --working-directory $workingDirectory --logger-level $GuardianLoggerLevel"
- & $guardianCliLocation tsa-onboard --codebase-name "$TsaCodebaseName" --notification-alias "$TsaNotificationEmail" --codebase-admin "$TsaCodebaseAdmin" --instance-url "$TsaInstanceUrl" --project-name "$TsaProjectName" --area-path "$TsaBugAreaPath" --iteration-path "$TsaIterationPath" --working-directory $workingDirectory --logger-level $GuardianLoggerLevel
- if ($LASTEXITCODE -ne 0) {
- Write-Host "Guardian tsa-onboard failed with exit code $LASTEXITCODE."
- exit $LASTEXITCODE
+ if ($TsaOnboard) {
+ if ($TsaCodebaseName -and $TsaNotificationEmail -and $TsaCodebaseAdmin -and $TsaBugAreaPath) {
+ Write-Host "$guardianCliLocation tsa-onboard --codebase-name `"$TsaCodebaseName`" --notification-alias `"$TsaNotificationEmail`" --codebase-admin `"$TsaCodebaseAdmin`" --instance-url `"$TsaInstanceUrl`" --project-name `"$TsaProjectName`" --area-path `"$TsaBugAreaPath`" --iteration-path `"$TsaIterationPath`" --working-directory $workingDirectory --logger-level $GuardianLoggerLevel"
+ & $guardianCliLocation tsa-onboard --codebase-name "$TsaCodebaseName" --notification-alias "$TsaNotificationEmail" --codebase-admin "$TsaCodebaseAdmin" --instance-url "$TsaInstanceUrl" --project-name "$TsaProjectName" --area-path "$TsaBugAreaPath" --iteration-path "$TsaIterationPath" --working-directory $workingDirectory --logger-level $GuardianLoggerLevel
+ if ($LASTEXITCODE -ne 0) {
+ Write-PipelineTelemetryError -Force -Category 'Sdl' -Message "Guardian tsa-onboard failed with exit code $LASTEXITCODE."
+ ExitWithExitCode $LASTEXITCODE
+ }
+ } else {
+ Write-PipelineTelemetryError -Force -Category 'Sdl' -Message 'Could not onboard to TSA -- not all required values ($TsaCodebaseName, $TsaNotificationEmail, $TsaCodebaseAdmin, $TsaBugAreaPath) were specified.'
+ ExitWithExitCode 1
}
- } else {
- Write-Host "Could not onboard to TSA -- not all required values ($$TsaCodebaseName, $$TsaNotificationEmail, $$TsaCodebaseAdmin, $$TsaBugAreaPath) were specified."
- exit 1
}
-}
-if ($ArtifactToolsList -and $ArtifactToolsList.Count -gt 0) {
- & $(Join-Path $PSScriptRoot "run-sdl.ps1") -GuardianCliLocation $guardianCliLocation -WorkingDirectory $workingDirectory -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 $workingDirectory -TargetDirectory $SourceDirectory -GdnFolder $gdnFolder -ToolsList $SourceToolsList -AzureDevOpsAccessToken $AzureDevOpsAccessToken -UpdateBaseline $UpdateBaseline -GuardianLoggerLevel $GuardianLoggerLevel -CrScanAdditionalRunConfigParams $CrScanAdditionalRunConfigParams -PoliCheckAdditionalRunConfigParams $PoliCheckAdditionalRunConfigParams
-}
+ if ($ArtifactToolsList -and $ArtifactToolsList.Count -gt 0) {
+ & $(Join-Path $PSScriptRoot 'run-sdl.ps1') -GuardianCliLocation $guardianCliLocation -WorkingDirectory $workingDirectory -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 $workingDirectory -TargetDirectory $SourceDirectory -GdnFolder $gdnFolder -ToolsList $SourceToolsList -AzureDevOpsAccessToken $AzureDevOpsAccessToken -UpdateBaseline $UpdateBaseline -GuardianLoggerLevel $GuardianLoggerLevel -CrScanAdditionalRunConfigParams $CrScanAdditionalRunConfigParams -PoliCheckAdditionalRunConfigParams $PoliCheckAdditionalRunConfigParams
+ }
-if ($UpdateBaseline) {
- & (Join-Path $PSScriptRoot "push-gdn.ps1") -Repository $RepoName -BranchName $BranchName -GdnFolder $GdnFolder -AzureDevOpsAccessToken $AzureDevOpsAccessToken -PushReason "Update baseline"
-}
+ if ($UpdateBaseline) {
+ & (Join-Path $PSScriptRoot 'push-gdn.ps1') -Repository $RepoName -BranchName $BranchName -GdnFolder $GdnFolder -AzureDevOpsAccessToken $AzureDevOpsAccessToken -PushReason 'Update baseline'
+ }
-if ($TsaPublish) {
- if ($TsaBranchName -and $BuildNumber) {
- if (-not $TsaRepositoryName) {
- $TsaRepositoryName = "$($Repository)-$($BranchName)"
- }
- Write-Host "$guardianCliLocation tsa-publish --all-tools --repository-name `"$TsaRepositoryName`" --branch-name `"$TsaBranchName`" --build-number `"$BuildNumber`" --codebase-name `"$TsaCodebaseName`" --notification-alias `"$TsaNotificationEmail`" --codebase-admin `"$TsaCodebaseAdmin`" --instance-url `"$TsaInstanceUrl`" --project-name `"$TsaProjectName`" --area-path `"$TsaBugAreaPath`" --iteration-path `"$TsaIterationPath`" --working-directory $workingDirectory --logger-level $GuardianLoggerLevel"
- & $guardianCliLocation tsa-publish --all-tools --repository-name "$TsaRepositoryName" --branch-name "$TsaBranchName" --build-number "$BuildNumber" --onboard $True --codebase-name "$TsaCodebaseName" --notification-alias "$TsaNotificationEmail" --codebase-admin "$TsaCodebaseAdmin" --instance-url "$TsaInstanceUrl" --project-name "$TsaProjectName" --area-path "$TsaBugAreaPath" --iteration-path "$TsaIterationPath" --working-directory $workingDirectory --logger-level $GuardianLoggerLevel
- if ($LASTEXITCODE -ne 0) {
- Write-Host "Guardian tsa-publish failed with exit code $LASTEXITCODE."
- exit $LASTEXITCODE
+ if ($TsaPublish) {
+ if ($TsaBranchName -and $BuildNumber) {
+ if (-not $TsaRepositoryName) {
+ $TsaRepositoryName = "$($Repository)-$($BranchName)"
+ }
+ Write-Host "$guardianCliLocation tsa-publish --all-tools --repository-name `"$TsaRepositoryName`" --branch-name `"$TsaBranchName`" --build-number `"$BuildNumber`" --codebase-name `"$TsaCodebaseName`" --notification-alias `"$TsaNotificationEmail`" --codebase-admin `"$TsaCodebaseAdmin`" --instance-url `"$TsaInstanceUrl`" --project-name `"$TsaProjectName`" --area-path `"$TsaBugAreaPath`" --iteration-path `"$TsaIterationPath`" --working-directory $workingDirectory --logger-level $GuardianLoggerLevel"
+ & $guardianCliLocation tsa-publish --all-tools --repository-name "$TsaRepositoryName" --branch-name "$TsaBranchName" --build-number "$BuildNumber" --onboard $True --codebase-name "$TsaCodebaseName" --notification-alias "$TsaNotificationEmail" --codebase-admin "$TsaCodebaseAdmin" --instance-url "$TsaInstanceUrl" --project-name "$TsaProjectName" --area-path "$TsaBugAreaPath" --iteration-path "$TsaIterationPath" --working-directory $workingDirectory --logger-level $GuardianLoggerLevel
+ if ($LASTEXITCODE -ne 0) {
+ Write-PipelineTelemetryError -Force -Category 'Sdl' -Message "Guardian tsa-publish failed with exit code $LASTEXITCODE."
+ ExitWithExitCode $LASTEXITCODE
+ }
+ } else {
+ Write-PipelineTelemetryError -Force -Category 'Sdl' -Message 'Could not publish to TSA -- not all required values ($TsaBranchName, $BuildNumber) were specified.'
+ ExitWithExitCode 1
}
- } else {
- Write-Host "Could not publish to TSA -- not all required values ($$TsaBranchName, $$BuildNumber) were specified."
- exit 1
}
}
+catch {
+ Write-Host $_.ScriptStackTrace
+ Write-PipelineTelemetryError -Force -Category 'Sdl' -Message $_
+ exit 1
+}
diff --git a/eng/common/sdl/extract-artifact-packages.ps1 b/eng/common/sdl/extract-artifact-packages.ps1
index 6e6825013bf5..3c9bf106789f 100644
--- a/eng/common/sdl/extract-artifact-packages.ps1
+++ b/eng/common/sdl/extract-artifact-packages.ps1
@@ -3,54 +3,16 @@ param(
[Parameter(Mandatory=$true)][string] $ExtractPath # Full path to directory where the packages will be extracted
)
-$ErrorActionPreference = "Stop"
+$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
+$disableConfigureToolsetImport = $true
-$ExtractPackage = {
- param(
- [string] $PackagePath # Full path to a NuGet package
- )
-
- if (!(Test-Path $PackagePath)) {
- Write-PipelineTaskError "Input file does not exist: $PackagePath"
- ExitWithExitCode 1
- }
-
- $RelevantExtensions = @(".dll", ".exe", ".pdb")
- Write-Host -NoNewLine "Extracting" ([System.IO.Path]::GetFileName($PackagePath)) "... "
-
- $PackageId = [System.IO.Path]::GetFileNameWithoutExtension($PackagePath)
- $ExtractPath = Join-Path -Path $using:ExtractPath -ChildPath $PackageId
-
- Add-Type -AssemblyName System.IO.Compression.FileSystem
-
- [System.IO.Directory]::CreateDirectory($ExtractPath);
-
- try {
- $zip = [System.IO.Compression.ZipFile]::OpenRead($PackagePath)
-
- $zip.Entries |
- Where-Object {$RelevantExtensions -contains [System.IO.Path]::GetExtension($_.Name)} |
- ForEach-Object {
- $TargetFile = Join-Path -Path $ExtractPath -ChildPath $_.Name
-
- [System.IO.Compression.ZipFileExtensions]::ExtractToFile($_, $TargetFile, $true)
- }
- }
- catch {
-
- }
- finally {
- $zip.Dispose()
- }
- }
- function ExtractArtifacts {
+function ExtractArtifacts {
if (!(Test-Path $InputPath)) {
Write-Host "Input Path does not exist: $InputPath"
ExitWithExitCode 0
@@ -67,11 +29,52 @@ $ExtractPackage = {
}
try {
+ . $PSScriptRoot\..\tools.ps1
+
+ $ExtractPackage = {
+ param(
+ [string] $PackagePath # Full path to a NuGet package
+ )
+
+ if (!(Test-Path $PackagePath)) {
+ Write-PipelineTelemetryError -Category 'Build' -Message "Input file does not exist: $PackagePath"
+ ExitWithExitCode 1
+ }
+
+ $RelevantExtensions = @('.dll', '.exe', '.pdb')
+ Write-Host -NoNewLine 'Extracting ' ([System.IO.Path]::GetFileName($PackagePath)) '...'
+
+ $PackageId = [System.IO.Path]::GetFileNameWithoutExtension($PackagePath)
+ $ExtractPath = Join-Path -Path $using:ExtractPath -ChildPath $PackageId
+
+ Add-Type -AssemblyName System.IO.Compression.FileSystem
+
+ [System.IO.Directory]::CreateDirectory($ExtractPath);
+
+ try {
+ $zip = [System.IO.Compression.ZipFile]::OpenRead($PackagePath)
+
+ $zip.Entries |
+ Where-Object {$RelevantExtensions -contains [System.IO.Path]::GetExtension($_.Name)} |
+ ForEach-Object {
+ $TargetFile = Join-Path -Path $ExtractPath -ChildPath $_.Name
+
+ [System.IO.Compression.ZipFileExtensions]::ExtractToFile($_, $TargetFile, $true)
+ }
+ }
+ catch {
+ Write-Host $_.ScriptStackTrace
+ Write-PipelineTelemetryError -Force -Category 'Sdl' -Message $_
+ ExitWithExitCode 1
+ }
+ finally {
+ $zip.Dispose()
+ }
+ }
Measure-Command { ExtractArtifacts }
}
catch {
- Write-Host $_
- Write-Host $_.Exception
Write-Host $_.ScriptStackTrace
+ Write-PipelineTelemetryError -Force -Category 'Sdl' -Message $_
ExitWithExitCode 1
}
diff --git a/eng/common/sdl/init-sdl.ps1 b/eng/common/sdl/init-sdl.ps1
index c737eb0e71c1..285f1ccdb07e 100644
--- a/eng/common/sdl/init-sdl.ps1
+++ b/eng/common/sdl/init-sdl.ps1
@@ -1,16 +1,19 @@
Param(
[string] $GuardianCliLocation,
[string] $Repository,
- [string] $BranchName="master",
+ [string] $BranchName='master',
[string] $WorkingDirectory,
[string] $AzureDevOpsAccessToken,
- [string] $GuardianLoggerLevel="Standard"
+ [string] $GuardianLoggerLevel='Standard'
)
-$ErrorActionPreference = "Stop"
+$ErrorActionPreference = 'Stop'
Set-StrictMode -Version 2.0
+$disableConfigureToolsetImport = $true
$LASTEXITCODE = 0
+. $PSScriptRoot\..\tools.ps1
+
# Don't display the console progress UI - it's a huge perf hit
$ProgressPreference = 'SilentlyContinue'
@@ -21,11 +24,10 @@ $uri = "https://dev.azure.com/dnceng/internal/_apis/git/repositories/sdl-tool-cf
$zipFile = "$WorkingDirectory/gdn.zip"
Add-Type -AssemblyName System.IO.Compression.FileSystem
-$gdnFolder = (Join-Path $WorkingDirectory ".gdn")
-Try
-{
+$gdnFolder = (Join-Path $WorkingDirectory '.gdn')
+try {
# We try to download the zip; if the request fails (e.g. the file doesn't exist), we catch it and init guardian instead
- Write-Host "Downloading gdn folder from internal config repostiory..."
+ Write-Host 'Downloading gdn folder from internal config repostiory...'
Invoke-WebRequest -Headers @{ "Accept"="application/zip"; "Authorization"="Basic $encodedPat" } -Uri $uri -OutFile $zipFile
if (Test-Path $gdnFolder) {
# Remove the gdn folder if it exists (it shouldn't unless there's too much caching; this is just in case)
@@ -33,19 +35,29 @@ Try
}
[System.IO.Compression.ZipFile]::ExtractToDirectory($zipFile, $WorkingDirectory)
Write-Host $gdnFolder
-} Catch [System.Net.WebException] {
+ ExitWithExitCode 0
+} catch [System.Net.WebException] { } # Catch and ignore webexception
+try {
# if the folder does not exist, we'll do a guardian init and push it to the remote repository
- Write-Host "Initializing Guardian..."
+ Write-Host 'Initializing Guardian...'
Write-Host "$GuardianCliLocation init --working-directory $WorkingDirectory --logger-level $GuardianLoggerLevel"
& $GuardianCliLocation init --working-directory $WorkingDirectory --logger-level $GuardianLoggerLevel
if ($LASTEXITCODE -ne 0) {
- Write-Error "Guardian init failed with exit code $LASTEXITCODE."
+ Write-PipelineTelemetryError -Force -Category 'Build' -Message "Guardian init failed with exit code $LASTEXITCODE."
+ ExitWithExitCode $LASTEXITCODE
}
# We create the mainbaseline so it can be edited later
Write-Host "$GuardianCliLocation baseline --working-directory $WorkingDirectory --name mainbaseline"
& $GuardianCliLocation baseline --working-directory $WorkingDirectory --name mainbaseline
if ($LASTEXITCODE -ne 0) {
- Write-Error "Guardian baseline failed with exit code $LASTEXITCODE."
+ Write-PipelineTelemetryError -Force -Category 'Build' -Message "Guardian baseline failed with exit code $LASTEXITCODE."
+ ExitWithExitCode $LASTEXITCODE
}
- & $(Join-Path $PSScriptRoot "push-gdn.ps1") -Repository $Repository -BranchName $BranchName -GdnFolder $gdnFolder -AzureDevOpsAccessToken $AzureDevOpsAccessToken -PushReason "Initialize gdn folder"
-}
\ No newline at end of file
+ & $(Join-Path $PSScriptRoot 'push-gdn.ps1') -Repository $Repository -BranchName $BranchName -GdnFolder $gdnFolder -AzureDevOpsAccessToken $AzureDevOpsAccessToken -PushReason 'Initialize gdn folder'
+ ExitWithExitCode 0
+}
+catch {
+ Write-Host $_.ScriptStackTrace
+ Write-PipelineTelemetryError -Category 'Sdl' -Message $_
+ ExitWithExitCode 1
+}
diff --git a/eng/common/sdl/push-gdn.ps1 b/eng/common/sdl/push-gdn.ps1
index 79c707d6d8a0..79d3d355c7e5 100644
--- a/eng/common/sdl/push-gdn.ps1
+++ b/eng/common/sdl/push-gdn.ps1
@@ -1,51 +1,65 @@
Param(
[string] $Repository,
- [string] $BranchName="master",
+ [string] $BranchName='master',
[string] $GdnFolder,
[string] $AzureDevOpsAccessToken,
[string] $PushReason
)
-$ErrorActionPreference = "Stop"
+$ErrorActionPreference = 'Stop'
Set-StrictMode -Version 2.0
+$disableConfigureToolsetImport = $true
$LASTEXITCODE = 0
-# We create the temp directory where we'll store the sdl-config repository
-$sdlDir = Join-Path $env:TEMP "sdl"
-if (Test-Path $sdlDir) {
- Remove-Item -Force -Recurse $sdlDir
-}
+try {
+ . $PSScriptRoot\..\tools.ps1
-Write-Host "git clone https://dnceng:`$AzureDevOpsAccessToken@dev.azure.com/dnceng/internal/_git/sdl-tool-cfg $sdlDir"
-git clone https://dnceng:$AzureDevOpsAccessToken@dev.azure.com/dnceng/internal/_git/sdl-tool-cfg $sdlDir
-if ($LASTEXITCODE -ne 0) {
- Write-Error "Git clone failed with exit code $LASTEXITCODE."
-}
-# We copy the .gdn folder from our local run into the git repository so it can be committed
-$sdlRepositoryFolder = Join-Path (Join-Path (Join-Path $sdlDir $Repository) $BranchName) ".gdn"
-if (Get-Command Robocopy) {
- Robocopy /S $GdnFolder $sdlRepositoryFolder
-} else {
- rsync -r $GdnFolder $sdlRepositoryFolder
-}
-# cd to the sdl-config directory so we can run git there
-Push-Location $sdlDir
-# git add . --> git commit --> git push
-Write-Host "git add ."
-git add .
-if ($LASTEXITCODE -ne 0) {
- Write-Error "Git add failed with exit code $LASTEXITCODE."
-}
-Write-Host "git -c user.email=`"dn-bot@microsoft.com`" -c user.name=`"Dotnet Bot`" commit -m `"$PushReason for $Repository/$BranchName`""
-git -c user.email="dn-bot@microsoft.com" -c user.name="Dotnet Bot" commit -m "$PushReason for $Repository/$BranchName"
-if ($LASTEXITCODE -ne 0) {
- Write-Error "Git commit failed with exit code $LASTEXITCODE."
-}
-Write-Host "git push"
-git push
-if ($LASTEXITCODE -ne 0) {
- Write-Error "Git push failed with exit code $LASTEXITCODE."
-}
+ # We create the temp directory where we'll store the sdl-config repository
+ $sdlDir = Join-Path $env:TEMP 'sdl'
+ if (Test-Path $sdlDir) {
+ Remove-Item -Force -Recurse $sdlDir
+ }
-# Return to the original directory
-Pop-Location
\ No newline at end of file
+ Write-Host "git clone https://dnceng:`$AzureDevOpsAccessToken@dev.azure.com/dnceng/internal/_git/sdl-tool-cfg $sdlDir"
+ git clone https://dnceng:$AzureDevOpsAccessToken@dev.azure.com/dnceng/internal/_git/sdl-tool-cfg $sdlDir
+ if ($LASTEXITCODE -ne 0) {
+ Write-PipelineTelemetryError -Force -Category 'Sdl' -Message "Git clone failed with exit code $LASTEXITCODE."
+ ExitWithExitCode $LASTEXITCODE
+ }
+ # We copy the .gdn folder from our local run into the git repository so it can be committed
+ $sdlRepositoryFolder = Join-Path (Join-Path (Join-Path $sdlDir $Repository) $BranchName) '.gdn'
+ if (Get-Command Robocopy) {
+ Robocopy /S $GdnFolder $sdlRepositoryFolder
+ } else {
+ rsync -r $GdnFolder $sdlRepositoryFolder
+ }
+ # cd to the sdl-config directory so we can run git there
+ Push-Location $sdlDir
+ # git add . --> git commit --> git push
+ Write-Host 'git add .'
+ git add .
+ if ($LASTEXITCODE -ne 0) {
+ Write-PipelineTelemetryError -Force -Category 'Sdl' -Message "Git add failed with exit code $LASTEXITCODE."
+ ExitWithExitCode $LASTEXITCODE
+ }
+ Write-Host "git -c user.email=`"dn-bot@microsoft.com`" -c user.name=`"Dotnet Bot`" commit -m `"$PushReason for $Repository/$BranchName`""
+ git -c user.email="dn-bot@microsoft.com" -c user.name="Dotnet Bot" commit -m "$PushReason for $Repository/$BranchName"
+ if ($LASTEXITCODE -ne 0) {
+ Write-PipelineTelemetryError -Force -Category 'Sdl' -Message "Git commit failed with exit code $LASTEXITCODE."
+ ExitWithExitCode $LASTEXITCODE
+ }
+ Write-Host 'git push'
+ git push
+ if ($LASTEXITCODE -ne 0) {
+ Write-PipelineTelemetryError -Force -Category 'Sdl' -Message "Git push failed with exit code $LASTEXITCODE."
+ ExitWithExitCode $LASTEXITCODE
+ }
+
+ # Return to the original directory
+ Pop-Location
+}
+catch {
+ Write-Host $_.ScriptStackTrace
+ Write-PipelineTelemetryError -Category 'Sdl' -Message $_
+ ExitWithExitCode 1
+}
\ No newline at end of file
diff --git a/eng/common/sdl/run-sdl.ps1 b/eng/common/sdl/run-sdl.ps1
index 9bc25314ae21..40a084f79698 100644
--- a/eng/common/sdl/run-sdl.ps1
+++ b/eng/common/sdl/run-sdl.ps1
@@ -5,55 +5,65 @@ Param(
[string] $GdnFolder,
[string[]] $ToolsList,
[string] $UpdateBaseline,
- [string] $GuardianLoggerLevel="Standard",
+ [string] $GuardianLoggerLevel='Standard',
[string[]] $CrScanAdditionalRunConfigParams,
[string[]] $PoliCheckAdditionalRunConfigParams
)
-$ErrorActionPreference = "Stop"
+$ErrorActionPreference = 'Stop'
Set-StrictMode -Version 2.0
+$disableConfigureToolsetImport = $true
$LASTEXITCODE = 0
-# We store config files in the r directory of .gdn
-Write-Host $ToolsList
-$gdnConfigPath = Join-Path $GdnFolder "r"
-$ValidPath = Test-Path $GuardianCliLocation
+try {
+ . $PSScriptRoot\..\tools.ps1
-if ($ValidPath -eq $False)
-{
- Write-Host "Invalid Guardian CLI Location."
- exit 1
-}
+ # We store config files in the r directory of .gdn
+ Write-Host $ToolsList
+ $gdnConfigPath = Join-Path $GdnFolder 'r'
+ $ValidPath = Test-Path $GuardianCliLocation
-$configParam = @("--config")
-
-foreach ($tool in $ToolsList) {
- $gdnConfigFile = Join-Path $gdnConfigPath "$tool-configure.gdnconfig"
- 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 `" `" OutputType < pre `" $(If ($CrScanAdditionalRunConfigParams) {$CrScanAdditionalRunConfigParams})"
- & $GuardianCliLocation configure --working-directory $WorkingDirectory --tool $tool --output-path $gdnConfigFile --logger-level $GuardianLoggerLevel --noninteractive --force --args " TargetDirectory < $TargetDirectory " "OutputType < pre" $(If ($CrScanAdditionalRunConfigParams) {$CrScanAdditionalRunConfigParams})
- if ($LASTEXITCODE -ne 0) {
- Write-Host "Guardian configure for $tool failed with exit code $LASTEXITCODE."
- exit $LASTEXITCODE
- }
+ if ($ValidPath -eq $False)
+ {
+ Write-PipelineTelemetryError -Force -Category 'Sdl' -Message "Invalid Guardian CLI Location."
+ ExitWithExitCode 1
}
- if ($tool -eq "policheck") {
- 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
+
+ $configParam = @('--config')
+
+ foreach ($tool in $ToolsList) {
+ $gdnConfigFile = Join-Path $gdnConfigPath "$tool-configure.gdnconfig"
+ 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 `" `" OutputType < pre `" $(If ($CrScanAdditionalRunConfigParams) {$CrScanAdditionalRunConfigParams})"
+ & $GuardianCliLocation configure --working-directory $WorkingDirectory --tool $tool --output-path $gdnConfigFile --logger-level $GuardianLoggerLevel --noninteractive --force --args " TargetDirectory < $TargetDirectory " "OutputType < pre" $(If ($CrScanAdditionalRunConfigParams) {$CrScanAdditionalRunConfigParams})
+ if ($LASTEXITCODE -ne 0) {
+ Write-PipelineTelemetryError -Force -Category 'Sdl' -Message "Guardian configure for $tool failed with exit code $LASTEXITCODE."
+ ExitWithExitCode $LASTEXITCODE
+ }
+ }
+ if ($tool -eq 'policheck') {
+ 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-PipelineTelemetryError -Force -Category 'Sdl' -Message "Guardian configure for $tool failed with exit code $LASTEXITCODE."
+ ExitWithExitCode $LASTEXITCODE
+ }
}
- }
- $configParam+=$gdnConfigFile
-}
+ $configParam+=$gdnConfigFile
+ }
-Write-Host "$GuardianCliLocation run --working-directory $WorkingDirectory --baseline mainbaseline --update-baseline $UpdateBaseline --logger-level $GuardianLoggerLevel $configParam"
-& $GuardianCliLocation run --working-directory $WorkingDirectory --tool $tool --baseline mainbaseline --update-baseline $UpdateBaseline --logger-level $GuardianLoggerLevel $configParam
-if ($LASTEXITCODE -ne 0) {
- Write-Host "Guardian run for $ToolsList using $configParam failed with exit code $LASTEXITCODE."
- exit $LASTEXITCODE
+ Write-Host "$GuardianCliLocation run --working-directory $WorkingDirectory --baseline mainbaseline --update-baseline $UpdateBaseline --logger-level $GuardianLoggerLevel $configParam"
+ & $GuardianCliLocation run --working-directory $WorkingDirectory --tool $tool --baseline mainbaseline --update-baseline $UpdateBaseline --logger-level $GuardianLoggerLevel $configParam
+ if ($LASTEXITCODE -ne 0) {
+ Write-PipelineTelemetryError -Force -Category 'Sdl' -Message "Guardian run for $ToolsList using $configParam failed with exit code $LASTEXITCODE."
+ ExitWithExitCode $LASTEXITCODE
+ }
}
+catch {
+ Write-Host $_.ScriptStackTrace
+ Write-PipelineTelemetryError -Category 'Sdl' -Message $_
+ ExitWithExitCode 1
+}
\ No newline at end of file
diff --git a/eng/common/templates/job/execute-sdl.yml b/eng/common/templates/job/execute-sdl.yml
index 52e2ff021d70..640f2b04e240 100644
--- a/eng/common/templates/job/execute-sdl.yml
+++ b/eng/common/templates/job/execute-sdl.yml
@@ -1,4 +1,5 @@
parameters:
+ enable: 'false' # Whether the SDL validation job should execute or not
overrideParameters: '' # Optional: to override values for parameters.
additionalParameters: '' # Optional: parameters that need user specific values eg: '-SourceToolsList @("abc","def") -ArtifactToolsList @("ghi","jkl")'
# There is some sort of bug (has been reported) in Azure DevOps where if this parameter is named
@@ -16,8 +17,15 @@ jobs:
- job: Run_SDL
dependsOn: ${{ parameters.dependsOn }}
displayName: Run SDL tool
+ condition: eq( ${{ parameters.enable }}, 'true')
variables:
- group: DotNet-VSTS-Bot
+ - name: AzDOProjectName
+ value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.AzDOProjectName'] ]
+ - name: AzDOPipelineId
+ value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.AzDOPipelineId'] ]
+ - name: AzDOBuildId
+ value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.AzDOBuildId'] ]
pool:
name: Hosted VS2017
steps:
@@ -28,25 +36,33 @@ jobs:
- task: DownloadBuildArtifacts@0
displayName: Download Build Artifacts
inputs:
- buildType: current
+ buildType: specific
+ buildVersionToDownload: specific
+ project: $(AzDOProjectName)
+ pipeline: $(AzDOPipelineId)
+ buildId: $(AzDOBuildId)
artifactName: ${{ artifactName }}
downloadPath: $(Build.ArtifactStagingDirectory)\artifacts
- ${{ if eq(parameters.artifactNames, '') }}:
- task: DownloadBuildArtifacts@0
displayName: Download Build Artifacts
inputs:
- buildType: current
+ buildType: specific
+ buildVersionToDownload: specific
+ project: $(AzDOProjectName)
+ pipeline: $(AzDOPipelineId)
+ buildId: $(AzDOBuildId)
downloadType: specific files
itemPattern: "**"
downloadPath: $(Build.ArtifactStagingDirectory)\artifacts
- powershell: eng/common/sdl/extract-artifact-packages.ps1
- -InputPath $(Build.SourcesDirectory)\artifacts\BlobArtifacts
- -ExtractPath $(Build.SourcesDirectory)\artifacts\BlobArtifacts
+ -InputPath $(Build.ArtifactStagingDirectory)\artifacts\BlobArtifacts
+ -ExtractPath $(Build.ArtifactStagingDirectory)\artifacts\BlobArtifacts
displayName: Extract Blob Artifacts
continueOnError: ${{ parameters.sdlContinueOnError }}
- powershell: eng/common/sdl/extract-artifact-packages.ps1
- -InputPath $(Build.SourcesDirectory)\artifacts\PackageArtifacts
- -ExtractPath $(Build.SourcesDirectory)\artifacts\PackageArtifacts
+ -InputPath $(Build.ArtifactStagingDirectory)\artifacts\PackageArtifacts
+ -ExtractPath $(Build.ArtifactStagingDirectory)\artifacts\PackageArtifacts
displayName: Extract Package Artifacts
continueOnError: ${{ parameters.sdlContinueOnError }}
- task: NuGetToolInstaller@1
diff --git a/eng/common/templates/job/job.yml b/eng/common/templates/job/job.yml
index ffda80a197b2..ecebd0f03eb7 100644
--- a/eng/common/templates/job/job.yml
+++ b/eng/common/templates/job/job.yml
@@ -1,67 +1,33 @@
+# Internal resources (telemetry, microbuild) can only be accessed from non-public projects,
+# and some (Microbuild) should only be applied to non-PR cases for internal builds.
+
parameters:
# Job schema parameters - https://docs.microsoft.com/en-us/azure/devops/pipelines/yaml-schema?view=vsts&tabs=schema#job
cancelTimeoutInMinutes: ''
-
condition: ''
-
- continueOnError: false
-
container: ''
-
+ continueOnError: false
dependsOn: ''
-
displayName: ''
-
- steps: []
-
pool: ''
-
+ steps: []
strategy: ''
-
timeoutInMinutes: ''
-
variables: []
-
workspace: ''
- # Job base template specific parameters
- # Optional: Enable installing Microbuild plugin
- # if 'true', these "variables" must be specified in the variables object or as part of the queue matrix
- # _TeamName - the name of your team
- # _SignType - 'test' or 'real'
+# Job base template specific parameters
+ # See schema documentation - https://github.com/dotnet/arcade/blob/master/Documentation/AzureDevOps/TemplateSchema.md
+ artifacts: ''
enableMicrobuild: false
-
- # Optional: Include PublishBuildArtifacts task
enablePublishBuildArtifacts: false
-
- # Optional: Enable publishing to the build asset registry
enablePublishBuildAssets: false
-
- # Optional: Prevent gather/push manifest from executing when using publishing pipelines
- enablePublishUsingPipelines: false
-
- # Optional: Include PublishTestResults task
enablePublishTestResults: false
-
- # Optional: enable sending telemetry
- enableTelemetry: false
-
- # Optional: define the helix repo for telemetry (example: 'dotnet/arcade')
- helixRepo: ''
-
- # Optional: define the helix type for telemetry (example: 'build/product/')
- helixType: ''
-
- # Required: name of the job
+ enablePublishUsingPipelines: false
name: ''
-
- # Optional: should run as a public build even in the internal project
- # if 'true', the build won't run any of the internal only steps, even if it is running in non-public projects.
+ preSteps: []
runAsPublic: false
-# Internal resources (telemetry, microbuild) can only be accessed from non-public projects,
-# and some (Microbuild) should only be applied to non-PR cases for internal builds.
-
jobs:
- job: ${{ parameters.name }}
@@ -93,7 +59,7 @@ jobs:
timeoutInMinutes: ${{ parameters.timeoutInMinutes }}
variables:
- - ${{ if eq(parameters.enableTelemetry, 'true') }}:
+ - ${{ if ne(parameters.enableTelemetry, 'false') }}:
- name: DOTNET_CLI_TELEMETRY_PROFILE
value: '$(Build.Repository.Uri)'
- ${{ each variable in parameters.variables }}:
@@ -125,21 +91,12 @@ jobs:
workspace: ${{ parameters.workspace }}
steps:
- - ${{ if eq(parameters.enableTelemetry, 'true') }}:
- # Telemetry tasks are built from https://github.com/dotnet/arcade-extensions
- - task: sendStartTelemetry@0
- displayName: 'Send Helix Start Telemetry'
- inputs:
- helixRepo: ${{ parameters.helixRepo }}
- ${{ if ne(parameters.helixType, '') }}:
- helixType: ${{ parameters.helixType }}
- buildConfig: $(_BuildConfig)
- runAsPublic: ${{ parameters.runAsPublic }}
- continueOnError: ${{ parameters.continueOnError }}
- condition: always()
+ - ${{ if ne(parameters.preSteps, '') }}:
+ - ${{ each preStep in parameters.preSteps }}:
+ - ${{ preStep }}
- - ${{ if eq(parameters.enableMicrobuild, 'true') }}:
- - ${{ if and(eq(parameters.runAsPublic, 'false'), ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
+ - ${{ if and(eq(parameters.runAsPublic, 'false'), ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
+ - ${{ if eq(parameters.enableMicrobuild, 'true') }}:
- task: MicroBuildSigningPlugin@2
displayName: Install MicroBuild plugin
inputs:
@@ -151,9 +108,16 @@ jobs:
continueOnError: ${{ parameters.continueOnError }}
condition: and(succeeded(), in(variables['_SignType'], 'real', 'test'), eq(variables['Agent.Os'], 'Windows_NT'))
- - ${{ if and(eq(parameters.runAsPublic, 'false'), ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
- task: NuGetAuthenticate@0
+ - ${{ if or(eq(parameters.artifacts.download, 'true'), ne(parameters.artifacts.download, '')) }}:
+ - task: DownloadPipelineArtifact@2
+ inputs:
+ buildType: current
+ artifactName: ${{ coalesce(parameters.artifacts.download.name, 'Artifacts_$(Agent.OS)_$(_BuildConfig)') }}
+ targetPath: ${{ coalesce(parameters.artifacts.download.path, 'artifacts') }}
+ itemPattern: ${{ coalesce(parameters.artifacts.download.pattern, '**') }}
+
- ${{ each step in parameters.steps }}:
- ${{ step }}
@@ -166,20 +130,60 @@ jobs:
env:
TeamName: $(_TeamName)
- - ${{ if eq(parameters.enableTelemetry, 'true') }}:
- # Telemetry tasks are built from https://github.com/dotnet/arcade-extensions
- - task: sendEndTelemetry@0
- displayName: 'Send Helix End Telemetry'
- continueOnError: ${{ parameters.continueOnError }}
- condition: always()
-
- - ${{ if eq(parameters.enablePublishBuildArtifacts, 'true') }}:
+ - ${{ if ne(parameters.artifacts.publish, '') }}:
+ - ${{ if or(eq(parameters.artifacts.publish.artifacts, 'true'), ne(parameters.artifacts.publish.artifacts, '')) }}:
+ - task: CopyFiles@2
+ displayName: Gather binaries for publish to artifacts
+ inputs:
+ SourceFolder: 'artifacts/bin'
+ Contents: '**'
+ TargetFolder: '$(Build.ArtifactStagingDirectory)/artifacts/bin'
+ - task: CopyFiles@2
+ displayName: Gather packages for publish to artifacts
+ inputs:
+ SourceFolder: 'artifacts/packages'
+ Contents: '**'
+ TargetFolder: '$(Build.ArtifactStagingDirectory)/artifacts/packages'
+ - task: PublishBuildArtifacts@1
+ displayName: Publish pipeline artifacts
+ inputs:
+ PathtoPublish: '$(Build.ArtifactStagingDirectory)/artifacts'
+ PublishLocation: Container
+ ArtifactName: ${{ coalesce(parameters.artifacts.publish.artifacts.name , 'Artifacts_$(Agent.Os)_$(_BuildConfig)') }}
+ continueOnError: true
+ condition: always()
+ - ${{ if or(eq(parameters.artifacts.publish.logs, 'true'), ne(parameters.artifacts.publish.logs, '')) }}:
+ - publish: artifacts/log
+ artifact: ${{ coalesce(parameters.artifacts.publish.logs.name, 'Logs_Build_$(Agent.Os)_$(_BuildConfig)') }}
+ displayName: Publish logs
+ continueOnError: true
+ condition: always()
+ - ${{ if or(eq(parameters.artifacts.publish.manifests, 'true'), ne(parameters.artifacts.publish.manifests, '')) }}:
+ - ${{ if and(ne(parameters.enablePublishUsingPipelines, 'true'), eq(parameters.runAsPublic, 'false'), ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
+ - task: CopyFiles@2
+ displayName: Gather Asset Manifests
+ inputs:
+ SourceFolder: '$(Build.SourcesDirectory)/artifacts/log/$(_BuildConfig)/AssetManifest'
+ TargetFolder: '$(Build.ArtifactStagingDirectory)/AssetManifests'
+ continueOnError: ${{ parameters.continueOnError }}
+ condition: and(succeeded(), eq(variables['_DotNetPublishToBlobFeed'], 'true'))
+
+ - task: PublishBuildArtifacts@1
+ displayName: Push Asset Manifests
+ inputs:
+ PathtoPublish: '$(Build.ArtifactStagingDirectory)/AssetManifests'
+ PublishLocation: Container
+ ArtifactName: AssetManifests
+ continueOnError: ${{ parameters.continueOnError }}
+ condition: and(succeeded(), eq(variables['_DotNetPublishToBlobFeed'], 'true'))
+
+ - ${{ if ne(parameters.enablePublishBuildArtifacts, 'false') }}:
- task: PublishBuildArtifacts@1
displayName: Publish Logs
inputs:
PathtoPublish: '$(Build.SourcesDirectory)/artifacts/log/$(_BuildConfig)'
PublishLocation: Container
- ArtifactName: $(Agent.Os)_$(Agent.JobName)
+ ArtifactName: ${{ coalesce(parameters.enablePublishBuildArtifacts.artifactName, '$(Agent.Os)_$(Agent.JobName)' ) }}
continueOnError: true
condition: always()
diff --git a/eng/common/templates/jobs/jobs.yml b/eng/common/templates/jobs/jobs.yml
index 6a2f98c036f6..c08225a9a975 100644
--- a/eng/common/templates/jobs/jobs.yml
+++ b/eng/common/templates/jobs/jobs.yml
@@ -1,19 +1,10 @@
parameters:
- # Optional: 'true' if failures in job.yml job should not fail the job
+ # See schema documentation in /Documentation/AzureDevOps/TemplateSchema.md
continueOnError: false
- # Optional: Enable installing Microbuild plugin
- # if 'true', these "variables" must be specified in the variables object or as part of the queue matrix
- # _TeamName - the name of your team
- # _SignType - 'test' or 'real'
- enableMicrobuild: false
-
# Optional: Include PublishBuildArtifacts task
enablePublishBuildArtifacts: false
- # Optional: Enable publishing to the build asset registry
- enablePublishBuildAssets: false
-
# Optional: Enable publishing using release pipelines
enablePublishUsingPipelines: false
@@ -23,19 +14,9 @@ parameters:
# Optional: Include toolset dependencies in the generated graph files
includeToolset: false
- # Optional: Include PublishTestResults task
- enablePublishTestResults: false
-
- # Optional: enable sending telemetry
- # if enabled then the 'helixRepo' parameter should also be specified
- enableTelemetry: false
-
# Required: A collection of jobs to run - https://docs.microsoft.com/en-us/azure/devops/pipelines/yaml-schema?view=vsts&tabs=schema#job
jobs: []
- # Optional: define the helix repo for telemetry (example: 'dotnet/arcade')
- helixRepo: ''
-
# Optional: Override automatically derived dependsOn value for "publish build assets" job
publishBuildAssetsDependsOn: ''
@@ -62,29 +43,30 @@ jobs:
name: ${{ job.job }}
-- ${{ if and(eq(parameters.enablePublishBuildAssets, true), eq(parameters.runAsPublic, 'false'), ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
- - template: ../job/publish-build-assets.yml
- parameters:
- continueOnError: ${{ parameters.continueOnError }}
- dependsOn:
- - ${{ if ne(parameters.publishBuildAssetsDependsOn, '') }}:
- - ${{ each job in parameters.publishBuildAssetsDependsOn }}:
- - ${{ job.job }}
- - ${{ if eq(parameters.publishBuildAssetsDependsOn, '') }}:
- - ${{ each job in parameters.jobs }}:
- - ${{ job.job }}
- pool:
- vmImage: vs2017-win2016
- runAsPublic: ${{ parameters.runAsPublic }}
- publishUsingPipelines: ${{ parameters.enablePublishUsingPipelines }}
- enablePublishBuildArtifacts: ${{ parameters.enablePublishBuildArtifacts }}
-
-- ${{ if and(eq(parameters.graphFileGeneration.enabled, true), eq(parameters.runAsPublic, 'false'), ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
- - template: ../job/generate-graph-files.yml
- parameters:
- continueOnError: ${{ parameters.continueOnError }}
- includeToolset: ${{ parameters.graphFileGeneration.includeToolset }}
- dependsOn:
- - Asset_Registry_Publish
- pool:
- vmImage: vs2017-win2016
+- ${{ if and(eq(parameters.runAsPublic, 'false'), ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
+ - ${{ if or(eq(parameters.enablePublishBuildAssets, true), eq(parameters.artifacts.publish.manifests, 'true'), ne(parameters.artifacts.publish.manifests, '')) }}:
+ - template: ../job/publish-build-assets.yml
+ parameters:
+ continueOnError: ${{ parameters.continueOnError }}
+ dependsOn:
+ - ${{ if ne(parameters.publishBuildAssetsDependsOn, '') }}:
+ - ${{ each job in parameters.publishBuildAssetsDependsOn }}:
+ - ${{ job.job }}
+ - ${{ if eq(parameters.publishBuildAssetsDependsOn, '') }}:
+ - ${{ each job in parameters.jobs }}:
+ - ${{ job.job }}
+ pool:
+ vmImage: vs2017-win2016
+ runAsPublic: ${{ parameters.runAsPublic }}
+ publishUsingPipelines: ${{ parameters.enablePublishUsingPipelines }}
+ enablePublishBuildArtifacts: ${{ parameters.enablePublishBuildArtifacts }}
+
+ - ${{ if eq(parameters.graphFileGeneration.enabled, true) }}:
+ - template: ../job/generate-graph-files.yml
+ parameters:
+ continueOnError: ${{ parameters.continueOnError }}
+ includeToolset: ${{ parameters.graphFileGeneration.includeToolset }}
+ dependsOn:
+ - Asset_Registry_Publish
+ pool:
+ vmImage: vs2017-win2016
diff --git a/eng/common/templates/post-build/channels/generic-internal-channel.yml b/eng/common/templates/post-build/channels/generic-internal-channel.yml
index ad9375f5e5c5..dde27800c3f2 100644
--- a/eng/common/templates/post-build/channels/generic-internal-channel.yml
+++ b/eng/common/templates/post-build/channels/generic-internal-channel.yml
@@ -1,4 +1,7 @@
parameters:
+ artifactsPublishingAdditionalParameters: ''
+ dependsOn:
+ - Validate
publishInstallersAndChecksums: false
symbolPublishingAdditionalParameters: ''
stageName: ''
@@ -10,37 +13,54 @@ parameters:
stages:
- stage: ${{ parameters.stageName }}
- dependsOn: validate
+ dependsOn: ${{ parameters.dependsOn }}
variables:
- template: ../common-variables.yml
displayName: ${{ parameters.channelName }} Publishing
jobs:
- template: ../setup-maestro-vars.yml
- - job:
+ - job: publish_symbols
displayName: Symbol Publishing
dependsOn: setupMaestroVars
- condition: contains(dependencies.setupMaestroVars.outputs['setReleaseVars.InitialChannels'], format('[{0}]', ${{ parameters.channelId }} ))
+ condition: or(contains(dependencies.setupMaestroVars.outputs['setReleaseVars.InitialChannels'], format('[{0}]', ${{ parameters.channelId }} )), eq(dependencies.setupMaestroVars.outputs['setReleaseVars.PromoteToMaestroChannelId'], ${{ parameters.channelId }}))
variables:
- group: DotNet-Symbol-Server-Pats
+ - name: AzDOProjectName
+ value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.AzDOProjectName'] ]
+ - name: AzDOPipelineId
+ value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.AzDOPipelineId'] ]
+ - name: AzDOBuildId
+ value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.AzDOBuildId'] ]
pool:
vmImage: 'windows-2019'
steps:
+ - task: DownloadBuildArtifacts@0
+ displayName: Download Build Assets
+ continueOnError: true
+ inputs:
+ buildType: specific
+ buildVersionToDownload: specific
+ project: $(AzDOProjectName)
+ pipeline: $(AzDOPipelineId)
+ buildId: $(AzDOBuildId)
+ downloadType: 'specific'
+ itemPattern: |
+ PdbArtifacts/**
+ BlobArtifacts/**
+ downloadPath: '$(Build.ArtifactStagingDirectory)'
+
# This is necessary whenever we want to publish/restore to an AzDO private feed
+ # Since sdk-task.ps1 tries to restore packages we need to do this authentication here
+ # otherwise it'll complain about accessing a private feed.
- task: NuGetAuthenticate@0
displayName: 'Authenticate to AzDO Feeds'
- - task: DownloadBuildArtifacts@0
- displayName: Download Blob Artifacts
- inputs:
- artifactName: 'BlobArtifacts'
- continueOnError: true
-
- - task: DownloadBuildArtifacts@0
- displayName: Download PDB Artifacts
+ - task: PowerShell@2
+ displayName: Enable cross-org publishing
inputs:
- artifactName: 'PDBArtifacts'
- continueOnError: true
+ filePath: eng\common\enable-cross-org-publishing.ps1
+ arguments: -token $(dn-bot-dnceng-artifact-feeds-rw)
- task: PowerShell@2
displayName: Publish
@@ -53,39 +73,48 @@ stages:
/p:BlobBasePath='$(Build.ArtifactStagingDirectory)/BlobArtifacts/'
/p:SymbolPublishingExclusionsFile='$(Build.SourcesDirectory)/eng/SymbolPublishingExclusionsFile.txt'
/p:Configuration=Release
+ /p:PublishToMSDL=false
${{ parameters.symbolPublishingAdditionalParameters }}
+ - template: ../../steps/publish-logs.yml
+ parameters:
+ StageLabel: '${{ parameters.stageName }}'
+ JobLabel: 'SymbolPublishing'
+
- job: publish_assets
displayName: Publish Assets
dependsOn: setupMaestroVars
+ timeoutInMinutes: 120
variables:
- - group: DotNet-Blob-Feed
- - group: AzureDevOps-Artifact-Feeds-Pats
- name: BARBuildId
value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.BARBuildId'] ]
- name: IsStableBuild
value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.IsStableBuild'] ]
- condition: contains(dependencies.setupMaestroVars.outputs['setReleaseVars.InitialChannels'], format('[{0}]', ${{ parameters.channelId }}))
+ - name: AzDOProjectName
+ value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.AzDOProjectName'] ]
+ - name: AzDOPipelineId
+ value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.AzDOPipelineId'] ]
+ - name: AzDOBuildId
+ value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.AzDOBuildId'] ]
+ condition: or(contains(dependencies.setupMaestroVars.outputs['setReleaseVars.InitialChannels'], format('[{0}]', ${{ parameters.channelId }} )), eq(dependencies.setupMaestroVars.outputs['setReleaseVars.PromoteToMaestroChannelId'], ${{ parameters.channelId }}))
pool:
vmImage: 'windows-2019'
steps:
- task: DownloadBuildArtifacts@0
- displayName: Download Package Artifacts
- inputs:
- buildType: current
- artifactName: PackageArtifacts
-
- - task: DownloadBuildArtifacts@0
- displayName: Download Blob Artifacts
- inputs:
- buildType: current
- artifactName: BlobArtifacts
-
- - task: DownloadBuildArtifacts@0
- displayName: Download Asset Manifests
+ displayName: Download Build Assets
+ continueOnError: true
inputs:
- buildType: current
- artifactName: AssetManifests
+ buildType: specific
+ buildVersionToDownload: specific
+ project: $(AzDOProjectName)
+ pipeline: $(AzDOPipelineId)
+ buildId: $(AzDOBuildId)
+ downloadType: 'specific'
+ itemPattern: |
+ PackageArtifacts/**
+ BlobArtifacts/**
+ AssetManifests/**
+ downloadPath: '$(Build.ArtifactStagingDirectory)'
- task: NuGetToolInstaller@1
displayName: 'Install NuGet.exe'
@@ -124,7 +153,6 @@ stages:
/p:ChecksumsAzureAccountKey=$(InternalChecksumsBlobFeedKey)
/p:InstallersTargetStaticFeed=$(InternalInstallersBlobFeedUrl)
/p:InstallersAzureAccountKey=$(InternalInstallersBlobFeedKey)
- /p:PublishToAzureDevOpsNuGetFeeds=true
/p:AzureDevOpsStaticShippingFeed='${{ parameters.shippingFeed }}'
/p:AzureDevOpsStaticShippingFeedKey='$(dn-bot-dnceng-artifact-feeds-rw)'
/p:AzureDevOpsStaticTransportFeed='${{ parameters.transportFeed }}'
@@ -134,6 +162,11 @@ stages:
/p:PublishToMSDL=false
${{ parameters.artifactsPublishingAdditionalParameters }}
- - template: ../../steps/promote-build.yml
+ - template: ../../steps/publish-logs.yml
+ parameters:
+ StageLabel: '${{ parameters.stageName }}'
+ JobLabel: 'AssetsPublishing'
+
+ - template: ../../steps/add-build-to-channel.yml
parameters:
ChannelId: ${{ parameters.channelId }}
diff --git a/eng/common/templates/post-build/channels/generic-public-channel.yml b/eng/common/templates/post-build/channels/generic-public-channel.yml
index c4bc1897d81f..08853ec45e0c 100644
--- a/eng/common/templates/post-build/channels/generic-public-channel.yml
+++ b/eng/common/templates/post-build/channels/generic-public-channel.yml
@@ -1,5 +1,7 @@
parameters:
artifactsPublishingAdditionalParameters: ''
+ dependsOn:
+ - Validate
publishInstallersAndChecksums: false
symbolPublishingAdditionalParameters: ''
stageName: ''
@@ -8,36 +10,47 @@ parameters:
transportFeed: ''
shippingFeed: ''
symbolsFeed: ''
+ # If the channel name is empty, no links will be generated
+ akaMSChannelName: ''
stages:
- stage: ${{ parameters.stageName }}
- dependsOn: validate
+ dependsOn: ${{ parameters.dependsOn }}
variables:
- template: ../common-variables.yml
displayName: ${{ parameters.channelName }} Publishing
jobs:
- template: ../setup-maestro-vars.yml
- - job:
+ - job: publish_symbols
displayName: Symbol Publishing
dependsOn: setupMaestroVars
- condition: contains(dependencies.setupMaestroVars.outputs['setReleaseVars.InitialChannels'], format('[{0}]', ${{ parameters.channelId }} ))
+ condition: or(contains(dependencies.setupMaestroVars.outputs['setReleaseVars.InitialChannels'], format('[{0}]', ${{ parameters.channelId }} )), eq(dependencies.setupMaestroVars.outputs['setReleaseVars.PromoteToMaestroChannelId'], ${{ parameters.channelId }}))
variables:
- group: DotNet-Symbol-Server-Pats
+ - name: AzDOProjectName
+ value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.AzDOProjectName'] ]
+ - name: AzDOPipelineId
+ value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.AzDOPipelineId'] ]
+ - name: AzDOBuildId
+ value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.AzDOBuildId'] ]
pool:
vmImage: 'windows-2019'
steps:
- task: DownloadBuildArtifacts@0
- displayName: Download Blob Artifacts
- inputs:
- artifactName: 'BlobArtifacts'
+ displayName: Download Build Assets
continueOnError: true
-
- - task: DownloadBuildArtifacts@0
- displayName: Download PDB Artifacts
inputs:
- artifactName: 'PDBArtifacts'
- continueOnError: true
+ buildType: specific
+ buildVersionToDownload: specific
+ project: $(AzDOProjectName)
+ pipeline: $(AzDOPipelineId)
+ buildId: $(AzDOBuildId)
+ downloadType: 'specific'
+ itemPattern: |
+ PdbArtifacts/**
+ BlobArtifacts/**
+ downloadPath: '$(Build.ArtifactStagingDirectory)'
# This is necessary whenever we want to publish/restore to an AzDO private feed
# Since sdk-task.ps1 tries to restore packages we need to do this authentication here
@@ -64,37 +77,47 @@ stages:
/p:Configuration=Release
${{ parameters.symbolPublishingAdditionalParameters }}
+ - template: ../../steps/publish-logs.yml
+ parameters:
+ StageLabel: '${{ parameters.stageName }}'
+ JobLabel: 'SymbolPublishing'
+
- job: publish_assets
displayName: Publish Assets
dependsOn: setupMaestroVars
+ timeoutInMinutes: 120
variables:
- name: BARBuildId
value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.BARBuildId'] ]
- name: IsStableBuild
value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.IsStableBuild'] ]
- condition: contains(dependencies.setupMaestroVars.outputs['setReleaseVars.InitialChannels'], format('[{0}]', ${{ parameters.channelId }}))
+ - name: AzDOProjectName
+ value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.AzDOProjectName'] ]
+ - name: AzDOPipelineId
+ value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.AzDOPipelineId'] ]
+ - name: AzDOBuildId
+ value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.AzDOBuildId'] ]
+ - name: ArtifactsCategory
+ value: ${{ coalesce(variables._DotNetArtifactsCategory, '.NETCore') }}
+ condition: or(contains(dependencies.setupMaestroVars.outputs['setReleaseVars.InitialChannels'], format('[{0}]', ${{ parameters.channelId }} )), eq(dependencies.setupMaestroVars.outputs['setReleaseVars.PromoteToMaestroChannelId'], ${{ parameters.channelId }}))
pool:
vmImage: 'windows-2019'
steps:
- task: DownloadBuildArtifacts@0
- displayName: Download Package Artifacts
- inputs:
- buildType: current
- artifactName: PackageArtifacts
+ displayName: Download Build Assets
continueOnError: true
-
- - task: DownloadBuildArtifacts@0
- displayName: Download Blob Artifacts
inputs:
- buildType: current
- artifactName: BlobArtifacts
- continueOnError: true
-
- - task: DownloadBuildArtifacts@0
- displayName: Download Asset Manifests
- inputs:
- buildType: current
- artifactName: AssetManifests
+ buildType: specific
+ buildVersionToDownload: specific
+ project: $(AzDOProjectName)
+ pipeline: $(AzDOPipelineId)
+ buildId: $(AzDOBuildId)
+ downloadType: 'specific'
+ itemPattern: |
+ PackageArtifacts/**
+ BlobArtifacts/**
+ AssetManifests/**
+ downloadPath: '$(Build.ArtifactStagingDirectory)'
- task: NuGetToolInstaller@1
displayName: 'Install NuGet.exe'
@@ -114,7 +137,7 @@ stages:
inputs:
filePath: eng\common\sdk-task.ps1
arguments: -task PublishArtifactsInManifest -restore -msbuildEngine dotnet
- /p:ArtifactsCategory=$(_DotNetArtifactsCategory)
+ /p:ArtifactsCategory=$(ArtifactsCategory)
/p:IsStableBuild=$(IsStableBuild)
/p:IsInternalBuild=$(IsInternalBuild)
/p:RepositoryName=$(Build.Repository.Name)
@@ -134,15 +157,22 @@ stages:
/p:InstallersAzureAccountKey=$(dotnetcli-storage-key)
/p:ChecksumsTargetStaticFeed=$(ChecksumsBlobFeedUrl)
/p:ChecksumsAzureAccountKey=$(dotnetclichecksums-storage-key)
- /p:PublishToAzureDevOpsNuGetFeeds=true
/p:AzureDevOpsStaticShippingFeed='${{ parameters.shippingFeed }}'
/p:AzureDevOpsStaticShippingFeedKey='$(dn-bot-dnceng-artifact-feeds-rw)'
/p:AzureDevOpsStaticTransportFeed='${{ parameters.transportFeed }}'
/p:AzureDevOpsStaticTransportFeedKey='$(dn-bot-dnceng-artifact-feeds-rw)'
/p:AzureDevOpsStaticSymbolsFeed='${{ parameters.symbolsFeed }}'
/p:AzureDevOpsStaticSymbolsFeedKey='$(dn-bot-dnceng-artifact-feeds-rw)'
+ /p:LatestLinkShortUrlPrefix=dotnet/'${{ parameters.akaMSChannelName }}'
+ /p:AkaMSClientId=$(akams-client-id)
+ /p:AkaMSClientSecret=$(akams-client-secret)
${{ parameters.artifactsPublishingAdditionalParameters }}
- - template: ../../steps/promote-build.yml
+ - template: ../../steps/publish-logs.yml
+ parameters:
+ StageLabel: '${{ parameters.stageName }}'
+ JobLabel: 'AssetsPublishing'
+
+ - template: ../../steps/add-build-to-channel.yml
parameters:
ChannelId: ${{ parameters.channelId }}
diff --git a/eng/common/templates/post-build/common-variables.yml b/eng/common/templates/post-build/common-variables.yml
index 216d043e4e3b..9505cf170f0f 100644
--- a/eng/common/templates/post-build/common-variables.yml
+++ b/eng/common/templates/post-build/common-variables.yml
@@ -4,7 +4,7 @@ variables:
- group: DotNet-DotNetCli-Storage
- group: DotNet-MSRC-Storage
- group: Publish-Build-Assets
-
+
# .NET Core 3.1 Dev
- name: PublicDevRelease_31_Channel_Id
value: 128
@@ -49,6 +49,10 @@ variables:
- name: NetCore_31_Blazor_Features_Channel_Id
value: 531
+ # .NET Core Experimental
+ - name: NetCore_Experimental_Channel_Id
+ value: 562
+
# Whether the build is internal or not
- name: IsInternalBuild
value: ${{ and(ne(variables['System.TeamProject'], 'public'), contains(variables['Build.SourceBranch'], 'internal')) }}
diff --git a/eng/common/templates/post-build/darc-gather-drop.yml b/eng/common/templates/post-build/darc-gather-drop.yml
deleted file mode 100644
index 3268ccaa5513..000000000000
--- a/eng/common/templates/post-build/darc-gather-drop.yml
+++ /dev/null
@@ -1,23 +0,0 @@
-parameters:
- ChannelId: 0
-
-jobs:
-- job: gatherDrop
- displayName: Gather Drop
- dependsOn: setupMaestroVars
- condition: contains(dependencies.setupMaestroVars.outputs['setReleaseVars.InitialChannels'], format('[{0}]', ${{ 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 3c69186f03a7..7be5b0bfad4e 100644
--- a/eng/common/templates/post-build/post-build.yml
+++ b/eng/common/templates/post-build/post-build.yml
@@ -17,100 +17,190 @@ parameters:
signingValidationAdditionalParameters: ''
# Which stages should finish execution before post-build stages start
- dependsOn: [build]
-
+ validateDependsOn:
+ - build
+ publishDependsOn:
+ - Validate
+
+ # Channel ID's instantiated in this file.
+ # When adding a new channel implementation the call to `check-channel-consistency.ps1`
+ # needs to be updated with the new channel ID
+ NetEngLatestChannelId: 2
+ NetEngValidationChannelId: 9
+ NetCoreDev5ChannelId: 131
+ GeneralTestingChannelId: 529
+ NETCoreToolingDevChannelId: 548
+ NETCoreToolingReleaseChannelId: 549
+ NETInternalToolingChannelId: 551
+ NETCoreExperimentalChannelId: 562
+ NetEngServicesIntChannelId: 678
+ NetEngServicesProdChannelId: 679
+ Net5Preview1ChannelId: 737
+ Net5Preview2ChannelId: 738
+
stages:
-- stage: validate
- dependsOn: ${{ parameters.dependsOn }}
+- stage: Validate
+ dependsOn: ${{ parameters.validateDependsOn }}
displayName: Validate
+ variables:
+ - template: common-variables.yml
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
- pool:
- vmImage: 'windows-2019'
- steps:
- # This is necessary whenever we want to publish/restore to an AzDO private feed
- # Since sdk-task.ps1 tries to restore packages we need to do this authentication here
- # otherwise it'll complain about accessing a private feed.
- - task: NuGetAuthenticate@0
- displayName: 'Authenticate to AzDO Feeds'
-
- - task: DownloadBuildArtifacts@0
- displayName: Download Package Artifacts
- inputs:
- buildType: current
- artifactName: PackageArtifacts
-
- - task: PowerShell@2
- displayName: Validate
- inputs:
- filePath: eng\common\sdk-task.ps1
- arguments: -task SigningValidation -restore -msbuildEngine dotnet
- /p:PackageBasePath='$(Build.ArtifactStagingDirectory)/PackageArtifacts'
- /p:SignCheckExclusionsFile='$(Build.SourcesDirectory)/eng/SignCheckExclusionsFile.txt'
- /p:Configuration=Release
- ${{ parameters.signingValidationAdditionalParameters }}
-
- - ${{ if eq(parameters.enableSourceLinkValidation, 'true') }}:
- - job:
- displayName: SourceLink Validation
- variables:
- - template: common-variables.yml
- pool:
- vmImage: 'windows-2019'
- steps:
- - task: DownloadBuildArtifacts@0
- displayName: Download Blob Artifacts
- inputs:
- buildType: current
- artifactName: BlobArtifacts
-
- - task: PowerShell@2
- displayName: Validate
- inputs:
- filePath: $(Build.SourcesDirectory)/eng/common/post-build/sourcelink-validation.ps1
- arguments: -InputPath $(Build.ArtifactStagingDirectory)/BlobArtifacts/
- -ExtractPath $(Agent.BuildDirectory)/Extract/
- -GHRepoName $(Build.Repository.Name)
- -GHCommit $(Build.SourceVersion)
- -SourcelinkCliVersion $(SourceLinkCLIVersion)
- continueOnError: true
-
- - ${{ if eq(parameters.SDLValidationParameters.enable, 'true') }}:
- - template: /eng/common/templates/job/execute-sdl.yml
- parameters:
- additionalParameters: ${{ parameters.SDLValidationParameters.params }}
- continueOnError: ${{ parameters.SDLValidationParameters.continueOnError }}
- artifactNames: ${{ parameters.SDLValidationParameters.artifactNames }}
+ - template: setup-maestro-vars.yml
+
+ - job:
+ displayName: Post-build Checks
+ dependsOn: setupMaestroVars
+ variables:
+ - name: InitialChannels
+ value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.InitialChannels'] ]
+ - name: PromoteToMaestroChannelId
+ value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.PromoteToMaestroChannelId'] ]
+ pool:
+ vmImage: 'windows-2019'
+ steps:
+ - task: PowerShell@2
+ displayName: Maestro Channels Consistency
+ inputs:
+ filePath: $(Build.SourcesDirectory)/eng/common/post-build/check-channel-consistency.ps1
+ arguments: -PromoteToChannels "$(InitialChannels)[$(PromoteToMaestroChannelId)]"
+ -AvailableChannelIds ${{parameters.NetEngLatestChannelId}},${{parameters.NetEngValidationChannelId}},${{parameters.NetCoreDev5ChannelId}},${{parameters.GeneralTestingChannelId}},${{parameters.NETCoreToolingDevChannelId}},${{parameters.NETCoreToolingReleaseChannelId}},${{parameters.NETInternalToolingChannelId}},${{parameters.NETCoreExperimentalChannelId}},${{parameters.NetEngServicesIntChannelId}},${{parameters.NetEngServicesProdChannelId}},${{parameters.Net5Preview1ChannelId}},${{parameters.Net5Preview2ChannelId}}
+
+ - job:
+ displayName: NuGet Validation
+ dependsOn: setupMaestroVars
+ condition: eq( ${{ parameters.enableNugetValidation }}, 'true')
+ pool:
+ vmImage: 'windows-2019'
+ variables:
+ - name: AzDOProjectName
+ value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.AzDOProjectName'] ]
+ - name: AzDOPipelineId
+ value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.AzDOPipelineId'] ]
+ - name: AzDOBuildId
+ value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.AzDOBuildId'] ]
+ steps:
+ - task: DownloadBuildArtifacts@0
+ displayName: Download Package Artifacts
+ inputs:
+ buildType: specific
+ buildVersionToDownload: specific
+ project: $(AzDOProjectName)
+ pipeline: $(AzDOPipelineId)
+ buildId: $(AzDOBuildId)
+ 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/
+
+ - job:
+ displayName: Signing Validation
+ dependsOn: setupMaestroVars
+ condition: eq( ${{ parameters.enableSigningValidation }}, 'true')
+ variables:
+ - template: common-variables.yml
+ - name: AzDOProjectName
+ value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.AzDOProjectName'] ]
+ - name: AzDOPipelineId
+ value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.AzDOPipelineId'] ]
+ - name: AzDOBuildId
+ value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.AzDOBuildId'] ]
+ pool:
+ vmImage: 'windows-2019'
+ steps:
+ - task: DownloadBuildArtifacts@0
+ displayName: Download Package Artifacts
+ inputs:
+ buildType: specific
+ buildVersionToDownload: specific
+ project: $(AzDOProjectName)
+ pipeline: $(AzDOPipelineId)
+ buildId: $(AzDOBuildId)
+ artifactName: PackageArtifacts
+
+ # This is necessary whenever we want to publish/restore to an AzDO private feed
+ # Since sdk-task.ps1 tries to restore packages we need to do this authentication here
+ # otherwise it'll complain about accessing a private feed.
+ - task: NuGetAuthenticate@0
+ displayName: 'Authenticate to AzDO Feeds'
+
+ - task: PowerShell@2
+ displayName: Enable cross-org publishing
+ inputs:
+ filePath: eng\common\enable-cross-org-publishing.ps1
+ arguments: -token $(dn-bot-dnceng-artifact-feeds-rw)
+
+ - task: PowerShell@2
+ displayName: Validate
+ inputs:
+ filePath: eng\common\sdk-task.ps1
+ arguments: -task SigningValidation -restore -msbuildEngine dotnet
+ /p:PackageBasePath='$(Build.ArtifactStagingDirectory)/PackageArtifacts'
+ /p:SignCheckExclusionsFile='$(Build.SourcesDirectory)/eng/SignCheckExclusionsFile.txt'
+ ${{ parameters.signingValidationAdditionalParameters }}
+
+ - template: ../steps/publish-logs.yml
+ parameters:
+ StageLabel: 'Validation'
+ JobLabel: 'Signing'
+
+ - job:
+ displayName: SourceLink Validation
+ dependsOn: setupMaestroVars
+ condition: eq( ${{ parameters.enableSourceLinkValidation }}, 'true')
+ variables:
+ - template: common-variables.yml
+ - name: AzDOProjectName
+ value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.AzDOProjectName'] ]
+ - name: AzDOPipelineId
+ value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.AzDOPipelineId'] ]
+ - name: AzDOBuildId
+ value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.AzDOBuildId'] ]
+ pool:
+ vmImage: 'windows-2019'
+ steps:
+ - task: DownloadBuildArtifacts@0
+ displayName: Download Blob Artifacts
+ inputs:
+ buildType: specific
+ buildVersionToDownload: specific
+ project: $(AzDOProjectName)
+ pipeline: $(AzDOPipelineId)
+ buildId: $(AzDOBuildId)
+ artifactName: BlobArtifacts
+
+ - task: PowerShell@2
+ displayName: Validate
+ inputs:
+ filePath: $(Build.SourcesDirectory)/eng/common/post-build/sourcelink-validation.ps1
+ arguments: -InputPath $(Build.ArtifactStagingDirectory)/BlobArtifacts/
+ -ExtractPath $(Agent.BuildDirectory)/Extract/
+ -GHRepoName $(Build.Repository.Name)
+ -GHCommit $(Build.SourceVersion)
+ -SourcelinkCliVersion $(SourceLinkCLIVersion)
+ continueOnError: true
+
+ - template: /eng/common/templates/job/execute-sdl.yml
+ parameters:
+ enable: ${{ parameters.SDLValidationParameters.enable }}
+ dependsOn: setupMaestroVars
+ additionalParameters: ${{ parameters.SDLValidationParameters.params }}
+ continueOnError: ${{ parameters.SDLValidationParameters.continueOnError }}
+ artifactNames: ${{ parameters.SDLValidationParameters.artifactNames }}
- template: \eng\common\templates\post-build\channels\generic-public-channel.yml
parameters:
artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }}
+ dependsOn: ${{ parameters.publishDependsOn }}
publishInstallersAndChecksums: ${{ parameters.publishInstallersAndChecksums }}
symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }}
stageName: 'NetCore_Dev5_Publish'
channelName: '.NET Core 5 Dev'
- channelId: 131
+ akaMSChannelName: 'net5/dev'
+ channelId: ${{ parameters.NetCoreDev5ChannelId }}
transportFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet5-transport/nuget/v3/index.json'
shippingFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet5/nuget/v3/index.json'
symbolsFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet5-symbols/nuget/v3/index.json'
@@ -118,47 +208,41 @@ stages:
- template: \eng\common\templates\post-build\channels\generic-public-channel.yml
parameters:
artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }}
+ dependsOn: ${{ parameters.publishDependsOn }}
publishInstallersAndChecksums: ${{ parameters.publishInstallersAndChecksums }}
symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }}
- stageName: 'NetCore_Dev31_Publish'
- channelName: '.NET Core 3.1 Dev'
- channelId: 128
- transportFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet3.1-transport/nuget/v3/index.json'
- shippingFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet3.1/nuget/v3/index.json'
- symbolsFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet3.1-symbols/nuget/v3/index.json'
-
-- template: \eng\common\templates\post-build\channels\generic-public-channel.yml
- parameters:
- artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }}
- publishInstallersAndChecksums: ${{ parameters.publishInstallersAndChecksums }}
- symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }}
- stageName: 'Net_Eng_Latest_Publish'
- channelName: '.NET Eng - Latest'
- channelId: 2
- transportFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json'
- shippingFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json'
- symbolsFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng-symbols/nuget/v3/index.json'
+ stageName: 'Net5_Preview1_Publish'
+ channelName: '.NET 5 Preview 1'
+ akaMSChannelName: 'net5/preview1'
+ channelId: ${{ parameters.Net5Preview1ChannelId }}
+ transportFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet5-transport/nuget/v3/index.json'
+ shippingFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet5/nuget/v3/index.json'
+ symbolsFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet5-symbols/nuget/v3/index.json'
- template: \eng\common\templates\post-build\channels\generic-public-channel.yml
parameters:
artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }}
+ dependsOn: ${{ parameters.publishDependsOn }}
publishInstallersAndChecksums: ${{ parameters.publishInstallersAndChecksums }}
symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }}
- stageName: 'Net_Eng_Validation_Publish'
- channelName: '.NET Eng - Validation'
- channelId: 9
- transportFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json'
- shippingFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json'
- symbolsFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng-symbols/nuget/v3/index.json'
+ stageName: 'Net5_Preview2_Publish'
+ channelName: '.NET 5 Preview 2'
+ akaMSChannelName: 'net5/preview2'
+ channelId: ${{ parameters.Net5Preview2ChannelId }}
+ transportFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet5-transport/nuget/v3/index.json'
+ shippingFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet5/nuget/v3/index.json'
+ symbolsFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet5-symbols/nuget/v3/index.json'
- template: \eng\common\templates\post-build\channels\generic-public-channel.yml
parameters:
artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }}
+ dependsOn: ${{ parameters.publishDependsOn }}
publishInstallersAndChecksums: ${{ parameters.publishInstallersAndChecksums }}
symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }}
- stageName: 'NetCore_3_Tools_Validation_Publish'
- channelName: '.NET 3 Tools - Validation'
- channelId: 390
+ stageName: 'Net_Eng_Latest_Publish'
+ channelName: '.NET Eng - Latest'
+ akaMSChannelName: 'eng/daily'
+ channelId: ${{ parameters.NetEngLatestChannelId }}
transportFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json'
shippingFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json'
symbolsFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng-symbols/nuget/v3/index.json'
@@ -166,11 +250,13 @@ stages:
- template: \eng\common\templates\post-build\channels\generic-public-channel.yml
parameters:
artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }}
+ dependsOn: ${{ parameters.publishDependsOn }}
publishInstallersAndChecksums: ${{ parameters.publishInstallersAndChecksums }}
symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }}
- stageName: 'NetCore_3_Tools_Publish'
- channelName: '.NET 3 Tools'
- channelId: 344
+ stageName: 'Net_Eng_Validation_Publish'
+ channelName: '.NET Eng - Validation'
+ akaMSChannelName: 'eng/validation'
+ channelId: ${{ parameters.NetEngValidationChannelId }}
transportFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json'
shippingFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json'
symbolsFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng-symbols/nuget/v3/index.json'
@@ -178,71 +264,13 @@ stages:
- template: \eng\common\templates\post-build\channels\generic-public-channel.yml
parameters:
artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }}
- publishInstallersAndChecksums: ${{ parameters.publishInstallersAndChecksums }}
- symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }}
- stageName: 'NetCore_Release30_Publish'
- channelName: '.NET Core 3.0 Release'
- channelId: 19
- transportFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet3-transport/nuget/v3/index.json'
- shippingFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet3/nuget/v3/index.json'
- symbolsFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet3-symbols/nuget/v3/index.json'
-
-- template: \eng\common\templates\post-build\channels\generic-public-channel.yml
- parameters:
- artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }}
- publishInstallersAndChecksums: ${{ parameters.publishInstallersAndChecksums }}
- symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }}
- stageName: 'NetCore_Release31_Publish'
- channelName: '.NET Core 3.1 Release'
- channelId: 129
- transportFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet3.1-transport/nuget/v3/index.json'
- shippingFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet3.1/nuget/v3/index.json'
- symbolsFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet3.1-symbols/nuget/v3/index.json'
-
-- template: \eng\common\templates\post-build\channels\generic-public-channel.yml
- parameters:
- artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }}
- publishInstallersAndChecksums: ${{ parameters.publishInstallersAndChecksums }}
- symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }}
- stageName: 'NetCore_Blazor31_Features_Publish'
- channelName: '.NET Core 3.1 Blazor Features'
- channelId: 531
- transportFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet3.1-blazor/nuget/v3/index.json'
- shippingFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet3.1-blazor/nuget/v3/index.json'
- symbolsFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet3.1-blazor-symbols/nuget/v3/index.json'
-
-- template: \eng\common\templates\post-build\channels\generic-internal-channel.yml
- parameters:
- artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }}
- publishInstallersAndChecksums: ${{ parameters.publishInstallersAndChecksums }}
- symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }}
- stageName: 'NetCore_30_Internal_Servicing_Publishing'
- channelName: '.NET Core 3.0 Internal Servicing'
- channelId: 184
- transportFeed: 'https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3-internal-transport/nuget/v3/index.json'
- shippingFeed: 'https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3-internal/nuget/v3/index.json'
- symbolsFeed: 'https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3-internal-symbols/nuget/v3/index.json'
-
-- template: \eng\common\templates\post-build\channels\generic-internal-channel.yml
- parameters:
- artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }}
- publishInstallersAndChecksums: ${{ parameters.publishInstallersAndChecksums }}
- symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }}
- stageName: 'NetCore_31_Internal_Servicing_Publishing'
- channelName: '.NET Core 3.1 Internal Servicing'
- channelId: 550
- transportFeed: 'https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3.1-internal-transport/nuget/v3/index.json'
- shippingFeed: 'https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3.1-internal/nuget/v3/index.json'
- symbolsFeed: 'https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3.1-internal-symbols/nuget/v3/index.json'
-
-- template: \eng\common\templates\post-build\channels\generic-public-channel.yml
- parameters:
- artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }}
+ dependsOn: ${{ parameters.publishDependsOn }}
publishInstallersAndChecksums: ${{ parameters.publishInstallersAndChecksums }}
symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }}
stageName: 'General_Testing_Publish'
channelName: 'General Testing'
- channelId: 529
+ akaMSChannelName: 'generaltesting'
+ channelId: ${{ parameters.GeneralTestingChannelId }}
transportFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/general-testing/nuget/v3/index.json'
shippingFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/general-testing/nuget/v3/index.json'
symbolsFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/general-testing-symbols/nuget/v3/index.json'
@@ -250,11 +278,12 @@ stages:
- template: \eng\common\templates\post-build\channels\generic-public-channel.yml
parameters:
artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }}
+ dependsOn: ${{ parameters.publishDependsOn }}
publishInstallersAndChecksums: ${{ parameters.publishInstallersAndChecksums }}
symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }}
stageName: 'NETCore_Tooling_Dev_Publishing'
channelName: '.NET Core Tooling Dev'
- channelId: 548
+ channelId: ${{ parameters.NETCoreToolingDevChannelId }}
transportFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json'
shippingFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json'
symbolsFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools-symbols/nuget/v3/index.json'
@@ -262,107 +291,64 @@ stages:
- template: \eng\common\templates\post-build\channels\generic-public-channel.yml
parameters:
artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }}
+ dependsOn: ${{ parameters.publishDependsOn }}
publishInstallersAndChecksums: ${{ parameters.publishInstallersAndChecksums }}
symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }}
stageName: 'NETCore_Tooling_Release_Publishing'
channelName: '.NET Core Tooling Release'
- channelId: 549
+ channelId: ${{ parameters.NETCoreToolingReleaseChannelId }}
transportFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json'
shippingFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json'
symbolsFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools-symbols/nuget/v3/index.json'
-- template: \eng\common\templates\post-build\channels\generic-public-channel.yml
- parameters:
- artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }}
- publishInstallersAndChecksums: ${{ parameters.publishInstallersAndChecksums }}
- symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }}
- stageName: 'NETCore_SDK_301xx_Publishing'
- channelName: '.NET Core SDK 3.0.1xx'
- channelId: 556
- transportFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet3-transport/nuget/v3/index.json'
- shippingFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet3/nuget/v3/index.json'
- symbolsFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet3-symbols/nuget/v3/index.json'
-
- template: \eng\common\templates\post-build\channels\generic-internal-channel.yml
parameters:
artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }}
+ dependsOn: ${{ parameters.publishDependsOn }}
publishInstallersAndChecksums: ${{ parameters.publishInstallersAndChecksums }}
symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }}
- stageName: 'NETCore_SDK_301xx_Internal_Publishing'
- channelName: '.NET Core SDK 3.0.1xx Internal'
- channelId: 555
- transportFeed: 'https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3-internal-transport/nuget/v3/index.json'
- shippingFeed: 'https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3-internal/nuget/v3/index.json'
- symbolsFeed: 'https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3-internal-symbols/nuget/v3/index.json'
+ stageName: 'NET_Internal_Tooling_Publishing'
+ channelName: '.NET Internal Tooling'
+ channelId: ${{ parameters.NETInternalToolingChannelId }}
+ transportFeed: 'https://pkgs.dev.azure.com/dnceng/internal/_packaging/dotnet-tools-internal/nuget/v3/index.json'
+ shippingFeed: 'https://pkgs.dev.azure.com/dnceng/internal/_packaging/dotnet-tools-internal/nuget/v3/index.json'
+ symbolsFeed: 'https://pkgs.dev.azure.com/dnceng/internal/_packaging/dotnet-tools-internal-symbols/nuget/v3/index.json'
- template: \eng\common\templates\post-build\channels\generic-public-channel.yml
parameters:
artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }}
+ dependsOn: ${{ parameters.publishDependsOn }}
publishInstallersAndChecksums: ${{ parameters.publishInstallersAndChecksums }}
symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }}
- stageName: 'NETCore_SDK_311xx_Publishing'
- channelName: '.NET Core SDK 3.1.1xx'
- channelId: 560
- transportFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet3.1-transport/nuget/v3/index.json'
- shippingFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet3.1/nuget/v3/index.json'
- symbolsFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet3.1-symbols/nuget/v3/index.json'
-
-- template: \eng\common\templates\post-build\channels\generic-internal-channel.yml
- parameters:
- artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }}
- publishInstallersAndChecksums: ${{ parameters.publishInstallersAndChecksums }}
- symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }}
- stageName: 'NETCore_SDK_311xx_Internal_Publishing'
- channelName: '.NET Core SDK 3.1.1xx Internal'
- channelId: 559
- transportFeed: 'https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3.1-internal-transport/nuget/v3/index.json'
- shippingFeed: 'https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3.1-internal/nuget/v3/index.json'
- symbolsFeed: 'https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3.1-internal-symbols/nuget/v3/index.json'
+ stageName: 'NETCore_Experimental_Publishing'
+ channelName: '.NET Core Experimental'
+ channelId: ${{ parameters.NETCoreExperimentalChannelId }}
+ transportFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-experimental/nuget/v3/index.json'
+ shippingFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-experimental/nuget/v3/index.json'
+ symbolsFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-experimental-symbols/nuget/v3/index.json'
- template: \eng\common\templates\post-build\channels\generic-public-channel.yml
parameters:
artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }}
+ dependsOn: ${{ parameters.publishDependsOn }}
publishInstallersAndChecksums: ${{ parameters.publishInstallersAndChecksums }}
symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }}
- stageName: 'NETCore_SDK_312xx_Publishing'
- channelName: '.NET Core SDK 3.1.2xx'
- channelId: 558
- transportFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet3.1-transport/nuget/v3/index.json'
- shippingFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet3.1/nuget/v3/index.json'
- symbolsFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet3.1-symbols/nuget/v3/index.json'
-
-- template: \eng\common\templates\post-build\channels\generic-internal-channel.yml
- parameters:
- artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }}
- publishInstallersAndChecksums: ${{ parameters.publishInstallersAndChecksums }}
- symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }}
- stageName: 'NETCore_SDK_312xx_Internal_Publishing'
- channelName: '.NET Core SDK 3.1.2xx Internal'
- channelId: 557
- transportFeed: 'https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3.1-internal-transport/nuget/v3/index.json'
- shippingFeed: 'https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3.1-internal/nuget/v3/index.json'
- symbolsFeed: 'https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3.1-internal-symbols/nuget/v3/index.json'
+ stageName: 'Net_Eng_Services_Int_Publish'
+ channelName: '.NET Eng Services - Int'
+ channelId: ${{ parameters.NetEngServicesIntChannelId }}
+ transportFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json'
+ shippingFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json'
+ symbolsFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng-symbols/nuget/v3/index.json'
- template: \eng\common\templates\post-build\channels\generic-public-channel.yml
parameters:
artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }}
+ dependsOn: ${{ parameters.publishDependsOn }}
publishInstallersAndChecksums: ${{ parameters.publishInstallersAndChecksums }}
symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }}
- stageName: 'NETCore_SDK_313xx_Publishing'
- channelName: '.NET Core SDK 3.1.3xx'
- channelId: 759
- transportFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet3.1-transport/nuget/v3/index.json'
- shippingFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet3.1/nuget/v3/index.json'
- symbolsFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet3.1-symbols/nuget/v3/index.json'
-
-- template: \eng\common\templates\post-build\channels\generic-internal-channel.yml
- parameters:
- artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }}
- publishInstallersAndChecksums: ${{ parameters.publishInstallersAndChecksums }}
- symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }}
- stageName: 'NETCore_SDK_313xx_Internal_Publishing'
- channelName: '.NET Core SDK 3.1.3xx Internal'
- channelId: 760
- transportFeed: 'https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3.1-internal-transport/nuget/v3/index.json'
- shippingFeed: 'https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3.1-internal/nuget/v3/index.json'
- symbolsFeed: 'https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3.1-internal-symbols/nuget/v3/index.json'
\ No newline at end of file
+ stageName: 'Net_Eng_Services_Prod_Publish'
+ channelName: '.NET Eng Services - Prod'
+ channelId: ${{ parameters.NetEngServicesProdChannelId }}
+ transportFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json'
+ shippingFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json'
+ symbolsFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng-symbols/nuget/v3/index.json'
diff --git a/eng/common/templates/post-build/promote-build.yml b/eng/common/templates/post-build/promote-build.yml
deleted file mode 100644
index 6b479c3b82a8..000000000000
--- a/eng/common/templates/post-build/promote-build.yml
+++ /dev/null
@@ -1,25 +0,0 @@
-parameters:
- ChannelId: 0
-
-jobs:
-- job:
- displayName: Promote Build
- dependsOn: setupMaestroVars
- condition: contains(dependencies.setupMaestroVars.outputs['setReleaseVars.InitialChannels'], format('[{0}]', ${{ parameters.ChannelId }}))
- variables:
- - name: BARBuildId
- value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.BARBuildId'] ]
- - name: ChannelId
- value: ${{ parameters.ChannelId }}
- pool:
- vmImage: 'windows-2019'
- steps:
- - task: PowerShell@2
- displayName: Add Build to Channel
- inputs:
- 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 56242b068e15..05e611edb68a 100644
--- a/eng/common/templates/post-build/setup-maestro-vars.yml
+++ b/eng/common/templates/post-build/setup-maestro-vars.yml
@@ -1,11 +1,20 @@
jobs:
- job: setupMaestroVars
displayName: Setup Maestro Vars
+ variables:
+ - template: common-variables.yml
+ - name: BuildId
+ value: $[ coalesce(variables.BARBuildId, 0) ]
+ - name: PromoteToChannelId
+ value: $[ coalesce(variables.PromoteToMaestroChannelId, 0) ]
pool:
vmImage: 'windows-2019'
steps:
+ - checkout: none
+
- task: DownloadBuildArtifacts@0
displayName: Download Release Configs
+ condition: eq(variables.PromoteToChannelId, 0)
inputs:
buildType: current
artifactName: ReleaseConfigs
@@ -14,5 +23,59 @@ jobs:
name: setReleaseVars
displayName: Set Release Configs Vars
inputs:
- filePath: $(Build.SourcesDirectory)/eng/common/post-build/setup-maestro-vars.ps1
- arguments: -ReleaseConfigsPath '$(Build.StagingDirectory)/ReleaseConfigs/ReleaseConfigs.txt'
+ targetType: inline
+ script: |
+ try {
+ if ($Env:PromoteToChannelId -eq 0) {
+ $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
+
+ $AzureDevOpsProject = $Env:System_TeamProject
+ $AzureDevOpsBuildDefinitionId = $Env:System_DefinitionId
+ $AzureDevOpsBuildId = $Env:Build_BuildId
+ $PromoteToMaestroChannelId = 0
+ }
+ else {
+ $buildApiEndpoint = "${Env:MaestroApiEndPoint}/api/builds/${Env:BARBuildId}?api-version=${Env:MaestroApiVersion}"
+
+ $apiHeaders = New-Object 'System.Collections.Generic.Dictionary[[String],[String]]'
+ $apiHeaders.Add('Accept', 'application/json')
+ $apiHeaders.Add('Authorization',"Bearer ${Env:MAESTRO_API_TOKEN}")
+
+ $buildInfo = try { Invoke-WebRequest -Method Get -Uri $buildApiEndpoint -Headers $apiHeaders | ConvertFrom-Json } catch { Write-Host "Error: $_" }
+
+ $BarId = $Env:BARBuildId
+ $Channels = 'None'
+
+ #TODO: Fix this once this issue is done: https://github.com/dotnet/arcade/issues/3834
+ $IsStableBuild = 'False'
+
+ $AzureDevOpsProject = $buildInfo.azureDevOpsProject
+ $AzureDevOpsBuildDefinitionId = $buildInfo.azureDevOpsBuildDefinitionId
+ $AzureDevOpsBuildId = $buildInfo.azureDevOpsBuildId
+ $PromoteToMaestroChannelId = $Env:PromoteToMaestroChannelId
+ }
+
+ Write-Host "##vso[task.setvariable variable=BARBuildId;isOutput=true]$BarId"
+ Write-Host "##vso[task.setvariable variable=InitialChannels;isOutput=true]$Channels"
+ Write-Host "##vso[task.setvariable variable=IsStableBuild;isOutput=true]$IsStableBuild"
+
+ Write-Host "##vso[task.setvariable variable=AzDOProjectName;isOutput=true]$AzureDevOpsProject"
+ Write-Host "##vso[task.setvariable variable=AzDOPipelineId;isOutput=true]$AzureDevOpsBuildDefinitionId"
+ Write-Host "##vso[task.setvariable variable=AzDOBuildId;isOutput=true]$AzureDevOpsBuildId"
+ Write-Host "##vso[task.setvariable variable=PromoteToMaestroChannelId;isOutput=true]$PromoteToMaestroChannelId"
+ }
+ catch {
+ Write-Host $_
+ Write-Host $_.Exception
+ Write-Host $_.ScriptStackTrace
+ exit 1
+ }
+ env:
+ MAESTRO_API_TOKEN: $(MaestroApiAccessToken)
diff --git a/eng/common/templates/steps/promote-build.yml b/eng/common/templates/steps/add-build-to-channel.yml
similarity index 68%
rename from eng/common/templates/steps/promote-build.yml
rename to eng/common/templates/steps/add-build-to-channel.yml
index b90404435dd7..f67a210d62f3 100644
--- a/eng/common/templates/steps/promote-build.yml
+++ b/eng/common/templates/steps/add-build-to-channel.yml
@@ -5,9 +5,9 @@ steps:
- task: PowerShell@2
displayName: Add Build to Channel
inputs:
- filePath: $(Build.SourcesDirectory)/eng/common/post-build/promote-build.ps1
+ filePath: $(Build.SourcesDirectory)/eng/common/post-build/add-build-to-channel.ps1
arguments: -BuildId $(BARBuildId)
-ChannelId ${{ parameters.ChannelId }}
-MaestroApiAccessToken $(MaestroApiAccessToken)
-MaestroApiEndPoint $(MaestroApiEndPoint)
- -MaestroApiVersion $(MaestroApiVersion)
+ -MaestroApiVersion $(MaestroApiVersion)
diff --git a/eng/common/templates/steps/publish-logs.yml b/eng/common/templates/steps/publish-logs.yml
new file mode 100644
index 000000000000..f91751fe78e1
--- /dev/null
+++ b/eng/common/templates/steps/publish-logs.yml
@@ -0,0 +1,23 @@
+parameters:
+ StageLabel: ''
+ JobLabel: ''
+
+steps:
+- task: Powershell@2
+ displayName: Prepare Binlogs to Upload
+ inputs:
+ targetType: inline
+ script: |
+ New-Item -ItemType Directory $(Build.SourcesDirectory)/PostBuildLogs/${{parameters.StageLabel}}/${{parameters.JobLabel}}/
+ Move-Item -Path $(Build.SourcesDirectory)/artifacts/log/Debug/* $(Build.SourcesDirectory)/PostBuildLogs/${{parameters.StageLabel}}/${{parameters.JobLabel}}/
+ continueOnError: true
+ condition: always()
+
+- task: PublishBuildArtifacts@1
+ displayName: Publish Logs
+ inputs:
+ PathtoPublish: '$(Build.SourcesDirectory)/PostBuildLogs'
+ PublishLocation: Container
+ ArtifactName: PostBuildLogs
+ continueOnError: true
+ condition: always()
diff --git a/eng/common/templates/steps/send-to-helix.yml b/eng/common/templates/steps/send-to-helix.yml
index 05df886f55f7..30becf01ea55 100644
--- a/eng/common/templates/steps/send-to-helix.yml
+++ b/eng/common/templates/steps/send-to-helix.yml
@@ -23,6 +23,7 @@ parameters:
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."
IsExternal: false # [DEPRECATED] -- doesn't do anything, jobs are external if HelixAccessToken is empty and Creator is set
+ HelixBaseUri: 'https://helix.dot.net/' # optional -- sets the Helix API base URI (allows targeting int)
Creator: '' # optional -- if the build is external, use this to specify who is sending the job
DisplayNamePrefix: 'Run Tests' # optional -- rename the beginning of the displayName of the steps in AzDO
condition: succeeded() # optional -- condition for step to execute; defaults to succeeded()
@@ -55,6 +56,7 @@ steps:
DotNetCliVersion: ${{ parameters.DotNetCliVersion }}
EnableXUnitReporter: ${{ parameters.EnableXUnitReporter }}
WaitForWorkItemCompletion: ${{ parameters.WaitForWorkItemCompletion }}
+ HelixBaseUri: ${{ parameters.HelixBaseUri }}
Creator: ${{ parameters.Creator }}
SYSTEM_ACCESSTOKEN: $(System.AccessToken)
condition: and(${{ parameters.condition }}, eq(variables['Agent.Os'], 'Windows_NT'))
@@ -85,6 +87,7 @@ steps:
DotNetCliVersion: ${{ parameters.DotNetCliVersion }}
EnableXUnitReporter: ${{ parameters.EnableXUnitReporter }}
WaitForWorkItemCompletion: ${{ parameters.WaitForWorkItemCompletion }}
+ HelixBaseUri: ${{ parameters.HelixBaseUri }}
Creator: ${{ parameters.Creator }}
SYSTEM_ACCESSTOKEN: $(System.AccessToken)
condition: and(${{ parameters.condition }}, ne(variables['Agent.Os'], 'Windows_NT'))
diff --git a/eng/common/tools.ps1 b/eng/common/tools.ps1
index 92a053bd16b4..60c1cd897587 100644
--- a/eng/common/tools.ps1
+++ b/eng/common/tools.ps1
@@ -5,7 +5,7 @@
[bool]$ci = if (Test-Path variable:ci) { $ci } else { $false }
# Build configuration. Common values include 'Debug' and 'Release', but the repository may use other names.
-[string]$configuration = if (Test-Path variable:configuration) { $configuration } else { "Debug" }
+[string]$configuration = if (Test-Path variable:configuration) { $configuration } else { 'Debug' }
# Set to true to output binary log from msbuild. Note that emitting binary log slows down the build.
# Binary log must be enabled on CI.
@@ -24,7 +24,7 @@
[bool]$restore = if (Test-Path variable:restore) { $restore } else { $true }
# Adjusts msbuild verbosity level.
-[string]$verbosity = if (Test-Path variable:verbosity) { $verbosity } else { "minimal" }
+[string]$verbosity = if (Test-Path variable:verbosity) { $verbosity } else { 'minimal' }
# Set to true to reuse msbuild nodes. Recommended to not reuse on CI.
[bool]$nodeReuse = if (Test-Path variable:nodeReuse) { $nodeReuse } else { !$ci }
@@ -41,21 +41,23 @@
# Enable repos to use a particular version of the on-line dotnet-install scripts.
# default URL: https://dot.net/v1/dotnet-install.ps1
-[string]$dotnetInstallScriptVersion = if (Test-Path variable:dotnetInstallScriptVersion) { $dotnetInstallScriptVersion } else { "v1" }
+[string]$dotnetInstallScriptVersion = if (Test-Path variable:dotnetInstallScriptVersion) { $dotnetInstallScriptVersion } else { 'v1' }
# True to use global NuGet cache instead of restoring packages to repository-local directory.
[bool]$useGlobalNuGetCache = if (Test-Path variable:useGlobalNuGetCache) { $useGlobalNuGetCache } else { !$ci }
# An array of names of processes to stop on script exit if prepareMachine is true.
-$processesToStopOnExit = if (Test-Path variable:processesToStopOnExit) { $processesToStopOnExit } else { @("msbuild", "dotnet", "vbcscompiler") }
+$processesToStopOnExit = if (Test-Path variable:processesToStopOnExit) { $processesToStopOnExit } else { @('msbuild', 'dotnet', 'vbcscompiler') }
+
+$disableConfigureToolsetImport = if (Test-Path variable:disableConfigureToolsetImport) { $disableConfigureToolsetImport } else { $null }
set-strictmode -version 2.0
-$ErrorActionPreference = "Stop"
+$ErrorActionPreference = 'Stop'
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
function Create-Directory([string[]] $path) {
if (!(Test-Path $path)) {
- New-Item -path $path -force -itemType "Directory" | Out-Null
+ New-Item -path $path -force -itemType 'Directory' | Out-Null
}
}
@@ -96,7 +98,10 @@ function Exec-Process([string]$command, [string]$commandArgs) {
}
}
-function InitializeDotNetCli([bool]$install) {
+# createSdkLocationFile parameter enables a file being generated under the toolset directory
+# which writes the sdk's location into. This is only necessary for cmd --> powershell invocations
+# as dot sourcing isn't possible.
+function InitializeDotNetCli([bool]$install, [bool]$createSdkLocationFile) {
if (Test-Path variable:global:_DotNetInstallDir) {
return $global:_DotNetInstallDir
}
@@ -119,7 +124,7 @@ function InitializeDotNetCli([bool]$install) {
# Find the first path on %PATH% that contains the dotnet.exe
if ($useInstalledDotNetCli -and (-not $globalJsonHasRuntimes) -and ($env:DOTNET_INSTALL_DIR -eq $null)) {
- $dotnetCmd = Get-Command "dotnet.exe" -ErrorAction SilentlyContinue
+ $dotnetCmd = Get-Command 'dotnet.exe' -ErrorAction SilentlyContinue
if ($dotnetCmd -ne $null) {
$env:DOTNET_INSTALL_DIR = Split-Path $dotnetCmd.Path -Parent
}
@@ -132,13 +137,13 @@ function InitializeDotNetCli([bool]$install) {
if ((-not $globalJsonHasRuntimes) -and ($env:DOTNET_INSTALL_DIR -ne $null) -and (Test-Path(Join-Path $env:DOTNET_INSTALL_DIR "sdk\$dotnetSdkVersion"))) {
$dotnetRoot = $env:DOTNET_INSTALL_DIR
} else {
- $dotnetRoot = Join-Path $RepoRoot ".dotnet"
+ $dotnetRoot = Join-Path $RepoRoot '.dotnet'
if (-not (Test-Path(Join-Path $dotnetRoot "sdk\$dotnetSdkVersion"))) {
if ($install) {
InstallDotNetSdk $dotnetRoot $dotnetSdkVersion
} else {
- Write-PipelineTelemetryError -Category "InitializeToolset" -Message "Unable to find dotnet with SDK version '$dotnetSdkVersion'"
+ Write-PipelineTelemetryError -Category 'InitializeToolset' -Message "Unable to find dotnet with SDK version '$dotnetSdkVersion'"
ExitWithExitCode 1
}
}
@@ -146,6 +151,24 @@ function InitializeDotNetCli([bool]$install) {
$env:DOTNET_INSTALL_DIR = $dotnetRoot
}
+ # Creates a temporary file under the toolset dir.
+ # The following code block is protecting against concurrent access so that this function can
+ # be called in parallel.
+ if ($createSdkLocationFile) {
+ do {
+ $sdkCacheFileTemp = Join-Path $ToolsetDir $([System.IO.Path]::GetRandomFileName())
+ }
+ until (!(Test-Path $sdkCacheFileTemp))
+ Set-Content -Path $sdkCacheFileTemp -Value $dotnetRoot
+
+ try {
+ Rename-Item -Force -Path $sdkCacheFileTemp 'sdk.txt'
+ } catch {
+ # Somebody beat us
+ Remove-Item -Path $sdkCacheFileTemp
+ }
+ }
+
# Add dotnet to PATH. This prevents any bare invocation of dotnet in custom
# build steps from using anything other than what we've downloaded.
# It also ensures that VS msbuild will use the downloaded sdk targets.
@@ -154,15 +177,6 @@ function InitializeDotNetCli([bool]$install) {
# Make Sure that our bootstrapped dotnet cli is available in future steps of the Azure Pipelines build
Write-PipelinePrependPath -Path $dotnetRoot
- # Work around issues with Azure Artifacts credential provider
- # https://github.com/dotnet/arcade/issues/3932
- if ($ci) {
- $env:NUGET_PLUGIN_HANDSHAKE_TIMEOUT_IN_SECONDS = 20
- $env:NUGET_PLUGIN_REQUEST_TIMEOUT_IN_SECONDS = 20
- Write-PipelineSetVariable -Name 'NUGET_PLUGIN_HANDSHAKE_TIMEOUT_IN_SECONDS' -Value '20'
- Write-PipelineSetVariable -Name 'NUGET_PLUGIN_REQUEST_TIMEOUT_IN_SECONDS' -Value '20'
- }
-
Write-PipelineSetVariable -Name 'DOTNET_MULTILEVEL_LOOKUP' -Value '0'
Write-PipelineSetVariable -Name 'DOTNET_SKIP_FIRST_TIME_EXPERIENCE' -Value '1'
@@ -170,27 +184,53 @@ function InitializeDotNetCli([bool]$install) {
}
function GetDotNetInstallScript([string] $dotnetRoot) {
- $installScript = Join-Path $dotnetRoot "dotnet-install.ps1"
+ $installScript = Join-Path $dotnetRoot 'dotnet-install.ps1'
if (!(Test-Path $installScript)) {
Create-Directory $dotnetRoot
$ProgressPreference = 'SilentlyContinue' # Don't display the console progress UI - it's a huge perf hit
- Invoke-WebRequest "https://dot.net/$dotnetInstallScriptVersion/dotnet-install.ps1" -OutFile $installScript
+
+ $maxRetries = 5
+ $retries = 1
+
+ $uri = "https://dot.net/$dotnetInstallScriptVersion/dotnet-install.ps1"
+
+ while($true) {
+ try {
+ Write-Host "GET $uri"
+ Invoke-WebRequest $uri -OutFile $installScript
+ break
+ }
+ catch {
+ Write-Host "Failed to download '$uri'"
+ Write-Error $_.Exception.Message -ErrorAction Continue
+ }
+
+ if (++$retries -le $maxRetries) {
+ $delayInSeconds = [math]::Pow(2, $retries) - 1 # Exponential backoff
+ Write-Host "Retrying. Waiting for $delayInSeconds seconds before next attempt ($retries of $maxRetries)."
+ Start-Sleep -Seconds $delayInSeconds
+ }
+ else {
+ throw "Unable to download file in $maxRetries attempts."
+ }
+
+ }
}
return $installScript
}
-function InstallDotNetSdk([string] $dotnetRoot, [string] $version, [string] $architecture = "") {
+function InstallDotNetSdk([string] $dotnetRoot, [string] $version, [string] $architecture = '') {
InstallDotNet $dotnetRoot $version $architecture
}
-function InstallDotNet([string] $dotnetRoot,
- [string] $version,
- [string] $architecture = "",
- [string] $runtime = "",
- [bool] $skipNonVersionedFiles = $false,
- [string] $runtimeSourceFeed = "",
- [string] $runtimeSourceFeedKey = "") {
+function InstallDotNet([string] $dotnetRoot,
+ [string] $version,
+ [string] $architecture = '',
+ [string] $runtime = '',
+ [bool] $skipNonVersionedFiles = $false,
+ [string] $runtimeSourceFeed = '',
+ [string] $runtimeSourceFeedKey = '') {
$installScript = GetDotNetInstallScript $dotnetRoot
$installParameters = @{
@@ -206,7 +246,7 @@ function InstallDotNet([string] $dotnetRoot,
& $installScript @installParameters
}
catch {
- Write-PipelineTelemetryError -Category "InitializeToolset" -Message "Failed to install dotnet runtime '$runtime' from public location."
+ Write-PipelineTelemetryError -Category 'InitializeToolset' -Message "Failed to install dotnet runtime '$runtime' from public location."
# Only the runtime can be installed from a custom [private] location.
if ($runtime -and ($runtimeSourceFeed -or $runtimeSourceFeedKey)) {
@@ -222,7 +262,7 @@ function InstallDotNet([string] $dotnetRoot,
& $installScript @installParameters
}
catch {
- Write-PipelineTelemetryError -Category "InitializeToolset" -Message "Failed to install dotnet runtime '$runtime' from custom location '$runtimeSourceFeed'."
+ Write-PipelineTelemetryError -Category 'InitializeToolset' -Message "Failed to install dotnet runtime '$runtime' from custom location '$runtimeSourceFeed'."
ExitWithExitCode 1
}
} else {
@@ -248,16 +288,16 @@ function InitializeVisualStudioMSBuild([bool]$install, [object]$vsRequirements =
}
if (!$vsRequirements) { $vsRequirements = $GlobalJson.tools.vs }
- $vsMinVersionStr = if ($vsRequirements.version) { $vsRequirements.version } else { "15.9" }
+ $vsMinVersionStr = if ($vsRequirements.version) { $vsRequirements.version } else { '15.9' }
$vsMinVersion = [Version]::new($vsMinVersionStr)
# Try msbuild command available in the environment.
if ($env:VSINSTALLDIR -ne $null) {
- $msbuildCmd = Get-Command "msbuild.exe" -ErrorAction SilentlyContinue
+ $msbuildCmd = Get-Command 'msbuild.exe' -ErrorAction SilentlyContinue
if ($msbuildCmd -ne $null) {
# Workaround for https://github.com/dotnet/roslyn/issues/35793
# Due to this issue $msbuildCmd.Version returns 0.0.0.0 for msbuild.exe 16.2+
- $msbuildVersion = [Version]::new((Get-Item $msbuildCmd.Path).VersionInfo.ProductVersion.Split(@('-', '+'))[0])
+ $msbuildVersion = [Version]::new((Get-Item $msbuildCmd.Path).VersionInfo.ProductVersion.Split([char[]]@('-', '+'))[0])
if ($msbuildVersion -ge $vsMinVersion) {
return $global:_MSBuildExe = $msbuildCmd.Path
@@ -277,7 +317,7 @@ function InitializeVisualStudioMSBuild([bool]$install, [object]$vsRequirements =
InitializeVisualStudioEnvironmentVariables $vsInstallDir $vsMajorVersion
} else {
- if (Get-Member -InputObject $GlobalJson.tools -Name "xcopy-msbuild") {
+ if (Get-Member -InputObject $GlobalJson.tools -Name 'xcopy-msbuild') {
$xcopyMSBuildVersion = $GlobalJson.tools.'xcopy-msbuild'
$vsMajorVersion = $xcopyMSBuildVersion.Split('.')[0]
} else {
@@ -285,9 +325,12 @@ function InitializeVisualStudioMSBuild([bool]$install, [object]$vsRequirements =
$xcopyMSBuildVersion = "$vsMajorVersion.$($vsMinVersion.Minor).0-alpha"
}
- $vsInstallDir = InitializeXCopyMSBuild $xcopyMSBuildVersion $install
+ $vsInstallDir = $null
+ if ($xcopyMSBuildVersion.Trim() -ine "none") {
+ $vsInstallDir = InitializeXCopyMSBuild $xcopyMSBuildVersion $install
+ }
if ($vsInstallDir -eq $null) {
- throw "Unable to find Visual Studio that has required version and components installed"
+ throw 'Unable to find Visual Studio that has required version and components installed'
}
}
@@ -311,7 +354,7 @@ function InstallXCopyMSBuild([string]$packageVersion) {
}
function InitializeXCopyMSBuild([string]$packageVersion, [bool]$install) {
- $packageName = "RoslynTools.MSBuild"
+ $packageName = 'RoslynTools.MSBuild'
$packageDir = Join-Path $ToolsDir "msbuild\$packageVersion"
$packagePath = Join-Path $packageDir "$packageName.$packageVersion.nupkg"
@@ -327,7 +370,7 @@ function InitializeXCopyMSBuild([string]$packageVersion, [bool]$install) {
Unzip $packagePath $packageDir
}
- return Join-Path $packageDir "tools"
+ return Join-Path $packageDir 'tools'
}
#
@@ -344,32 +387,37 @@ function InitializeXCopyMSBuild([string]$packageVersion, [bool]$install) {
# or $null if no instance meeting the requirements is found on the machine.
#
function LocateVisualStudio([object]$vsRequirements = $null){
- if (Get-Member -InputObject $GlobalJson.tools -Name "vswhere") {
+ if (Get-Member -InputObject $GlobalJson.tools -Name 'vswhere') {
$vswhereVersion = $GlobalJson.tools.vswhere
} else {
- $vswhereVersion = "2.5.2"
+ $vswhereVersion = '2.5.2'
}
$vsWhereDir = Join-Path $ToolsDir "vswhere\$vswhereVersion"
- $vsWhereExe = Join-Path $vsWhereDir "vswhere.exe"
+ $vsWhereExe = Join-Path $vsWhereDir 'vswhere.exe'
if (!(Test-Path $vsWhereExe)) {
Create-Directory $vsWhereDir
- Write-Host "Downloading vswhere"
- Invoke-WebRequest "https://github.com/Microsoft/vswhere/releases/download/$vswhereVersion/vswhere.exe" -OutFile $vswhereExe
+ Write-Host 'Downloading vswhere'
+ try {
+ Invoke-WebRequest "https://netcorenativeassets.blob.core.windows.net/resource-packages/external/windows/vswhere/$vswhereVersion/vswhere.exe" -OutFile $vswhereExe
+ }
+ catch {
+ Write-PipelineTelemetryError -Category 'InitializeToolset' -Message $_
+ }
}
if (!$vsRequirements) { $vsRequirements = $GlobalJson.tools.vs }
- $args = @("-latest", "-prerelease", "-format", "json", "-requires", "Microsoft.Component.MSBuild", "-products", "*")
+ $args = @('-latest', '-prerelease', '-format', 'json', '-requires', 'Microsoft.Component.MSBuild', '-products', '*')
- if (Get-Member -InputObject $vsRequirements -Name "version") {
- $args += "-version"
+ if (Get-Member -InputObject $vsRequirements -Name 'version') {
+ $args += '-version'
$args += $vsRequirements.version
}
- if (Get-Member -InputObject $vsRequirements -Name "components") {
+ if (Get-Member -InputObject $vsRequirements -Name 'components') {
foreach ($component in $vsRequirements.components) {
- $args += "-requires"
+ $args += '-requires'
$args += $component
}
}
@@ -395,27 +443,27 @@ function InitializeBuildTool() {
# Initialize dotnet cli if listed in 'tools'
$dotnetRoot = $null
- if (Get-Member -InputObject $GlobalJson.tools -Name "dotnet") {
+ if (Get-Member -InputObject $GlobalJson.tools -Name 'dotnet') {
$dotnetRoot = InitializeDotNetCli -install:$restore
}
- if ($msbuildEngine -eq "dotnet") {
+ if ($msbuildEngine -eq 'dotnet') {
if (!$dotnetRoot) {
- Write-PipelineTelemetryError -Category "InitializeToolset" -Message "/global.json must specify 'tools.dotnet'."
+ Write-PipelineTelemetryError -Category 'InitializeToolset' -Message "/global.json must specify 'tools.dotnet'."
ExitWithExitCode 1
}
- $buildTool = @{ Path = Join-Path $dotnetRoot "dotnet.exe"; Command = "msbuild"; Tool = "dotnet"; Framework = "netcoreapp2.1" }
+ $buildTool = @{ Path = Join-Path $dotnetRoot 'dotnet.exe'; Command = 'msbuild'; Tool = 'dotnet'; Framework = 'netcoreapp2.1' }
} elseif ($msbuildEngine -eq "vs") {
try {
$msbuildPath = InitializeVisualStudioMSBuild -install:$restore
} catch {
- Write-PipelineTelemetryError -Category "InitializeToolset" -Message $_
+ Write-PipelineTelemetryError -Category 'InitializeToolset' -Message $_
ExitWithExitCode 1
}
$buildTool = @{ Path = $msbuildPath; Command = ""; Tool = "vs"; Framework = "net472" }
} else {
- Write-PipelineTelemetryError -Category "InitializeToolset" -Message "Unexpected value of -msbuildEngine: '$msbuildEngine'."
+ Write-PipelineTelemetryError -Category 'InitializeToolset' -Message "Unexpected value of -msbuildEngine: '$msbuildEngine'."
ExitWithExitCode 1
}
@@ -424,15 +472,15 @@ function InitializeBuildTool() {
function GetDefaultMSBuildEngine() {
# Presence of tools.vs indicates the repo needs to build using VS msbuild on Windows.
- if (Get-Member -InputObject $GlobalJson.tools -Name "vs") {
- return "vs"
+ if (Get-Member -InputObject $GlobalJson.tools -Name 'vs') {
+ return 'vs'
}
- if (Get-Member -InputObject $GlobalJson.tools -Name "dotnet") {
- return "dotnet"
+ if (Get-Member -InputObject $GlobalJson.tools -Name 'dotnet') {
+ return 'dotnet'
}
- Write-PipelineTelemetryError -Category "InitializeToolset" -Message "-msbuildEngine must be specified, or /global.json must specify 'tools.dotnet' or 'tools.vs'."
+ Write-PipelineTelemetryError -Category 'InitializeToolset' -Message "-msbuildEngine must be specified, or /global.json must specify 'tools.dotnet' or 'tools.vs'."
ExitWithExitCode 1
}
@@ -441,9 +489,9 @@ function GetNuGetPackageCachePath() {
# Use local cache on CI to ensure deterministic build,
# use global cache in dev builds to avoid cost of downloading packages.
if ($useGlobalNuGetCache) {
- $env:NUGET_PACKAGES = Join-Path $env:UserProfile ".nuget\packages"
+ $env:NUGET_PACKAGES = Join-Path $env:UserProfile '.nuget\packages'
} else {
- $env:NUGET_PACKAGES = Join-Path $RepoRoot ".packages"
+ $env:NUGET_PACKAGES = Join-Path $RepoRoot '.packages'
}
}
@@ -456,7 +504,7 @@ function GetSdkTaskProject([string]$taskName) {
}
function InitializeNativeTools() {
- if (Get-Member -InputObject $GlobalJson -Name "native-tools") {
+ if (-Not (Test-Path variable:DisableNativeToolsetInstalls) -And (Get-Member -InputObject $GlobalJson -Name "native-tools")) {
$nativeArgs= @{}
if ($ci) {
$nativeArgs = @{
@@ -485,14 +533,14 @@ function InitializeToolset() {
}
if (-not $restore) {
- Write-PipelineTelemetryError -Category "InitializeToolset" -Message "Toolset version $toolsetVersion has not been restored."
+ Write-PipelineTelemetryError -Category 'InitializeToolset' -Message "Toolset version $toolsetVersion has not been restored."
ExitWithExitCode 1
}
$buildTool = InitializeBuildTool
- $proj = Join-Path $ToolsetDir "restore.proj"
- $bl = if ($binaryLog) { "/bl:" + (Join-Path $LogDir "ToolsetRestore.binlog") } else { "" }
+ $proj = Join-Path $ToolsetDir 'restore.proj'
+ $bl = if ($binaryLog) { '/bl:' + (Join-Path $LogDir 'ToolsetRestore.binlog') } else { '' }
' ' | Set-Content $proj
@@ -514,7 +562,7 @@ function ExitWithExitCode([int] $exitCode) {
}
function Stop-Processes() {
- Write-Host "Killing running build processes..."
+ Write-Host 'Killing running build processes...'
foreach ($processName in $processesToStopOnExit) {
Get-Process -Name $processName -ErrorAction SilentlyContinue | Stop-Process
}
@@ -531,13 +579,18 @@ function MSBuild() {
# Work around issues with Azure Artifacts credential provider
# https://github.com/dotnet/arcade/issues/3932
- if ($ci -and $buildTool.Tool -eq "dotnet") {
+ if ($ci -and $buildTool.Tool -eq 'dotnet') {
dotnet nuget locals http-cache -c
+
+ $env:NUGET_PLUGIN_HANDSHAKE_TIMEOUT_IN_SECONDS = 20
+ $env:NUGET_PLUGIN_REQUEST_TIMEOUT_IN_SECONDS = 20
+ Write-PipelineSetVariable -Name 'NUGET_PLUGIN_HANDSHAKE_TIMEOUT_IN_SECONDS' -Value '20'
+ Write-PipelineSetVariable -Name 'NUGET_PLUGIN_REQUEST_TIMEOUT_IN_SECONDS' -Value '20'
}
$toolsetBuildProject = InitializeToolset
$path = Split-Path -parent $toolsetBuildProject
- $path = Join-Path $path (Join-Path $buildTool.Framework "Microsoft.DotNet.Arcade.Sdk.dll")
+ $path = Join-Path $path (Join-Path $buildTool.Framework 'Microsoft.DotNet.Arcade.Sdk.dll')
$args += "/logger:$path"
}
@@ -552,12 +605,12 @@ function MSBuild() {
function MSBuild-Core() {
if ($ci) {
if (!$binaryLog) {
- Write-PipelineTaskError -Message "Binary log must be enabled in CI build."
+ Write-PipelineTelemetryError -Category 'Build' -Message 'Binary log must be enabled in CI build.'
ExitWithExitCode 1
}
if ($nodeReuse) {
- Write-PipelineTaskError -Message "Node reuse must be disabled in CI build."
+ Write-PipelineTelemetryError -Category 'Build' -Message 'Node reuse must be disabled in CI build.'
ExitWithExitCode 1
}
}
@@ -567,10 +620,10 @@ function MSBuild-Core() {
$cmdArgs = "$($buildTool.Command) /m /nologo /clp:Summary /v:$verbosity /nr:$nodeReuse /p:ContinuousIntegrationBuild=$ci"
if ($warnAsError) {
- $cmdArgs += " /warnaserror /p:TreatWarningsAsErrors=true"
+ $cmdArgs += ' /warnaserror /p:TreatWarningsAsErrors=true'
}
else {
- $cmdArgs += " /p:TreatWarningsAsErrors=false"
+ $cmdArgs += ' /p:TreatWarningsAsErrors=false'
}
foreach ($arg in $args) {
@@ -582,7 +635,7 @@ function MSBuild-Core() {
$exitCode = Exec-Process $buildTool.Path $cmdArgs
if ($exitCode -ne 0) {
- Write-PipelineTaskError -Message "Build failed."
+ Write-PipelineTelemetryError -Category 'Build' -Message 'Build failed.'
$buildLog = GetMSBuildBinaryLogCommandLineArgument $args
if ($buildLog -ne $null) {
@@ -597,12 +650,12 @@ function GetMSBuildBinaryLogCommandLineArgument($arguments) {
foreach ($argument in $arguments) {
if ($argument -ne $null) {
$arg = $argument.Trim()
- if ($arg.StartsWith("/bl:", "OrdinalIgnoreCase")) {
- return $arg.Substring("/bl:".Length)
+ if ($arg.StartsWith('/bl:', "OrdinalIgnoreCase")) {
+ return $arg.Substring('/bl:'.Length)
}
- if ($arg.StartsWith("/binaryLogger:", "OrdinalIgnoreCase")) {
- return $arg.Substring("/binaryLogger:".Length)
+ if ($arg.StartsWith('/binaryLogger:', 'OrdinalIgnoreCase')) {
+ return $arg.Substring('/binaryLogger:'.Length)
}
}
}
@@ -612,14 +665,14 @@ function GetMSBuildBinaryLogCommandLineArgument($arguments) {
. $PSScriptRoot\pipeline-logging-functions.ps1
-$RepoRoot = Resolve-Path (Join-Path $PSScriptRoot "..\..")
-$EngRoot = Resolve-Path (Join-Path $PSScriptRoot "..")
-$ArtifactsDir = Join-Path $RepoRoot "artifacts"
-$ToolsetDir = Join-Path $ArtifactsDir "toolset"
-$ToolsDir = Join-Path $RepoRoot ".tools"
-$LogDir = Join-Path (Join-Path $ArtifactsDir "log") $configuration
-$TempDir = Join-Path (Join-Path $ArtifactsDir "tmp") $configuration
-$GlobalJson = Get-Content -Raw -Path (Join-Path $RepoRoot "global.json") | ConvertFrom-Json
+$RepoRoot = Resolve-Path (Join-Path $PSScriptRoot '..\..')
+$EngRoot = Resolve-Path (Join-Path $PSScriptRoot '..')
+$ArtifactsDir = Join-Path $RepoRoot 'artifacts'
+$ToolsetDir = Join-Path $ArtifactsDir 'toolset'
+$ToolsDir = Join-Path $RepoRoot '.tools'
+$LogDir = Join-Path (Join-Path $ArtifactsDir 'log') $configuration
+$TempDir = Join-Path (Join-Path $ArtifactsDir 'tmp') $configuration
+$GlobalJson = Get-Content -Raw -Path (Join-Path $RepoRoot 'global.json') | ConvertFrom-Json
# true if global.json contains a "runtimes" section
$globalJsonHasRuntimes = if ($GlobalJson.tools.PSObject.Properties.Name -Match 'runtimes') { $true } else { $false }
@@ -632,3 +685,18 @@ Write-PipelineSetVariable -Name 'Artifacts.Toolset' -Value $ToolsetDir
Write-PipelineSetVariable -Name 'Artifacts.Log' -Value $LogDir
Write-PipelineSetVariable -Name 'TEMP' -Value $TempDir
Write-PipelineSetVariable -Name 'TMP' -Value $TempDir
+
+# Import custom tools configuration, if present in the repo.
+# Note: Import in global scope so that the script set top-level variables without qualification.
+if (!$disableConfigureToolsetImport) {
+ $configureToolsetScript = Join-Path $EngRoot 'configure-toolset.ps1'
+ if (Test-Path $configureToolsetScript) {
+ . $configureToolsetScript
+ if ((Test-Path variable:failOnConfigureToolsetError) -And $failOnConfigureToolsetError) {
+ if ((Test-Path variable:LastExitCode) -And ($LastExitCode -ne 0)) {
+ Write-PipelineTelemetryError -Category 'Build' -Message 'configure-toolset.ps1 returned a non-zero exit code'
+ ExitWithExitCode $LastExitCode
+ }
+ }
+ }
+}
diff --git a/eng/common/tools.sh b/eng/common/tools.sh
index 94965a8fd2a9..664ac1055bd0 100755
--- a/eng/common/tools.sh
+++ b/eng/common/tools.sh
@@ -41,7 +41,7 @@ fi
# Configures warning treatment in msbuild.
warn_as_error=${warn_as_error:-true}
-# True to attempt using .NET Core already that meets requirements specified in global.json
+# True to attempt using .NET Core already that meets requirements specified in global.json
# installed on the machine instead of downloading one.
use_installed_dotnet_cli=${use_installed_dotnet_cli:-true}
@@ -81,7 +81,7 @@ function ReadGlobalVersion {
local pattern="\"$key\" *: *\"(.*)\""
if [[ ! $line =~ $pattern ]]; then
- Write-PipelineTelemetryError -category 'InitializeToolset' "Error: Cannot find \"$key\" in $global_json_file"
+ Write-PipelineTelemetryError -category 'Build' "Error: Cannot find \"$key\" in $global_json_file"
ExitWithExitCode 1
fi
@@ -152,15 +152,6 @@ function InitializeDotNetCli {
# build steps from using anything other than what we've downloaded.
Write-PipelinePrependPath -path "$dotnet_root"
- # Work around issues with Azure Artifacts credential provider
- # https://github.com/dotnet/arcade/issues/3932
- if [[ "$ci" == true ]]; then
- export NUGET_PLUGIN_HANDSHAKE_TIMEOUT_IN_SECONDS=20
- export NUGET_PLUGIN_REQUEST_TIMEOUT_IN_SECONDS=20
- Write-PipelineSetVariable -name "NUGET_PLUGIN_HANDSHAKE_TIMEOUT_IN_SECONDS" -value "20"
- Write-PipelineSetVariable -name "NUGET_PLUGIN_REQUEST_TIMEOUT_IN_SECONDS" -value "20"
- fi
-
Write-PipelineSetVariable -name "DOTNET_MULTILEVEL_LOOKUP" -value "0"
Write-PipelineSetVariable -name "DOTNET_SKIP_FIRST_TIME_EXPERIENCE" -value "1"
@@ -181,7 +172,7 @@ function InstallDotNetSdk {
function InstallDotNet {
local root=$1
local version=$2
-
+
GetDotNetInstallScript "$root"
local install_script=$_GetDotNetInstallScript
@@ -227,6 +218,28 @@ function InstallDotNet {
}
}
+function with_retries {
+ local maxRetries=5
+ local retries=1
+ echo "Trying to run '$@' for maximum of $maxRetries attempts."
+ while [[ $((retries++)) -le $maxRetries ]]; do
+ "$@"
+
+ if [[ $? == 0 ]]; then
+ echo "Ran '$@' successfully."
+ return 0
+ fi
+
+ timeout=$((2**$retries-1))
+ echo "Failed to execute '$@'. Waiting $timeout seconds before next attempt ($retries out of $maxRetries)." 1>&2
+ sleep $timeout
+ done
+
+ echo "Failed to execute '$@' for $maxRetries times." 1>&2
+
+ return 1
+}
+
function GetDotNetInstallScript {
local root=$1
local install_script="$root/dotnet-install.sh"
@@ -239,13 +252,13 @@ function GetDotNetInstallScript {
# Use curl if available, otherwise use wget
if command -v curl > /dev/null; then
- curl "$install_script_url" -sSL --retry 10 --create-dirs -o "$install_script" || {
+ with_retries curl "$install_script_url" -sSL --retry 10 --create-dirs -o "$install_script" || {
local exit_code=$?
Write-PipelineTelemetryError -category 'InitializeToolset' "Failed to acquire dotnet install script (exit code '$exit_code')."
ExitWithExitCode $exit_code
}
- else
- wget -q -O "$install_script" "$install_script_url" || {
+ else
+ with_retries wget -v -O "$install_script" "$install_script_url" || {
local exit_code=$?
Write-PipelineTelemetryError -category 'InitializeToolset' "Failed to acquire dotnet install script (exit code '$exit_code')."
ExitWithExitCode $exit_code
@@ -260,11 +273,11 @@ function InitializeBuildTool {
if [[ -n "${_InitializeBuildTool:-}" ]]; then
return
fi
-
+
InitializeDotNetCli $restore
# return values
- _InitializeBuildTool="$_InitializeDotNetCli/dotnet"
+ _InitializeBuildTool="$_InitializeDotNetCli/dotnet"
_InitializeBuildToolCommand="msbuild"
_InitializeBuildToolFramework="netcoreapp2.1"
}
@@ -283,6 +296,9 @@ function GetNuGetPackageCachePath {
}
function InitializeNativeTools() {
+ if [[ -n "${DisableNativeToolsetInstalls:-}" ]]; then
+ return
+ fi
if grep -Fq "native-tools" $global_json_file
then
local nativeArgs=""
@@ -325,14 +341,14 @@ function InitializeToolset {
if [[ "$binary_log" == true ]]; then
bl="/bl:$log_dir/ToolsetRestore.binlog"
fi
-
+
echo ' ' > "$proj"
MSBuild-Core "$proj" $bl /t:__WriteToolsetLocation /clp:ErrorsOnly\;NoSummary /p:__ToolsetLocationOutputFile="$toolset_location_file"
local toolset_build_proj=`cat "$toolset_location_file"`
if [[ ! -a "$toolset_build_proj" ]]; then
- Write-PipelineTelemetryError -category 'InitializeToolset' "Invalid toolset path: $toolset_build_proj"
+ Write-PipelineTelemetryError -category 'Build' "Invalid toolset path: $toolset_build_proj"
ExitWithExitCode 3
fi
@@ -363,7 +379,12 @@ function MSBuild {
# Work around issues with Azure Artifacts credential provider
# https://github.com/dotnet/arcade/issues/3932
if [[ "$ci" == true ]]; then
- dotnet nuget locals http-cache -c
+ "$_InitializeBuildTool" nuget locals http-cache -c
+
+ export NUGET_PLUGIN_HANDSHAKE_TIMEOUT_IN_SECONDS=20
+ export NUGET_PLUGIN_REQUEST_TIMEOUT_IN_SECONDS=20
+ Write-PipelineSetVariable -name "NUGET_PLUGIN_HANDSHAKE_TIMEOUT_IN_SECONDS" -value "20"
+ Write-PipelineSetVariable -name "NUGET_PLUGIN_REQUEST_TIMEOUT_IN_SECONDS" -value "20"
fi
local toolset_dir="${_InitializeToolset%/*}"
@@ -377,12 +398,12 @@ function MSBuild {
function MSBuild-Core {
if [[ "$ci" == true ]]; then
if [[ "$binary_log" != true ]]; then
- Write-PipelineTaskError "Binary log must be enabled in CI build."
+ Write-PipelineTelemetryError -category 'Build' "Binary log must be enabled in CI build."
ExitWithExitCode 1
fi
if [[ "$node_reuse" == true ]]; then
- Write-PipelineTaskError "Node reuse must be disabled in CI build."
+ Write-PipelineTelemetryError -category 'Build' "Node reuse must be disabled in CI build."
ExitWithExitCode 1
fi
fi
@@ -396,7 +417,7 @@ function MSBuild-Core {
"$_InitializeBuildTool" "$_InitializeBuildToolCommand" /m /nologo /clp:Summary /v:$verbosity /nr:$node_reuse $warnaserror_switch /p:TreatWarningsAsErrors=$warn_as_error /p:ContinuousIntegrationBuild=$ci "$@" || {
local exit_code=$?
- Write-PipelineTaskError "Build failed (exit code '$exit_code')."
+ Write-PipelineTelemetryError -category 'Build' "Build failed (exit code '$exit_code')."
ExitWithExitCode $exit_code
}
}
@@ -437,3 +458,18 @@ 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"
+
+# Import custom tools configuration, if present in the repo.
+if [ -z "${disable_configure_toolset_import:-}" ]; then
+ configure_toolset_script="$eng_root/configure-toolset.sh"
+ if [[ -a "$configure_toolset_script" ]]; then
+ . "$configure_toolset_script"
+ fi
+fi
+
+# TODO: https://github.com/dotnet/arcade/issues/1468
+# Temporary workaround to avoid breaking change.
+# Remove once repos are updated.
+if [[ -n "${useInstalledDotNetCli:-}" ]]; then
+ use_installed_dotnet_cli="$useInstalledDotNetCli"
+fi
diff --git a/eng/helix/content/InstallAppRuntime.ps1 b/eng/helix/content/InstallAppRuntime.ps1
new file mode 100644
index 000000000000..9d9aaffb5c80
--- /dev/null
+++ b/eng/helix/content/InstallAppRuntime.ps1
@@ -0,0 +1,54 @@
+ <#
+ .SYNOPSIS
+ Installs an AspNetCore shared framework on a machine
+ .DESCRIPTION
+ This script installs an AspNetCore shared framework on a machine
+ .PARAMETER AppRuntimePath
+ The path to the app runtime package to install.
+ .PARAMETER InstallDir
+ The directory to install the shared framework to.
+ .PARAMETER Framework
+ The framework directory to copy the shared framework from.
+ .PARAMETER RuntimeIdentifier
+ The runtime identifier for the shared framework.
+ #>
+param(
+ [Parameter(Mandatory = $true)]
+ $AppRuntimePath,
+
+ [Parameter(Mandatory = $true)]
+ $InstallDir,
+
+ [Parameter(Mandatory = $true)]
+ $Framework,
+
+ [Parameter(Mandatory = $true)]
+ $RuntimeIdentifier)
+
+$ErrorActionPreference = 'Stop'
+$ProgressPreference = 'SilentlyContinue' # Workaround PowerShell/PowerShell#2138
+
+Set-StrictMode -Version 1
+
+Write-Host "Extracting to $InstallDir"
+
+$zipPackage = [io.path]::ChangeExtension($AppRuntimePath, ".zip")
+Write-Host "Renaming to $zipPackage"
+Rename-Item -Path $AppRuntimePath -NewName $zipPackage
+if (Get-Command -Name 'Microsoft.PowerShell.Archive\Expand-Archive' -ErrorAction Ignore) {
+ # Use built-in commands where possible as they are cross-plat compatible
+ Microsoft.PowerShell.Archive\Expand-Archive -Path $zipPackage -DestinationPath ".\tmpRuntime" -Force
+}
+else {
+ Remove-Item ".\tmpRuntime" -Recurse -ErrorAction Ignore
+ # Fallback to old approach for old installations of PowerShell
+ Add-Type -AssemblyName System.IO.Compression.FileSystem
+ [System.IO.Compression.ZipFile]::ExtractToDirectory($zipPackage, ".\tmpRuntime")
+}
+
+Get-ChildItem -Path ".\tmpRuntime" -Recurse
+
+Write-Host "Copying managed files to $InstallDir"
+Copy-Item -Path ".\tmpRuntime\runtimes\$RuntimeIdentifier\lib\$Framework\*" $InstallDir
+Write-Host "Copying native files to $InstallDir"
+Copy-Item -Path ".\tmpRuntime\runtimes\$RuntimeIdentifier\native\*" $InstallDir
diff --git a/eng/helix/content/InstallJdk.ps1 b/eng/helix/content/InstallJdk.ps1
new file mode 100644
index 000000000000..a9346062fad6
--- /dev/null
+++ b/eng/helix/content/InstallJdk.ps1
@@ -0,0 +1,62 @@
+<#
+.SYNOPSIS
+ Installs JDK into a folder in this repo.
+.DESCRIPTION
+ This script downloads an extracts the JDK.
+.PARAMETER JdkVersion
+ The version of the JDK to install. If not set, the default value is read from global.json
+.PARAMETER Force
+ Overwrite the existing installation
+#>
+param(
+ [string]$JdkVersion,
+ [Parameter(Mandatory = $false)]
+ $InstallDir
+)
+$ErrorActionPreference = 'Stop'
+$ProgressPreference = 'SilentlyContinue' # Workaround PowerShell/PowerShell#2138
+
+Set-StrictMode -Version 1
+
+if ($InstallDir) {
+ $installDir = $InstallDir;
+}
+else {
+ $repoRoot = Resolve-Path "$PSScriptRoot\..\.."
+ $installDir = "$repoRoot\.tools\jdk\win-x64\"
+}
+$tempDir = "$installDir\obj"
+if (-not $JdkVersion) {
+ $globalJson = Get-Content "$repoRoot\global.json" | ConvertFrom-Json
+ $JdkVersion = $globalJson.tools.jdk
+}
+
+if (Test-Path $installDir) {
+ if ($Force) {
+ Remove-Item -Force -Recurse $installDir
+ }
+ else {
+ Write-Host "The JDK already installed to $installDir. Exiting without action. Call this script again with -Force to overwrite."
+ exit 0
+ }
+}
+
+Remove-Item -Force -Recurse $tempDir -ErrorAction Ignore | out-null
+mkdir $tempDir -ea Ignore | out-null
+mkdir $installDir -ea Ignore | out-null
+Write-Host "Starting download of JDK ${JdkVersion}"
+Invoke-WebRequest -UseBasicParsing -Uri "https://netcorenativeassets.blob.core.windows.net/resource-packages/external/windows/java/jdk-${JdkVersion}_windows-x64_bin.zip" -OutFile "$tempDir/jdk.zip"
+Write-Host "Done downloading JDK ${JdkVersion}"
+
+Add-Type -assembly "System.IO.Compression.FileSystem"
+[System.IO.Compression.ZipFile]::ExtractToDirectory("$tempDir/jdk.zip", "$tempDir/jdk/")
+
+Write-Host "Expanded JDK to $tempDir"
+Write-Host "Installing JDK to $installDir"
+Move-Item "$tempDir/jdk/jdk-${JdkVersion}/*" $installDir
+Write-Host "Done installing JDK to $installDir"
+Remove-Item -Force -Recurse $tempDir -ErrorAction Ignore | out-null
+
+if ($env:TF_BUILD) {
+ Write-Host "##vso[task.prependpath]$installDir\bin"
+}
diff --git a/eng/helix/content/InstallNode.ps1 b/eng/helix/content/InstallNode.ps1
index 862e61258267..3754eee5f556 100644
--- a/eng/helix/content/InstallNode.ps1
+++ b/eng/helix/content/InstallNode.ps1
@@ -29,9 +29,9 @@ if (Get-Command "node.exe" -ErrorAction SilentlyContinue)
exit
}
-if (Test-Path "$output_dir\node.exe")
+if (Test-Path "$InstallDir\node.exe")
{
- Write-Host "Node.exe found at $output_dir"
+ Write-Host "Node.exe found at $InstallDir"
exit
}
@@ -48,9 +48,10 @@ Write-Host "Extracting to $tempDir"
if (Get-Command -Name 'Microsoft.PowerShell.Archive\Expand-Archive' -ErrorAction Ignore) {
# Use built-in commands where possible as they are cross-plat compatible
- Microsoft.PowerShell.Archive\Expand-Archive -Path "nodejs.zip" -DestinationPath $tempDir
+ Microsoft.PowerShell.Archive\Expand-Archive -Path "nodejs.zip" -DestinationPath $tempDir -Force
}
else {
+ Remove-Item $tempDir -Recurse -ErrorAction Ignore
# Fallback to old approach for old installations of PowerShell
Add-Type -AssemblyName System.IO.Compression.FileSystem
[System.IO.Compression.ZipFile]::ExtractToDirectory("nodejs.zip", $tempDir)
diff --git a/eng/helix/content/default.runner.json b/eng/helix/content/default.runner.json
new file mode 100644
index 000000000000..ac621e1a5d45
--- /dev/null
+++ b/eng/helix/content/default.runner.json
@@ -0,0 +1,4 @@
+{
+ "longRunningTestSeconds": 60,
+ "diagnosticMessages": true
+}
diff --git a/eng/helix/content/installappruntime.sh b/eng/helix/content/installappruntime.sh
new file mode 100644
index 000000000000..45cb1554fab3
--- /dev/null
+++ b/eng/helix/content/installappruntime.sh
@@ -0,0 +1,20 @@
+#!/usr/bin/env bash
+
+# Cause the script to fail if any subcommand fails
+set -e
+
+appRuntimePath=$1
+output_dir=$2
+framework=$3
+rid=$4
+tmpDir=./tmpRuntime
+
+echo "Installing shared framework from $appRuntimePath"
+cp $appRuntimePath sharedFx.zip
+
+mkdir -p $tmpDir
+unzip sharedFx.zip -d $tmpDir
+mkdir -p $output_dir
+echo "Copying to $output_dir"
+cp $tmpDir/runtimes/$rid/lib/$framework/* $output_dir
+cp $tmpDir/runtimes/$rid/native/* $output_dir
diff --git a/eng/helix/content/installjdk.sh b/eng/helix/content/installjdk.sh
new file mode 100644
index 000000000000..6c1c2ff5c673
--- /dev/null
+++ b/eng/helix/content/installjdk.sh
@@ -0,0 +1,46 @@
+#!/usr/bin/env bash
+
+# Cause the script to fail if any subcommand fails
+set -e
+
+pushd .
+
+if [ "$JAVA_HOME" != "" ]; then
+ echo "JAVA_HOME is set"
+ exit
+fi
+
+java_version=$1
+arch=$2
+osname=`uname -s`
+if [ "$osname" = "Darwin" ]; then
+ echo "macOS not supported, relying on the machine providing java itself"
+ exit 1
+else
+ platformarch="linux-$arch"
+fi
+echo "PlatformArch: $platformarch"
+DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
+output_dir="$DIR/java"
+url="https://netcorenativeassets.blob.core.windows.net/resource-packages/external/linux/java/jdk-${java_version}_${platformarch}_bin.tar.gz"
+echo "Downloading from: $url"
+tmp="$(mktemp -d -t install-jdk.XXXXXX)"
+
+cleanup() {
+ exitcode=$?
+ if [ $exitcode -ne 0 ]; then
+ echo "Failed to install java with exit code: $exitcode"
+ fi
+ rm -rf "$tmp"
+ exit $exitcode
+}
+
+trap "cleanup" EXIT
+cd "$tmp"
+curl -Lsfo $(basename $url) "$url"
+echo "Installing java from $(basename $url) $url"
+mkdir $output_dir
+echo "Unpacking to $output_dir"
+tar --strip-components 1 -xzf "jdk-${java_version}_${platformarch}_bin.tar.gz" --no-same-owner --directory "$output_dir"
+
+popd
\ No newline at end of file
diff --git a/eng/helix/content/installnode.sh b/eng/helix/content/installnode.sh
index 0442958ac2f6..db5d2fa5a532 100644
--- a/eng/helix/content/installnode.sh
+++ b/eng/helix/content/installnode.sh
@@ -22,7 +22,17 @@ output_dir="$DIR/node"
url="http://nodejs.org/dist/v$node_version/node-v$node_version-$platformarch.tar.gz"
echo "Downloading from: $url"
tmp="$(mktemp -d -t install-node.XXXXXX)"
-trap "rm -rf $tmp" EXIT
+
+cleanup() {
+ exitcode=$?
+ if [ $exitcode -ne 0 ]; then
+ echo "Failed to install node with exit code: $exitcode"
+ fi
+ rm -rf "$tmp"
+ exit $exitcode
+}
+
+trap "cleanup" EXIT
cd "$tmp"
curl -Lsfo $(basename $url) "$url"
echo "Installing node from $(basename $url) $url"
diff --git a/eng/helix/content/runtests.cmd b/eng/helix/content/runtests.cmd
index 935b23647d89..6dec0880d552 100644
--- a/eng/helix/content/runtests.cmd
+++ b/eng/helix/content/runtests.cmd
@@ -1,33 +1,62 @@
@echo off
-REM Disable "!Foo!" expansions because they break the filter syntax
-setlocal disableextensions
+REM Need delayed expansion !PATH! so parens in the path don't mess up the parens for the if statements that use parens for blocks
+setlocal enabledelayedexpansion
-set target=%1
-set targetFrameworkIdentifier=%2
-set sdkVersion=%3
-set runtimeVersion=%4
-set helixQueue=%5
-set arch=%6
+REM Use '$' as a variable name prefix to avoid MSBuild variable collisions with these variables
+set $target=%1
+set $sdkVersion=%2
+set $runtimeVersion=%3
+set $helixQueue=%4
+set $arch=%5
+set $quarantined=%6
+set $efVersion=%7
set DOTNET_HOME=%HELIX_CORRELATION_PAYLOAD%\sdk
-set DOTNET_ROOT=%DOTNET_HOME%\%arch%
+set DOTNET_ROOT=%DOTNET_HOME%\%$arch%
set DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1
set DOTNET_MULTILEVEL_LOOKUP=0
set DOTNET_CLI_HOME=%HELIX_CORRELATION_PAYLOAD%\home
-set PATH=%DOTNET_ROOT%;%PATH%;%HELIX_CORRELATION_PAYLOAD%\node\bin
+set PATH=%DOTNET_ROOT%;!PATH!;%HELIX_CORRELATION_PAYLOAD%\node\bin
+echo Set path to: %PATH%
+echo "Installing SDK"
+powershell.exe -NoProfile -ExecutionPolicy unrestricted -Command "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; &([scriptblock]::Create((Invoke-WebRequest -useb 'https://dot.net/v1/dotnet-install.ps1'))) -Architecture %$arch% -Version %$sdkVersion% -InstallDir %DOTNET_ROOT%"
+echo "Installing Runtime"
+powershell.exe -NoProfile -ExecutionPolicy unrestricted -Command "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; &([scriptblock]::Create((Invoke-WebRequest -useb 'https://dot.net/v1/dotnet-install.ps1'))) -Architecture %$arch% -Runtime dotnet -Version %$runtimeVersion% -InstallDir %DOTNET_ROOT%"
+echo "Checking for Microsoft.AspNetCore.App"
+if EXIST ".\Microsoft.AspNetCore.App" (
+ echo "Found Microsoft.AspNetCore.App, copying to %DOTNET_ROOT%\shared\Microsoft.AspNetCore.App\%runtimeVersion%"
+ xcopy /i /y ".\Microsoft.AspNetCore.App" %DOTNET_ROOT%\shared\Microsoft.AspNetCore.App\%runtimeVersion%\
+
+ echo "Adding current directory to nuget sources: %HELIX_WORKITEM_ROOT%"
+ dotnet nuget add source %HELIX_WORKITEM_ROOT%
+ dotnet nuget add source https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet5/nuget/v3/index.json
+ dotnet nuget list source
+ dotnet tool install dotnet-ef --global --version %$efVersion%
-powershell.exe -NoProfile -ExecutionPolicy unrestricted -Command "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; &([scriptblock]::Create((Invoke-WebRequest -useb 'https://dot.net/v1/dotnet-install.ps1'))) -Architecture %arch% -Version %sdkVersion% -InstallDir %DOTNET_ROOT%"
-powershell.exe -NoProfile -ExecutionPolicy unrestricted -Command "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; &([scriptblock]::Create((Invoke-WebRequest -useb 'https://dot.net/v1/dotnet-install.ps1'))) -Architecture %arch% -Runtime dotnet -Version %runtimeVersion% -InstallDir %DOTNET_ROOT%"
+ set PATH=!PATH!;%DOTNET_CLI_HOME%\.dotnet\tools
+)
-set HELIX=%helixQueue%
+echo "Current Directory: %HELIX_WORKITEM_ROOT%"
+set HELIX=%$helixQueue%
+set HELIX_DIR=%HELIX_WORKITEM_ROOT%
+set NUGET_FALLBACK_PACKAGES=%HELIX_DIR%
+set NUGET_RESTORE=%HELIX_DIR%\nugetRestore
+set DotNetEfFullPath=%HELIX_DIR%\nugetRestore\dotnet-ef\%$efVersion%\tools\netcoreapp3.1\any\dotnet-ef.exe
+echo "Set DotNetEfFullPath: %DotNetEfFullPath%"
+echo "Setting HELIX_DIR: %HELIX_DIR%"
+echo Creating nuget restore directory: %NUGET_RESTORE%
+mkdir %NUGET_RESTORE%
+mkdir logs
-if (%targetFrameworkIdentifier%==.NETFramework) (
- xunit.console.exe %target% -xml testResults.xml
- exit /b %ERRORLEVEL%
+REM "Rename default.runner.json to xunit.runner.json if there is not a custom one from the project"
+if not EXIST ".\xunit.runner.json" (
+ copy default.runner.json xunit.runner.json
)
-%DOTNET_ROOT%\dotnet vstest %target% -lt >discovered.txt
+dir
+
+%DOTNET_ROOT%\dotnet vstest %$target% -lt >discovered.txt
find /c "Exception thrown" discovered.txt
REM "ERRORLEVEL is not %ERRORLEVEL%" https://blogs.msdn.microsoft.com/oldnewthing/20080926-00/?p=20743/
if not errorlevel 1 (
@@ -38,25 +67,39 @@ if not errorlevel 1 (
set exit_code=0
-REM Run non-flaky tests first
-REM We need to specify all possible Flaky filters that apply to this environment, because the flaky attribute
-REM only puts the explicit filter traits the user provided in
-REM Filter syntax: https://github.com/Microsoft/vstest-docs/blob/master/docs/filter.md
-set NONFLAKY_FILTER="Flaky:All!=true&Flaky:Helix:All!=true&Flaky:Helix:Queue:All!=true&Flaky:Helix:Queue:%HELIX%!=true"
-echo Running non-flaky tests.
-%DOTNET_ROOT%\dotnet vstest %target% --logger:trx --TestCaseFilter:%NONFLAKY_FILTER%
-if errorlevel 1 (
- echo Failure in non-flaky test 1>&2
- set exit_code=1
- REM DO NOT EXIT
+if %$quarantined%==True (
+ set %$quarantined=true
+)
+
+REM Disable "!Foo!" expansions because they break the filter syntax
+setlocal disabledelayedexpansion
+set NONQUARANTINE_FILTER="Quarantined!=true"
+set QUARANTINE_FILTER="Quarantined=true"
+if %$quarantined%==true (
+ echo Running quarantined tests.
+ %DOTNET_ROOT%\dotnet vstest %$target% --logger:xunit --TestCaseFilter:%QUARANTINE_FILTER%
+ if errorlevel 1 (
+ echo Failure in quarantined test 1>&2
+ REM DO NOT EXIT and DO NOT SET EXIT_CODE to 1
+ )
+) else (
+ REM Filter syntax: https://github.com/Microsoft/vstest-docs/blob/master/docs/filter.md
+ echo Running non-quarantined tests.
+ %DOTNET_ROOT%\dotnet vstest %$target% --logger:xunit --TestCaseFilter:%NONQUARANTINE_FILTER%
+ if errorlevel 1 (
+ echo Failure in non-quarantined test 1>&2
+ set exit_code=1
+ REM DO NOT EXIT
+ )
)
-set FLAKY_FILTER="Flaky:All=true|Flaky:Helix:All=true|Flaky:Helix:Queue:All=true|Flaky:Helix:Queue:%HELIX%=true"
-echo Running known-flaky tests.
-%DOTNET_ROOT%\dotnet vstest %target% --TestCaseFilter:%FLAKY_FILTER%
-if errorlevel 1 (
- echo Failure in flaky test 1>&2
- REM DO NOT EXIT and DO NOT SET EXIT_CODE to 1
+echo "Copying TestResults\TestResults.xml to ."
+copy TestResults\TestResults.xml testResults.xml
+echo "Copying artifacts/logs to %HELIX_WORKITEM_UPLOAD_ROOT%\..\"
+for /R artifacts/log %%f in (*.log) do (
+ echo "Copying: %%f"
+ copy "%%f" %HELIX_WORKITEM_UPLOAD_ROOT%\..\
+ copy "%%f" %HELIX_WORKITEM_UPLOAD_ROOT%\
)
exit /b %exit_code%
diff --git a/eng/helix/content/runtests.sh b/eng/helix/content/runtests.sh
index e864f097decc..7788f800f9c0 100644
--- a/eng/helix/content/runtests.sh
+++ b/eng/helix/content/runtests.sh
@@ -4,6 +4,9 @@ test_binary_path="$1"
dotnet_sdk_version="$2"
dotnet_runtime_version="$3"
helix_queue_name="$4"
+target_arch="$5"
+quarantined="$6"
+efVersion="$7"
RESET="\033[0m"
RED="\033[0;31m"
@@ -29,7 +32,16 @@ export DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1
# Used by SkipOnHelix attribute
export helix="$helix_queue_name"
+export HELIX_DIR="$DIR"
+export NUGET_FALLBACK_PACKAGES="$DIR"
+export DotNetEfFullPath=$DIR\nugetRestore\dotnet-ef\$efVersion\tools\netcoreapp3.1\any\dotnet-ef.dll
+echo "Set DotNetEfFullPath: $DotNetEfFullPath"
+export NUGET_RESTORE="$DIR/nugetRestore"
+echo "Creating nugetRestore directory: $NUGET_RESTORE"
+mkdir $NUGET_RESTORE
+mkdir logs
+ls -laR
RESET="\033[0m"
RED="\033[0;31m"
@@ -81,6 +93,38 @@ if [ $? -ne 0 ]; then
done
fi
+# Copy over any local shared fx if found
+if [ -d "Microsoft.AspNetCore.App" ]
+then
+ echo "Found Microsoft.AspNetCore.App directory, copying to $DOTNET_ROOT/shared/Microsoft.AspNetCore.App/$dotnet_runtime_version."
+ cp -r Microsoft.AspNetCore.App $DOTNET_ROOT/shared/Microsoft.AspNetCore.App/$dotnet_runtime_version
+
+ echo "Adding current directory to nuget sources: $DIR"
+ dotnet nuget add source $DIR
+ dotnet nuget add source https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet5/nuget/v3/index.json
+ dotnet nuget list source
+
+ dotnet tool install dotnet-ef --global --version $efVersion
+
+ # Ensure tools are on on PATH
+ export PATH="$PATH:$DOTNET_CLI_HOME/.dotnet/tools"
+fi
+
+# Rename default.runner.json to xunit.runner.json if there is not a custom one from the project
+if [ ! -f "xunit.runner.json" ]
+then
+ cp default.runner.json xunit.runner.json
+fi
+
+if [ -e /proc/self/coredump_filter ]; then
+ # Include memory in private and shared file-backed mappings in the dump.
+ # This ensures that we can see disassembly from our shared libraries when
+ # inspecting the contents of the dump. See 'man core' for details.
+ echo -n 0x3F > /proc/self/coredump_filter
+fi
+
+sync
+
$DOTNET_ROOT/dotnet vstest $test_binary_path -lt >discovered.txt
if grep -q "Exception thrown" discovered.txt; then
echo -e "${RED}Exception thrown during test discovery${RESET}".
@@ -88,25 +132,32 @@ if grep -q "Exception thrown" discovered.txt; then
exit 1
fi
-# Run non-flaky tests first
-# We need to specify all possible Flaky filters that apply to this environment, because the flaky attribute
-# only puts the explicit filter traits the user provided in the flaky attribute
-# Filter syntax: https://github.com/Microsoft/vstest-docs/blob/master/docs/filter.md
-NONFLAKY_FILTER="Flaky:All!=true&Flaky:Helix:All!=true&Flaky:Helix:Queue:All!=true&Flaky:Helix:Queue:$helix_queue_name!=true"
-echo "Running non-flaky tests."
-$DOTNET_ROOT/dotnet vstest $test_binary_path --logger:trx --TestCaseFilter:"$NONFLAKY_FILTER"
-nonflaky_exitcode=$?
-if [ $nonflaky_exitcode != 0 ]; then
- echo "Non-flaky tests failed!" 1>&2
- # DO NOT EXIT
-fi
+exit_code=0
-FLAKY_FILTER="Flaky:All=true|Flaky:Helix:All=true|Flaky:Helix:Queue:All=true|Flaky:Helix:Queue:$helix_queue_name=true"
-echo "Running known-flaky tests."
-$DOTNET_ROOT/dotnet vstest $test_binary_path --TestCaseFilter:"$FLAKY_FILTER"
-if [ $? != 0 ]; then
- echo "Flaky tests failed!" 1>&2
- # DO NOT EXIT
+# Filter syntax: https://github.com/Microsoft/vstest-docs/blob/master/docs/filter.md
+NONQUARANTINE_FILTER="Quarantined!=true"
+QUARANTINE_FILTER="Quarantined=true"
+if [ "$quarantined" == true ]; then
+ echo "Running all tests including quarantined."
+ $DOTNET_ROOT/dotnet vstest $test_binary_path --logger:xunit --TestCaseFilter:"$QUARANTINE_FILTER"
+ if [ $? != 0 ]; then
+ echo "Quarantined tests failed!" 1>&2
+ # DO NOT EXIT
+ fi
+else
+ echo "Running non-quarantined tests."
+ $DOTNET_ROOT/dotnet vstest $test_binary_path --logger:xunit --TestCaseFilter:"$NONQUARANTINE_FILTER"
+ exit_code=$?
+ if [ $exit_code != 0 ]; then
+ echo "Non-quarantined tests failed!" 1>&2
+ # DO NOT EXIT
+ fi
fi
-exit $nonflaky_exitcode
+echo "Copying TestResults/TestResults to ."
+cp TestResults/TestResults.xml testResults.xml
+echo "Copying artifacts/logs to $HELIX_WORKITEM_UPLOAD_ROOT/../"
+shopt -s globstar
+cp artifacts/log/**/*.log $HELIX_WORKITEM_UPLOAD_ROOT/../
+cp artifacts/log/**/*.log $HELIX_WORKITEM_UPLOAD_ROOT/
+exit $exit_code
diff --git a/eng/helix/helix.proj b/eng/helix/helix.proj
index 105134743c19..b90569314536 100644
--- a/eng/helix/helix.proj
+++ b/eng/helix/helix.proj
@@ -12,34 +12,50 @@
-
+
+
- pr/aspnet/aspnetcore
private-$(USERNAME)
private-$(USER)
true
true
2
+ $(HelixApiAccessToken)
ci
- aspnetcore
+
+ aspnetcore
$(BUILD_BUILDNUMBER).$(TargetArchitecture).$(SYSTEM_JOBATTEMPT)
true
true
- true
+ true
dev
- $(USERNAME)
- $(USER)
+
+ $(USERNAME)
+ $(USER)
$([System.DateTime]::Now.ToString('yyyyMMddHHmm'))
+
+
+
+
+
+
+
+
+
+
+
+
+
nul'
+ $changedFiles = & cmd /c 'git --no-pager diff --ignore-space-change --name-only 2>nul'
# Temporary: Disable check for blazor js file and nuget.config (updated automatically for
# internal builds)
@@ -187,10 +188,9 @@ try {
if ($changedFiles) {
foreach ($file in $changedFiles) {
if ($changedFilesExclusions -contains $file) {continue}
-
$filePath = Resolve-Path "${repoRoot}/${file}"
LogError "Generated code is not up to date in $file. You might need to regenerate the reference assemblies or project list (see docs/ReferenceAssemblies.md and docs/ReferenceResolution.md)" -filepath $filePath
- & git --no-pager diff --ignore-space-at-eol $filePath
+ & git --no-pager diff --ignore-space-change $filePath
}
}
}
diff --git a/eng/scripts/InstallVisualStudio.ps1 b/eng/scripts/InstallVisualStudio.ps1
index bbccdaacad6d..844da67bba4f 100644
--- a/eng/scripts/InstallVisualStudio.ps1
+++ b/eng/scripts/InstallVisualStudio.ps1
@@ -23,7 +23,7 @@
Run the installer without UI and wait for installation to complete.
.LINK
https://visualstudio.com
- https://github.com/aspnet/AspNetCore/blob/master/docs/BuildFromSource.md
+ https://github.com/dotnet/aspnetcore/blob/master/docs/BuildFromSource.md
.EXAMPLE
To install VS 2019 Enterprise, run this command in PowerShell:
diff --git a/eng/scripts/RunHelix.ps1 b/eng/scripts/RunHelix.ps1
new file mode 100644
index 000000000000..9e1bc513a26c
--- /dev/null
+++ b/eng/scripts/RunHelix.ps1
@@ -0,0 +1,42 @@
+<#
+.SYNOPSIS
+ Runs the specified test project on a Helix machine.
+.DESCRIPTION
+ This script runs the Helix msbuild task on the given project and publishes then uploads the output and runs tests on the Helix machine(s) passed in.
+.PARAMETER Project
+ The test project to publish and send to Helix.
+.PARAMETER HelixQueues
+ Set the Helix queues to use, the list is ';' separated.
+ Some supported queues:
+ Ubuntu.1604.Amd64.Open
+ Ubuntu.1804.Amd64.Open
+ Windows.10.Amd64.Open
+ Windows.81.Amd64.Open
+ Windows.7.Amd64.Open
+ OSX.1014.Amd64.Open
+ Centos.7.Amd64.Open
+ Debian.8.Amd64.Open
+ Debian.9.Amd64.Open
+ Redhat.7.Amd64.Open
+.PARAMETER RunQuarantinedTests
+ By default quarantined tests are not run. Set this to $true to run only the quarantined tests.
+#>
+param(
+ [Parameter(Mandatory=$true)]
+ [string]$Project,
+ [string]$HelixQueues = "Windows.10.Amd64.Open",
+ [string]$TargetArchitecture = "",
+ [bool]$RunQuarantinedTests = $false
+)
+$ErrorActionPreference = 'Stop'
+$ProgressPreference = 'SilentlyContinue' # Workaround PowerShell/PowerShell#2138
+
+Set-StrictMode -Version 1
+
+$env:BUILD_REASON="PullRequest"
+$env:BUILD_SOURCEBRANCH="local"
+$env:BUILD_REPOSITORY_NAME="aspnetcore"
+$env:SYSTEM_TEAMPROJECT="aspnetcore"
+
+$HelixQueues = $HelixQueues -replace ";", "%3B"
+dotnet msbuild $Project /t:Helix /p:TargetArchitecture="$TargetArchitecture" /p:IsRequiredCheck=true /p:IsHelixDaily=true /p:HelixTargetQueues=$HelixQueues /p:RunQuarantinedTests=$RunQuarantinedTests /p:_UseHelixOpenQueues=true
\ No newline at end of file
diff --git a/eng/scripts/StartDumpCollectionForHangingBuilds.ps1 b/eng/scripts/StartDumpCollectionForHangingBuilds.ps1
index 4ed696ec3c93..3fd2664d480f 100644
--- a/eng/scripts/StartDumpCollectionForHangingBuilds.ps1
+++ b/eng/scripts/StartDumpCollectionForHangingBuilds.ps1
@@ -54,7 +54,7 @@ Write-Output "Watching processes $($CandidateProcessNames -join ', ')";
# This script registers as a scheduled job. This scheduled job executes after $WakeTime.
# When the scheduled job executes, it runs procdump on all alive processes whose name matches $CandidateProcessNames.
# The dumps are placed in $ProcDumpOutputPath
-# If the build completes sucessfully in less than $WakeTime, a final step unregisters the job.
+# If the build completes successfully in less than $WakeTime, a final step unregisters the job.
# Create a unique identifier for the job name
$JobName = "CaptureDumps" + (New-Guid).ToString("N");
diff --git a/eng/scripts/ci-source-build.sh b/eng/scripts/ci-source-build.sh
index ebc50dad0a59..468f74975193 100755
--- a/eng/scripts/ci-source-build.sh
+++ b/eng/scripts/ci-source-build.sh
@@ -9,31 +9,34 @@ set -euo pipefail
scriptroot="$( cd -P "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
reporoot="$(dirname "$(dirname "$scriptroot")")"
- # For local development, make a backup copy of this file first
-if [ ! -f "$reporoot/global.bak.json" ]; then
- mv "$reporoot/global.json" "$reporoot/global.bak.json"
-fi
-
- # Detect the current version of .NET Core installed
-export SDK_VERSION=$(dotnet --version)
-echo "The ambient version of .NET Core SDK version = $SDK_VERSION"
-
- # Update the global.json file to match the current .NET environment
-cat "$reporoot/global.bak.json" | \
- jq '.sdk.version=env.SDK_VERSION' | \
- jq '.tools.dotnet=env.SDK_VERSION' | \
- jq 'del(.tools.runtimes)' \
- > "$reporoot/global.json"
-
- # Restore the original global.json file
-trap "{
- mv "$reporoot/global.bak.json" "$reporoot/global.json"
-}" EXIT
-
- # Build repo tasks
+#
+# This commented out section is used for servicing branches
+#
+# For local development, make a backup copy of this file first
+# if [ ! -f "$reporoot/global.bak.json" ]; then
+# mv "$reporoot/global.json" "$reporoot/global.bak.json"
+# fi
+
+# Detect the current version of .NET Core installed
+# export SDK_VERSION=$(dotnet --version)
+# echo "The ambient version of .NET Core SDK version = $SDK_VERSION"
+
+# Update the global.json file to match the current .NET environment
+# cat "$reporoot/global.bak.json" | \
+# jq '.sdk.version=env.SDK_VERSION' | \
+# jq '.tools.dotnet=env.SDK_VERSION' | \
+# jq 'del(.tools.runtimes)' \
+# > "$reporoot/global.json"
+
+# Restore the original global.json file
+#trap "{
+# mv "$reporoot/global.bak.json" "$reporoot/global.json"
+#}" EXIT
+
+# Build repo tasks
"$reporoot/eng/common/build.sh" --restore --build --ci --configuration Release /p:ProjectToBuild=$reporoot/eng/tools/RepoTasks/RepoTasks.csproj
export DotNetBuildFromSource='true'
- # Build projects
+# Build projects
"$reporoot/eng/common/build.sh" --restore --build --pack "$@"
\ No newline at end of file
diff --git a/eng/targets/CSharp.Common.props b/eng/targets/CSharp.Common.props
index 6cc6bd2dd81f..03e6f56e37bd 100644
--- a/eng/targets/CSharp.Common.props
+++ b/eng/targets/CSharp.Common.props
@@ -25,8 +25,11 @@
+
+
+
PreserveNewest
@@ -35,6 +38,5 @@
-
diff --git a/eng/targets/CSharp.Common.targets b/eng/targets/CSharp.Common.targets
index 877665a63bad..e327a7b8868a 100644
--- a/eng/targets/CSharp.Common.targets
+++ b/eng/targets/CSharp.Common.targets
@@ -30,5 +30,5 @@
-
+
diff --git a/eng/targets/FunctionalTestAsset.targets b/eng/targets/FunctionalTestAsset.targets
new file mode 100644
index 000000000000..04b351334127
--- /dev/null
+++ b/eng/targets/FunctionalTestAsset.targets
@@ -0,0 +1,9 @@
+
+
+
+
+ $(MSBuildProjectName)\%(ResolvedFileToPublish.RelativePath)
+
+
+
+
\ No newline at end of file
diff --git a/eng/targets/FunctionalTestWithAssets.targets b/eng/targets/FunctionalTestWithAssets.targets
new file mode 100644
index 000000000000..b6194607cb43
--- /dev/null
+++ b/eng/targets/FunctionalTestWithAssets.targets
@@ -0,0 +1,27 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+ %(DependencyPayload.RelativePath)
+ PreserveNewest
+ PreserveNewest
+
+
+
+
+
\ No newline at end of file
diff --git a/eng/targets/Helix.Common.props b/eng/targets/Helix.Common.props
index 8ea26294a254..e77bcd88280d 100644
--- a/eng/targets/Helix.Common.props
+++ b/eng/targets/Helix.Common.props
@@ -1,10 +1,4 @@
-
-
- true
-
-
-
@@ -12,15 +6,30 @@
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
+
@@ -28,29 +37,13 @@
-
+
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/eng/targets/Helix.props b/eng/targets/Helix.props
index 30a5903b9a7a..d4c7a99d524f 100644
--- a/eng/targets/Helix.props
+++ b/eng/targets/Helix.props
@@ -12,12 +12,17 @@
true
00:30:00
+ false
false
true
- $(MSBuildProjectName)-$(TargetFramework)
+ false
+ true
+ $(MSBuildProjectName)--$(TargetFramework)
false
- true
+ false
10.15.3
+ 5.0.0-ci
+ false
@@ -32,16 +37,4 @@
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/eng/targets/Helix.targets b/eng/targets/Helix.targets
index d3a45dfa4575..154ce92ee6f2 100644
--- a/eng/targets/Helix.targets
+++ b/eng/targets/Helix.targets
@@ -1,11 +1,37 @@
+
+
+
+
-
-
-
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -35,14 +61,24 @@ Usage: dotnet msbuild /t:Helix src/MyTestProject.csproj
+
+
+
+
<_SelectedPlatforms>@(HelixProjectPlatform)
+
+ <_Temp Include="@(HelixAvailableTargetQueue)" />
+
+
+
+
- <_HelixProjectTargetQueue Include="%(HelixAvailableTargetQueue.Identity)" Condition="'%(HelixAvailableTargetQueue.Identity)' != '' AND '$(_SelectedPlatforms.Contains(%(Platform)))' == 'true' AND '%(EnableByDefault)' == 'true'" />
+ <_HelixProjectTargetQueue Include="%(HelixAvailableTargetQueue.Identity)" Condition="'%(HelixAvailableTargetQueue.Identity)' != '' AND '$(_SelectedPlatforms.Contains(%(Platform)))' == 'true'" />
<_HelixApplicableTargetQueue Include="%(_HelixProjectTargetQueue.Identity)" Condition="'%(Identity)' == '$(HelixTargetQueue)'" />
@@ -60,12 +96,18 @@ Usage: dotnet msbuild /t:Helix src/MyTestProject.csproj
+
+
+
+
+
<_HelixFriendlyNameTargetQueue>$(HelixTargetQueue)
<_HelixFriendlyNameTargetQueue Condition="$(HelixTargetQueue.Contains('@'))">$(HelixTargetQueue.Substring(1, $([MSBuild]::Subtract($(HelixTargetQueue.LastIndexOf(')')), 1))))
+
@@ -78,8 +120,9 @@ Usage: dotnet msbuild /t:Helix src/MyTestProject.csproj
$(TargetFileName)
@(HelixPreCommand)
@(HelixPostCommand)
- call runtests.cmd $(TargetFileName) $(TargetFrameworkIdentifier) $(NETCoreSdkVersion) $(MicrosoftNETCoreAppRuntimeVersion) $(_HelixFriendlyNameTargetQueue) $(TargetArchitecture)
- ./runtests.sh $(TargetFileName) $(NETCoreSdkVersion) $(MicrosoftNETCoreAppRuntimeVersion) $(_HelixFriendlyNameTargetQueue) $(TargetArchitecture)
+ call runtests.cmd $(TargetFileName) $(NETCoreSdkVersion) $(MicrosoftNETCoreAppRuntimeVersion) $(_HelixFriendlyNameTargetQueue) $(TargetArchitecture) $(RunQuarantinedTests) $(DotnetEfPackageVersion)
+ ./runtests.sh $(TargetFileName) $(NETCoreSdkVersion) $(MicrosoftNETCoreAppRuntimeVersion) $(_HelixFriendlyNameTargetQueue) $(TargetArchitecture) $(RunQuarantinedTests) $(DotnetEfPackageVersion)
+ $(HelixCommand)
$(HelixTimeout)
diff --git a/eng/targets/Npm.Common.targets b/eng/targets/Npm.Common.targets
index 062a9d3a8f76..3460edde2e7a 100644
--- a/eng/targets/Npm.Common.targets
+++ b/eng/targets/Npm.Common.targets
@@ -20,22 +20,27 @@
-
-
-
+
+
+
+
+
+
+
-
-
+
+
+
@@ -50,15 +55,29 @@
+
+
+
+
+
+
+
+
+
+ DependsOnTargets="GetBuildInputCacheFile"
+ Inputs="@(TSFiles);$(BaseIntermediateOutputPath)tsfiles.cache"
+ Outputs="@(BuildOutputFiles)">
-
+
@@ -73,7 +92,10 @@
-
+
+
<_PackageTargetPath>$(MSBuildProjectDirectory)\$(PackageFileName)
@@ -81,7 +103,7 @@
-
+
@@ -97,7 +119,8 @@
-
+
+
diff --git a/eng/targets/ReferenceAssembly.targets b/eng/targets/ReferenceAssembly.targets
index 59568267bec0..84076d9a414c 100644
--- a/eng/targets/ReferenceAssembly.targets
+++ b/eng/targets/ReferenceAssembly.targets
@@ -23,11 +23,14 @@
+ <_TargetFrameworkOverride />
+ <_TargetFrameworkOverride
+ Condition=" @(_ResultTargetFramework->Count()) > 1 ">%0A <TargetFrameworks Condition="'%24(DotNetBuildFromSource)' == 'true'">%24(DefaultNetCoreTargetFramework)</TargetFrameworks>
- @(_ResultTargetFramework)
+ @(_ResultTargetFramework) $(_TargetFrameworkOverride)
@(ProjectListContentItem->'%(Identity)', '%0A')
@@ -67,7 +70,6 @@
<_GenApiFile>$([MSBuild]::NormalizePath('$(ArtifactsDir)', 'log', 'GenAPI.rsp'))
<_GenAPICommand
Condition="'$(MSBuildRuntimeType)' == 'core'">"$(DotNetTool)" --roll-forward-on-no-candidate-fx 2 "$(_GenAPIPath)"
- <_GenAPICmd>$(_GenAPICommand)
<_GenAPICmd>$(_GenAPICommand) @"$(_GenApiFile)"
<_GenAPICmd
Condition=" '$(AdditionalGenApiCmdOptions)' != '' ">$(_GenAPICmd) $(AdditionalGenApiCmdOptions)
diff --git a/eng/targets/ResolveReferences.targets b/eng/targets/ResolveReferences.targets
index e77922ebcb71..37a17b714034 100644
--- a/eng/targets/ResolveReferences.targets
+++ b/eng/targets/ResolveReferences.targets
@@ -11,12 +11,11 @@
Items used by the resolution strategy:
- * BaselinePackageReference = a list of packages that were referenced in the last release of the project currently building
- - mainly used to ensure references do not change in servicing builds unless $(UseLatestPackageReferences) is not true.
+ * BaselinePackageReference = a list of packages that were reference in the last release of the project currently building
* LatestPackageReference = a list of the latest versions of packages
* Reference = a list of the references which are needed for compilation or runtime
* ProjectReferenceProvider = a list which maps of assembly names to the project file that produces it
--->
+ -->
@@ -30,49 +29,43 @@
+ true
+ true
true
- true
- true
+ Condition=" '$(UseLatestPackageReferences)' == '' AND '$(IsImplementationProject)' == 'true' AND '$(IsPackable)' == 'true' ">true
false
- true
+ true
+ true
+ false
- true
- false
+ true
+ false
- true
- false
+ true
+ false
-
+
- true
+ true
@@ -80,40 +73,35 @@
<_AllowedExplicitPackageReference Include="@(PackageReference->WithMetadataValue('AllowExplicitReference', 'true'))" />
<_AllowedExplicitPackageReference Include="FSharp.Core" Condition="'$(MSBuildProjectExtension)' == '.fsproj'" />
- <_ExplicitPackageReference Include="@(PackageReference)"
- Exclude="@(_ImplicitPackageReference);@(_AllowedExplicitPackageReference)" />
+ <_ExplicitPackageReference Include="@(PackageReference)" Exclude="@(_ImplicitPackageReference);@(_AllowedExplicitPackageReference)" />
<_UnusedProjectReferenceProvider Include="@(ProjectReferenceProvider)" Exclude="@(Reference)" />
- <_CompilationOnlyReference Include="@(Reference->WithMetadataValue('NuGetPackageId','NETStandard.Library'))"
- Condition="'$(TargetFramework)' == 'netstandard2.0'" />
+ <_CompilationOnlyReference Condition="'$(TargetFramework)' == 'netstandard2.0'" Include="@(Reference->WithMetadataValue('NuGetPackageId','NETStandard.Library'))" />
<_InvalidReferenceToNonSharedFxAssembly Condition="'$(IsAspNetCoreApp)' == 'true'"
- Include="@(Reference)"
- Exclude="
- @(AspNetCoreAppReference);
- @(AspNetCoreAppReferenceAndPackage);
- @(ExternalAspNetCoreAppReference);
- @(_CompilationOnlyReference);
- @(Reference->WithMetadataValue('IsSharedSource', 'true'))" />
+ Include="@(Reference)"
+ Exclude="
+ @(AspNetCoreAppReference);
+ @(AspNetCoreAppReferenceAndPackage);
+ @(ExternalAspNetCoreAppReference);
+ @(_CompilationOnlyReference);
+ @(Reference->WithMetadataValue('IsSharedSource', 'true'))" />
<_OriginalReferences Include="@(Reference)" />
-
<_ProjectReferenceByAssemblyName Condition="'$(UseProjectReferences)' == 'true'"
- Include="@(ProjectReferenceProvider)"
- Exclude="@(_UnusedProjectReferenceProvider)" />
+ Include="@(ProjectReferenceProvider)"
+ Exclude="@(_UnusedProjectReferenceProvider)" />
-
+
false
-
+
true
@@ -121,31 +109,30 @@
+
+ Text="Cannot reference "%(_InvalidReferenceToSharedFxOnlyAssembly.Identity)" directly because it is part of the shared framework and this project is not. Use <FrameworkReference Include="Microsoft.AspNetCore.App" /> instead." />
-
+
-
+
-
+
@@ -154,15 +141,9 @@
-
-
+
-
-
+
-
- <_BaselinePackageReferenceWithVersion Include="@(Reference)"
- Condition=" '$(IsServicingBuild)' == 'true' OR '$(UseLatestPackageReferences)' != 'true' ">
+
+ <_BaselinePackageReferenceWithVersion Include="@(Reference)" Condition=" '$(IsServicingBuild)' == 'true' OR '$(UseLatestPackageReferences)' != 'true' ">
%(BaselinePackageReference.Identity)
%(BaselinePackageReference.Version)
- <_BaselinePackageReferenceWithVersion Remove="@(_BaselinePackageReferenceWithVersion)"
- Condition="'%(Id)' != '%(Identity)' " />
+
+ <_BaselinePackageReferenceWithVersion Remove="@(_BaselinePackageReferenceWithVersion)" Condition="'%(Id)' != '%(Identity)' " />
@@ -197,10 +176,10 @@
%(LatestPackageReference.Identity)
%(LatestPackageReference.Version)
- <_PrivatePackageReferenceWithVersion Remove="@(_PrivatePackageReferenceWithVersion)"
- Condition="'%(Id)' != '%(Identity)' " />
-
+ <_PrivatePackageReferenceWithVersion Remove="@(_PrivatePackageReferenceWithVersion)" Condition="'%(Id)' != '%(Identity)' " />
+
+
@@ -211,70 +190,31 @@
<_ImplicitPackageReference Remove="@(_ImplicitPackageReference)" />
-
+
<_ExplicitPackageReference Remove="@(_ExplicitPackageReference)" />
-
+
-
+
-
+
-
<_CompileTfmUsingReferenceAssemblies>false
<_CompileTfmUsingReferenceAssemblies
Condition=" '$(CompileUsingReferenceAssemblies)' != false AND '$(TargetFramework)' == '$(DefaultNetCoreTargetFramework)' ">true
-
- <_ReferenceProjectFile>$(MSBuildProjectDirectory)/../ref/$(MSBuildProjectFile)
-
-
- $(GetTargetPathWithTargetPlatformMonikerDependsOn);AddReferenceProjectMetadata
- RemoveReferenceProjectMetadata;$(PrepareForRunDependsOn)
-
-
-
-
- ReferenceProjectMetadata
- false
-
-
-
-
- true
- @(ReferenceProjectMetadata)
-
-
-
-
-
-
-
-
-
@@ -319,36 +249,24 @@
$([MSBuild]::MakeRelative($(RepoRoot), '$(ReferenceAssemblyDirectory)$(MSBuildProjectFile)'))
-
-
-
-
+
+
$([MSBuild]::ValueOrDefault($(IsAspNetCoreApp),'false'))
$([MSBuild]::ValueOrDefault($(IsPackable),'false'))
$([MSBuild]::MakeRelative($(RepoRoot), $(MSBuildProjectFullPath)))
- $(ReferenceAssemblyProjectFileRelativePath)
+ $(ReferenceAssemblyProjectFileRelativePath)
- <_CustomCollectProjectReferenceDependsOn
- Condition="'$(TargetFramework)' != ''">ResolveProjectReferences
+ <_CustomCollectProjectReferenceDependsOn Condition="'$(TargetFramework)' != ''">ResolveProjectReferences
-
+
<_TargetFrameworks Include="$(TargetFrameworks)" />
@@ -369,4 +287,4 @@
-
+
\ No newline at end of file
diff --git a/eng/tools/RepoTasks/DownloadFile.cs b/eng/tools/RepoTasks/DownloadFile.cs
index 2be0954cc258..7ba2602d0ce6 100644
--- a/eng/tools/RepoTasks/DownloadFile.cs
+++ b/eng/tools/RepoTasks/DownloadFile.cs
@@ -22,7 +22,7 @@ public class DownloadFile : Microsoft.Build.Utilities.Task
/// status, it will try to download the file from `PrivateUri`.
///
public string PrivateUri { get; set; }
-
+
///
/// Suffix for the private URI in base64 form (for SAS compatibility)
///
@@ -146,4 +146,4 @@ private async System.Threading.Tasks.Task ExecuteAsync()
return null;
}
}
-}
+}
\ No newline at end of file
diff --git a/eng/tools/RepoTasks/RepoTasks.tasks b/eng/tools/RepoTasks/RepoTasks.tasks
index 4916a97ed395..631944feea73 100644
--- a/eng/tools/RepoTasks/RepoTasks.tasks
+++ b/eng/tools/RepoTasks/RepoTasks.tasks
@@ -1,6 +1,6 @@
- <_RepoTaskAssemblyFolder Condition="'$(MSBuildRuntimeType)' == 'core'">netcoreapp3.1
+ <_RepoTaskAssemblyFolder Condition="'$(MSBuildRuntimeType)' == 'core'">netcoreapp5.0
<_RepoTaskAssemblyFolder Condition="'$(MSBuildRuntimeType)' != 'core'">net472
<_RepoTaskAssembly>$(ArtifactsBinDir)RepoTasks\Release\$(_RepoTaskAssemblyFolder)\RepoTasks.dll
diff --git a/global.json b/global.json
index b31b8106207d..97cf8d4d4bfe 100644
--- a/global.json
+++ b/global.json
@@ -1,9 +1,9 @@
{
"sdk": {
- "version": "3.1.102"
+ "version": "5.0.100-preview.2.20120.3"
},
"tools": {
- "dotnet": "3.1.102",
+ "dotnet": "5.0.100-preview.2.20120.3",
"runtimes": {
"dotnet/x64": [
"$(MicrosoftNETCoreAppInternalPackageVersion)"
@@ -15,7 +15,7 @@
"Git": "2.22.0",
"jdk": "11.0.3",
"vs": {
- "version": "16.0",
+ "version": "16.3",
"components": [
"Microsoft.VisualStudio.Component.VC.ATL",
"Microsoft.VisualStudio.Component.VC.Tools.x86.x64",
@@ -25,7 +25,7 @@
},
"msbuild-sdks": {
"Yarn.MSBuild": "1.15.2",
- "Microsoft.DotNet.Arcade.Sdk": "1.0.0-beta.20113.5",
- "Microsoft.DotNet.Helix.Sdk": "2.0.0-beta.20113.5"
+ "Microsoft.DotNet.Arcade.Sdk": "5.0.0-beta.20162.3",
+ "Microsoft.DotNet.Helix.Sdk": "5.0.0-beta.20162.3"
}
}
diff --git a/src/Analyzers/Analyzers/src/StartupFacts.cs b/src/Analyzers/Analyzers/src/StartupFacts.cs
index 221e3ff4c4d3..f5f833429a69 100644
--- a/src/Analyzers/Analyzers/src/StartupFacts.cs
+++ b/src/Analyzers/Analyzers/src/StartupFacts.cs
@@ -138,6 +138,8 @@ public static bool IsSignalRConfigureMethodGesture(IMethodSymbol symbol)
throw new ArgumentNullException(nameof(symbol));
}
+ // UseSignalR has been removed in 5.0, but we should probably still check for it in this analyzer in case the user
+ // installs it into a pre-5.0 app.
if (string.Equals(symbol.Name, SymbolNames.SignalRAppBuilderExtensions.UseSignalRMethodName, StringComparison.Ordinal) ||
string.Equals(symbol.Name, SymbolNames.HubEndpointRouteBuilderExtensions.MapHubMethodName, StringComparison.Ordinal) ||
string.Equals(symbol.Name, SymbolNames.ComponentEndpointRouteBuilderExtensions.MapBlazorHubMethodName, StringComparison.Ordinal))
diff --git a/src/Analyzers/Analyzers/src/UseAuthorizationAnalyzer.cs b/src/Analyzers/Analyzers/src/UseAuthorizationAnalyzer.cs
index dbfa9a3dcb28..79f8fea63315 100644
--- a/src/Analyzers/Analyzers/src/UseAuthorizationAnalyzer.cs
+++ b/src/Analyzers/Analyzers/src/UseAuthorizationAnalyzer.cs
@@ -41,7 +41,7 @@ public void AnalyzeSymbol(SymbolAnalysisContext context)
if (useRoutingItem != null && useAuthorizationItem == null)
{
// This looks like
- //
+ //
// app.UseAuthorization();
// ...
// app.UseRouting();
@@ -60,7 +60,7 @@ public void AnalyzeSymbol(SymbolAnalysisContext context)
if (useAuthorizationItem != null)
{
// This configuration looks like
- //
+ //
// app.UseRouting();
// app.UseEndpoints(...);
// ...
@@ -86,7 +86,7 @@ public void AnalyzeSymbol(SymbolAnalysisContext context)
// This analyzer expects MiddlewareItem instances to appear in the order in which they appear in source
// which unfortunately isn't true for chained calls (the operations appear in reverse order).
// We'll avoid doing any analysis in this event and rely on the runtime guardrails.
- // We'll use https://github.com/aspnet/AspNetCore/issues/16648 to track addressing this in a future milestone
+ // We'll use https://github.com/dotnet/aspnetcore/issues/16648 to track addressing this in a future milestone
return;
}
diff --git a/src/Analyzers/Analyzers/test/AnalyzerTestBase.cs b/src/Analyzers/Analyzers/test/AnalyzerTestBase.cs
index 269c50a394b0..eb748f2ab369 100644
--- a/src/Analyzers/Analyzers/test/AnalyzerTestBase.cs
+++ b/src/Analyzers/Analyzers/test/AnalyzerTestBase.cs
@@ -56,7 +56,7 @@ private static string GetProjectDirectory()
}
// This test code needs to be updated to support distributed testing.
-// See https://github.com/aspnet/AspNetCore/issues/10422
+// See https://github.com/dotnet/aspnetcore/issues/10422
#pragma warning disable 0618
var solutionDirectory = TestPathUtilities.GetSolutionRootDirectory("Analyzers");
#pragma warning restore 0618
diff --git a/src/Analyzers/Analyzers/test/CompilationFeatureDetectorTest.cs b/src/Analyzers/Analyzers/test/CompilationFeatureDetectorTest.cs
index 0669c7646462..9fcc0ff16750 100644
--- a/src/Analyzers/Analyzers/test/CompilationFeatureDetectorTest.cs
+++ b/src/Analyzers/Analyzers/test/CompilationFeatureDetectorTest.cs
@@ -29,7 +29,6 @@ public async Task DetectFeaturesAsync_FindsNoFeatures()
}
[Theory]
- [InlineData(nameof(StartupWithUseSignalR))]
[InlineData(nameof(StartupWithMapHub))]
[InlineData(nameof(StartupWithMapBlazorHub))]
public async Task DetectFeaturesAsync_FindsSignalR(string source)
diff --git a/src/Analyzers/Analyzers/test/Microsoft.AspNetCore.Analyzers.Test.csproj b/src/Analyzers/Analyzers/test/Microsoft.AspNetCore.Analyzers.Test.csproj
index 87d62d3fdad9..e0847bc0331b 100644
--- a/src/Analyzers/Analyzers/test/Microsoft.AspNetCore.Analyzers.Test.csproj
+++ b/src/Analyzers/Analyzers/test/Microsoft.AspNetCore.Analyzers.Test.csproj
@@ -4,14 +4,7 @@
$(DefaultNetCoreTargetFramework)
true
Microsoft.AspNetCore.Analyzers
-
-
-
- false
-
-
-
-
+
diff --git a/src/Analyzers/Analyzers/test/StartupAnalyzerTest.cs b/src/Analyzers/Analyzers/test/StartupAnalyzerTest.cs
index fc635ef7f2b4..8345ddc58683 100644
--- a/src/Analyzers/Analyzers/test/StartupAnalyzerTest.cs
+++ b/src/Analyzers/Analyzers/test/StartupAnalyzerTest.cs
@@ -247,7 +247,7 @@ public async Task StartupAnalyzer_UseAuthorizationConfiguredCorrectly_ReportsNoD
[Fact]
public async Task StartupAnalyzer_UseAuthorizationConfiguredAsAChain_ReportsNoDiagnostics()
{
- // Regression test for https://github.com/aspnet/AspNetCore/issues/15203
+ // Regression test for https://github.com/dotnet/aspnetcore/issues/15203
// Arrange
var source = Read(nameof(TestFiles.StartupAnalyzerTest.UseAuthConfiguredCorrectlyChained));
@@ -298,7 +298,7 @@ public async Task StartupAnalyzer_UseAuthorizationConfiguredBeforeUseRouting_Rep
[Fact]
public async Task StartupAnalyzer_UseAuthorizationConfiguredBeforeUseRoutingChained_ReportsDiagnostics()
{
- // This one asserts a false negative for https://github.com/aspnet/AspNetCore/issues/15203.
+ // This one asserts a false negative for https://github.com/dotnet/aspnetcore/issues/15203.
// We don't correctly identify chained calls, this test verifies the behavior.
// Arrange
var source = Read(nameof(TestFiles.StartupAnalyzerTest.UseAuthBeforeUseRoutingChained));
diff --git a/src/Analyzers/Analyzers/test/TestFiles/CompilationFeatureDetectorTest/StartupWithUseSignalR.cs b/src/Analyzers/Analyzers/test/TestFiles/CompilationFeatureDetectorTest/StartupWithUseSignalR.cs
deleted file mode 100644
index aa65f832580a..000000000000
--- a/src/Analyzers/Analyzers/test/TestFiles/CompilationFeatureDetectorTest/StartupWithUseSignalR.cs
+++ /dev/null
@@ -1,20 +0,0 @@
-// Copyright (c) .NET Foundation. All rights reserved.
-// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
-
-using Microsoft.AspNetCore.Builder;
-
-namespace Microsoft.AspNetCore.Analyzers.TestFiles.CompilationFeatureDetectorTest
-{
- public class StartupWithUseSignalR
- {
- public void Configure(IApplicationBuilder app)
- {
-#pragma warning disable CS0618 // Type or member is obsolete
- app.UseSignalR(routes =>
- {
-
- });
-#pragma warning restore CS0618 // Type or member is obsolete
- }
- }
-}
diff --git a/src/Analyzers/build.sh b/src/Analyzers/build.sh
old mode 100644
new mode 100755
diff --git a/src/Analyzers/shared/FeatureDetection/Microsoft.AspNetCore.Analyzers.FeatureDetection.Sources.csproj b/src/Analyzers/shared/FeatureDetection/Microsoft.AspNetCore.Analyzers.FeatureDetection.Sources.csproj
deleted file mode 100644
index 1ec3645965f4..000000000000
--- a/src/Analyzers/shared/FeatureDetection/Microsoft.AspNetCore.Analyzers.FeatureDetection.Sources.csproj
+++ /dev/null
@@ -1,74 +0,0 @@
-
-
-
-
-
-
- netstandard1.0
- true
- false
- true
- true
- true
- false
- false
- false
- false
- contentFiles
- true
- $(DefaultExcludeItems);$(BaseOutputPath);$(BaseIntermediateOutputPath);
- $(NoWarn);CS8021
- false
-
-
-
-
- True
- lib
-
-
-
- true
- $(ContentTargetFolders)\cs\netstandard1.0\shared\
-
-
-
-
-
- %(FileName)%(Extension)
- true
- $(ContentTargetFolders)\cs\netstandard1.0\shared\
-
-
- %(FileName)%(Extension)
- true
- $(ContentTargetFolders)\cs\netstandard1.0\shared\
-
-
- %(FileName)%(Extension)
- true
- $(ContentTargetFolders)\cs\netstandard1.0\shared\
-
-
- %(FileName)%(Extension)
- true
- $(ContentTargetFolders)\cs\netstandard1.0\shared\
-
-
- %(FileName)%(Extension)
- true
- $(ContentTargetFolders)\cs\netstandard1.0\shared\
-
-
- %(FileName)%(Extension)
- true
- $(ContentTargetFolders)\cs\netstandard1.0\shared\
-
-
-
-
-
-
-
-
-
diff --git a/src/Analyzers/shared/FeatureDetection/ProjectCompilationFeatureDetector.cs b/src/Analyzers/shared/FeatureDetection/ProjectCompilationFeatureDetector.cs
deleted file mode 100644
index 9a92559a6139..000000000000
--- a/src/Analyzers/shared/FeatureDetection/ProjectCompilationFeatureDetector.cs
+++ /dev/null
@@ -1,80 +0,0 @@
-// Copyright (c) .NET Foundation. All rights reserved.
-// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
-
-using System;
-using System.Collections.Immutable;
-using System.ComponentModel.Composition;
-using System.Threading;
-using System.Threading.Tasks;
-using Microsoft.CodeAnalysis;
-using Microsoft.VisualStudio.LanguageServices;
-using Microsoft.VisualStudio.Shell;
-using Microsoft.VisualStudio.Threading;
-using Task = System.Threading.Tasks.Task;
-
-namespace Microsoft.AspNetCore.Analyzers.FeatureDetection
-{
- // Be very careful making changes to this file. No project in this repo builds it.
- //
- // If you need to verify a change, make a local project (net472) and copy in everything included by this project.
- //
- // You'll also need some nuget packages like:
- // - Microsoft.VisualStudio.LanguageServices
- // - Microsoft.VisualStudio.Shell.15.0
- // - Microsoft.VisualStudio.Threading
- [Export(typeof(ProjectCompilationFeatureDetector))]
- internal class ProjectCompilationFeatureDetector
- {
- private readonly Lazy _workspace;
-
- [ImportingConstructor]
- public ProjectCompilationFeatureDetector(Lazy workspace)
- {
- _workspace = workspace;
- }
-
- public async Task> DetectFeaturesAsync(string projectFullPath, CancellationToken cancellationToken = default)
- {
- if (projectFullPath == null)
- {
- throw new ArgumentNullException(nameof(projectFullPath));
- }
-
- // If the workspace is uninitialized, we need to do the first access on the UI thread.
- //
- // This is very unlikely to occur, but doing it here for completeness.
- if (!_workspace.IsValueCreated)
- {
- await ThreadHelper.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken);
- GC.KeepAlive(_workspace.Value);
- await TaskScheduler.Default;
- }
-
- var workspace = _workspace.Value;
- var solution = workspace.CurrentSolution;
-
- var project = GetProject(solution, projectFullPath);
- if (project == null)
- {
- // Cannot find matching project.
- return ImmutableHashSet.Empty;
- }
-
- var compilation = await project.GetCompilationAsync(cancellationToken).ConfigureAwait(false);
- return await CompilationFeatureDetector.DetectFeaturesAsync(compilation, cancellationToken);
- }
-
- private static Project GetProject(Solution solution, string projectFilePath)
- {
- foreach (var project in solution.Projects)
- {
- if (string.Equals(projectFilePath, project.FilePath, StringComparison.OrdinalIgnoreCase))
- {
- return project;
- }
- }
-
- return null;
- }
- }
-}
diff --git a/src/Antiforgery/README.md b/src/Antiforgery/README.md
index eb59611a423b..59aa0da5a0bc 100644
--- a/src/Antiforgery/README.md
+++ b/src/Antiforgery/README.md
@@ -3,4 +3,4 @@ Antiforgery
Antiforgery system for generating secure tokens to prevent Cross-Site Request Forgery attacks.
-This project is part of ASP.NET Core. You can find documentation and getting started instructions for ASP.NET Core at the [AspNetCore](https://github.com/aspnet/AspNetCore) repo.
+This project is part of ASP.NET Core. You can find documentation and getting started instructions for ASP.NET Core at the [AspNetCore](https://github.com/dotnet/aspnetcore) repo.
diff --git a/src/Antiforgery/ref/Microsoft.AspNetCore.Antiforgery.netcoreapp.cs b/src/Antiforgery/ref/Microsoft.AspNetCore.Antiforgery.netcoreapp.cs
index 5eb2c8be65a1..4ca6748ccead 100644
--- a/src/Antiforgery/ref/Microsoft.AspNetCore.Antiforgery.netcoreapp.cs
+++ b/src/Antiforgery/ref/Microsoft.AspNetCore.Antiforgery.netcoreapp.cs
@@ -9,16 +9,16 @@ public partial class AntiforgeryOptions
public AntiforgeryOptions() { }
public Microsoft.AspNetCore.Http.CookieBuilder Cookie { get { throw null; } set { } }
public string FormFieldName { get { throw null; } set { } }
- public string HeaderName { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
- public bool SuppressXFrameOptionsHeader { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
+ public string HeaderName { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } }
+ public bool SuppressXFrameOptionsHeader { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } }
}
public partial class AntiforgeryTokenSet
{
public AntiforgeryTokenSet(string requestToken, string cookieToken, string formFieldName, string headerName) { }
- public string CookieToken { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } }
- public string FormFieldName { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } }
- public string HeaderName { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } }
- public string RequestToken { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } }
+ public string CookieToken { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } }
+ public string FormFieldName { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } }
+ public string HeaderName { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } }
+ public string RequestToken { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } }
}
public partial class AntiforgeryValidationException : System.Exception
{
diff --git a/src/Antiforgery/src/IAntiforgeryAdditionalDataProvider.cs b/src/Antiforgery/src/IAntiforgeryAdditionalDataProvider.cs
index d66b6245db7b..485fc8c9e8b2 100644
--- a/src/Antiforgery/src/IAntiforgeryAdditionalDataProvider.cs
+++ b/src/Antiforgery/src/IAntiforgeryAdditionalDataProvider.cs
@@ -8,7 +8,7 @@ namespace Microsoft.AspNetCore.Antiforgery
///
/// Allows providing or validating additional custom data for antiforgery tokens.
/// For example, the developer could use this to supply a nonce when the token is
- /// generated, then he could validate the nonce when the token is validated.
+ /// generated, then validate it when the token is validated.
///
///
/// The antiforgery system already embeds the client's username within the
diff --git a/src/Antiforgery/src/Internal/BinaryBlob.cs b/src/Antiforgery/src/Internal/BinaryBlob.cs
index 0e5039295acb..9313175b36e8 100644
--- a/src/Antiforgery/src/Internal/BinaryBlob.cs
+++ b/src/Antiforgery/src/Internal/BinaryBlob.cs
@@ -15,7 +15,6 @@ namespace Microsoft.AspNetCore.Antiforgery
[DebuggerDisplay("{DebuggerString}")]
internal sealed class BinaryBlob : IEquatable
{
- private static readonly RandomNumberGenerator _randomNumberGenerator = RandomNumberGenerator.Create();
private readonly byte[] _data;
// Generates a new token using a specified bit length.
@@ -92,7 +91,7 @@ public override int GetHashCode()
private static byte[] GenerateNewToken(int bitLength)
{
var data = new byte[bitLength / 8];
- _randomNumberGenerator.GetBytes(data);
+ RandomNumberGenerator.Fill(data);
return data;
}
diff --git a/src/Antiforgery/src/Internal/DefaultAntiforgery.cs b/src/Antiforgery/src/Internal/DefaultAntiforgery.cs
index 030f79c07efc..f88d18bf8a22 100644
--- a/src/Antiforgery/src/Internal/DefaultAntiforgery.cs
+++ b/src/Antiforgery/src/Internal/DefaultAntiforgery.cs
@@ -102,10 +102,10 @@ public async Task IsRequestValidAsync(HttpContext httpContext)
CheckSSLConfig(httpContext);
var method = httpContext.Request.Method;
- if (string.Equals(method, "GET", StringComparison.OrdinalIgnoreCase) ||
- string.Equals(method, "HEAD", StringComparison.OrdinalIgnoreCase) ||
- string.Equals(method, "OPTIONS", StringComparison.OrdinalIgnoreCase) ||
- string.Equals(method, "TRACE", StringComparison.OrdinalIgnoreCase))
+ if (HttpMethods.IsGet(method) ||
+ HttpMethods.IsHead(method) ||
+ HttpMethods.IsOptions(method) ||
+ HttpMethods.IsTrace(method))
{
// Validation not needed for these request types.
return true;
@@ -379,7 +379,7 @@ private IAntiforgeryFeature GetTokensInternal(HttpContext httpContext)
/// The .
protected virtual void SetDoNotCacheHeaders(HttpContext httpContext)
{
- // Since antifogery token generation is not very obvious to the end users (ex: MVC's form tag generates them
+ // Since antiforgery token generation is not very obvious to the end users (ex: MVC's form tag generates them
// by default), log a warning to let users know of the change in behavior to any cache headers they might
// have set explicitly.
LogCacheHeaderOverrideWarning(httpContext.Response);
diff --git a/src/Antiforgery/test/DefaultAntiforgeryTokenGeneratorTest.cs b/src/Antiforgery/test/DefaultAntiforgeryTokenGeneratorTest.cs
index e32fbb85ab09..3df264d48d50 100644
--- a/src/Antiforgery/test/DefaultAntiforgeryTokenGeneratorTest.cs
+++ b/src/Antiforgery/test/DefaultAntiforgeryTokenGeneratorTest.cs
@@ -149,10 +149,7 @@ public void GenerateRequestToken_ClaimsBasedIdentity()
httpContext.User = new ClaimsPrincipal(identity);
byte[] data = new byte[256 / 8];
- using (var rng = RandomNumberGenerator.Create())
- {
- rng.GetBytes(data);
- }
+ RandomNumberGenerator.Fill(data);
var base64ClaimUId = Convert.ToBase64String(data);
var expectedClaimUid = new BinaryBlob(256, data);
diff --git a/src/Antiforgery/test/DefaultClaimUidExtractorTest.cs b/src/Antiforgery/test/DefaultClaimUidExtractorTest.cs
index 1852b910dadb..67d690a83ae2 100644
--- a/src/Antiforgery/test/DefaultClaimUidExtractorTest.cs
+++ b/src/Antiforgery/test/DefaultClaimUidExtractorTest.cs
@@ -56,7 +56,7 @@ public void ExtractClaimUid_ClaimsIdentity()
public void DefaultUniqueClaimTypes_NotPresent_SerializesAllClaimTypes()
{
var identity = new ClaimsIdentity("someAuthentication");
- identity.AddClaim(new Claim(ClaimTypes.Email, "someone@antifrogery.com"));
+ identity.AddClaim(new Claim(ClaimTypes.Email, "someone@antiforgery.com"));
identity.AddClaim(new Claim(ClaimTypes.GivenName, "some"));
identity.AddClaim(new Claim(ClaimTypes.Surname, "one"));
identity.AddClaim(new Claim(ClaimTypes.NameIdentifier, string.Empty));
diff --git a/src/Antiforgery/test/Microsoft.AspNetCore.Antiforgery.Test.csproj b/src/Antiforgery/test/Microsoft.AspNetCore.Antiforgery.Test.csproj
index 4b4a43b6c1ae..d7654d288dd7 100644
--- a/src/Antiforgery/test/Microsoft.AspNetCore.Antiforgery.Test.csproj
+++ b/src/Antiforgery/test/Microsoft.AspNetCore.Antiforgery.Test.csproj
@@ -8,7 +8,6 @@
-
diff --git a/src/Azure/AzureAD/Authentication.AzureAD.UI/src/Areas/AzureAD/Pages/Account/AccessDenied.cshtml b/src/Azure/AzureAD/Authentication.AzureAD.UI/src/Areas/AzureAD/Pages/Account/AccessDenied.cshtml
index cc158167418e..487effa8c19c 100644
--- a/src/Azure/AzureAD/Authentication.AzureAD.UI/src/Areas/AzureAD/Pages/Account/AccessDenied.cshtml
+++ b/src/Azure/AzureAD/Authentication.AzureAD.UI/src/Areas/AzureAD/Pages/Account/AccessDenied.cshtml
@@ -5,6 +5,6 @@
}
\ No newline at end of file
+ @ViewData["Title"]
+ You do not have access to this resource.
+
diff --git a/src/Azure/AzureAD/Authentication.AzureAD.UI/src/Areas/AzureAD/Pages/Account/Error.cshtml b/src/Azure/AzureAD/Authentication.AzureAD.UI/src/Areas/AzureAD/Pages/Account/Error.cshtml
index b1f462275857..30e569ead11f 100644
--- a/src/Azure/AzureAD/Authentication.AzureAD.UI/src/Areas/AzureAD/Pages/Account/Error.cshtml
+++ b/src/Azure/AzureAD/Authentication.AzureAD.UI/src/Areas/AzureAD/Pages/Account/Error.cshtml
@@ -4,20 +4,20 @@
ViewData["Title"] = "Error";
}
-Error.
-An error occurred while processing your request.
+Error.
+An error occurred while processing your request.
@if (Model.ShowRequestId)
{
-
+
Request ID: @Model.RequestId
}
-Development Mode
-
+
Development Mode
+
Swapping to Development environment will display more detailed information about the error that occurred.
-
+
Development environment should not be enabled in deployed applications , as it can result in sensitive information from exceptions being displayed to end users. For local debugging, development environment can be enabled by setting the ASPNETCORE_ENVIRONMENT environment variable to Development , and restarting the application.
-
\ No newline at end of file
+
diff --git a/src/Azure/AzureAD/Authentication.AzureAD.UI/src/Areas/AzureAD/Pages/Account/SignedOut.cshtml b/src/Azure/AzureAD/Authentication.AzureAD.UI/src/Areas/AzureAD/Pages/Account/SignedOut.cshtml
index 41fcf9554ad6..ef41507d5b07 100644
--- a/src/Azure/AzureAD/Authentication.AzureAD.UI/src/Areas/AzureAD/Pages/Account/SignedOut.cshtml
+++ b/src/Azure/AzureAD/Authentication.AzureAD.UI/src/Areas/AzureAD/Pages/Account/SignedOut.cshtml
@@ -4,7 +4,7 @@
ViewData["Title"] = "Signed out";
}
-@ViewData["Title"]
-
+
@ViewData["Title"]
+
You have successfully signed out.
-
\ No newline at end of file
+
diff --git a/src/Azure/AzureAD/Authentication.AzureAD.UI/src/Microsoft.AspNetCore.Authentication.AzureAD.UI.csproj b/src/Azure/AzureAD/Authentication.AzureAD.UI/src/Microsoft.AspNetCore.Authentication.AzureAD.UI.csproj
index 6720f825e670..a17773b58dcf 100644
--- a/src/Azure/AzureAD/Authentication.AzureAD.UI/src/Microsoft.AspNetCore.Authentication.AzureAD.UI.csproj
+++ b/src/Azure/AzureAD/Authentication.AzureAD.UI/src/Microsoft.AspNetCore.Authentication.AzureAD.UI.csproj
@@ -6,7 +6,7 @@
$(DefaultNetCoreTargetFramework)
aspnetcore;authentication;AzureAD
true
- true
+ true
Microsoft.AspNetCore.Mvc.ApplicationParts.NullApplicationPartFactory, Microsoft.AspNetCore.Mvc.Core
true
diff --git a/src/Azure/AzureAD/Authentication.AzureADB2C.UI/src/Areas/AzureADB2C/Pages/Account/AccessDenied.cshtml b/src/Azure/AzureAD/Authentication.AzureADB2C.UI/src/Areas/AzureADB2C/Pages/Account/AccessDenied.cshtml
index cc158167418e..ac4c026e2f20 100644
--- a/src/Azure/AzureAD/Authentication.AzureADB2C.UI/src/Areas/AzureADB2C/Pages/Account/AccessDenied.cshtml
+++ b/src/Azure/AzureAD/Authentication.AzureADB2C.UI/src/Areas/AzureADB2C/Pages/Account/AccessDenied.cshtml
@@ -5,6 +5,6 @@
}
\ No newline at end of file
+ @ViewData["Title"]
+ You do not have access to this resource.
+
diff --git a/src/Azure/AzureAD/Authentication.AzureADB2C.UI/src/Areas/AzureADB2C/Pages/Account/Error.cshtml b/src/Azure/AzureAD/Authentication.AzureADB2C.UI/src/Areas/AzureADB2C/Pages/Account/Error.cshtml
index b1f462275857..60da74a37260 100644
--- a/src/Azure/AzureAD/Authentication.AzureADB2C.UI/src/Areas/AzureADB2C/Pages/Account/Error.cshtml
+++ b/src/Azure/AzureAD/Authentication.AzureADB2C.UI/src/Areas/AzureADB2C/Pages/Account/Error.cshtml
@@ -4,20 +4,20 @@
ViewData["Title"] = "Error";
}
-Error.
-An error occurred while processing your request.
+Error.
+An error occurred while processing your request.
@if (Model.ShowRequestId)
{
-
+
Request ID: @Model.RequestId
}
-Development Mode
-
+
Development Mode
+
Swapping to Development environment will display more detailed information about the error that occurred.
-
+
Development environment should not be enabled in deployed applications , as it can result in sensitive information from exceptions being displayed to end users. For local debugging, development environment can be enabled by setting the ASPNETCORE_ENVIRONMENT environment variable to Development , and restarting the application.
-
\ No newline at end of file
+
diff --git a/src/Azure/AzureAD/Authentication.AzureADB2C.UI/src/Areas/AzureADB2C/Pages/Account/SignedOut.cshtml b/src/Azure/AzureAD/Authentication.AzureADB2C.UI/src/Areas/AzureADB2C/Pages/Account/SignedOut.cshtml
index 41fcf9554ad6..b29fbad79cd1 100644
--- a/src/Azure/AzureAD/Authentication.AzureADB2C.UI/src/Areas/AzureADB2C/Pages/Account/SignedOut.cshtml
+++ b/src/Azure/AzureAD/Authentication.AzureADB2C.UI/src/Areas/AzureADB2C/Pages/Account/SignedOut.cshtml
@@ -4,7 +4,7 @@
ViewData["Title"] = "Signed out";
}
-@ViewData["Title"]
-
+
@ViewData["Title"]
+
You have successfully signed out.
-
\ No newline at end of file
+
diff --git a/src/Azure/AzureAD/Authentication.AzureADB2C.UI/src/Microsoft.AspNetCore.Authentication.AzureADB2C.UI.csproj b/src/Azure/AzureAD/Authentication.AzureADB2C.UI/src/Microsoft.AspNetCore.Authentication.AzureADB2C.UI.csproj
index 2711ae53037d..77ec20937b75 100644
--- a/src/Azure/AzureAD/Authentication.AzureADB2C.UI/src/Microsoft.AspNetCore.Authentication.AzureADB2C.UI.csproj
+++ b/src/Azure/AzureAD/Authentication.AzureADB2C.UI/src/Microsoft.AspNetCore.Authentication.AzureADB2C.UI.csproj
@@ -6,7 +6,7 @@
$(DefaultNetCoreTargetFramework)
aspnetcore;authentication;AzureADB2C
true
- true
+ true
Microsoft.AspNetCore.Mvc.ApplicationParts.NullApplicationPartFactory, Microsoft.AspNetCore.Mvc.Core
true
diff --git a/src/Azure/AzureAD/test/FunctionalTests/Microsoft.AspNetCore.Authentication.AzureAD.FunctionalTests.csproj b/src/Azure/AzureAD/test/FunctionalTests/Microsoft.AspNetCore.Authentication.AzureAD.FunctionalTests.csproj
index d2cb51194b0a..ba0beb09c895 100644
--- a/src/Azure/AzureAD/test/FunctionalTests/Microsoft.AspNetCore.Authentication.AzureAD.FunctionalTests.csproj
+++ b/src/Azure/AzureAD/test/FunctionalTests/Microsoft.AspNetCore.Authentication.AzureAD.FunctionalTests.csproj
@@ -2,7 +2,7 @@
$(DefaultNetCoreTargetFramework)
-
+
true
@@ -16,7 +16,6 @@
-
diff --git a/src/Azure/AzureAppServices.HostingStartup/src/Microsoft.AspNetCore.AzureAppServices.HostingStartup.csproj b/src/Azure/AzureAppServices.HostingStartup/src/Microsoft.AspNetCore.AzureAppServices.HostingStartup.csproj
index 8992d007b831..5d4b07647f16 100644
--- a/src/Azure/AzureAppServices.HostingStartup/src/Microsoft.AspNetCore.AzureAppServices.HostingStartup.csproj
+++ b/src/Azure/AzureAppServices.HostingStartup/src/Microsoft.AspNetCore.AzureAppServices.HostingStartup.csproj
@@ -7,7 +7,7 @@
$(DefaultNetCoreTargetFramework)
true
aspnetcore;azure;appservices
- true
+ true
diff --git a/src/Azure/AzureAppServicesIntegration/src/Microsoft.AspNetCore.AzureAppServicesIntegration.csproj b/src/Azure/AzureAppServicesIntegration/src/Microsoft.AspNetCore.AzureAppServicesIntegration.csproj
index 972ea62ff830..a9f4eae94d18 100644
--- a/src/Azure/AzureAppServicesIntegration/src/Microsoft.AspNetCore.AzureAppServicesIntegration.csproj
+++ b/src/Azure/AzureAppServicesIntegration/src/Microsoft.AspNetCore.AzureAppServicesIntegration.csproj
@@ -7,7 +7,7 @@
true
true
aspnetcore;azure;appservices
- true
+ true
diff --git a/src/Components/Analyzers/src/ComponentInternalUsageDiagnosticAnalzyer.cs b/src/Components/Analyzers/src/ComponentInternalUsageDiagnosticAnalzyer.cs
index 8f6272c32639..b1b5724cb393 100644
--- a/src/Components/Analyzers/src/ComponentInternalUsageDiagnosticAnalzyer.cs
+++ b/src/Components/Analyzers/src/ComponentInternalUsageDiagnosticAnalzyer.cs
@@ -1,6 +1,7 @@
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
+using System;
using System.Collections.Immutable;
using Microsoft.AspNetCore.Components.Analyzers;
using Microsoft.CodeAnalysis;
@@ -15,6 +16,8 @@ namespace Microsoft.Extensions.Internal
[DiagnosticAnalyzer(LanguageNames.CSharp)]
public class ComponentInternalUsageDiagnosticAnalyzer : DiagnosticAnalyzer
{
+ private static readonly string[] NamespaceParts = new[] { "RenderTree", "Components", "AspNetCore", "Microsoft", };
+
private readonly InternalUsageAnalyzer _inner;
public ComponentInternalUsageDiagnosticAnalyzer()
@@ -27,17 +30,25 @@ public ComponentInternalUsageDiagnosticAnalyzer()
public override void Initialize(AnalysisContext context)
{
+ context.ConfigureGeneratedCodeAnalysis(GeneratedCodeAnalysisFlags.Analyze | GeneratedCodeAnalysisFlags.ReportDiagnostics);
+
_inner.Register(context);
}
private static bool IsInInternalNamespace(ISymbol symbol)
{
- if (symbol?.ContainingNamespace?.ToDisplayString() is string ns)
+ var @namespace = symbol?.ContainingNamespace;
+ for (var i = 0; i < NamespaceParts.Length; i++)
{
- return string.Equals(ns, "Microsoft.AspNetCore.Components.RenderTree");
+ if (@namespace == null || !string.Equals(NamespaceParts[i], @namespace.Name, StringComparison.Ordinal))
+ {
+ return false;
+ }
+
+ @namespace = @namespace.ContainingNamespace;
}
- return false;
+ return @namespace.IsGlobalNamespace;
}
}
}
diff --git a/src/Components/Analyzers/src/DiagnosticDescriptors.cs b/src/Components/Analyzers/src/DiagnosticDescriptors.cs
index 8eb86b3212fa..05b98d3b4afb 100644
--- a/src/Components/Analyzers/src/DiagnosticDescriptors.cs
+++ b/src/Components/Analyzers/src/DiagnosticDescriptors.cs
@@ -10,7 +10,7 @@ internal static class DiagnosticDescriptors
// Note: The Razor Compiler (including Components features) use the RZ prefix for diagnostics, so there's currently
// no change of clashing between that and the BL prefix used here.
//
- // Tracking https://github.com/aspnet/AspNetCore/issues/10382 to rationalize this
+ // Tracking https://github.com/dotnet/aspnetcore/issues/10382 to rationalize this
public static readonly DiagnosticDescriptor ComponentParameterSettersShouldBePublic = new DiagnosticDescriptor(
"BL0001",
new LocalizableResourceString(nameof(Resources.ComponentParameterSettersShouldBePublic_Title), Resources.ResourceManager, typeof(Resources)),
diff --git a/src/Components/Analyzers/src/InternalUsageAnalyzer.cs b/src/Components/Analyzers/src/InternalUsageAnalyzer.cs
index 92b07a7ab215..af77a42eccec 100644
--- a/src/Components/Analyzers/src/InternalUsageAnalyzer.cs
+++ b/src/Components/Analyzers/src/InternalUsageAnalyzer.cs
@@ -2,10 +2,10 @@
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
+using System.Linq;
using Microsoft.CodeAnalysis;
-using Microsoft.CodeAnalysis.CSharp;
-using Microsoft.CodeAnalysis.CSharp.Syntax;
using Microsoft.CodeAnalysis.Diagnostics;
+using Microsoft.CodeAnalysis.Operations;
namespace Microsoft.Extensions.Internal
{
@@ -35,87 +35,149 @@ public InternalUsageAnalyzer(Func isInInternalNamespace, Func creation.Constructor,
+ IInvocationOperation invocation => invocation.TargetMethod,
+ IFieldReferenceOperation field => field.Member,
+ IMethodReferenceOperation method => method.Member,
+ IPropertyReferenceOperation property => property.Member,
+ IEventReferenceOperation @event => @event.Member,
+ _ => throw new InvalidOperationException("Unexpected operation kind: " + context.Operation.Kind),
+ };
+
+ VisitOperationSymbol(context, symbol);
}
- private void AnalyzeNode(SyntaxNodeAnalysisContext context)
+ private void AnalyzeSymbol(SymbolAnalysisContext context)
{
- switch (context.Node)
+ // Note: we don't currently try to detect second-order usage of these types
+ // like public Task GetFooAsync() { }.
+ //
+ // This probably accomplishes our goals OK for now, which are focused on use of these
+ // types in method bodies.
+ switch (context.Symbol)
{
- case MemberAccessExpressionSyntax memberAccessSyntax:
+ case INamedTypeSymbol type:
+ VisitDeclarationSymbol(context, type.BaseType, type);
+ foreach (var @interface in type.Interfaces)
{
- if (context.SemanticModel.GetSymbolInfo(context.Node, context.CancellationToken).Symbol is ISymbol symbol &&
- symbol.ContainingAssembly != context.Compilation.Assembly)
- {
- var containingType = symbol.ContainingType;
-
- if (HasInternalAttribute(symbol))
- {
- context.ReportDiagnostic(Diagnostic.Create(_descriptor, memberAccessSyntax.Name.GetLocation(), $"{containingType}.{symbol.Name}"));
- return;
- }
-
- if (IsInInternalNamespace(containingType) || HasInternalAttribute(containingType))
- {
- context.ReportDiagnostic(Diagnostic.Create(_descriptor, memberAccessSyntax.Name.GetLocation(), containingType));
- return;
- }
- }
- return;
+ VisitDeclarationSymbol(context, @interface, type);
}
+ break;
- case ObjectCreationExpressionSyntax creationSyntax:
- {
- if (context.SemanticModel.GetSymbolInfo(context.Node, context.CancellationToken).Symbol is ISymbol symbol &&
- symbol.ContainingAssembly != context.Compilation.Assembly)
- {
- var containingType = symbol.ContainingType;
-
- if (HasInternalAttribute(symbol))
- {
- context.ReportDiagnostic(Diagnostic.Create(_descriptor, creationSyntax.GetLocation(), containingType));
- return;
- }
-
- if (IsInInternalNamespace(containingType) || HasInternalAttribute(containingType))
- {
- context.ReportDiagnostic(Diagnostic.Create(_descriptor, creationSyntax.Type.GetLocation(), containingType));
- return;
- }
- }
+ case IFieldSymbol field:
+ VisitDeclarationSymbol(context, field.Type, field);
+ break;
- return;
+ case IMethodSymbol method:
+
+ // Ignore return types on property-getters. Those will be reported through
+ // the property analysis.
+ if (method.MethodKind != MethodKind.PropertyGet)
+ {
+ VisitDeclarationSymbol(context, method.ReturnType, method);
}
- case ClassDeclarationSyntax declarationSyntax:
+ // Ignore parameters on property-setters. Those will be reported through
+ // the property analysis.
+ if (method.MethodKind != MethodKind.PropertySet)
{
- if (context.SemanticModel.GetDeclaredSymbol(declarationSyntax)?.BaseType is ISymbol symbol &&
- symbol.ContainingAssembly != context.Compilation.Assembly &&
- (IsInInternalNamespace(symbol) || HasInternalAttribute(symbol)) &&
- declarationSyntax.BaseList?.Types.Count > 0)
+ foreach (var parameter in method.Parameters)
{
- context.ReportDiagnostic(Diagnostic.Create(_descriptor, declarationSyntax.BaseList.Types[0].GetLocation(), symbol));
+ VisitDeclarationSymbol(context, parameter.Type, method);
}
-
- return;
}
+ break;
- case ParameterSyntax parameterSyntax:
- {
- if (context.SemanticModel.GetDeclaredSymbol(parameterSyntax)?.Type is ISymbol symbol &&
- symbol.ContainingAssembly != context.Compilation.Assembly &&
- (IsInInternalNamespace(symbol) || HasInternalAttribute(symbol)))
- {
+ case IPropertySymbol property:
+ VisitDeclarationSymbol(context, property.Type, property);
+ break;
- context.ReportDiagnostic(Diagnostic.Create(_descriptor, parameterSyntax.GetLocation(), symbol));
- }
+ case IEventSymbol @event:
+ VisitDeclarationSymbol(context, @event.Type, @event);
+ break;
+ }
+ }
- return;
- }
+ // Similar logic here to VisitDeclarationSymbol, keep these in sync.
+ private void VisitOperationSymbol(OperationAnalysisContext context, ISymbol symbol)
+ {
+ if (symbol == null || symbol.ContainingAssembly == context.Compilation.Assembly)
+ {
+ // The type is being referenced within the same assembly. This is valid use of an "internal" type
+ return;
+ }
+
+ if (HasInternalAttribute(symbol))
+ {
+ context.ReportDiagnostic(Diagnostic.Create(
+ _descriptor,
+ context.Operation.Syntax.GetLocation(),
+ symbol.ToDisplayString(SymbolDisplayFormat.CSharpShortErrorMessageFormat)));
+ return;
+ }
+
+ var containingType = symbol.ContainingType;
+ if (IsInInternalNamespace(containingType) || HasInternalAttribute(containingType))
+ {
+ context.ReportDiagnostic(Diagnostic.Create(
+ _descriptor,
+ context.Operation.Syntax.GetLocation(),
+ containingType.ToDisplayString(SymbolDisplayFormat.CSharpShortErrorMessageFormat)));
+ return;
+ }
+ }
+
+ // Similar logic here to VisitOperationSymbol, keep these in sync.
+ private void VisitDeclarationSymbol(SymbolAnalysisContext context, ISymbol symbol, ISymbol symbolForDiagnostic)
+ {
+ if (symbol == null || symbol.ContainingAssembly == context.Compilation.Assembly)
+ {
+ // This is part of the compilation, avoid this analyzer when building from source.
+ return;
+ }
+
+ if (HasInternalAttribute(symbol))
+ {
+ context.ReportDiagnostic(Diagnostic.Create(
+ _descriptor,
+ symbolForDiagnostic.DeclaringSyntaxReferences.FirstOrDefault()?.GetSyntax().GetLocation() ?? Location.None,
+ symbol.ToDisplayString(SymbolDisplayFormat.CSharpShortErrorMessageFormat)));
+ return;
+ }
+
+ var containingType = symbol as INamedTypeSymbol ?? symbol.ContainingType;
+ if (IsInInternalNamespace(containingType) || HasInternalAttribute(containingType))
+ {
+ context.ReportDiagnostic(Diagnostic.Create(
+ _descriptor,
+ symbolForDiagnostic.DeclaringSyntaxReferences.FirstOrDefault()?.GetSyntax().GetLocation() ?? Location.None,
+ containingType.ToDisplayString(SymbolDisplayFormat.CSharpShortErrorMessageFormat)));
+ return;
}
}
diff --git a/src/Components/Analyzers/src/Microsoft.AspNetCore.Components.Analyzers.csproj b/src/Components/Analyzers/src/Microsoft.AspNetCore.Components.Analyzers.csproj
index 903de47c78c5..dab047ca116a 100644
--- a/src/Components/Analyzers/src/Microsoft.AspNetCore.Components.Analyzers.csproj
+++ b/src/Components/Analyzers/src/Microsoft.AspNetCore.Components.Analyzers.csproj
@@ -6,7 +6,7 @@
true
false
Roslyn analyzers for ASP.NET Core Components.
- true
+ true
false
diff --git a/src/Components/Analyzers/test/AnalyzerTestBase.cs b/src/Components/Analyzers/test/AnalyzerTestBase.cs
index 8c1ae953762e..91bfe2d9cc41 100644
--- a/src/Components/Analyzers/test/AnalyzerTestBase.cs
+++ b/src/Components/Analyzers/test/AnalyzerTestBase.cs
@@ -56,7 +56,7 @@ private static string GetProjectDirectory()
}
// This test code needs to be updated to support distributed testing.
- // See https://github.com/aspnet/AspNetCore/issues/10422
+ // See https://github.com/dotnet/aspnetcore/issues/10422
#pragma warning disable 0618
var solutionDirectory = TestPathUtilities.GetSolutionRootDirectory("Components");
#pragma warning restore 0618
diff --git a/src/Components/Analyzers/test/ComponentInternalUsageDiagnosticsAnalyzerTest.cs b/src/Components/Analyzers/test/ComponentInternalUsageDiagnosticsAnalyzerTest.cs
new file mode 100644
index 000000000000..c7a01a5c630f
--- /dev/null
+++ b/src/Components/Analyzers/test/ComponentInternalUsageDiagnosticsAnalyzerTest.cs
@@ -0,0 +1,105 @@
+// Copyright (c) .NET Foundation. All rights reserved.
+// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
+
+using System.Threading.Tasks;
+using Microsoft.AspNetCore.Analyzer.Testing;
+using Microsoft.Extensions.Internal;
+using Xunit;
+
+namespace Microsoft.AspNetCore.Components.Analyzers
+{
+ public class ComponentInternalUsageDiagnosticsAnalyzerTest : AnalyzerTestBase
+ {
+ public ComponentInternalUsageDiagnosticsAnalyzerTest()
+ {
+ Analyzer = new ComponentInternalUsageDiagnosticAnalyzer();
+ Runner = new ComponentAnalyzerDiagnosticAnalyzerRunner(Analyzer);
+ }
+
+ private ComponentInternalUsageDiagnosticAnalyzer Analyzer { get; }
+ private ComponentAnalyzerDiagnosticAnalyzerRunner Runner { get; }
+
+ [Fact]
+ public async Task InternalUsage_FindsUseOfInternalTypesInDeclarations()
+ {
+ // Arrange
+ var source = Read("UsesRendererTypesInDeclarations");
+
+ // Act
+ var diagnostics = await Runner.GetDiagnosticsAsync(source.Source);
+
+ // Assert
+ Assert.Collection(
+ diagnostics,
+ diagnostic =>
+ {
+ Assert.Same(DiagnosticDescriptors.DoNotUseRenderTreeTypes, diagnostic.Descriptor);
+ AnalyzerAssert.DiagnosticLocation(source.MarkerLocations["MMBaseClass"], diagnostic.Location);
+ },
+ diagnostic =>
+ {
+ Assert.Same(DiagnosticDescriptors.DoNotUseRenderTreeTypes, diagnostic.Descriptor);
+ AnalyzerAssert.DiagnosticLocation(source.MarkerLocations["MMField"], diagnostic.Location);
+ },
+ diagnostic =>
+ {
+ Assert.Same(DiagnosticDescriptors.DoNotUseRenderTreeTypes, diagnostic.Descriptor);
+ AnalyzerAssert.DiagnosticLocation(source.MarkerLocations["MMInvocation"], diagnostic.Location);
+ },
+ diagnostic =>
+ {
+ Assert.Same(DiagnosticDescriptors.DoNotUseRenderTreeTypes, diagnostic.Descriptor);
+ AnalyzerAssert.DiagnosticLocation(source.MarkerLocations["MMProperty"], diagnostic.Location);
+ },
+ diagnostic =>
+ {
+ Assert.Same(DiagnosticDescriptors.DoNotUseRenderTreeTypes, diagnostic.Descriptor);
+ AnalyzerAssert.DiagnosticLocation(source.MarkerLocations["MMParameter"], diagnostic.Location);
+ },
+ diagnostic =>
+ {
+ Assert.Same(DiagnosticDescriptors.DoNotUseRenderTreeTypes, diagnostic.Descriptor);
+ AnalyzerAssert.DiagnosticLocation(source.MarkerLocations["MMReturnType"], diagnostic.Location);
+ });
+ }
+
+ [Fact]
+ public async Task InternalUsage_FindsUseOfInternalTypesInMethodBody()
+ {
+ // Arrange
+ var source = Read("UsersRendererTypesInMethodBody");
+
+ // Act
+ var diagnostics = await Runner.GetDiagnosticsAsync(source.Source);
+
+ // Assert
+ Assert.Collection(
+ diagnostics,
+ diagnostic =>
+ {
+ Assert.Same(DiagnosticDescriptors.DoNotUseRenderTreeTypes, diagnostic.Descriptor);
+ AnalyzerAssert.DiagnosticLocation(source.MarkerLocations["MMField"], diagnostic.Location);
+ },
+ diagnostic =>
+ {
+ Assert.Same(DiagnosticDescriptors.DoNotUseRenderTreeTypes, diagnostic.Descriptor);
+ AnalyzerAssert.DiagnosticLocation(source.MarkerLocations["MMNewObject"], diagnostic.Location);
+ },
+ diagnostic =>
+ {
+ Assert.Same(DiagnosticDescriptors.DoNotUseRenderTreeTypes, diagnostic.Descriptor);
+ AnalyzerAssert.DiagnosticLocation(source.MarkerLocations["MMProperty"], diagnostic.Location);
+ },
+ diagnostic =>
+ {
+ Assert.Same(DiagnosticDescriptors.DoNotUseRenderTreeTypes, diagnostic.Descriptor);
+ AnalyzerAssert.DiagnosticLocation(source.MarkerLocations["MMNewObject2"], diagnostic.Location);
+ },
+ diagnostic =>
+ {
+ Assert.Same(DiagnosticDescriptors.DoNotUseRenderTreeTypes, diagnostic.Descriptor);
+ AnalyzerAssert.DiagnosticLocation(source.MarkerLocations["MMInvocation"], diagnostic.Location);
+ });
+ }
+ }
+}
diff --git a/src/Components/Analyzers/test/ComponentInternalUsageDiagnoticsAnalyzerTest.cs b/src/Components/Analyzers/test/ComponentInternalUsageDiagnoticsAnalyzerTest.cs
deleted file mode 100644
index 92e2252304af..000000000000
--- a/src/Components/Analyzers/test/ComponentInternalUsageDiagnoticsAnalyzerTest.cs
+++ /dev/null
@@ -1,60 +0,0 @@
-// Copyright (c) .NET Foundation. All rights reserved.
-// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
-
-using System.Threading.Tasks;
-using Microsoft.AspNetCore.Analyzer.Testing;
-using Microsoft.Extensions.Internal;
-using Xunit;
-
-namespace Microsoft.AspNetCore.Components.Analyzers
-{
- public class ComponentInternalUsageDiagnoticsAnalyzerTest : AnalyzerTestBase
- {
- public ComponentInternalUsageDiagnoticsAnalyzerTest()
- {
- Analyzer = new ComponentInternalUsageDiagnosticAnalyzer();
- Runner = new ComponentAnalyzerDiagnosticAnalyzerRunner(Analyzer);
- }
-
- private ComponentInternalUsageDiagnosticAnalyzer Analyzer { get; }
- private ComponentAnalyzerDiagnosticAnalyzerRunner Runner { get; }
-
- [Fact]
- public async Task InternalUsage_FindsUseOfRenderTreeFrameAsParameter()
- {
- // Arrange
- var source = Read("UsesRenderTreeFrameAsParameter");
-
- // Act
- var diagnostics = await Runner.GetDiagnosticsAsync(source.Source);
-
- // Assert
- Assert.Collection(
- diagnostics,
- diagnostic =>
- {
- Assert.Same(DiagnosticDescriptors.DoNotUseRenderTreeTypes, diagnostic.Descriptor);
- AnalyzerAssert.DiagnosticLocation(source.DefaultMarkerLocation, diagnostic.Location);
- });
- }
-
- [Fact]
- public async Task InternalUsage_FindsUseOfRenderTreeType()
- {
- // Arrange
- var source = Read("UsesRenderTreeFrameTypeAsLocal");
-
- // Act
- var diagnostics = await Runner.GetDiagnosticsAsync(source.Source);
-
- // Assert
- Assert.Collection(
- diagnostics,
- diagnostic =>
- {
- Assert.Same(DiagnosticDescriptors.DoNotUseRenderTreeTypes, diagnostic.Descriptor);
- AnalyzerAssert.DiagnosticLocation(source.DefaultMarkerLocation, diagnostic.Location);
- });
- }
- }
-}
diff --git a/src/Components/Analyzers/test/Microsoft.AspNetCore.Components.Analyzers.Tests.csproj b/src/Components/Analyzers/test/Microsoft.AspNetCore.Components.Analyzers.Tests.csproj
index 10085017d1f8..80b92842f4ba 100644
--- a/src/Components/Analyzers/test/Microsoft.AspNetCore.Components.Analyzers.Tests.csproj
+++ b/src/Components/Analyzers/test/Microsoft.AspNetCore.Components.Analyzers.Tests.csproj
@@ -3,9 +3,6 @@
$(DefaultNetCoreTargetFramework)
-
-
- false
diff --git a/src/Components/Analyzers/test/TestFiles/ComponentInternalUsageDiagnosticsAnalyzerTest/UsersRendererTypesInMethodBody.cs b/src/Components/Analyzers/test/TestFiles/ComponentInternalUsageDiagnosticsAnalyzerTest/UsersRendererTypesInMethodBody.cs
new file mode 100644
index 000000000000..9bd27fb960c1
--- /dev/null
+++ b/src/Components/Analyzers/test/TestFiles/ComponentInternalUsageDiagnosticsAnalyzerTest/UsersRendererTypesInMethodBody.cs
@@ -0,0 +1,20 @@
+using System;
+using Microsoft.AspNetCore.Components.RenderTree;
+
+namespace Microsoft.AspNetCore.Components.Analyzers.Tests.TestFiles.ComponentInternalUsageDiagnosticsAnalyzerTest
+{
+ class UsersRendererTypesInMethodBody
+ {
+ private void Test()
+ {
+ var test = /*MMField*/RenderTreeFrameType.Attribute;
+ GC.KeepAlive(test);
+
+ var frame = /*MMNewObject*/new RenderTreeFrame();
+ GC.KeepAlive(/*MMProperty*/frame.Component);
+
+ var range = /*MMNewObject2*/new ArrayRange(null, 0);
+ /*MMInvocation*/range.Clone();
+ }
+ }
+}
diff --git a/src/Components/Analyzers/test/TestFiles/ComponentInternalUsageDiagnosticsAnalyzerTest/UsesRendererAsBaseClass.cs b/src/Components/Analyzers/test/TestFiles/ComponentInternalUsageDiagnosticsAnalyzerTest/UsesRendererAsBaseClass.cs
new file mode 100644
index 000000000000..7ca9dfccf5c8
--- /dev/null
+++ b/src/Components/Analyzers/test/TestFiles/ComponentInternalUsageDiagnosticsAnalyzerTest/UsesRendererAsBaseClass.cs
@@ -0,0 +1,26 @@
+using System;
+using System.Threading.Tasks;
+using Microsoft.AspNetCore.Components.RenderTree;
+
+namespace Microsoft.AspNetCore.Components.Analyzers.Tests.TestFiles.ComponentInternalUsageDiagnosticsAnalyzerTest
+{
+ /*MM*/class UsesRendererAsBaseClass : Renderer
+ {
+ public UsesRendererAsBaseClass()
+ : base(null, null)
+ {
+ }
+
+ public override Dispatcher Dispatcher => throw new NotImplementedException();
+
+ protected override void HandleException(Exception exception)
+ {
+ throw new NotImplementedException();
+ }
+
+ protected override Task UpdateDisplayAsync(/*M1*/in RenderBatch renderBatch)
+ {
+ throw new NotImplementedException();
+ }
+ }
+}
diff --git a/src/Components/Analyzers/test/TestFiles/ComponentInternalUsageDiagnosticsAnalyzerTest/UsesRendererTypesInDeclarations.cs b/src/Components/Analyzers/test/TestFiles/ComponentInternalUsageDiagnosticsAnalyzerTest/UsesRendererTypesInDeclarations.cs
new file mode 100644
index 000000000000..0a0bd11b7bee
--- /dev/null
+++ b/src/Components/Analyzers/test/TestFiles/ComponentInternalUsageDiagnosticsAnalyzerTest/UsesRendererTypesInDeclarations.cs
@@ -0,0 +1,36 @@
+using System;
+using System.Threading.Tasks;
+using Microsoft.AspNetCore.Components.RenderTree;
+
+namespace Microsoft.AspNetCore.Components.Analyzers.Tests.TestFiles.ComponentInternalUsageDiagnosticsAnalyzerTest
+{
+ /*MMBaseClass*/class UsesRendererTypesInDeclarations : Renderer
+ {
+ private Renderer /*MMField*/_field = null;
+
+ public UsesRendererTypesInDeclarations()
+ /*MMInvocation*/: base(null, null)
+ {
+ }
+
+ public override Dispatcher Dispatcher => throw new NotImplementedException();
+
+ /*MMProperty*/public Renderer Property { get; set; }
+
+ protected override void HandleException(Exception exception)
+ {
+ throw new NotImplementedException();
+ }
+
+ /*MMParameter*/protected override Task UpdateDisplayAsync(in RenderBatch renderBatch)
+ {
+ throw new NotImplementedException();
+ }
+
+ /*MMReturnType*/private Renderer GetRenderer() => _field;
+
+ public interface ITestInterface
+ {
+ }
+ }
+}
diff --git a/src/Components/Analyzers/test/TestFiles/ComponentInternalUsageDiagnoticsAnalyzerTest/UsesRenderTreeFrameAsParameter.cs b/src/Components/Analyzers/test/TestFiles/ComponentInternalUsageDiagnoticsAnalyzerTest/UsesRenderTreeFrameAsParameter.cs
deleted file mode 100644
index 415030a01166..000000000000
--- a/src/Components/Analyzers/test/TestFiles/ComponentInternalUsageDiagnoticsAnalyzerTest/UsesRenderTreeFrameAsParameter.cs
+++ /dev/null
@@ -1,11 +0,0 @@
-using Microsoft.AspNetCore.Components.RenderTree;
-
-namespace Microsoft.AspNetCore.Components.Analyzers.Tests.TestFiles.ComponentInternalUsageDiagnoticsAnalyzerTest
-{
- class UsesRenderTreeFrameAsParameter
- {
- private void Test(/*MM*/RenderTreeFrame frame)
- {
- }
- }
-}
diff --git a/src/Components/Analyzers/test/TestFiles/ComponentInternalUsageDiagnoticsAnalyzerTest/UsesRenderTreeFrameTypeAsLocal.cs b/src/Components/Analyzers/test/TestFiles/ComponentInternalUsageDiagnoticsAnalyzerTest/UsesRenderTreeFrameTypeAsLocal.cs
deleted file mode 100644
index bdd40c2df1ef..000000000000
--- a/src/Components/Analyzers/test/TestFiles/ComponentInternalUsageDiagnoticsAnalyzerTest/UsesRenderTreeFrameTypeAsLocal.cs
+++ /dev/null
@@ -1,15 +0,0 @@
-using System;
-using Microsoft.AspNetCore.Components.RenderTree;
-
-namespace Microsoft.AspNetCore.Components.Analyzers.Tests.TestFiles.ComponentInternalUsageDiagnoticsAnalyzerTest
-{
- class UsesRenderTreeFrameTypeAsLocal
- {
- private void Test()
- {
- var test = RenderTreeFrameType./*MM*/Attribute;
- GC.KeepAlive(test);
- }
-
- }
-}
diff --git a/src/Components/Authorization/ref/Microsoft.AspNetCore.Components.Authorization.csproj b/src/Components/Authorization/ref/Microsoft.AspNetCore.Components.Authorization.csproj
index 3a91e8a4b85b..53db4b90de52 100644
--- a/src/Components/Authorization/ref/Microsoft.AspNetCore.Components.Authorization.csproj
+++ b/src/Components/Authorization/ref/Microsoft.AspNetCore.Components.Authorization.csproj
@@ -2,6 +2,7 @@
netstandard2.0;$(DefaultNetCoreTargetFramework)
+ $(DefaultNetCoreTargetFramework)
diff --git a/src/Components/Authorization/ref/Microsoft.AspNetCore.Components.Authorization.netcoreapp.cs b/src/Components/Authorization/ref/Microsoft.AspNetCore.Components.Authorization.netcoreapp.cs
index ca0535937a18..1ed5ecbf0e5c 100644
--- a/src/Components/Authorization/ref/Microsoft.AspNetCore.Components.Authorization.netcoreapp.cs
+++ b/src/Components/Authorization/ref/Microsoft.AspNetCore.Components.Authorization.netcoreapp.cs
@@ -6,7 +6,7 @@ namespace Microsoft.AspNetCore.Components.Authorization
public partial class AuthenticationState
{
public AuthenticationState(System.Security.Claims.ClaimsPrincipal user) { }
- public System.Security.Claims.ClaimsPrincipal User { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } }
+ public System.Security.Claims.ClaimsPrincipal User { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } }
}
public delegate void AuthenticationStateChangedHandler(System.Threading.Tasks.Task task);
public abstract partial class AuthenticationStateProvider
@@ -20,33 +20,33 @@ public sealed partial class AuthorizeRouteView : Microsoft.AspNetCore.Components
{
public AuthorizeRouteView() { }
[Microsoft.AspNetCore.Components.ParameterAttribute]
- public Microsoft.AspNetCore.Components.RenderFragment Authorizing { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
+ public Microsoft.AspNetCore.Components.RenderFragment Authorizing { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } }
[Microsoft.AspNetCore.Components.ParameterAttribute]
- public Microsoft.AspNetCore.Components.RenderFragment NotAuthorized { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
+ public Microsoft.AspNetCore.Components.RenderFragment NotAuthorized { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } }
protected override void Render(Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder builder) { }
}
public partial class AuthorizeView : Microsoft.AspNetCore.Components.Authorization.AuthorizeViewCore
{
public AuthorizeView() { }
[Microsoft.AspNetCore.Components.ParameterAttribute]
- public string Policy { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
+ public string Policy { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } }
[Microsoft.AspNetCore.Components.ParameterAttribute]
- public string Roles { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
+ public string Roles { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } }
protected override Microsoft.AspNetCore.Authorization.IAuthorizeData[] GetAuthorizeData() { throw null; }
}
public abstract partial class AuthorizeViewCore : Microsoft.AspNetCore.Components.ComponentBase
{
protected AuthorizeViewCore() { }
[Microsoft.AspNetCore.Components.ParameterAttribute]
- public Microsoft.AspNetCore.Components.RenderFragment Authorized { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
+ public Microsoft.AspNetCore.Components.RenderFragment Authorized { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } }
[Microsoft.AspNetCore.Components.ParameterAttribute]
- public Microsoft.AspNetCore.Components.RenderFragment Authorizing { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
+ public Microsoft.AspNetCore.Components.RenderFragment Authorizing { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } }
[Microsoft.AspNetCore.Components.ParameterAttribute]
- public Microsoft.AspNetCore.Components.RenderFragment ChildContent { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
+ public Microsoft.AspNetCore.Components.RenderFragment ChildContent { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } }
[Microsoft.AspNetCore.Components.ParameterAttribute]
- public Microsoft.AspNetCore.Components.RenderFragment NotAuthorized { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
+ public Microsoft.AspNetCore.Components.RenderFragment NotAuthorized { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } }
[Microsoft.AspNetCore.Components.ParameterAttribute]
- public object Resource { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
+ public object Resource { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } }
protected override void BuildRenderTree(Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder builder) { }
protected abstract Microsoft.AspNetCore.Authorization.IAuthorizeData[] GetAuthorizeData();
[System.Diagnostics.DebuggerStepThroughAttribute]
@@ -56,7 +56,7 @@ public partial class CascadingAuthenticationState : Microsoft.AspNetCore.Compone
{
public CascadingAuthenticationState() { }
[Microsoft.AspNetCore.Components.ParameterAttribute]
- public Microsoft.AspNetCore.Components.RenderFragment ChildContent { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
+ public Microsoft.AspNetCore.Components.RenderFragment ChildContent { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } }
protected override void BuildRenderTree(Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder __builder) { }
protected override void OnInitialized() { }
void System.IDisposable.Dispose() { }
diff --git a/src/Components/Authorization/ref/Microsoft.AspNetCore.Components.Authorization.netstandard2.0.cs b/src/Components/Authorization/ref/Microsoft.AspNetCore.Components.Authorization.netstandard2.0.cs
index ca0535937a18..1ed5ecbf0e5c 100644
--- a/src/Components/Authorization/ref/Microsoft.AspNetCore.Components.Authorization.netstandard2.0.cs
+++ b/src/Components/Authorization/ref/Microsoft.AspNetCore.Components.Authorization.netstandard2.0.cs
@@ -6,7 +6,7 @@ namespace Microsoft.AspNetCore.Components.Authorization
public partial class AuthenticationState
{
public AuthenticationState(System.Security.Claims.ClaimsPrincipal user) { }
- public System.Security.Claims.ClaimsPrincipal User { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } }
+ public System.Security.Claims.ClaimsPrincipal User { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } }
}
public delegate void AuthenticationStateChangedHandler(System.Threading.Tasks.Task task);
public abstract partial class AuthenticationStateProvider
@@ -20,33 +20,33 @@ public sealed partial class AuthorizeRouteView : Microsoft.AspNetCore.Components
{
public AuthorizeRouteView() { }
[Microsoft.AspNetCore.Components.ParameterAttribute]
- public Microsoft.AspNetCore.Components.RenderFragment Authorizing { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
+ public Microsoft.AspNetCore.Components.RenderFragment Authorizing { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } }
[Microsoft.AspNetCore.Components.ParameterAttribute]
- public Microsoft.AspNetCore.Components.RenderFragment NotAuthorized { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
+ public Microsoft.AspNetCore.Components.RenderFragment NotAuthorized { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } }
protected override void Render(Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder builder) { }
}
public partial class AuthorizeView : Microsoft.AspNetCore.Components.Authorization.AuthorizeViewCore
{
public AuthorizeView() { }
[Microsoft.AspNetCore.Components.ParameterAttribute]
- public string Policy { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
+ public string Policy { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } }
[Microsoft.AspNetCore.Components.ParameterAttribute]
- public string Roles { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
+ public string Roles { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } }
protected override Microsoft.AspNetCore.Authorization.IAuthorizeData[] GetAuthorizeData() { throw null; }
}
public abstract partial class AuthorizeViewCore : Microsoft.AspNetCore.Components.ComponentBase
{
protected AuthorizeViewCore() { }
[Microsoft.AspNetCore.Components.ParameterAttribute]
- public Microsoft.AspNetCore.Components.RenderFragment Authorized { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
+ public Microsoft.AspNetCore.Components.RenderFragment Authorized { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } }
[Microsoft.AspNetCore.Components.ParameterAttribute]
- public Microsoft.AspNetCore.Components.RenderFragment Authorizing { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
+ public Microsoft.AspNetCore.Components.RenderFragment Authorizing { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } }
[Microsoft.AspNetCore.Components.ParameterAttribute]
- public Microsoft.AspNetCore.Components.RenderFragment ChildContent { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
+ public Microsoft.AspNetCore.Components.RenderFragment ChildContent { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } }
[Microsoft.AspNetCore.Components.ParameterAttribute]
- public Microsoft.AspNetCore.Components.RenderFragment NotAuthorized { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
+ public Microsoft.AspNetCore.Components.RenderFragment NotAuthorized { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } }
[Microsoft.AspNetCore.Components.ParameterAttribute]
- public object Resource { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
+ public object Resource { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } }
protected override void BuildRenderTree(Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder builder) { }
protected abstract Microsoft.AspNetCore.Authorization.IAuthorizeData[] GetAuthorizeData();
[System.Diagnostics.DebuggerStepThroughAttribute]
@@ -56,7 +56,7 @@ public partial class CascadingAuthenticationState : Microsoft.AspNetCore.Compone
{
public CascadingAuthenticationState() { }
[Microsoft.AspNetCore.Components.ParameterAttribute]
- public Microsoft.AspNetCore.Components.RenderFragment ChildContent { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
+ public Microsoft.AspNetCore.Components.RenderFragment ChildContent { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } }
protected override void BuildRenderTree(Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder __builder) { }
protected override void OnInitialized() { }
void System.IDisposable.Dispose() { }
diff --git a/src/Components/benchmarkapps/Directory.Build.props b/src/Components/Blazor/Blazor.Version.props
similarity index 100%
rename from src/Components/benchmarkapps/Directory.Build.props
rename to src/Components/Blazor/Blazor.Version.props
diff --git a/src/Components/Blazor/Blazor/src/Hosting/EntrypointInvoker.cs b/src/Components/Blazor/Blazor/src/Hosting/EntrypointInvoker.cs
new file mode 100644
index 000000000000..40a5d07de431
--- /dev/null
+++ b/src/Components/Blazor/Blazor/src/Hosting/EntrypointInvoker.cs
@@ -0,0 +1,89 @@
+// Copyright (c) .NET Foundation. All rights reserved.
+// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
+
+using System;
+using System.Linq;
+using System.Reflection;
+using System.Threading.Tasks;
+
+namespace Microsoft.AspNetCore.Blazor.Hosting
+{
+ internal static class EntrypointInvoker
+ {
+ // This method returns void because currently the JS side is not listening to any result,
+ // nor will it handle any exceptions. We handle all exceptions internally to this method.
+ // In the future we may want Blazor.start to return something that exposes the possibly-async
+ // entrypoint result to the JS caller. There's no requirement to do that today, and if we
+ // do change this it will be non-breaking.
+ public static void InvokeEntrypoint(string assemblyName, string[] args)
+ {
+ object entrypointResult;
+ try
+ {
+ var assembly = Assembly.Load(assemblyName);
+ var entrypoint = FindUnderlyingEntrypoint(assembly);
+ var @params = entrypoint.GetParameters().Length == 1 ? new object[] { args ?? Array.Empty() } : new object[] { };
+ entrypointResult = entrypoint.Invoke(null, @params);
+ }
+ catch (Exception syncException)
+ {
+ HandleStartupException(syncException);
+ return;
+ }
+
+ // If the entrypoint is async, handle async exceptions in the same way that we would
+ // have handled sync ones
+ if (entrypointResult is Task entrypointTask)
+ {
+ entrypointTask.ContinueWith(task =>
+ {
+ if (task.Exception != null)
+ {
+ HandleStartupException(task.Exception);
+ }
+ });
+ }
+ }
+
+ private static MethodBase FindUnderlyingEntrypoint(Assembly assembly)
+ {
+ // This is the entrypoint declared in .NET metadata. In the case of async main, it's the
+ // compiler-generated wrapper method. Otherwise it's the developer-defined method.
+ var metadataEntrypointMethodBase = assembly.EntryPoint;
+
+ // For "async Task Main", the C# compiler generates a method called ""
+ // that is marked as the assembly entrypoint. Detect this case, and instead of
+ // calling "", call the sibling "Whatever".
+ if (metadataEntrypointMethodBase.IsSpecialName)
+ {
+ var origName = metadataEntrypointMethodBase.Name;
+ var origNameLength = origName.Length;
+ if (origNameLength > 2)
+ {
+ var candidateMethodName = origName.Substring(1, origNameLength - 2);
+ var candidateMethod = metadataEntrypointMethodBase.DeclaringType.GetMethod(
+ candidateMethodName,
+ BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic,
+ null,
+ metadataEntrypointMethodBase.GetParameters().Select(p => p.ParameterType).ToArray(),
+ null);
+
+ if (candidateMethod != null)
+ {
+ return candidateMethod;
+ }
+ }
+ }
+
+ // Either it's not async main, or for some reason we couldn't locate the underlying entrypoint,
+ // so use the one from assembly metadata.
+ return metadataEntrypointMethodBase;
+ }
+
+ private static void HandleStartupException(Exception exception)
+ {
+ // Logs to console, and causes the error UI to appear
+ Console.Error.WriteLine(exception);
+ }
+ }
+}
diff --git a/src/Components/Blazor/Blazor/src/Hosting/IWebAssemblyServiceFactoryAdapter.cs b/src/Components/Blazor/Blazor/src/Hosting/IWebAssemblyServiceFactoryAdapter.cs
index c790a3c8791f..ff63ec3a669c 100644
--- a/src/Components/Blazor/Blazor/src/Hosting/IWebAssemblyServiceFactoryAdapter.cs
+++ b/src/Components/Blazor/Blazor/src/Hosting/IWebAssemblyServiceFactoryAdapter.cs
@@ -6,7 +6,7 @@
namespace Microsoft.AspNetCore.Blazor.Hosting
{
- // Equivalent to https://github.com/aspnet/Extensions/blob/master/src/Hosting/Hosting/src/Internal/IServiceFactoryAdapter.cs
+ // Equivalent to https://github.com/dotnet/extensions/blob/master/src/Hosting/Hosting/src/Internal/IServiceFactoryAdapter.cs
internal interface IWebAssemblyServiceFactoryAdapter
{
diff --git a/src/Components/Blazor/Blazor/src/Hosting/WebAssemblyHost.cs b/src/Components/Blazor/Blazor/src/Hosting/WebAssemblyHost.cs
index 3a2ccfbaaee2..b90878fdde36 100644
--- a/src/Components/Blazor/Blazor/src/Hosting/WebAssemblyHost.cs
+++ b/src/Components/Blazor/Blazor/src/Hosting/WebAssemblyHost.cs
@@ -19,6 +19,11 @@ internal class WebAssemblyHost : IWebAssemblyHost
public WebAssemblyHost(IServiceProvider services, IJSRuntime runtime)
{
+ // To ensure JS-invoked methods don't get linked out, have a reference to their enclosing types
+ GC.KeepAlive(typeof(EntrypointInvoker));
+ GC.KeepAlive(typeof(JSInteropMethods));
+ GC.KeepAlive(typeof(WebAssemblyEventDispatcher));
+
Services = services ?? throw new ArgumentNullException(nameof(services));
_runtime = runtime ?? throw new ArgumentNullException(nameof(runtime));
}
diff --git a/src/Components/Blazor/Blazor/src/Hosting/WebAssemblyHostExtensions.cs b/src/Components/Blazor/Blazor/src/Hosting/WebAssemblyHostExtensions.cs
index d08162a590ec..5182a1660d6a 100644
--- a/src/Components/Blazor/Blazor/src/Hosting/WebAssemblyHostExtensions.cs
+++ b/src/Components/Blazor/Blazor/src/Hosting/WebAssemblyHostExtensions.cs
@@ -22,7 +22,7 @@ public static class WebAssemblyHostExtensions
public static void Run(this IWebAssemblyHost host)
{
// Behave like async void, because we don't yet support async-main properly on WebAssembly.
- // However, don't actualy make this method async, because we rely on startup being synchronous
+ // However, don't actually make this method async, because we rely on startup being synchronous
// for things like attaching navigation event handlers.
host.StartAsync().ContinueWith(task =>
{
diff --git a/src/Components/Blazor/Blazor/src/Hosting/WebAssemblyServiceFactoryAdapter.cs b/src/Components/Blazor/Blazor/src/Hosting/WebAssemblyServiceFactoryAdapter.cs
index fcc879653abb..2cfc0ba093ea 100644
--- a/src/Components/Blazor/Blazor/src/Hosting/WebAssemblyServiceFactoryAdapter.cs
+++ b/src/Components/Blazor/Blazor/src/Hosting/WebAssemblyServiceFactoryAdapter.cs
@@ -6,7 +6,7 @@
namespace Microsoft.AspNetCore.Blazor.Hosting
{
- // Equivalent to https://github.com/aspnet/Extensions/blob/master/src/Hosting/Hosting/src/Internal/ServiceFactoryAdapter.cs
+ // Equivalent to https://github.com/dotnet/extensions/blob/master/src/Hosting/Hosting/src/Internal/ServiceFactoryAdapter.cs
internal class WebAssemblyServiceFactoryAdapter : IWebAssemblyServiceFactoryAdapter
{
diff --git a/src/Components/Blazor/Blazor/src/Microsoft.AspNetCore.Blazor.csproj b/src/Components/Blazor/Blazor/src/Microsoft.AspNetCore.Blazor.csproj
index e98ef0926850..867dec821513 100644
--- a/src/Components/Blazor/Blazor/src/Microsoft.AspNetCore.Blazor.csproj
+++ b/src/Components/Blazor/Blazor/src/Microsoft.AspNetCore.Blazor.csproj
@@ -1,7 +1,7 @@
- netstandard2.0
+ netstandard2.1
Build client-side single-page applications (SPAs) with Blazor running under WebAssembly.
false
diff --git a/src/Components/Blazor/Blazor/src/Services/WebAssemblyConsoleLogger.cs b/src/Components/Blazor/Blazor/src/Services/WebAssemblyConsoleLogger.cs
index c86c1cf30beb..1769dbd91519 100644
--- a/src/Components/Blazor/Blazor/src/Services/WebAssemblyConsoleLogger.cs
+++ b/src/Components/Blazor/Blazor/src/Services/WebAssemblyConsoleLogger.cs
@@ -20,6 +20,11 @@ public bool IsEnabled(LogLevel logLevel)
public void Log(LogLevel logLevel, EventId eventId, TState state, Exception exception, Func formatter)
{
+ if (!IsEnabled(logLevel))
+ {
+ return;
+ }
+
var formattedMessage = formatter(state, exception);
Console.WriteLine($"[{logLevel}] {formattedMessage}");
}
diff --git a/src/Components/Blazor/Blazor/test/Hosting/EntrypointInvokerTest.cs b/src/Components/Blazor/Blazor/test/Hosting/EntrypointInvokerTest.cs
new file mode 100644
index 000000000000..60a3d1638b8f
--- /dev/null
+++ b/src/Components/Blazor/Blazor/test/Hosting/EntrypointInvokerTest.cs
@@ -0,0 +1,153 @@
+// Copyright (c) .NET Foundation. All rights reserved.
+// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
+
+using System;
+using System.IO;
+using System.Reflection;
+using System.Runtime.Loader;
+using System.Threading.Tasks;
+using Microsoft.CodeAnalysis;
+using Microsoft.CodeAnalysis.CSharp;
+using Xunit;
+
+namespace Microsoft.AspNetCore.Blazor.Hosting
+{
+ public class EntrypointInvokerTest
+ {
+ [Theory]
+ [InlineData(false, false)]
+ [InlineData(false, true)]
+ [InlineData(true, false)]
+ [InlineData(true, true)]
+ public void InvokesEntrypoint_Sync_Success(bool hasReturnValue, bool hasParams)
+ {
+ // Arrange
+ var returnType = hasReturnValue ? "int" : "void";
+ var paramsDecl = hasParams ? "string[] args" : string.Empty;
+ var returnStatement = hasReturnValue ? "return 123;" : "return;";
+ var assembly = CompileToAssembly(@"
+static " + returnType + @" Main(" + paramsDecl + @")
+{
+ DidMainExecute = true;
+ " + returnStatement + @"
+}", out var didMainExecute);
+
+ // Act
+ EntrypointInvoker.InvokeEntrypoint(assembly.FullName, new string[] { });
+
+ // Assert
+ Assert.True(didMainExecute());
+ }
+
+ [Theory]
+ [InlineData(false, false)]
+ [InlineData(false, true)]
+ [InlineData(true, false)]
+ [InlineData(true, true)]
+ public void InvokesEntrypoint_Async_Success(bool hasReturnValue, bool hasParams)
+ {
+ // Arrange
+ var returnTypeGenericParam = hasReturnValue ? "" : string.Empty;
+ var paramsDecl = hasParams ? "string[] args" : string.Empty;
+ var returnStatement = hasReturnValue ? "return 123;" : "return;";
+ var assembly = CompileToAssembly(@"
+public static TaskCompletionSource ContinueTcs { get; } = new TaskCompletionSource();
+
+static async Task" + returnTypeGenericParam + @" Main(" + paramsDecl + @")
+{
+ await ContinueTcs.Task;
+ DidMainExecute = true;
+ " + returnStatement + @"
+}", out var didMainExecute);
+
+ // Act/Assert 1: Waits for task
+ // The fact that we're not blocking here proves that we're not executing the
+ // metadata-declared entrypoint, as that would block
+ EntrypointInvoker.InvokeEntrypoint(assembly.FullName, new string[] { });
+ Assert.False(didMainExecute());
+
+ // Act/Assert 2: Continues
+ var tcs = (TaskCompletionSource)assembly.GetType("SomeApp.Program").GetProperty("ContinueTcs").GetValue(null);
+ tcs.SetResult(null);
+ Assert.True(didMainExecute());
+ }
+
+ [Fact]
+ public void InvokesEntrypoint_Sync_Exception()
+ {
+ // Arrange
+ var assembly = CompileToAssembly(@"
+public static void Main()
+{
+ DidMainExecute = true;
+ throw new InvalidTimeZoneException(""Test message"");
+}", out var didMainExecute);
+
+ // Act/Assert
+ // The fact that this doesn't throw shows that EntrypointInvoker is doing something
+ // to handle the exception. We can't assert about what it does here, because that
+ // would involve capturing console output, which isn't safe in unit tests. Instead
+ // we'll check this in E2E tests.
+ EntrypointInvoker.InvokeEntrypoint(assembly.FullName, new string[] { });
+ Assert.True(didMainExecute());
+ }
+
+ [Fact]
+ public void InvokesEntrypoint_Async_Exception()
+ {
+ // Arrange
+ var assembly = CompileToAssembly(@"
+public static TaskCompletionSource ContinueTcs { get; } = new TaskCompletionSource();
+
+public static async Task Main()
+{
+ await ContinueTcs.Task;
+ DidMainExecute = true;
+ throw new InvalidTimeZoneException(""Test message"");
+}", out var didMainExecute);
+
+ // Act/Assert 1: Waits for task
+ EntrypointInvoker.InvokeEntrypoint(assembly.FullName, new string[] { });
+ Assert.False(didMainExecute());
+
+ // Act/Assert 2: Continues
+ // As above, we can't directly observe the exception handling behavior here,
+ // so this is covered in E2E tests instead.
+ var tcs = (TaskCompletionSource)assembly.GetType("SomeApp.Program").GetProperty("ContinueTcs").GetValue(null);
+ tcs.SetResult(null);
+ Assert.True(didMainExecute());
+ }
+
+ private static Assembly CompileToAssembly(string mainMethod, out Func didMainExecute)
+ {
+ var syntaxTree = CSharpSyntaxTree.ParseText(@"
+using System;
+using System.Threading.Tasks;
+
+namespace SomeApp
+{
+ public static class Program
+ {
+ public static bool DidMainExecute { get; private set; }
+
+ " + mainMethod + @"
+ }
+}");
+
+ var compilation = CSharpCompilation.Create(
+ $"TestAssembly-{Guid.NewGuid().ToString("D")}",
+ new[] { syntaxTree },
+ new[] { MetadataReference.CreateFromFile(typeof(object).GetTypeInfo().Assembly.Location) },
+ new CSharpCompilationOptions(OutputKind.ConsoleApplication));
+ using var ms = new MemoryStream();
+ var compilationResult = compilation.Emit(ms);
+ ms.Seek(0, SeekOrigin.Begin);
+ var assembly = AssemblyLoadContext.Default.LoadFromStream(ms);
+
+ var didMainExecuteProp = assembly.GetType("SomeApp.Program").GetProperty("DidMainExecute");
+ didMainExecute = () => (bool)didMainExecuteProp.GetValue(null);
+
+ return assembly;
+ }
+ }
+}
diff --git a/src/Components/Blazor/Blazor/test/Microsoft.AspNetCore.Blazor.Tests.csproj b/src/Components/Blazor/Blazor/test/Microsoft.AspNetCore.Blazor.Tests.csproj
index c93519dfbd7c..b156fde4a2e0 100644
--- a/src/Components/Blazor/Blazor/test/Microsoft.AspNetCore.Blazor.Tests.csproj
+++ b/src/Components/Blazor/Blazor/test/Microsoft.AspNetCore.Blazor.Tests.csproj
@@ -1,4 +1,4 @@
-
+
$(DefaultNetCoreTargetFramework)
@@ -8,6 +8,7 @@
+
diff --git a/src/Components/Blazor/Build/src/Cli/Commands/ResolveRuntimeDependenciesCommand.cs b/src/Components/Blazor/Build/src/Cli/Commands/ResolveRuntimeDependenciesCommand.cs
deleted file mode 100644
index d5d37bb83390..000000000000
--- a/src/Components/Blazor/Build/src/Cli/Commands/ResolveRuntimeDependenciesCommand.cs
+++ /dev/null
@@ -1,61 +0,0 @@
-// Copyright (c) .NET Foundation. All rights reserved.
-// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
-
-using System;
-using System.IO;
-using Microsoft.Extensions.CommandLineUtils;
-
-namespace Microsoft.AspNetCore.Blazor.Build.DevServer.Commands
-{
- class ResolveRuntimeDependenciesCommand
- {
- public static void Command(CommandLineApplication command)
- {
- var referencesFile = command.Option("--references",
- "The path to a file that lists the paths to given referenced dll files",
- CommandOptionType.SingleValue);
-
- var baseClassLibrary = command.Option("--base-class-library",
- "Full path to a directory in which BCL assemblies can be found",
- CommandOptionType.MultipleValue);
-
- var outputPath = command.Option("--output",
- "Path to the output file that will contain the list with the full paths of the resolved assemblies",
- CommandOptionType.SingleValue);
-
- var mainAssemblyPath = command.Argument("assembly",
- "Path to the assembly containing the entry point of the application.");
-
- command.OnExecute(() =>
- {
- if (string.IsNullOrEmpty(mainAssemblyPath.Value) ||
- !baseClassLibrary.HasValue() || !outputPath.HasValue())
- {
- command.ShowHelp(command.Name);
- return 1;
- }
-
- try
- {
- var referencesSources = referencesFile.HasValue()
- ? File.ReadAllLines(referencesFile.Value())
- : Array.Empty();
-
- RuntimeDependenciesResolver.ResolveRuntimeDependencies(
- mainAssemblyPath.Value,
- referencesSources,
- baseClassLibrary.Values.ToArray(),
- outputPath.Value());
-
- return 0;
- }
- catch (Exception ex)
- {
- Console.WriteLine($"ERROR: {ex.Message}");
- Console.WriteLine(ex.StackTrace);
- return 1;
- }
- });
- }
- }
-}
diff --git a/src/Components/Blazor/Build/src/Cli/Commands/WriteBootJsonCommand.cs b/src/Components/Blazor/Build/src/Cli/Commands/WriteBootJsonCommand.cs
deleted file mode 100644
index dea217958c98..000000000000
--- a/src/Components/Blazor/Build/src/Cli/Commands/WriteBootJsonCommand.cs
+++ /dev/null
@@ -1,68 +0,0 @@
-// Copyright (c) .NET Foundation. All rights reserved.
-// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
-
-using Microsoft.Extensions.CommandLineUtils;
-using System;
-using System.IO;
-
-namespace Microsoft.AspNetCore.Blazor.Build.DevServer.Commands
-{
- internal class WriteBootJsonCommand
- {
- public static void Command(CommandLineApplication command)
- {
- var referencesFile = command.Option("--references",
- "The path to a file that lists the paths to given referenced dll files",
- CommandOptionType.SingleValue);
-
- var embeddedResourcesFile = command.Option("--embedded-resources",
- "The path to a file that lists the paths of .NET assemblies that may contain embedded resources (typically, referenced assemblies in their pre-linked states)",
- CommandOptionType.SingleValue);
-
- var outputPath = command.Option("--output",
- "Path to the output file",
- CommandOptionType.SingleValue);
-
- var mainAssemblyPath = command.Argument("assembly",
- "Path to the assembly containing the entry point of the application.");
-
- var linkerEnabledFlag = command.Option("--linker-enabled",
- "If set, specifies that the application is being built with linking enabled.",
- CommandOptionType.NoValue);
-
- command.OnExecute(() =>
- {
- if (string.IsNullOrEmpty(mainAssemblyPath.Value) || !outputPath.HasValue())
- {
- command.ShowHelp(command.Name);
- return 1;
- }
-
- try
- {
- var referencesSources = referencesFile.HasValue()
- ? File.ReadAllLines(referencesFile.Value())
- : Array.Empty();
-
- var embeddedResourcesSources = embeddedResourcesFile.HasValue()
- ? File.ReadAllLines(embeddedResourcesFile.Value())
- : Array.Empty();
-
- BootJsonWriter.WriteFile(
- mainAssemblyPath.Value,
- referencesSources,
- embeddedResourcesSources,
- linkerEnabledFlag.HasValue(),
- outputPath.Value());
- return 0;
- }
- catch (Exception ex)
- {
- Console.WriteLine($"ERROR: {ex.Message}");
- Console.WriteLine(ex.StackTrace);
- return 1;
- }
- });
- }
- }
-}
diff --git a/src/Components/Blazor/Build/src/Cli/Program.cs b/src/Components/Blazor/Build/src/Cli/Program.cs
deleted file mode 100644
index 3bd530453f8a..000000000000
--- a/src/Components/Blazor/Build/src/Cli/Program.cs
+++ /dev/null
@@ -1,33 +0,0 @@
-// Copyright (c) .NET Foundation. All rights reserved.
-// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
-
-using Microsoft.AspNetCore.Blazor.Build.DevServer.Commands;
-using Microsoft.Extensions.CommandLineUtils;
-
-namespace Microsoft.AspNetCore.Blazor.Build
-{
- static class Program
- {
- static int Main(string[] args)
- {
- var app = new CommandLineApplication
- {
- Name = "Microsoft.AspNetCore.Blazor.Build"
- };
- app.HelpOption("-?|-h|--help");
-
- app.Command("resolve-dependencies", ResolveRuntimeDependenciesCommand.Command);
- app.Command("write-boot-json", WriteBootJsonCommand.Command);
-
- if (args.Length > 0)
- {
- return app.Execute(args);
- }
- else
- {
- app.ShowHelp();
- return 0;
- }
- }
- }
-}
diff --git a/src/Components/Blazor/Build/src/Core/BootJsonWriter.cs b/src/Components/Blazor/Build/src/Core/BootJsonWriter.cs
deleted file mode 100644
index 4d4c114158d9..000000000000
--- a/src/Components/Blazor/Build/src/Core/BootJsonWriter.cs
+++ /dev/null
@@ -1,95 +0,0 @@
-// Copyright (c) .NET Foundation. All rights reserved.
-// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
-
-using System;
-using System.Collections.Generic;
-using System.IO;
-using System.Linq;
-using System.Text.Json;
-using Microsoft.AspNetCore.Components;
-using Mono.Cecil;
-
-namespace Microsoft.AspNetCore.Blazor.Build
-{
- internal class BootJsonWriter
- {
- public static void WriteFile(
- string assemblyPath,
- string[] assemblyReferences,
- string[] embeddedResourcesSources,
- bool linkerEnabled,
- string outputPath)
- {
- var embeddedContent = EmbeddedResourcesProcessor.ExtractEmbeddedResources(
- embeddedResourcesSources, Path.GetDirectoryName(outputPath));
- var bootJsonText = GetBootJsonContent(
- Path.GetFileName(assemblyPath),
- GetAssemblyEntryPoint(assemblyPath),
- assemblyReferences,
- embeddedContent,
- linkerEnabled);
- var normalizedOutputPath = Path.GetFullPath(outputPath);
- Console.WriteLine("Writing boot data to: " + normalizedOutputPath);
- File.WriteAllText(normalizedOutputPath, bootJsonText);
- }
-
- public static string GetBootJsonContent(string assemblyFileName, string entryPoint, string[] assemblyReferences, IEnumerable embeddedContent, bool linkerEnabled)
- {
- var data = new BootJsonData(
- assemblyFileName,
- entryPoint,
- assemblyReferences,
- embeddedContent,
- linkerEnabled);
- return JsonSerializer.Serialize(data, JsonSerializerOptionsProvider.Options);
- }
-
- private static string GetAssemblyEntryPoint(string assemblyPath)
- {
- using (var assemblyDefinition = AssemblyDefinition.ReadAssembly(assemblyPath))
- {
- var entryPoint = assemblyDefinition.EntryPoint;
- if (entryPoint == null)
- {
- throw new ArgumentException($"The assembly at {assemblyPath} has no specified entry point.");
- }
-
- return $"{entryPoint.DeclaringType.FullName}::{entryPoint.Name}";
- }
- }
-
- ///
- /// Defines the structure of a Blazor boot JSON file
- ///
- class BootJsonData
- {
- public string Main { get; }
- public string EntryPoint { get; }
- public IEnumerable AssemblyReferences { get; }
- public IEnumerable CssReferences { get; }
- public IEnumerable JsReferences { get; }
- public bool LinkerEnabled { get; }
-
- public BootJsonData(
- string entrypointAssemblyWithExtension,
- string entryPoint,
- IEnumerable assemblyReferences,
- IEnumerable embeddedContent,
- bool linkerEnabled)
- {
- Main = entrypointAssemblyWithExtension;
- EntryPoint = entryPoint;
- AssemblyReferences = assemblyReferences;
- LinkerEnabled = linkerEnabled;
-
- CssReferences = embeddedContent
- .Where(c => c.Kind == EmbeddedResourceKind.Css)
- .Select(c => c.RelativePath);
-
- JsReferences = embeddedContent
- .Where(c => c.Kind == EmbeddedResourceKind.JavaScript)
- .Select(c => c.RelativePath);
- }
- }
- }
-}
diff --git a/src/Components/Blazor/Build/src/Core/EmbeddedResources/EmbeddedResourceInfo.cs b/src/Components/Blazor/Build/src/Core/EmbeddedResources/EmbeddedResourceInfo.cs
deleted file mode 100644
index 97331537f28c..000000000000
--- a/src/Components/Blazor/Build/src/Core/EmbeddedResources/EmbeddedResourceInfo.cs
+++ /dev/null
@@ -1,17 +0,0 @@
-// Copyright (c) .NET Foundation. All rights reserved.
-// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
-
-namespace Microsoft.AspNetCore.Blazor.Build
-{
- internal class EmbeddedResourceInfo
- {
- public EmbeddedResourceKind Kind { get; }
- public string RelativePath { get; }
-
- public EmbeddedResourceInfo(EmbeddedResourceKind kind, string relativePath)
- {
- Kind = kind;
- RelativePath = relativePath;
- }
- }
-}
diff --git a/src/Components/Blazor/Build/src/Core/EmbeddedResources/EmbeddedResourcesProcessor.cs b/src/Components/Blazor/Build/src/Core/EmbeddedResources/EmbeddedResourcesProcessor.cs
deleted file mode 100644
index 21a28597e1b9..000000000000
--- a/src/Components/Blazor/Build/src/Core/EmbeddedResources/EmbeddedResourcesProcessor.cs
+++ /dev/null
@@ -1,137 +0,0 @@
-// Copyright (c) .NET Foundation. All rights reserved.
-// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
-
-using Mono.Cecil;
-using System;
-using System.Collections.Generic;
-using System.IO;
-using System.Linq;
-
-namespace Microsoft.AspNetCore.Blazor.Build
-{
- internal class EmbeddedResourcesProcessor
- {
- const string ContentSubdirName = "_content";
-
- private readonly static Dictionary _knownResourceKindsByNamePrefix = new Dictionary
- {
- { "blazor:js:", EmbeddedResourceKind.JavaScript },
- { "blazor:css:", EmbeddedResourceKind.Css },
- { "blazor:file:", EmbeddedResourceKind.Static },
- };
-
- ///
- /// Finds Blazor-specific embedded resources in the specified assemblies, writes them
- /// to disk, and returns a description of those resources in dependency order.
- ///
- /// The paths to assemblies that may contain embedded resources.
- /// The path to the directory where output is being written.
- /// A description of the embedded resources that were written to disk.
- public static IReadOnlyList ExtractEmbeddedResources(
- IEnumerable referencedAssemblyPaths, string outputDir)
- {
- // Clean away any earlier state
- var contentDir = Path.Combine(outputDir, ContentSubdirName);
- if (Directory.Exists(contentDir))
- {
- Directory.Delete(contentDir, recursive: true);
- }
-
- // First, get an ordered list of AssemblyDefinition instances
- var referencedAssemblyDefinitions = referencedAssemblyPaths
- .Where(path => !Path.GetFileName(path).StartsWith("System.", StringComparison.Ordinal)) // Skip System.* because they are never going to contain embedded resources that we want
- .Select(path => AssemblyDefinition.ReadAssembly(path))
- .ToList();
- referencedAssemblyDefinitions.Sort(OrderWithReferenceSubjectFirst);
-
- // Now process them in turn
- return referencedAssemblyDefinitions
- .SelectMany(def => ExtractEmbeddedResourcesFromSingleAssembly(def, outputDir))
- .ToList()
- .AsReadOnly();
- }
-
- private static IEnumerable ExtractEmbeddedResourcesFromSingleAssembly(
- AssemblyDefinition assemblyDefinition, string outputDirPath)
- {
- var assemblyName = assemblyDefinition.Name.Name;
- foreach (var res in assemblyDefinition.MainModule.Resources)
- {
- if (TryExtractEmbeddedResource(assemblyName, res, outputDirPath, out var extractedResourceInfo))
- {
- yield return extractedResourceInfo;
- }
- }
- }
-
- private static bool TryExtractEmbeddedResource(string assemblyName, Resource resource, string outputDirPath, out EmbeddedResourceInfo extractedResourceInfo)
- {
- if (resource is EmbeddedResource embeddedResource)
- {
- if (TryInterpretLogicalName(resource.Name, out var kind, out var name))
- {
- // Prefix the output path with the assembly name to ensure no clashes
- // Also be invariant to the OS on which the package was built
- name = Path.Combine(ContentSubdirName, assemblyName, EnsureHasPathSeparators(name, Path.DirectorySeparatorChar));
-
- // Write the file content to disk, ensuring we don't try to write outside the output root
- var outputPath = Path.GetFullPath(Path.Combine(outputDirPath, name));
- if (!outputPath.StartsWith(outputDirPath))
- {
- throw new InvalidOperationException($"Cannot write embedded resource from assembly '{assemblyName}' to '{outputPath}' because it is outside the expected directory {outputDirPath}");
- }
- WriteResourceFile(embeddedResource, outputPath);
-
- // The URLs we write into the boot json file need to use web-style directory separators
- extractedResourceInfo = new EmbeddedResourceInfo(kind, EnsureHasPathSeparators(name, '/'));
- return true;
- }
- }
-
- extractedResourceInfo = null;
- return false;
- }
-
- private static void WriteResourceFile(EmbeddedResource resource, string outputPath)
- {
- Directory.CreateDirectory(Path.GetDirectoryName(outputPath));
- using (var outputStream = File.OpenWrite(outputPath))
- {
- resource.GetResourceStream().CopyTo(outputStream);
- }
- }
-
- private static string EnsureHasPathSeparators(string name, char desiredSeparatorChar) => name
- .Replace('\\', desiredSeparatorChar)
- .Replace('/', desiredSeparatorChar);
-
- private static bool TryInterpretLogicalName(string logicalName, out EmbeddedResourceKind kind, out string resolvedName)
- {
- foreach (var kvp in _knownResourceKindsByNamePrefix)
- {
- if (logicalName.StartsWith(kvp.Key, StringComparison.Ordinal))
- {
- kind = kvp.Value;
- resolvedName = logicalName.Substring(kvp.Key.Length);
- return true;
- }
- }
-
- kind = default;
- resolvedName = default;
- return false;
- }
-
- // For each assembly B that references A, we want the resources from A to be loaded before
- // the references for B (because B's resources might depend on A's resources)
- private static int OrderWithReferenceSubjectFirst(AssemblyDefinition a, AssemblyDefinition b)
- => AssemblyHasReference(a, b) ? 1
- : AssemblyHasReference(b, a) ? -1
- : 0;
-
- private static bool AssemblyHasReference(AssemblyDefinition from, AssemblyDefinition to)
- => from.MainModule.AssemblyReferences
- .Select(reference => reference.Name)
- .Contains(to.Name.Name, StringComparer.Ordinal);
- }
-}
diff --git a/src/Components/Blazor/Build/src/Core/RuntimeDependenciesResolver.cs b/src/Components/Blazor/Build/src/Core/RuntimeDependenciesResolver.cs
deleted file mode 100644
index 18637753cc75..000000000000
--- a/src/Components/Blazor/Build/src/Core/RuntimeDependenciesResolver.cs
+++ /dev/null
@@ -1,165 +0,0 @@
-// Copyright (c) .NET Foundation. All rights reserved.
-// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
-
-using System;
-using System.Collections.Generic;
-using System.Diagnostics;
-using System.IO;
-using System.Linq;
-using Mono.Cecil;
-
-namespace Microsoft.AspNetCore.Blazor.Build
-{
- internal class RuntimeDependenciesResolver
- {
- public static void ResolveRuntimeDependencies(
- string entryPoint,
- string[] applicationDependencies,
- string[] monoBclDirectories,
- string outputFile)
- {
- var paths = ResolveRuntimeDependenciesCore(entryPoint, applicationDependencies, monoBclDirectories);
- File.WriteAllLines(outputFile, paths);
- }
-
- public static IEnumerable ResolveRuntimeDependenciesCore(
- string entryPoint,
- string[] applicationDependencies,
- string[] monoBclDirectories)
- {
- var assembly = new AssemblyEntry(entryPoint, AssemblyDefinition.ReadAssembly(entryPoint));
-
- var dependencies = applicationDependencies
- .Select(a => new AssemblyEntry(a, AssemblyDefinition.ReadAssembly(a)))
- .ToArray();
-
- var bcl = monoBclDirectories
- .SelectMany(d => Directory.EnumerateFiles(d, "*.dll").Select(f => Path.Combine(d, f)))
- .Select(a => new AssemblyEntry(a, AssemblyDefinition.ReadAssembly(a)))
- .ToArray();
-
- var assemblyResolutionContext = new AssemblyResolutionContext(
- assembly,
- dependencies,
- bcl);
-
- assemblyResolutionContext.ResolveAssemblies();
-
- var paths = assemblyResolutionContext.Results.Select(r => r.Path);
- return paths.Concat(FindPdbs(paths));
- }
-
- private static IEnumerable FindPdbs(IEnumerable dllPaths)
- {
- return dllPaths
- .Select(path => Path.ChangeExtension(path, "pdb"))
- .Where(path => File.Exists(path));
- }
-
- public class AssemblyResolutionContext
- {
- public AssemblyResolutionContext(
- AssemblyEntry assembly,
- AssemblyEntry[] dependencies,
- AssemblyEntry[] bcl)
- {
- Assembly = assembly;
- Dependencies = dependencies;
- Bcl = bcl;
- }
-
- public AssemblyEntry Assembly { get; }
- public AssemblyEntry[] Dependencies { get; }
- public AssemblyEntry[] Bcl { get; }
-
- public IList Results { get; } = new List();
-
- internal void ResolveAssemblies()
- {
- var visitedAssemblies = new HashSet();
- var pendingAssemblies = new Stack();
- pendingAssemblies.Push(Assembly.Definition.Name);
- ResolveAssembliesCore();
-
- void ResolveAssembliesCore()
- {
- while (pendingAssemblies.TryPop(out var current))
- {
- if (!visitedAssemblies.Contains(current.Name))
- {
- visitedAssemblies.Add(current.Name);
-
- // Not all references will be resolvable within the Mono BCL, particularly
- // when building for server-side Blazor as you will be running on CoreCLR
- // and therefore may depend on System.* BCL assemblies that aren't present
- // in Mono WebAssembly. Skipping unresolved assemblies here is equivalent
- // to passing "--skip-unresolved true" to the Mono linker.
- var resolved = Resolve(current);
- if (resolved != null)
- {
- Results.Add(resolved);
- var references = GetAssemblyReferences(resolved);
- foreach (var reference in references)
- {
- pendingAssemblies.Push(reference);
- }
- }
- }
- }
- }
-
- IEnumerable GetAssemblyReferences(AssemblyEntry current) =>
- current.Definition.Modules.SelectMany(m => m.AssemblyReferences);
-
- AssemblyEntry Resolve(AssemblyNameReference current)
- {
- if (Assembly.Definition.Name.Name == current.Name)
- {
- return Assembly;
- }
-
- var referencedAssemblyCandidate = FindCandidate(current, Dependencies);
- var bclAssemblyCandidate = FindCandidate(current, Bcl);
-
- // Resolution logic. For right now, we will prefer the mono BCL version of a given
- // assembly if there is a candidate assembly and an equivalent mono assembly.
- if (bclAssemblyCandidate != null)
- {
- return bclAssemblyCandidate;
- }
-
- return referencedAssemblyCandidate;
- }
-
- AssemblyEntry FindCandidate(AssemblyNameReference current, AssemblyEntry[] candidates)
- {
- // Do simple name match. Assume no duplicates.
- foreach (var candidate in candidates)
- {
- if (current.Name == candidate.Definition.Name.Name)
- {
- return candidate;
- }
- }
-
- return null;
- }
- }
- }
-
- [DebuggerDisplay("{ToString(),nq}")]
- public class AssemblyEntry
- {
- public AssemblyEntry(string path, AssemblyDefinition definition)
- {
- Path = path;
- Definition = definition;
- }
-
- public string Path { get; set; }
- public AssemblyDefinition Definition { get; set; }
-
- public override string ToString() => Definition.FullName;
- }
- }
-}
diff --git a/src/Components/Blazor/Build/src/Microsoft.AspNetCore.Blazor.Build.csproj b/src/Components/Blazor/Build/src/Microsoft.AspNetCore.Blazor.Build.csproj
index 2f5b3297f574..57b1e5b4cd89 100644
--- a/src/Components/Blazor/Build/src/Microsoft.AspNetCore.Blazor.Build.csproj
+++ b/src/Components/Blazor/Build/src/Microsoft.AspNetCore.Blazor.Build.csproj
@@ -1,41 +1,71 @@
-
+
- $(DefaultNetCoreTargetFramework)
+ $(DefaultNetCoreTargetFramework);net46
+ Microsoft.AspNetCore.Blazor.Build.Tasks
+ Microsoft.AspNetCore.Blazor.Build
Build mechanism for ASP.NET Core Blazor applications.
- Exe
false
false
+ false
false
- $(GenerateNuspecDependsOn);Publish
true
Microsoft.AspNetCore.Blazor.Build.nuspec
-
+
-
-
-
-
-
-
-
-
+
+
+
-
-
+
+
+
+
+
+
+
+
+ <_NetCoreFilesToCopy Include="$(OutputPath)$(DefaultNetCoreTargetFramework)\*" TargetPath="netcoreapp\" />
+ <_DesktopFilesToCopy Include="$(OutputPath)net46\*" TargetPath="netfx\" />
+ <_AllFilesToCopy Include="@(_NetCoreFilesToCopy);@(_DesktopFilesToCopy)" />
+
+
+
+
+
+
+
+
+
+
diff --git a/src/Components/Blazor/Build/src/Microsoft.AspNetCore.Blazor.Build.nuspec b/src/Components/Blazor/Build/src/Microsoft.AspNetCore.Blazor.Build.nuspec
index 26ca818d7f60..a3e099dee67e 100644
--- a/src/Components/Blazor/Build/src/Microsoft.AspNetCore.Blazor.Build.nuspec
+++ b/src/Components/Blazor/Build/src/Microsoft.AspNetCore.Blazor.Build.nuspec
@@ -11,7 +11,7 @@
-
-
+
+
diff --git a/src/Components/Blazor/Build/src/ReferenceBlazorBuildFromSource.props b/src/Components/Blazor/Build/src/ReferenceBlazorBuildFromSource.props
new file mode 100644
index 000000000000..0bcebe22fa12
--- /dev/null
+++ b/src/Components/Blazor/Build/src/ReferenceBlazorBuildFromSource.props
@@ -0,0 +1,25 @@
+
+
+
+
+ $(MSBuildThisFileDirectory)..\..\..\
+ $(ComponentsRoot)Web.JS\dist\$(Configuration)\blazor.webassembly.js
+ $(ComponentsRoot)Web.JS\dist\$(Configuration)\blazor.webassembly.js.map
+ $(MSBuildThisFileDirectory)bin\$(Configuration)\tools\
+
+
+
+
+
+
+
+
+
+
diff --git a/src/Components/Blazor/Build/src/ReferenceFromSource.props b/src/Components/Blazor/Build/src/ReferenceFromSource.props
index 8067cdc131b9..37e2b60e16f0 100644
--- a/src/Components/Blazor/Build/src/ReferenceFromSource.props
+++ b/src/Components/Blazor/Build/src/ReferenceFromSource.props
@@ -1,21 +1,6 @@
-
-
-
- true
- $(RepoRoot)src\Components\Web.JS\dist\$(Configuration)\blazor.*.js.*
-
-
-
-
+
+
+
+
false
-
true
- TargetFramework
+ TargetFramework=$(DefaultNetCoreTargetFramework)
false
diff --git a/src/Components/Blazor/Build/src/Tasks/BlazorCreateRootDescriptorFile.cs b/src/Components/Blazor/Build/src/Tasks/BlazorCreateRootDescriptorFile.cs
new file mode 100644
index 000000000000..1aa853685671
--- /dev/null
+++ b/src/Components/Blazor/Build/src/Tasks/BlazorCreateRootDescriptorFile.cs
@@ -0,0 +1,56 @@
+// Copyright (c) .NET Foundation. All rights reserved.
+// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
+
+using System.Collections.Generic;
+using System.IO;
+using System.Linq;
+using System.Xml;
+using System.Xml.Linq;
+using Microsoft.Build.Framework;
+using Microsoft.Build.Utilities;
+
+namespace Microsoft.AspNetCore.Blazor.Build
+{
+ // Based on https://github.com/mono/linker/blob/3b329b9481e300bcf4fb88a2eebf8cb5ef8b323b/src/ILLink.Tasks/CreateRootDescriptorFile.cs
+ public class BlazorCreateRootDescriptorFile : Task
+ {
+ [Required]
+ public ITaskItem[] AssemblyNames { get; set; }
+
+ [Required]
+ public ITaskItem RootDescriptorFilePath { get; set; }
+
+ public override bool Execute()
+ {
+ using var fileStream = File.Create(RootDescriptorFilePath.ItemSpec);
+ var assemblyNames = AssemblyNames.Select(a => a.ItemSpec);
+
+ WriteRootDescriptor(fileStream, assemblyNames);
+ return true;
+ }
+
+ internal static void WriteRootDescriptor(Stream stream, IEnumerable assemblyNames)
+ {
+ var roots = new XElement("linker");
+ foreach (var assemblyName in assemblyNames)
+ {
+ roots.Add(new XElement("assembly",
+ new XAttribute("fullname", assemblyName),
+ new XElement("type",
+ new XAttribute("fullname", "*"),
+ new XAttribute("required", "true"))));
+ }
+
+ var xmlWriterSettings = new XmlWriterSettings
+ {
+ Indent = true,
+ OmitXmlDeclaration = true
+ };
+
+ using var writer = XmlWriter.Create(stream, xmlWriterSettings);
+ var xDocument = new XDocument(roots);
+
+ xDocument.Save(writer);
+ }
+ }
+}
diff --git a/src/Components/Blazor/Build/src/Tasks/BlazorILLink.cs b/src/Components/Blazor/Build/src/Tasks/BlazorILLink.cs
new file mode 100644
index 000000000000..d5dc22cde02c
--- /dev/null
+++ b/src/Components/Blazor/Build/src/Tasks/BlazorILLink.cs
@@ -0,0 +1,194 @@
+// Copyright (c) .NET Foundation. All rights reserved.
+// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
+
+using System;
+using System.Collections.Generic;
+using System.IO;
+using System.Text;
+using Microsoft.Build.Framework;
+using Microsoft.Build.Utilities;
+
+namespace Microsoft.AspNetCore.Blazor.Build.Tasks
+{
+ // Based on https://github.com/mono/linker/blob/3b329b9481e300bcf4fb88a2eebf8cb5ef8b323b/src/ILLink.Tasks/LinkTask.cs
+ public class BlazorILLink : ToolTask
+ {
+ private const string DotNetHostPathEnvironmentName = "DOTNET_HOST_PATH";
+
+ [Required]
+ public string ILLinkPath { get; set; }
+
+ [Required]
+ public ITaskItem[] AssemblyPaths { get; set; }
+
+ public ITaskItem[] ReferenceAssemblyPaths { get; set; }
+
+ [Required]
+ public ITaskItem[] RootAssemblyNames { get; set; }
+
+ [Required]
+ public ITaskItem OutputDirectory { get; set; }
+
+ public ITaskItem[] RootDescriptorFiles { get; set; }
+
+ public bool ClearInitLocals { get; set; }
+
+ public string ClearInitLocalsAssemblies { get; set; }
+
+ public string ExtraArgs { get; set; }
+
+ public bool DumpDependencies { get; set; }
+
+ private string _dotnetPath;
+
+ private string DotNetPath
+ {
+ get
+ {
+ if (!string.IsNullOrEmpty(_dotnetPath))
+ {
+ return _dotnetPath;
+ }
+
+ _dotnetPath = Environment.GetEnvironmentVariable(DotNetHostPathEnvironmentName);
+ if (string.IsNullOrEmpty(_dotnetPath))
+ {
+ throw new InvalidOperationException($"{DotNetHostPathEnvironmentName} is not set");
+ }
+
+ return _dotnetPath;
+ }
+ }
+
+ protected override MessageImportance StandardErrorLoggingImportance => MessageImportance.High;
+
+ protected override string ToolName => Path.GetFileName(DotNetPath);
+
+ protected override string GenerateFullPathToTool() => DotNetPath;
+
+ protected override string GenerateCommandLineCommands()
+ {
+ var args = new StringBuilder();
+ args.Append(Quote(ILLinkPath));
+ return args.ToString();
+ }
+
+ private static string Quote(string path)
+ {
+ return $"\"{path.TrimEnd('\\')}\"";
+ }
+
+ protected override string GenerateResponseFileCommands()
+ {
+ var args = new StringBuilder();
+
+ if (RootDescriptorFiles != null)
+ {
+ foreach (var rootFile in RootDescriptorFiles)
+ {
+ args.Append("-x ").AppendLine(Quote(rootFile.ItemSpec));
+ }
+ }
+
+ foreach (var assemblyItem in RootAssemblyNames)
+ {
+ args.Append("-a ").AppendLine(Quote(assemblyItem.ItemSpec));
+ }
+
+ var assemblyNames = new HashSet(StringComparer.OrdinalIgnoreCase);
+ foreach (var assembly in AssemblyPaths)
+ {
+ var assemblyPath = assembly.ItemSpec;
+ var assemblyName = Path.GetFileNameWithoutExtension(assemblyPath);
+
+ // If there are multiple paths with the same assembly name, only use the first one.
+ if (!assemblyNames.Add(assemblyName))
+ {
+ continue;
+ }
+
+ args.Append("-reference ")
+ .AppendLine(Quote(assemblyPath));
+
+ var action = assembly.GetMetadata("action");
+ if ((action != null) && (action.Length > 0))
+ {
+ args.Append("-p ");
+ args.Append(action);
+ args.Append(" ").AppendLine(Quote(assemblyName));
+ }
+ }
+
+ if (ReferenceAssemblyPaths != null)
+ {
+ foreach (var assembly in ReferenceAssemblyPaths)
+ {
+ var assemblyPath = assembly.ItemSpec;
+ var assemblyName = Path.GetFileNameWithoutExtension(assemblyPath);
+
+ // Don't process references for which we already have
+ // implementation assemblies.
+ if (assemblyNames.Contains(assemblyName))
+ {
+ continue;
+ }
+
+ args.Append("-reference ").AppendLine(Quote(assemblyPath));
+
+ // Treat reference assemblies as "skip". Ideally we
+ // would not even look at the IL, but only use them to
+ // resolve surface area.
+ args.Append("-p skip ").AppendLine(Quote(assemblyName));
+ }
+ }
+
+ if (OutputDirectory != null)
+ {
+ args.Append("-out ").AppendLine(Quote(OutputDirectory.ItemSpec));
+ }
+
+ if (ClearInitLocals)
+ {
+ args.AppendLine("--enable-opt clearinitlocals");
+ if ((ClearInitLocalsAssemblies != null) && (ClearInitLocalsAssemblies.Length > 0))
+ {
+ args.Append("-m ClearInitLocalsAssemblies ");
+ args.AppendLine(ClearInitLocalsAssemblies);
+ }
+ }
+
+ if (ExtraArgs != null)
+ {
+ args.AppendLine(ExtraArgs);
+ }
+
+ if (DumpDependencies)
+ {
+ args.AppendLine("--dump-dependencies");
+ }
+
+ return args.ToString();
+ }
+
+ protected override bool HandleTaskExecutionErrors()
+ {
+ // Show a slightly better error than the standard ToolTask message that says "dotnet" failed.
+ Log.LogError($"ILLink failed with exit code {ExitCode}.");
+ return false;
+ }
+
+ protected override void LogEventsFromTextOutput(string singleLine, MessageImportance messageImportance)
+ {
+ if (!string.IsNullOrEmpty(singleLine) && singleLine.StartsWith("Unhandled exception.", StringComparison.Ordinal))
+ {
+ // The Mono linker currently prints out an entire stack trace when the linker fails.
+ // We want to show something actionable in the VS Error window.
+ Log.LogError(singleLine);
+ }
+ else
+ {
+ base.LogEventsFromTextOutput(singleLine, messageImportance);
+ }
+ }
+ }
+}
diff --git a/src/Components/Blazor/Build/src/Tasks/GenerateBlazorBootJson.cs b/src/Components/Blazor/Build/src/Tasks/GenerateBlazorBootJson.cs
new file mode 100644
index 000000000000..1984de0a5798
--- /dev/null
+++ b/src/Components/Blazor/Build/src/Tasks/GenerateBlazorBootJson.cs
@@ -0,0 +1,86 @@
+// Copyright (c) .NET Foundation. All rights reserved.
+// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
+
+using System;
+using System.IO;
+using System.Linq;
+using System.Reflection;
+using System.Runtime.Serialization.Json;
+using Microsoft.Build.Framework;
+using Microsoft.Build.Utilities;
+
+namespace Microsoft.AspNetCore.Blazor.Build
+{
+ public class GenerateBlazorBootJson : Task
+ {
+ [Required]
+ public string AssemblyPath { get; set; }
+
+ [Required]
+ public ITaskItem[] References { get; set; }
+
+ [Required]
+ public bool LinkerEnabled { get; set; }
+
+ [Required]
+ public string OutputPath { get; set; }
+
+ public override bool Execute()
+ {
+ var entryAssemblyName = AssemblyName.GetAssemblyName(AssemblyPath).Name;
+ var assemblies = References.Select(GetUriPath).OrderBy(c => c, StringComparer.Ordinal).ToArray();
+
+ using var fileStream = File.Create(OutputPath);
+ WriteBootJson(fileStream, entryAssemblyName, assemblies, LinkerEnabled);
+
+ return true;
+
+ static string GetUriPath(ITaskItem item)
+ {
+ var outputPath = item.GetMetadata("RelativeOutputPath");
+ if (string.IsNullOrEmpty(outputPath))
+ {
+ outputPath = Path.GetFileName(item.ItemSpec);
+ }
+
+ return outputPath.Replace('\\', '/');
+ }
+ }
+
+ internal static void WriteBootJson(Stream stream, string entryAssemblyName, string[] assemblies, bool linkerEnabled)
+ {
+ var data = new BootJsonData
+ {
+ entryAssembly = entryAssemblyName,
+ assemblies = assemblies,
+ linkerEnabled = linkerEnabled,
+ };
+
+ var serializer = new DataContractJsonSerializer(typeof(BootJsonData));
+ serializer.WriteObject(stream, data);
+ }
+
+ ///
+ /// Defines the structure of a Blazor boot JSON file
+ ///
+#pragma warning disable IDE1006 // Naming Styles
+ public class BootJsonData
+ {
+ ///
+ /// Gets the name of the assembly with the application entry point
+ ///
+ public string entryAssembly { get; set; }
+
+ ///
+ /// Gets the closure of assemblies to be loaded by Blazor WASM. This includes the application entry assembly.
+ ///
+ public string[] assemblies { get; set; }
+
+ ///
+ /// Gets a value that determines if the linker is enabled.
+ ///
+ public bool linkerEnabled { get; set; }
+ }
+#pragma warning restore IDE1006 // Naming Styles
+ }
+}
diff --git a/src/Components/Blazor/Build/src/Tasks/GenerateTypeGranularityLinkingConfig.cs b/src/Components/Blazor/Build/src/Tasks/GenerateTypeGranularityLinkingConfig.cs
new file mode 100644
index 000000000000..8a56b7fc3deb
--- /dev/null
+++ b/src/Components/Blazor/Build/src/Tasks/GenerateTypeGranularityLinkingConfig.cs
@@ -0,0 +1,48 @@
+// Copyright (c) .NET Foundation. All rights reserved.
+// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
+
+using System.IO;
+using System.Xml.Linq;
+using Microsoft.Build.Framework;
+using Microsoft.Build.Utilities;
+
+namespace Microsoft.AspNetCore.Blazor.Build.Tasks
+{
+ public class GenerateTypeGranularityLinkingConfig : Task
+ {
+ [Required]
+ public ITaskItem[] Assemblies { get; set; }
+
+ [Required]
+ public string OutputPath { get; set; }
+
+ public override bool Execute()
+ {
+ var linkerElement = new XElement("linker",
+ new XComment(" THIS IS A GENERATED FILE - DO NOT EDIT MANUALLY "));
+
+ foreach (var assembly in Assemblies)
+ {
+ var assemblyElement = CreateTypeGranularityConfig(assembly);
+ linkerElement.Add(assemblyElement);
+ }
+
+ using var fileStream = File.Open(OutputPath, FileMode.Create);
+ new XDocument(linkerElement).Save(fileStream);
+
+ return true;
+ }
+
+ private XElement CreateTypeGranularityConfig(ITaskItem assembly)
+ {
+ // We match all types in the assembly, and for each one, tell the linker to preserve all
+ // its members (preserve=all) but only if there's some reference to the type (required=false)
+ return new XElement("assembly",
+ new XAttribute("fullname", Path.GetFileNameWithoutExtension(assembly.ItemSpec)),
+ new XElement("type",
+ new XAttribute("fullname", "*"),
+ new XAttribute("preserve", "all"),
+ new XAttribute("required", "false")));
+ }
+ }
+}
diff --git a/src/Components/Blazor/Build/src/Tasks/ResolveBlazorRuntimeDependencies.cs b/src/Components/Blazor/Build/src/Tasks/ResolveBlazorRuntimeDependencies.cs
new file mode 100644
index 000000000000..1181ea337d72
--- /dev/null
+++ b/src/Components/Blazor/Build/src/Tasks/ResolveBlazorRuntimeDependencies.cs
@@ -0,0 +1,203 @@
+// Copyright (c) .NET Foundation. All rights reserved.
+// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
+
+using System;
+using System.Collections.Generic;
+using System.Diagnostics;
+using System.IO;
+using System.Linq;
+using System.Reflection;
+using System.Reflection.Metadata;
+using System.Reflection.PortableExecutable;
+using Microsoft.Build.Framework;
+using Microsoft.Build.Utilities;
+
+namespace Microsoft.AspNetCore.Blazor.Build
+{
+ public class ResolveBlazorRuntimeDependencies : Task
+ {
+ [Required]
+ public string EntryPoint { get; set; }
+
+ [Required]
+ public ITaskItem[] ApplicationDependencies { get; set; }
+
+ [Required]
+ public ITaskItem[] WebAssemblyBCLAssemblies { get; set; }
+
+ [Output]
+ public ITaskItem[] Dependencies { get; set; }
+
+ public override bool Execute()
+ {
+ var paths = ResolveRuntimeDependenciesCore(EntryPoint, ApplicationDependencies.Select(c => c.ItemSpec), WebAssemblyBCLAssemblies.Select(c => c.ItemSpec));
+ Dependencies = paths.Select(p => new TaskItem(p)).ToArray();
+
+ return true;
+ }
+
+ public static IEnumerable ResolveRuntimeDependenciesCore(
+ string entryPoint,
+ IEnumerable applicationDependencies,
+ IEnumerable monoBclAssemblies)
+ {
+ var entryAssembly = new AssemblyEntry(entryPoint, GetAssemblyName(entryPoint));
+
+ var dependencies = CreateAssemblyLookup(applicationDependencies);
+
+ var bcl = CreateAssemblyLookup(monoBclAssemblies);
+
+ var assemblyResolutionContext = new AssemblyResolutionContext(
+ entryAssembly,
+ dependencies,
+ bcl);
+
+ assemblyResolutionContext.ResolveAssemblies();
+
+ var paths = assemblyResolutionContext.Results.Select(r => r.Path);
+ return paths.Concat(FindPdbs(paths));
+
+ static Dictionary CreateAssemblyLookup(IEnumerable assemblyPaths)
+ {
+ var dictionary = new Dictionary(StringComparer.Ordinal);
+ foreach (var path in assemblyPaths)
+ {
+ var assemblyName = AssemblyName.GetAssemblyName(path).Name;
+ if (dictionary.TryGetValue(assemblyName, out var previous))
+ {
+ throw new InvalidOperationException($"Multiple assemblies found with the same assembly name '{assemblyName}':" +
+ Environment.NewLine + string.Join(Environment.NewLine, previous, path));
+ }
+ dictionary[assemblyName] = new AssemblyEntry(path, assemblyName);
+ }
+
+ return dictionary;
+ }
+ }
+
+ private static string GetAssemblyName(string assemblyPath)
+ {
+ return AssemblyName.GetAssemblyName(assemblyPath).Name;
+ }
+
+ private static IEnumerable FindPdbs(IEnumerable dllPaths)
+ {
+ return dllPaths
+ .Select(path => Path.ChangeExtension(path, "pdb"))
+ .Where(path => File.Exists(path));
+ }
+
+ public class AssemblyResolutionContext
+ {
+ public AssemblyResolutionContext(
+ AssemblyEntry entryAssembly,
+ Dictionary dependencies,
+ Dictionary bcl)
+ {
+ EntryAssembly = entryAssembly;
+ Dependencies = dependencies;
+ Bcl = bcl;
+ }
+
+ public AssemblyEntry EntryAssembly { get; }
+ public Dictionary Dependencies { get; }
+ public Dictionary Bcl { get; }
+
+ public IList Results { get; } = new List();
+
+ internal void ResolveAssemblies()
+ {
+ var visitedAssemblies = new HashSet();
+ var pendingAssemblies = new Stack();
+ pendingAssemblies.Push(EntryAssembly.Name);
+ ResolveAssembliesCore();
+
+ void ResolveAssembliesCore()
+ {
+ while (pendingAssemblies.Count > 0)
+ {
+ var current = pendingAssemblies.Pop();
+ if (visitedAssemblies.Add(current))
+ {
+ // Not all references will be resolvable within the Mono BCL.
+ // Skipping unresolved assemblies here is equivalent to passing "--skip-unresolved true" to the Mono linker.
+ if (Resolve(current) is AssemblyEntry resolved)
+ {
+ Results.Add(resolved);
+ var references = GetAssemblyReferences(resolved.Path);
+ foreach (var reference in references)
+ {
+ pendingAssemblies.Push(reference);
+ }
+ }
+ }
+ }
+ }
+
+ AssemblyEntry? Resolve(string assemblyName)
+ {
+ if (EntryAssembly.Name == assemblyName)
+ {
+ return EntryAssembly;
+ }
+
+ // Resolution logic. For right now, we will prefer the mono BCL version of a given
+ // assembly if there is a candidate assembly and an equivalent mono assembly.
+ if (Bcl.TryGetValue(assemblyName, out var assembly) ||
+ Dependencies.TryGetValue(assemblyName, out assembly))
+ {
+ return assembly;
+ }
+
+ return null;
+ }
+
+ static IReadOnlyList GetAssemblyReferences(string assemblyPath)
+ {
+ try
+ {
+ using var peReader = new PEReader(File.OpenRead(assemblyPath));
+ if (!peReader.HasMetadata)
+ {
+ return Array.Empty(); // not a managed assembly
+ }
+
+ var metadataReader = peReader.GetMetadataReader();
+
+ var references = new List();
+ foreach (var handle in metadataReader.AssemblyReferences)
+ {
+ var reference = metadataReader.GetAssemblyReference(handle);
+ var referenceName = metadataReader.GetString(reference.Name);
+
+ references.Add(referenceName);
+ }
+
+ return references;
+ }
+ catch (BadImageFormatException)
+ {
+ // not a PE file, or invalid metadata
+ }
+
+ return Array.Empty(); // not a managed assembly
+ }
+ }
+ }
+
+ [DebuggerDisplay("{ToString(),nq}")]
+ public readonly struct AssemblyEntry
+ {
+ public AssemblyEntry(string path, string name)
+ {
+ Path = path;
+ Name = name;
+ }
+
+ public string Path { get; }
+ public string Name { get; }
+
+ public override string ToString() => Name;
+ }
+ }
+}
diff --git a/src/Components/Blazor/Build/src/targets/All.props b/src/Components/Blazor/Build/src/targets/All.props
index 690a29fbab8f..d1d242f4d92f 100644
--- a/src/Components/Blazor/Build/src/targets/All.props
+++ b/src/Components/Blazor/Build/src/targets/All.props
@@ -4,12 +4,6 @@
$(DefaultWebContentItemExcludes);wwwroot\**
-
- true
-
-
- true
-
true
diff --git a/src/Components/Blazor/Build/src/targets/All.targets b/src/Components/Blazor/Build/src/targets/All.targets
index dd4fbf1b7a9a..6c69e85a4011 100644
--- a/src/Components/Blazor/Build/src/targets/All.targets
+++ b/src/Components/Blazor/Build/src/targets/All.targets
@@ -6,40 +6,43 @@
- $(MSBuildThisFileDirectory)../tools/
- dotnet "$(BlazorToolsDir)Microsoft.AspNetCore.Blazor.Build.dll"
+ $(MSBuildThisFileDirectory)..\tools\
+ <_BlazorTasksTFM Condition=" '$(MSBuildRuntimeType)' == 'Core'">netcoreapp
+ <_BlazorTasksTFM Condition=" '$(_BlazorTasksTFM)' == ''">netfx
+ $(BlazorToolsDir)$(_BlazorTasksTFM)\Microsoft.AspNetCore.Blazor.Build.Tasks.dll
true
+
+
+ true
+
-
+
$(AssemblyName).blazor.config
$(TargetDir)$(BlazorMetadataFileName)
-
-
-
-
+
-
+ <_BlazorConfigContent Include="$(MSBuildProjectFullPath)" />
+ <_BlazorConfigContent Include="$(TargetPath)" />
+ <_BlazorConfigContent Include="debug:true" Condition="'$(BlazorEnableDebugging)'=='true'" />
-
-
-
- $(GetCurrentProjectStaticWebAssetsDependsOn);
- _ClearCurrentStaticWebAssetsForReferenceDiscovery
-
-
+
-
-
+
diff --git a/src/Components/Blazor/Build/src/targets/Blazor.MonoRuntime.props b/src/Components/Blazor/Build/src/targets/Blazor.MonoRuntime.props
index 03f70748ffb6..f49c1f8f2ff5 100644
--- a/src/Components/Blazor/Build/src/targets/Blazor.MonoRuntime.props
+++ b/src/Components/Blazor/Build/src/targets/Blazor.MonoRuntime.props
@@ -1,22 +1,20 @@
-
- $(MSBuildThisFileDirectory)../tools/blazor/blazor.*.js
+
+ $(MSBuildThisFileDirectory)..\tools\blazor\blazor.webassembly.js
none
- --disable-opt unreachablebodies --verbose --strip-security true --exclude-feature com --exclude-feature sre -v false -c link -u link -b true
- dist/
- $(BaseBlazorDistPath)_content/
- $(BaseBlazorDistPath)_framework/
- $(BaseBlazorRuntimeOutputPath)_bin/
- $(BaseBlazorRuntimeOutputPath)wasm/
- $(BaseBlazorRuntimeOutputPath)
- blazor/
- wwwroot/
+ --disable-opt unreachablebodies --verbose --strip-security true --exclude-feature com -v false -c link -u link -b true
+ dist\
+ $(BaseBlazorDistPath)_content\
+ $(BaseBlazorDistPath)_framework\
+ $(BaseBlazorRuntimeOutputPath)_bin\
+ $(BaseBlazorRuntimeOutputPath)wasm\
+ wwwroot\
blazor.boot.json
- $(BaseBlazorRuntimeOutputPath)$(BlazorBootJsonName)
+ <_BlazorBuiltInBclLinkerDescriptor>$(MSBuildThisFileDirectory)BuiltInBclLinkerDescriptor.xml
diff --git a/src/Components/Blazor/Build/src/targets/Blazor.MonoRuntime.targets b/src/Components/Blazor/Build/src/targets/Blazor.MonoRuntime.targets
index 69976d519b68..3c7d12656192 100644
--- a/src/Components/Blazor/Build/src/targets/Blazor.MonoRuntime.targets
+++ b/src/Components/Blazor/Build/src/targets/Blazor.MonoRuntime.targets
@@ -1,653 +1,336 @@
+
+ true
+
+
+
+
+ $(MonoBaseClassLibraryPath)
+ $(MonoBaseClassLibraryFacadesPath)
+ $(MonoWasmRuntimePath)
+ $(MonoWasmFrameworkPath)
+
+
+
+
+ $(DotNetWebAssemblyArtifactsRoot)\wasm-bcl\wasm\
+ $(DotNetWebAssemblyBCLPath)\Facades\
+ $(DotNetWebAssemblyArtifactsRoot)\builds\debug\
+ $(DotNetWebAssemblyArtifactsRoot)\framework\
+
+ Condition="'@(BlazorOutputWithTargetPath)' != '' and '$(CopyBuildOutputToOutputDirectory)' == 'true' and '$(SkipCopyBuildProduct)' != 'true'">
-
+
-
-
-
-
-
- <_BlazorResolveReferencesDidRun>true
-
-
-
-
- <_BlazorStatisticsOutput Include="@(BlazorItemOutput->'%(TargetOutputPath)')" />
+ <_BlazorStatisticsOutput Include="@(BlazorOutputWithTargetPath->'%(TargetOutputPath)')" />
-
- <_BlazorStatisticsReportImportance Condition="'$(BlazorOutputStatistics)' == ''">normal
- <_BlazorStatisticsReportImportance Condition="'$(BlazorOutputStatistics)' != ''">high
-
-
-
+
-
-
-
-
- _PrepareBlazorOutputConfiguration;
- _DefineBlazorCommonInputs;
- _BlazorResolveOutputBinaries;
- _GenerateBlazorBootJson;
-
-
-
-
-
-
-
-
-
-
-
- <_BlazorShouldLinkApplicationAssemblies Condition="$(BlazorLinkOnBuild) == 'false'">
- <_BlazorShouldLinkApplicationAssemblies Condition="$(BlazorLinkOnBuild) == 'true'">true
- <_BlazorBuiltInBclLinkerDescriptor>$(MSBuildThisFileDirectory)BuiltInBclLinkerDescriptor.xml
-
+
-
-
-
-
- $(TargetDir)$(BaseBlazorRuntimeWasmOutputPath)%(FileName)%(Extension)
- WebAssembly
- true
-
-
- $(TargetDir)$(BaseBlazorJsOutputPath)%(FileName)%(Extension)
- BlazorRuntime
- true
-
+
+
+
+
+
+
+ $(BlazorRuntimeWasmOutputPath)%(FileName)%(Extension)
+
+
+ $(BaseBlazorRuntimeOutputPath)%(FileName)%(Extension)
+
-
-
<_BlazorPackageContentOutput Include="@(BlazorPackageContentFile)" Condition="%(SourcePackage) != ''">
- $(TargetDir)$(BaseBlazorPackageContentOutputPath)%(SourcePackage)\%(RecursiveDir)\%(Filename)%(Extension)
- PreserveNewest
+ $(BaseBlazorPackageContentOutputPath)%(SourcePackage)\%(RecursiveDir)\%(Filename)%(Extension)
-
+
+
-
-
+
+
- $(IntermediateOutputPath)$(BaseBlazorIntermediateOutputPath)
- $([MSBuild]::Escape($([System.IO.Path]::GetFullPath('$([System.IO.Path]::Combine('$(MSBuildProjectDirectory)', '$(BlazorIntermediateOutputPath)'))'))))
-
-
-
-
- $(BlazorIntermediateOutputPath)inputs.basic.cache
-
-
- $(BlazorIntermediateOutputPath)inputs.copylocal.txt
-
-
- $(BlazorIntermediateOutputPath)inputs.linkerswitch.cache
-
-
-
-
- $(BlazorIntermediateOutputPath)inputs.linker.cache
+ $(IntermediateOutputPath)blazor\
$(BlazorIntermediateOutputPath)linker.descriptor.xml
+ <_TypeGranularityLinkerDescriptor>$(BlazorIntermediateOutputPath)linker.typegranularityconfig.xml
+
$(BlazorIntermediateOutputPath)linker/
-
- $(BlazorIntermediateOutputPath)linked.assemblies.txt
-
-
-
-
- $(BlazorIntermediateOutputPath)resolvedassemblies/
-
-
- $(BlazorIntermediateOutputPath)resolved.assemblies.txt
-
-
-
-
- $(BlazorIntermediateOutputPath)
-
- $(BlazorBootJsonIntermediateOutputDir)$(BlazorBootJsonName)
+ $(BlazorIntermediateOutputPath)$(BlazorBootJsonName)
-
- $(BlazorIntermediateOutputPath)inputs.bootjson.cache
-
-
- $(BlazorIntermediateOutputPath)resolve-dependencies.txt
-
-
- $(BlazorIntermediateOutputPath)bootjson-references.txt
-
-
- $(BlazorIntermediateOutputPath)embedded.resources.txt
-
-
+ <_BlazorLinkerOutputCache>$(BlazorIntermediateOutputPath)linker.output
-
- $(TargetDir)$(BaseBlazorRuntimeBinOutputPath)
+ <_BlazorApplicationAssembliesCacheFile>$(BlazorIntermediateOutputPath)unlinked.output
-
-
-
+
+ <_WebAssemblyBCLFolder Include="
+ $(DotNetWebAssemblyBCLPath);
+ $(DotNetWebAssemblyBCLFacadesPath);
+ $(DotNetWebAssemblyFrameworkPath)" />
-
-
-
-
-
-
-
- <_BlazorDependencyInput Include="@(ReferenceCopyLocalPaths->WithMetadataValue('Extension','.dll')->'%(FullPath)')" />
+ <_WebAssemblyBCLAssembly Include="%(_WebAssemblyBCLFolder.Identity)*.dll" />
+
- <_BlazorCommonInput Include="@(IntermediateAssembly)" />
- <_BlazorCommonInput Include="@(_BlazorDependencyInput)" />
- <_BlazorCommonInput Include="$(_BlazorShouldLinkApplicationAssemblies)" />
- <_BlazorCommonInput Include="$(BlazorEnableDebugging)" />
- <_BlazorLinkingOption Condition="'$(_BlazorShouldLinkApplicationAssemblies)' == ''" Include="false" />
- <_BlazorLinkingOption Condition="'$(_BlazorShouldLinkApplicationAssemblies)' != ''" Include="true" />
-
+
+ <_BlazorManagedRuntimeAssemby Include="@(RuntimeCopyLocalItems)" />
-
-
-
-
-
-
-
-
-
-
+
+ <_BlazorUserRuntimeAssembly Include="@(ReferencePath->WithMetadataValue('CopyLocal', 'true'))" />
+ <_BlazorUserRuntimeAssembly Include="@(ReferenceDependencyPaths->WithMetadataValue('CopyLocal', 'true'))" />
-
-
-
-
+ <_BlazorManagedRuntimeAssemby Include="@(_BlazorUserRuntimeAssembly)" />
+ <_BlazorManagedRuntimeAssemby Include="@(IntermediateAssembly)" />
+
-
+
+
+
+
+
+ <_BlazorCopyLocalPaths Include="@(ReferenceCopyLocalPaths)" />
+ <_BlazorCopyLocalPaths Remove="@(_BlazorManagedRuntimeAssemby)" />
+
+
+ true
+ $(BlazorRuntimeBinOutputPath)%(_BlazorCopyLocalPaths.DestinationSubDirectory)%(FileName)%(Extension)
+ %(_BlazorCopyLocalPaths.DestinationSubDirectory)%(FileName)%(Extension)
+
+
+
+ true
+ $(BlazorRuntimeBinOutputPath)%(FileName)%(Extension)
+ %(FileName)%(Extension)
+
+
+
-
- <_CollectLinkerOutputsDependsOn>
- _GenerateLinkerDescriptor;
- _CollectBlazorLinkerDescriptors;
- _LinkBlazorApplication
-
-
-
-
-
-
+ Name="_ResolveBlazorOutputsWhenLinked"
+ Condition="'$(BlazorLinkOnBuild)' == 'true'"
+ DependsOnTargets="_PrepareBlazorLinkerInputs;_GenerateBlazorLinkerDescriptor;_GenerateTypeGranularLinkerDescriptor;_LinkBlazorApplication">
+
+
+
+
+
+
-
- $(BlazorRuntimeBinOutputPath)%(FileName)%(Extension)
- Assembly
- true
-
-
- $(BlazorRuntimeBinOutputPath)%(FileName)%(Extension)
- Pdb
-
-
+ <_BlazorRuntimeCopyLocalItems Include="@(RuntimeCopyLocalItems)" />
+
+
+ <_BlazorRuntimeCopyLocalItems IsLinkable="true" Condition="$([System.String]::Copy('%(Filename)').StartsWith('System.'))" />
+ <_BlazorRuntimeCopyLocalItems IsLinkable="true" TypeGranularity="true" Condition="$([System.String]::Copy('%(Filename)').StartsWith('Microsoft.AspNetCore.'))" />
+ <_BlazorRuntimeCopyLocalItems IsLinkable="true" TypeGranularity="true" Condition="$([System.String]::Copy('%(Filename)').StartsWith('Microsoft.Extensions.'))" />
+
+ <_BlazorAssemblyToLink Include="@(_WebAssemblyBCLAssembly)" />
+ <_BlazorAssemblyToLink Include="@(_BlazorRuntimeCopyLocalItems)" Condition="'%(_BlazorRuntimeCopyLocalItems.IsLinkable)' == 'true'" />
+
+ <_BlazorLinkerRoot Include="@(IntermediateAssembly)" />
+ <_BlazorLinkerRoot Include="@(_BlazorUserRuntimeAssembly)" />
+ <_BlazorLinkerRoot Include="@(_BlazorRuntimeCopyLocalItems)" Condition="'%(_BlazorRuntimeCopyLocalItems.IsLinkable)' != 'true'" />
-
+
-
-
- <_PrepareLinkerDescriptorAssemblyLine Include="@(IntermediateAssembly->'%(FileName)')" />
- <_GeneratedLinkerDescriptorLine Include="<linker>" />
- <_GeneratedLinkerDescriptorLine Include="@(_PrepareLinkerDescriptorAssemblyLine->'<assembly fullname="%(Identity)" />')" />
- <_GeneratedLinkerDescriptorLine Include="</linker>" />
-
+ Condition="'@(BlazorLinkerDescriptor)' == ''">
-
+
-
-
-
-
-
-
-
-
-
+
- <_BlazorLinkerInput Include="@(IntermediateAssembly)" />
- <_BlazorLinkerInput Include="@(_BlazorDependencyInput)" />
- <_BlazorLinkerInput Include="@(BlazorLinkerDescriptor)" />
- <_BlazorLinkerInput Include="$(AdditionalMonoLinkerOptions)" />
+
+
+
+
-
-
-
+
+
-
+
-
+
+
-
+
-
-
- <_MonoBaseClassLibraryFolder Include="$(MonoBaseClassLibraryPath);$(MonoBaseClassLibraryFacadesPath);$(MonoWasmFrameworkPath)" />
- <_BlazorAssembliesToLink Include="@(_BlazorDependencyInput->'-a "%(Identity)"')" />
- <_BlazorAssembliesToLink Include="@(IntermediateAssembly->'-a "%(FullPath)"')" />
- <_BlazorFolderLookupPaths Include="@(_MonoBaseClassLibraryFolder->'-d "%(Identity)"')" />
- <_BlazorAssemblyDescriptorFiles
- Include="@(BlazorLinkerDescriptor->'-x "%(FullPath)"')" Condition="'@(BlazorLinkerDescriptor)' != ''" />
-
+ Inputs="$(ProjectAssetsFile);
+ @(_BlazorManagedRuntimeAssemby);
+ @(BlazorLinkerDescriptor);
+ $(MSBuildAllProjects)"
+ Outputs="$(_BlazorLinkerOutputCache)">
<_BlazorLinkerAdditionalOptions>-l $(MonoLinkerI18NAssemblies) $(AdditionalMonoLinkerOptions)
-
-
-
-
-
-
-
- <_BlazorLinkerOutput Include="$(BlazorIntermediateLinkerOutputPath)*.dll" />
- <_BlazorLinkerOutput Include="$(BlazorIntermediateLinkerOutputPath)*.pdb" />
+ <_OldLinkedFile Include="$(BlazorIntermediateLinkerOutputPath)*.dll" />
+ <_OldLinkedFile Include="$(BlazorIntermediateLinkerOutputPath)*.pdb" />
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- <_CollectResolvedAssembliesDependsOn>
- _ResolveBlazorApplicationAssemblies;
- _ReadResolvedBlazorApplicationAssemblies;
- _IntermediateCopyBlazorApplicationAssemblies;
- _TouchBlazorApplicationAssemblies
-
-
-
-
+
-
-
-
- $(BlazorRuntimeBinOutputPath)%(FileName)%(Extension)
- Assembly
- true
-
-
- $(BlazorRuntimeBinOutputPath)%(FileName)%(Extension)
- Pdb
-
-
-
-
-
-
-
-
- <_ReferencesArg Condition="'@(_BlazorDependencyInput)' != ''">--references "$(BlazorResolveDependenciesFilePath)"
- <_BclParameter>--base-class-library "$(MonoBaseClassLibraryPath)" --base-class-library "$(MonoBaseClassLibraryFacadesPath)" --base-class-library "$(MonoWasmFrameworkPath)"
+
+ <_DotNetHostDirectory>$(NetCoreRoot)
+ <_DotNetHostFileName>dotnet
+ <_DotNetHostFileName Condition=" '$(OS)' == 'Windows_NT' ">dotnet.exe
-
-
-
-
-
-
-
-
-
-
-
-
-
- <_IntermediateResolvedRuntimeDependencies Include="@(_BlazorResolvedRuntimeDependencies->'$(BlazorIntermediateResolvedApplicationAssembliesOutputPath)%(FileName)%(Extension)')" />
-
+
-
-
+ <_LinkerResult Include="$(BlazorIntermediateLinkerOutputPath)*.dll" />
+ <_LinkerResult Include="$(BlazorIntermediateLinkerOutputPath)*.pdb" Condition="'$(BlazorEnableDebugging)' == 'true'" />
+
+
-
-
+ Name="_ResolveBlazorOutputsWhenNotLinked"
+ DependsOnTargets="_ResolveBlazorRuntimeDependencies"
+ Condition="'$(BlazorLinkOnBuild)' != 'true'">
+
+
+
-
-
-
-
-
-
+
+
-
-
-
-
-
-
-
-
+
+
-
+
-
+
-
+
+
- <_UnlinkedAppReferencesPaths Include="@(_BlazorDependencyInput)" />
- <_AppReferences Include="@(BlazorItemOutput->WithMetadataValue('Type','Assembly')->WithMetadataValue('PrimaryOutput','')->'%(FileName)%(Extension)')" />
- <_AppReferences Include="@(BlazorItemOutput->WithMetadataValue('Type','Pdb')->'%(FileName)%(Extension)')" Condition="'$(BlazorEnableDebugging)' == 'true'" />
+ <_BlazorRuntimeFile Include="@(BlazorOutputWithTargetPath->WithMetadataValue('BlazorRuntimeFile', 'true'))" />
-
- <_LinkerEnabledFlag Condition="'$(_BlazorShouldLinkApplicationAssemblies)' != ''">--linker-enabled
- <_ReferencesArg Condition="'@(_AppReferences)' != ''">--references "$(BlazorBootJsonReferencesFilePath)"
- <_EmbeddedResourcesArg Condition="'@(_UnlinkedAppReferencesPaths)' != ''">--embedded-resources "$(BlazorEmbeddedResourcesConfigFilePath)"
-
-
-
-
-
-
-
-
- <_BlazorBootJson Include="$(BlazorBootJsonIntermediateOutputPath)" />
- <_BlazorBootJsonEmbeddedContentFile Include="$(BlazorBootJsonIntermediateOutputDir)_content\**\*.*" />
-
- $(TargetDir)$(BlazorBootJsonOutputPath)
- BootJson
-
-
- $(TargetDir)dist/_content/%(RecursiveDir)%(FileName)%(Extension)
-
+
+
+
+
-
-
diff --git a/src/Components/Blazor/Build/src/targets/BuiltInBclLinkerDescriptor.xml b/src/Components/Blazor/Build/src/targets/BuiltInBclLinkerDescriptor.xml
index 3275831dca42..6f36c720896f 100644
--- a/src/Components/Blazor/Build/src/targets/BuiltInBclLinkerDescriptor.xml
+++ b/src/Components/Blazor/Build/src/targets/BuiltInBclLinkerDescriptor.xml
@@ -2,11 +2,11 @@
+ described at https://github.com/mono/linker/blob/master/src/linker/README.md#syntax-of-xml-descriptor -->
+ to implement timers. Fixes https://github.com/dotnet/blazor/issues/239 -->
diff --git a/src/Components/Blazor/Build/src/targets/Publish.targets b/src/Components/Blazor/Build/src/targets/Publish.targets
index e431ad1272cd..7cb7e0ad231d 100644
--- a/src/Components/Blazor/Build/src/targets/Publish.targets
+++ b/src/Components/Blazor/Build/src/targets/Publish.targets
@@ -26,9 +26,8 @@
- <_BlazorGCTPDIDistFiles Include="@(BlazorItemOutput->'%(TargetOutputPath)')" />
- <_BlazorGCTPDI Include="@(_BlazorGCTPDIDistFiles)">
- $(BlazorPublishDistDir)$([MSBuild]::MakeRelative('$(TargetDir)dist\', %(Identity)))
+ <_BlazorGCTPDI Include="%(BlazorOutputWithTargetPath.Identity)">
+ $(AssemblyName)\%(TargetOutputPath)
@@ -41,8 +40,17 @@
<_BlazorConfigPath>$(OutDir)$(AssemblyName).blazor.config
-
-
+
+
+ <_BlazorPublishConfigContent Include="." />
+ <_BlazorPublishConfigContent Include="$(AssemblyName)/" />
+
+
+
diff --git a/src/Components/Blazor/Build/src/targets/StaticWebAssets.targets b/src/Components/Blazor/Build/src/targets/StaticWebAssets.targets
new file mode 100644
index 000000000000..d547f500b13f
--- /dev/null
+++ b/src/Components/Blazor/Build/src/targets/StaticWebAssets.targets
@@ -0,0 +1,37 @@
+
+
+
+
+ $(ResolveStaticWebAssetsInputsDependsOn);
+ _RemoveBlazorCurrentProjectAssetsFromStaticWebAssets;
+
+
+
+ $(GetCurrentProjectStaticWebAssetsDependsOn);
+ _RemoveBlazorCurrentProjectAssetsFromStaticWebAssets;
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <_StandaloneExternalPublishStaticWebAsset Include="@(_ExternalPublishStaticWebAsset)" Condition="'%(RelativePath)' != ''">
+ $([MSBuild]::MakeRelative('$(MSBuildProjectDirectory)', '$([MSBuild]::NormalizePath('$([System.Text.RegularExpressions.Regex]::Replace('%(RelativePath)','^wwwroot\\?\/?(.*)','$(BlazorPublishDistDir)$1'))'))'))
+
+
+
+
+
+
+
+
+
diff --git a/src/Components/Blazor/Build/test/BindRazorIntegrationTest.cs b/src/Components/Blazor/Build/test/BindRazorIntegrationTest.cs
index 1fafb9e81dbd..2292df38d8ac 100644
--- a/src/Components/Blazor/Build/test/BindRazorIntegrationTest.cs
+++ b/src/Components/Blazor/Build/test/BindRazorIntegrationTest.cs
@@ -448,7 +448,7 @@ public void Render_BindToElementFallback_SpecifiesValueAndChangeEvent_WithCSharp
frame => AssertFrame.Attribute(frame, "onchange", typeof(EventCallback), 4));
}
- [Fact] // See https://github.com/aspnet/Blazor/issues/703
+ [Fact] // See https://github.com/dotnet/blazor/issues/703
public void Workaround_703()
{
// Arrange
diff --git a/src/Components/Blazor/Build/test/BlazorCreateRootDescriptorFileTest.cs b/src/Components/Blazor/Build/test/BlazorCreateRootDescriptorFileTest.cs
new file mode 100644
index 000000000000..4470546cf071
--- /dev/null
+++ b/src/Components/Blazor/Build/test/BlazorCreateRootDescriptorFileTest.cs
@@ -0,0 +1,38 @@
+// Copyright (c) .NET Foundation. All rights reserved.
+// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
+
+using System.IO;
+using System.Xml.Linq;
+using Xunit;
+
+namespace Microsoft.AspNetCore.Blazor.Build
+{
+ public class BlazorCreateRootDescriptorFileTest
+ {
+ [Fact]
+ public void ProducesRootDescriptor()
+ {
+ // Arrange/Act
+ using var stream = new MemoryStream();
+
+ // Act
+ BlazorCreateRootDescriptorFile.WriteRootDescriptor(
+ stream,
+ new[] { "MyApp.dll" });
+
+ // Assert
+ stream.Position = 0;
+ var document = XDocument.Load(stream);
+ var rootElement = document.Root;
+
+ var assemblyElement = Assert.Single(rootElement.Elements());
+ Assert.Equal("assembly", assemblyElement.Name.ToString());
+ Assert.Equal("MyApp.dll", assemblyElement.Attribute("fullname").Value);
+
+ var typeElement = Assert.Single(assemblyElement.Elements());
+ Assert.Equal("type", typeElement.Name.ToString());
+ Assert.Equal("*", typeElement.Attribute("fullname").Value);
+ Assert.Equal("true", typeElement.Attribute("required").Value);
+ }
+ }
+}
diff --git a/src/Components/Blazor/Build/test/BootJsonWriterTest.cs b/src/Components/Blazor/Build/test/BootJsonWriterTest.cs
index 3632a082b780..1e2d89b573bb 100644
--- a/src/Components/Blazor/Build/test/BootJsonWriterTest.cs
+++ b/src/Components/Blazor/Build/test/BootJsonWriterTest.cs
@@ -1,62 +1,41 @@
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
-using Newtonsoft.Json;
-using Newtonsoft.Json.Linq;
-using System;
-using System.Linq;
+using System.IO;
+using System.Text.Json;
+using System.Threading.Tasks;
using Xunit;
-namespace Microsoft.AspNetCore.Blazor.Build.Test
+namespace Microsoft.AspNetCore.Blazor.Build
{
public class BootJsonWriterTest
{
[Fact]
- public void ProducesJsonReferencingAssemblyAndDependencies()
+ public async Task ProducesJsonReferencingAssemblyAndDependencies()
{
// Arrange/Act
- var assemblyReferences = new string[] { "System.Abc.dll", "MyApp.ClassLib.dll", };
- var content = BootJsonWriter.GetBootJsonContent(
+ var assemblyReferences = new string[] { "MyApp.EntryPoint.dll", "System.Abc.dll", "MyApp.ClassLib.dll", };
+ using var stream = new MemoryStream();
+
+ // Act
+ GenerateBlazorBootJson.WriteBootJson(
+ stream,
"MyApp.Entrypoint.dll",
- "MyNamespace.MyType::MyMethod",
assemblyReferences,
- Enumerable.Empty(),
linkerEnabled: true);
// Assert
- var parsedContent = JsonConvert.DeserializeObject(content);
- Assert.Equal("MyApp.Entrypoint.dll", parsedContent["main"].Value());
- Assert.Equal("MyNamespace.MyType::MyMethod", parsedContent["entryPoint"].Value());
- Assert.Equal(assemblyReferences, parsedContent["assemblyReferences"].Values());
- }
-
- [Fact]
- public void IncludesReferencesToEmbeddedContent()
- {
- // Arrange/Act
- var embeddedContent = new[]
+ stream.Position = 0;
+ using var parsedContent = await JsonDocument.ParseAsync(stream);
+ var rootElement = parsedContent.RootElement;
+ Assert.Equal("MyApp.Entrypoint.dll", rootElement.GetProperty("entryAssembly").GetString());
+ var assembliesElement = rootElement.GetProperty("assemblies");
+ Assert.Equal(assemblyReferences.Length, assembliesElement.GetArrayLength());
+ for (var i = 0; i < assemblyReferences.Length; i++)
{
- new EmbeddedResourceInfo(EmbeddedResourceKind.Static, "my/static/file"),
- new EmbeddedResourceInfo(EmbeddedResourceKind.Css, "css/first.css"),
- new EmbeddedResourceInfo(EmbeddedResourceKind.JavaScript, "javascript/first.js"),
- new EmbeddedResourceInfo(EmbeddedResourceKind.Css, "css/second.css"),
- new EmbeddedResourceInfo(EmbeddedResourceKind.JavaScript, "javascript/second.js"),
- };
- var content = BootJsonWriter.GetBootJsonContent(
- "MyApp.Entrypoint",
- "MyNamespace.MyType::MyMethod",
- assemblyReferences: new[] { "Something.dll" },
- embeddedContent: embeddedContent,
- linkerEnabled: true);
-
- // Assert
- var parsedContent = JsonConvert.DeserializeObject(content);
- Assert.Equal(
- new[] { "css/first.css", "css/second.css" },
- parsedContent["cssReferences"].Values());
- Assert.Equal(
- new[] { "javascript/first.js", "javascript/second.js" },
- parsedContent["jsReferences"].Values());
+ Assert.Equal(assemblyReferences[i], assembliesElement[i].GetString());
+ }
+ Assert.True(rootElement.GetProperty("linkerEnabled").GetBoolean());
}
}
}
diff --git a/src/Components/Blazor/Build/test/BuildIntegrationTests/Assert.cs b/src/Components/Blazor/Build/test/BuildIntegrationTests/Assert.cs
new file mode 100644
index 000000000000..8d0aa4b6dab1
--- /dev/null
+++ b/src/Components/Blazor/Build/test/BuildIntegrationTests/Assert.cs
@@ -0,0 +1,950 @@
+// Copyright (c) .NET Foundation. All rights reserved.
+// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
+
+using System;
+using System.Collections.Generic;
+using System.Diagnostics;
+using System.IO;
+using System.IO.Compression;
+using System.Linq;
+using System.Reflection.Metadata;
+using System.Reflection.PortableExecutable;
+using System.Text;
+using System.Text.RegularExpressions;
+
+namespace Microsoft.AspNetCore.Blazor.Build
+{
+ internal class Assert : Xunit.Assert
+ {
+ // Matches `{filename}: error {code}: {message} [{project}]
+ // See https://stackoverflow.com/questions/3441452/msbuild-and-ignorestandarderrorwarningformat/5180353#5180353
+ private static readonly Regex ErrorRegex = new Regex(@"^(?'location'.+): error (?'errorcode'[A-Z0-9]+): (?'message'.+) \[(?'project'.+)\]$");
+ private static readonly Regex WarningRegex = new Regex(@"^(?'location'.+): warning (?'errorcode'[A-Z0-9]+): (?'message'.+) \[(?'project'.+)\]$");
+ private static readonly string[] AllowedBuildWarnings = new[]
+ {
+ "MSB3491" , // The process cannot access the file. As long as the build succeeds, we're ok.
+ "NETSDK1071", // "A PackageReference to 'Microsoft.NETCore.App' specified a Version ..."
+ };
+
+ public static void BuildPassed(MSBuildResult result, bool allowWarnings = false)
+ {
+ if (result == null)
+ {
+ throw new ArgumentNullException(nameof(result));
+ }
+
+ if (result.ExitCode != 0)
+ {
+ throw new BuildFailedException(result);
+ }
+
+ var buildWarnings = GetBuildWarnings(result)
+ .Where(m => !AllowedBuildWarnings.Contains(m.match.Groups["errorcode"].Value))
+ .Select(m => m.line);
+
+ if (!allowWarnings && buildWarnings.Any())
+ {
+ throw new BuildWarningsException(result, buildWarnings);
+ }
+ }
+
+ public static void BuildError(MSBuildResult result, string errorCode, string location = null)
+ {
+ if (result == null)
+ {
+ throw new ArgumentNullException(nameof(result));
+ }
+
+ // We don't really need to search line by line, I'm doing this so that it's possible/easy to debug.
+ var lines = result.Output.Split(new char[] { '\r', '\n' }, StringSplitOptions.RemoveEmptyEntries);
+ for (var i = 0; i < lines.Length; i++)
+ {
+ var line = lines[i];
+ var match = ErrorRegex.Match(line);
+ if (match.Success)
+ {
+ if (match.Groups["errorcode"].Value != errorCode)
+ {
+ continue;
+ }
+
+ if (location != null && match.Groups["location"].Value.Trim() != location)
+ {
+ continue;
+ }
+
+ // This is a match
+ return;
+ }
+ }
+
+ throw new BuildErrorMissingException(result, errorCode, location);
+ }
+
+ public static void BuildWarning(MSBuildResult result, string errorCode, string location = null)
+ {
+ if (result == null)
+ {
+ throw new ArgumentNullException(nameof(result));
+ }
+
+ // We don't really need to search line by line, I'm doing this so that it's possible/easy to debug.
+ foreach (var (_, match) in GetBuildWarnings(result))
+ {
+ if (match.Groups["errorcode"].Value != errorCode)
+ {
+ continue;
+ }
+
+ if (location != null && match.Groups["location"].Value.Trim() != location)
+ {
+ continue;
+ }
+
+ // This is a match
+ return;
+ }
+
+ throw new BuildErrorMissingException(result, errorCode, location);
+ }
+
+ private static IEnumerable<(string line, Match match)> GetBuildWarnings(MSBuildResult result)
+ {
+ var lines = result.Output.Split(new char[] { '\r', '\n' }, StringSplitOptions.RemoveEmptyEntries);
+ for (var i = 0; i < lines.Length; i++)
+ {
+ var line = lines[i];
+ var match = WarningRegex.Match(line);
+ if (match.Success)
+ {
+ yield return (line, match);
+ }
+ }
+ }
+
+ public static void BuildFailed(MSBuildResult result)
+ {
+ if (result == null)
+ {
+ throw new ArgumentNullException(nameof(result));
+ };
+
+ if (result.ExitCode == 0)
+ {
+ throw new BuildPassedException(result);
+ }
+ }
+
+ public static void BuildOutputContainsLine(MSBuildResult result, string match)
+ {
+ if (result == null)
+ {
+ throw new ArgumentNullException(nameof(result));
+ }
+
+ if (match == null)
+ {
+ throw new ArgumentNullException(nameof(match));
+ }
+
+ // We don't really need to search line by line, I'm doing this so that it's possible/easy to debug.
+ var lines = result.Output.Split(new char[] { '\r', '\n' }, StringSplitOptions.RemoveEmptyEntries);
+ for (var i = 0; i < lines.Length; i++)
+ {
+ var line = lines[i].Trim();
+ if (line == match)
+ {
+ return;
+ }
+ }
+
+ throw new BuildOutputMissingException(result, match);
+ }
+
+ public static void BuildOutputDoesNotContainLine(MSBuildResult result, string match)
+ {
+ if (result == null)
+ {
+ throw new ArgumentNullException(nameof(result));
+ }
+
+ if (match == null)
+ {
+ throw new ArgumentNullException(nameof(match));
+ }
+
+ // We don't really need to search line by line, I'm doing this so that it's possible/easy to debug.
+ var lines = result.Output.Split(new char[] { '\r', '\n' }, StringSplitOptions.RemoveEmptyEntries);
+ for (var i = 0; i < lines.Length; i++)
+ {
+ var line = lines[i].Trim();
+ if (line == match)
+ {
+ throw new BuildOutputContainsLineException(result, match);
+ }
+ }
+ }
+
+ public static void FileContains(MSBuildResult result, string filePath, string match)
+ {
+ if (result == null)
+ {
+ throw new ArgumentNullException(nameof(result));
+ }
+
+ filePath = Path.Combine(result.Project.DirectoryPath, filePath);
+ FileExists(result, filePath);
+
+ var text = File.ReadAllText(filePath);
+ if (text.Contains(match))
+ {
+ return;
+ }
+
+ throw new FileContentMissingException(result, filePath, File.ReadAllText(filePath), match);
+ }
+
+ public static void FileDoesNotContain(MSBuildResult result, string filePath, string match)
+ {
+ if (result == null)
+ {
+ throw new ArgumentNullException(nameof(result));
+ }
+
+ filePath = Path.Combine(result.Project.DirectoryPath, filePath);
+ FileExists(result, filePath);
+
+ var text = File.ReadAllText(filePath);
+ if (text.Contains(match))
+ {
+ throw new FileContentFoundException(result, filePath, File.ReadAllText(filePath), match);
+ }
+ }
+
+ public static void FileContentEquals(MSBuildResult result, string filePath, string expected)
+ {
+ if (result == null)
+ {
+ throw new ArgumentNullException(nameof(result));
+ }
+
+ filePath = Path.Combine(result.Project.DirectoryPath, filePath);
+ FileExists(result, filePath);
+
+ var actual = File.ReadAllText(filePath);
+ if (!actual.Equals(expected, StringComparison.Ordinal))
+ {
+ throw new FileContentNotEqualException(result, filePath, expected, actual);
+ }
+ }
+
+ public static void FileEquals(MSBuildResult result, string expected, string actual)
+ {
+ if (result == null)
+ {
+ throw new ArgumentNullException(nameof(result));
+ }
+
+ expected = Path.Combine(result.Project.DirectoryPath, expected);
+ actual = Path.Combine(result.Project.DirectoryPath, actual);
+ FileExists(result, expected);
+ FileExists(result, actual);
+
+ if (!Enumerable.SequenceEqual(File.ReadAllBytes(expected), File.ReadAllBytes(actual)))
+ {
+ throw new FilesNotEqualException(result, expected, actual);
+ }
+ }
+
+ public static void FileContainsLine(MSBuildResult result, string filePath, string match)
+ {
+ if (result == null)
+ {
+ throw new ArgumentNullException(nameof(result));
+ }
+
+ filePath = Path.Combine(result.Project.DirectoryPath, filePath);
+ FileExists(result, filePath);
+
+ var lines = File.ReadAllLines(filePath);
+ for (var i = 0; i < lines.Length; i++)
+ {
+ var line = lines[i].Trim();
+ if (line == match)
+ {
+ return;
+ }
+ }
+
+ throw new FileContentMissingException(result, filePath, File.ReadAllText(filePath), match);
+ }
+
+ public static void FileDoesNotContainLine(MSBuildResult result, string filePath, string match)
+ {
+ if (result == null)
+ {
+ throw new ArgumentNullException(nameof(result));
+ }
+
+ filePath = Path.Combine(result.Project.DirectoryPath, filePath);
+ FileExists(result, filePath);
+
+ var lines = File.ReadAllLines(filePath);
+ for (var i = 0; i < lines.Length; i++)
+ {
+ var line = lines[i].Trim();
+ if (line == match)
+ {
+ throw new FileContentFoundException(result, filePath, File.ReadAllText(filePath), match);
+ }
+ }
+ }
+
+ public static string FileExists(MSBuildResult result, params string[] paths)
+ {
+ if (result == null)
+ {
+ throw new ArgumentNullException(nameof(result));
+ }
+
+ var filePath = Path.Combine(result.Project.DirectoryPath, Path.Combine(paths));
+ if (!File.Exists(filePath))
+ {
+ throw new FileMissingException(result, filePath);
+ }
+
+ return filePath;
+ }
+
+ public static void FileCountEquals(MSBuildResult result, int expected, string directoryPath, string searchPattern)
+ {
+ if (result == null)
+ {
+ throw new ArgumentNullException(nameof(result));
+ }
+
+ if (directoryPath == null)
+ {
+ throw new ArgumentNullException(nameof(directoryPath));
+ }
+
+ if (searchPattern == null)
+ {
+ throw new ArgumentNullException(nameof(searchPattern));
+ }
+
+ directoryPath = Path.Combine(result.Project.DirectoryPath, directoryPath);
+
+ if (Directory.Exists(directoryPath))
+ {
+ var files = Directory.GetFiles(directoryPath, searchPattern, SearchOption.AllDirectories);
+ if (files.Length != expected)
+ {
+ throw new FileCountException(result, expected, directoryPath, searchPattern, files);
+ }
+ }
+ else if (expected > 0)
+ {
+ // directory doesn't exist, that's OK if we expected to find nothing.
+ throw new FileCountException(result, expected, directoryPath, searchPattern, Array.Empty());
+ }
+ }
+
+ public static void FileDoesNotExist(MSBuildResult result, params string[] paths)
+ {
+ if (result == null)
+ {
+ throw new ArgumentNullException(nameof(result));
+ }
+
+ var filePath = Path.Combine(result.Project.DirectoryPath, Path.Combine(paths));
+ if (File.Exists(filePath))
+ {
+ throw new FileFoundException(result, filePath);
+ }
+ }
+
+ public static void NuspecContains(MSBuildResult result, string nuspecPath, string expected)
+ {
+ if (result == null)
+ {
+ throw new ArgumentNullException(nameof(result));
+ }
+
+ if (nuspecPath == null)
+ {
+ throw new ArgumentNullException(nameof(nuspecPath));
+ }
+
+ if (expected == null)
+ {
+ throw new ArgumentNullException(nameof(expected));
+ }
+
+ nuspecPath = Path.Combine(result.Project.DirectoryPath, nuspecPath);
+ FileExists(result, nuspecPath);
+
+ var content = File.ReadAllText(nuspecPath);
+ if (!content.Contains(expected))
+ {
+ throw new NuspecException(result, nuspecPath, content, expected);
+ }
+ }
+
+ public static void NuspecDoesNotContain(MSBuildResult result, string nuspecPath, string expected)
+ {
+ if (result == null)
+ {
+ throw new ArgumentNullException(nameof(result));
+ }
+
+ if (nuspecPath == null)
+ {
+ throw new ArgumentNullException(nameof(nuspecPath));
+ }
+
+ if (expected == null)
+ {
+ throw new ArgumentNullException(nameof(expected));
+ }
+
+ nuspecPath = Path.Combine(result.Project.DirectoryPath, nuspecPath);
+ FileExists(result, nuspecPath);
+
+ var content = File.ReadAllText(nuspecPath);
+ if (content.Contains(expected))
+ {
+ throw new NuspecFoundException(result, nuspecPath, content, expected);
+ }
+ }
+
+ // This method extracts the nupkg to a fixed directory path. To avoid the extra work of
+ // cleaning up after each invocation, this method accepts multiple files.
+ public static void NupkgContains(MSBuildResult result, string nupkgPath, params string[] filePaths)
+ {
+ if (result == null)
+ {
+ throw new ArgumentNullException(nameof(result));
+ }
+
+ if (nupkgPath == null)
+ {
+ throw new ArgumentNullException(nameof(nupkgPath));
+ }
+
+ if (filePaths == null)
+ {
+ throw new ArgumentNullException(nameof(filePaths));
+ }
+
+ nupkgPath = Path.Combine(result.Project.DirectoryPath, nupkgPath);
+ FileExists(result, nupkgPath);
+
+ var unzipped = Path.Combine(result.Project.DirectoryPath, Path.GetFileNameWithoutExtension(nupkgPath));
+ ZipFile.ExtractToDirectory(nupkgPath, unzipped);
+
+ foreach (var filePath in filePaths)
+ {
+ if (!File.Exists(Path.Combine(unzipped, filePath)))
+ {
+ throw new NupkgFileMissingException(result, nupkgPath, filePath);
+ }
+ }
+ }
+
+ // This method extracts the nupkg to a fixed directory path. To avoid the extra work of
+ // cleaning up after each invocation, this method accepts multiple files.
+ public static void NupkgDoesNotContain(MSBuildResult result, string nupkgPath, params string[] filePaths)
+ {
+ if (result == null)
+ {
+ throw new ArgumentNullException(nameof(result));
+ }
+
+ if (nupkgPath == null)
+ {
+ throw new ArgumentNullException(nameof(nupkgPath));
+ }
+
+ if (filePaths == null)
+ {
+ throw new ArgumentNullException(nameof(filePaths));
+ }
+
+ nupkgPath = Path.Combine(result.Project.DirectoryPath, nupkgPath);
+ FileExists(result, nupkgPath);
+
+ var unzipped = Path.Combine(result.Project.DirectoryPath, Path.GetFileNameWithoutExtension(nupkgPath));
+ ZipFile.ExtractToDirectory(nupkgPath, unzipped);
+
+ foreach (var filePath in filePaths)
+ {
+ if (File.Exists(Path.Combine(unzipped, filePath)))
+ {
+ throw new NupkgFileFoundException(result, nupkgPath, filePath);
+ }
+ }
+ }
+
+ public static void AssemblyContainsType(MSBuildResult result, string assemblyPath, string fullTypeName)
+ {
+ if (result == null)
+ {
+ throw new ArgumentNullException(nameof(result));
+ }
+
+ assemblyPath = Path.Combine(result.Project.DirectoryPath, Path.Combine(assemblyPath));
+
+ var typeNames = GetDeclaredTypeNames(assemblyPath);
+ Assert.Contains(fullTypeName, typeNames);
+ }
+
+ public static void AssemblyDoesNotContainType(MSBuildResult result, string assemblyPath, string fullTypeName)
+ {
+ if (result == null)
+ {
+ throw new ArgumentNullException(nameof(result));
+ }
+
+ assemblyPath = Path.Combine(result.Project.DirectoryPath, Path.Combine(assemblyPath));
+
+ var typeNames = GetDeclaredTypeNames(assemblyPath);
+ Assert.DoesNotContain(fullTypeName, typeNames);
+ }
+
+ private static IEnumerable GetDeclaredTypeNames(string assemblyPath)
+ {
+ using (var file = File.OpenRead(assemblyPath))
+ {
+ var peReader = new PEReader(file);
+ var metadataReader = peReader.GetMetadataReader();
+ return metadataReader.TypeDefinitions.Where(t => !t.IsNil).Select(t =>
+ {
+ var type = metadataReader.GetTypeDefinition(t);
+ return metadataReader.GetString(type.Namespace) + "." + metadataReader.GetString(type.Name);
+ }).ToArray();
+ }
+ }
+
+ public static void AssemblyHasAttribute(MSBuildResult result, string assemblyPath, string fullTypeName)
+ {
+ if (result == null)
+ {
+ throw new ArgumentNullException(nameof(result));
+ }
+
+ assemblyPath = Path.Combine(result.Project.DirectoryPath, Path.Combine(assemblyPath));
+
+ var typeNames = GetAssemblyAttributes(assemblyPath);
+ Assert.Contains(fullTypeName, typeNames);
+ }
+
+ private static IEnumerable GetAssemblyAttributes(string assemblyPath)
+ {
+ using (var file = File.OpenRead(assemblyPath))
+ {
+ var peReader = new PEReader(file);
+ var metadataReader = peReader.GetMetadataReader();
+ return metadataReader.CustomAttributes.Where(t => !t.IsNil).Select(t =>
+ {
+ var attribute = metadataReader.GetCustomAttribute(t);
+ var constructor = metadataReader.GetMemberReference((MemberReferenceHandle)attribute.Constructor);
+ var type = metadataReader.GetTypeReference((TypeReferenceHandle)constructor.Parent);
+
+ return metadataReader.GetString(type.Namespace) + "." + metadataReader.GetString(type.Name);
+ }).ToArray();
+ }
+ }
+
+ private abstract class MSBuildXunitException : Xunit.Sdk.XunitException
+ {
+ protected MSBuildXunitException(MSBuildResult result)
+ {
+ Result = result;
+ }
+
+ protected abstract string Heading { get; }
+
+ public MSBuildResult Result { get; }
+
+ public override string Message
+ {
+ get
+ {
+ var message = new StringBuilder();
+ message.AppendLine(Heading);
+ message.Append(Result.FileName);
+ message.Append(" ");
+ message.Append(Result.Arguments);
+ message.AppendLine();
+ message.AppendLine();
+ message.Append(Result.Output);
+ message.AppendLine();
+ message.Append("Exit Code:");
+ message.Append(Result.ExitCode);
+ return message.ToString();
+ }
+ }
+ }
+
+ private class BuildErrorMissingException : MSBuildXunitException
+ {
+ public BuildErrorMissingException(MSBuildResult result, string errorCode, string location)
+ : base(result)
+ {
+ ErrorCode = errorCode;
+ Location = location;
+ }
+
+ public string ErrorCode { get; }
+
+ public string Location { get; }
+
+ protected override string Heading
+ {
+ get
+ {
+ return
+ $"Error code '{ErrorCode}' was not found." + Environment.NewLine +
+ $"Looking for '{Location ?? ".*"}: error {ErrorCode}: .*'";
+ }
+ }
+ }
+
+ private class BuildFailedException : MSBuildXunitException
+ {
+ public BuildFailedException(MSBuildResult result)
+ : base(result)
+ {
+ }
+
+ protected override string Heading => "Build failed.";
+ }
+
+ private class BuildWarningsException : MSBuildXunitException
+ {
+ public BuildWarningsException(MSBuildResult result, IEnumerable warnings)
+ : base(result)
+ {
+ Warnings = warnings.ToList();
+ }
+
+ public List Warnings { get; }
+
+ protected override string Heading => "Build contains unexpected warnings: " + string.Join(Environment.NewLine, Warnings);
+ }
+
+ private class BuildPassedException : MSBuildXunitException
+ {
+ public BuildPassedException(MSBuildResult result)
+ : base(result)
+ {
+ }
+
+ protected override string Heading => "Build should have failed, but it passed.";
+ }
+
+ private class BuildOutputMissingException : MSBuildXunitException
+ {
+ public BuildOutputMissingException(MSBuildResult result, string match)
+ : base(result)
+ {
+ Match = match;
+ }
+
+ public string Match { get; }
+
+ protected override string Heading => $"Build did not contain the line: '{Match}'.";
+ }
+
+ private class BuildOutputContainsLineException : MSBuildXunitException
+ {
+ public BuildOutputContainsLineException(MSBuildResult result, string match)
+ : base(result)
+ {
+ Match = match;
+ }
+
+ public string Match { get; }
+
+ protected override string Heading => $"Build output contains the line: '{Match}'.";
+ }
+
+ private class FileContentFoundException : MSBuildXunitException
+ {
+ public FileContentFoundException(MSBuildResult result, string filePath, string content, string match)
+ : base(result)
+ {
+ FilePath = filePath;
+ Content = content;
+ Match = match;
+ }
+
+ public string Content { get; }
+
+ public string FilePath { get; }
+
+ public string Match { get; }
+
+ protected override string Heading
+ {
+ get
+ {
+ var builder = new StringBuilder();
+ builder.AppendFormat("File content of '{0}' should not contain line: '{1}'.", FilePath, Match);
+ builder.AppendLine();
+ builder.AppendLine();
+ builder.AppendLine(Content);
+ return builder.ToString();
+ }
+ }
+ }
+
+ private class FileContentMissingException : MSBuildXunitException
+ {
+ public FileContentMissingException(MSBuildResult result, string filePath, string content, string match)
+ : base(result)
+ {
+ FilePath = filePath;
+ Content = content;
+ Match = match;
+ }
+
+ public string Content { get; }
+
+ public string FilePath { get; }
+
+ public string Match { get; }
+
+ protected override string Heading
+ {
+ get
+ {
+ var builder = new StringBuilder();
+ builder.AppendFormat("File content of '{0}' did not contain the line: '{1}'.", FilePath, Match);
+ builder.AppendLine();
+ builder.AppendLine();
+ builder.AppendLine(Content);
+ return builder.ToString();
+ }
+ }
+ }
+
+ private class FileContentNotEqualException : MSBuildXunitException
+ {
+ public FileContentNotEqualException(MSBuildResult result, string filePath, string expected, string actual)
+ : base(result)
+ {
+ FilePath = filePath;
+ Expected = expected;
+ Actual = actual;
+ }
+
+ public string Actual { get; }
+
+ public string FilePath { get; }
+
+ public string Expected { get; }
+
+ protected override string Heading
+ {
+ get
+ {
+ var builder = new StringBuilder();
+ builder.AppendFormat("File content of '{0}' did not match the expected content: '{1}'.", FilePath, Expected);
+ builder.AppendLine();
+ builder.AppendLine();
+ builder.AppendLine(Actual);
+ return builder.ToString();
+ }
+ }
+ }
+
+ private class FilesNotEqualException : MSBuildXunitException
+ {
+ public FilesNotEqualException(MSBuildResult result, string expected, string actual)
+ : base(result)
+ {
+ Expected = expected;
+ Actual = actual;
+ }
+
+ public string Actual { get; }
+
+ public string Expected { get; }
+
+ protected override string Heading
+ {
+ get
+ {
+ var builder = new StringBuilder();
+ builder.AppendFormat("File content of '{0}' did not match the contents of '{1}'.", Expected, Actual);
+ builder.AppendLine();
+ builder.AppendLine();
+ builder.AppendLine(Actual);
+ return builder.ToString();
+ }
+ }
+ }
+
+ private class FileMissingException : MSBuildXunitException
+ {
+ public FileMissingException(MSBuildResult result, string filePath)
+ : base(result)
+ {
+ FilePath = filePath;
+ }
+
+ public string FilePath { get; }
+
+ protected override string Heading => $"File: '{FilePath}' was not found.";
+ }
+
+ private class FileCountException : MSBuildXunitException
+ {
+ public FileCountException(MSBuildResult result, int expected, string directoryPath, string searchPattern, string[] files)
+ : base(result)
+ {
+ Expected = expected;
+ DirectoryPath = directoryPath;
+ SearchPattern = searchPattern;
+ Files = files;
+ }
+
+ public string DirectoryPath { get; }
+
+ public int Expected { get; }
+
+ public string[] Files { get; }
+
+ public string SearchPattern { get; }
+
+ protected override string Heading
+ {
+ get
+ {
+ var heading = new StringBuilder();
+ heading.AppendLine($"Expected {Expected} files matching {SearchPattern} in {DirectoryPath}, found {Files.Length}.");
+
+ if (Files.Length > 0)
+ {
+ heading.AppendLine("Files:");
+
+ foreach (var file in Files)
+ {
+ heading.Append("\t");
+ heading.Append(file);
+ }
+
+ heading.AppendLine();
+ }
+
+ return heading.ToString();
+ }
+ }
+ }
+
+ private class FileFoundException : MSBuildXunitException
+ {
+ public FileFoundException(MSBuildResult result, string filePath)
+ : base(result)
+ {
+ FilePath = filePath;
+ }
+
+ public string FilePath { get; }
+
+ protected override string Heading => $"File: '{FilePath}' was found, but should not exist.";
+ }
+
+ private class NuspecException : MSBuildXunitException
+ {
+ public NuspecException(MSBuildResult result, string filePath, string content, string expected)
+ : base(result)
+ {
+ FilePath = filePath;
+ Content = content;
+ Expected = expected;
+ }
+
+ public string Content { get; }
+
+ public string Expected { get; }
+
+ public string FilePath { get; }
+
+ protected override string Heading
+ {
+ get
+ {
+ return
+ $"nuspec: '{FilePath}' did not contain the expected content." + Environment.NewLine +
+ Environment.NewLine +
+ $"expected: {Expected}" + Environment.NewLine +
+ Environment.NewLine +
+ $"actual: {Content}";
+ }
+ }
+ }
+
+ private class NuspecFoundException : MSBuildXunitException
+ {
+ public NuspecFoundException(MSBuildResult result, string filePath, string content, string expected)
+ : base(result)
+ {
+ FilePath = filePath;
+ Content = content;
+ Expected = expected;
+ }
+
+ public string Content { get; }
+
+ public string Expected { get; }
+
+ public string FilePath { get; }
+
+ protected override string Heading
+ {
+ get
+ {
+ return
+ $"nuspec: '{FilePath}' should not contain the content {Expected}." +
+ Environment.NewLine +
+ $"actual content: {Content}";
+ }
+ }
+ }
+
+ private class NupkgFileMissingException : MSBuildXunitException
+ {
+ public NupkgFileMissingException(MSBuildResult result, string nupkgPath, string filePath)
+ : base(result)
+ {
+ NupkgPath = nupkgPath;
+ FilePath = filePath;
+ }
+
+ public string FilePath { get; }
+
+ public string NupkgPath { get; }
+
+ protected override string Heading => $"File: '{FilePath}' was not found was not found in {NupkgPath}.";
+ }
+
+ private class NupkgFileFoundException : MSBuildXunitException
+ {
+ public NupkgFileFoundException(MSBuildResult result, string nupkgPath, string filePath)
+ : base(result)
+ {
+ NupkgPath = nupkgPath;
+ FilePath = filePath;
+ }
+
+ public string FilePath { get; }
+
+ public string NupkgPath { get; }
+
+ protected override string Heading => $"File: '{FilePath}' was found in {NupkgPath}.";
+ }
+ }
+}
diff --git a/src/Components/Blazor/Build/test/BuildIntegrationTests/BuildIncrementalismTest.cs b/src/Components/Blazor/Build/test/BuildIntegrationTests/BuildIncrementalismTest.cs
new file mode 100644
index 000000000000..73d864502989
--- /dev/null
+++ b/src/Components/Blazor/Build/test/BuildIntegrationTests/BuildIncrementalismTest.cs
@@ -0,0 +1,40 @@
+// Copyright (c) .NET Foundation. All rights reserved.
+// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
+
+using System.Threading.Tasks;
+using Xunit;
+
+namespace Microsoft.AspNetCore.Blazor.Build
+{
+ public class BuildIncrementalismTest
+ {
+ [Fact]
+ public async Task Build_WithLinker_IsIncremental()
+ {
+ // Arrange
+ using var project = ProjectDirectory.Create("standalone");
+ var result = await MSBuildProcessManager.DotnetMSBuild(project);
+
+ Assert.BuildPassed(result);
+
+ var buildOutputDirectory = project.BuildOutputDirectory;
+
+ // Act
+ var thumbPrint = FileThumbPrint.CreateFolderThumbprint(project, project.BuildOutputDirectory);
+
+ // Assert
+ for (var i = 0; i < 3; i++)
+ {
+ result = await MSBuildProcessManager.DotnetMSBuild(project);
+ Assert.BuildPassed(result);
+
+ var newThumbPrint = FileThumbPrint.CreateFolderThumbprint(project, project.BuildOutputDirectory);
+ Assert.Equal(thumbPrint.Count, newThumbPrint.Count);
+ for (var j = 0; j < thumbPrint.Count; j++)
+ {
+ Assert.Equal(thumbPrint[j], newThumbPrint[j]);
+ }
+ }
+ }
+ }
+}
diff --git a/src/Components/Blazor/Build/test/BuildIntegrationTests/BuildIntegrationTest.cs b/src/Components/Blazor/Build/test/BuildIntegrationTests/BuildIntegrationTest.cs
new file mode 100644
index 000000000000..54c089e874f3
--- /dev/null
+++ b/src/Components/Blazor/Build/test/BuildIntegrationTests/BuildIntegrationTest.cs
@@ -0,0 +1,135 @@
+// Copyright (c) .NET Foundation. All rights reserved.
+// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
+
+using System.IO;
+using System.Threading.Tasks;
+using Xunit;
+
+namespace Microsoft.AspNetCore.Blazor.Build
+{
+ public class BuildIntegrationTest
+ {
+ [Fact]
+ public async Task Build_WithDefaultSettings_Works()
+ {
+ // Arrange
+ using var project = ProjectDirectory.Create("standalone");
+ var result = await MSBuildProcessManager.DotnetMSBuild(project);
+
+ Assert.BuildPassed(result);
+
+ var buildOutputDirectory = project.BuildOutputDirectory;
+
+ Assert.FileExists(result, buildOutputDirectory, "dist", "_framework", "blazor.boot.json");
+ Assert.FileExists(result, buildOutputDirectory, "dist", "_framework", "blazor.webassembly.js");
+ Assert.FileExists(result, buildOutputDirectory, "dist", "_framework", "wasm", "dotnet.wasm");
+ Assert.FileExists(result, buildOutputDirectory, "dist", "_framework", "wasm", "dotnet.js");
+ Assert.FileExists(result, buildOutputDirectory, "dist", "_framework", "_bin", "standalone.dll");
+ Assert.FileExists(result, buildOutputDirectory, "dist", "_framework", "_bin", "Microsoft.Extensions.Logging.Abstractions.dll"); // Verify dependencies are part of the output.
+ }
+
+ [Fact]
+ public async Task Build_Hosted_Works()
+ {
+ // Arrange
+ using var project = ProjectDirectory.Create("blazorhosted", additionalProjects: new[] { "standalone", "razorclasslibrary", });
+ project.TargetFramework = "netcoreapp5.0";
+ var result = await MSBuildProcessManager.DotnetMSBuild(project);
+
+ Assert.BuildPassed(result);
+
+ var buildOutputDirectory = project.BuildOutputDirectory;
+ var blazorConfig = Path.Combine(buildOutputDirectory, "standalone.blazor.config");
+ Assert.FileExists(result, blazorConfig);
+
+ var path = Path.GetFullPath(Path.Combine(project.SolutionPath, "standalone", "bin", project.Configuration, "netstandard2.1", "standalone.dll"));
+ Assert.FileContains(result, blazorConfig, path);
+ Assert.FileDoesNotExist(result, buildOutputDirectory, "dist", "_framework", "_bin", "standalone.dll");
+ }
+
+ [Fact]
+ public async Task Build_WithLinkOnBuildDisabled_Works()
+ {
+ // Arrange
+ using var project = ProjectDirectory.Create("standalone");
+ project.AddProjectFileContent(
+@"
+ false
+ ");
+
+ var result = await MSBuildProcessManager.DotnetMSBuild(project);
+
+ Assert.BuildPassed(result);
+
+ var buildOutputDirectory = project.BuildOutputDirectory;
+
+ Assert.FileExists(result, buildOutputDirectory, "dist", "_framework", "blazor.boot.json");
+ Assert.FileExists(result, buildOutputDirectory, "dist", "_framework", "blazor.webassembly.js");
+ Assert.FileExists(result, buildOutputDirectory, "dist", "_framework", "wasm", "dotnet.wasm");
+ Assert.FileExists(result, buildOutputDirectory, "dist", "_framework", "wasm", "dotnet.js");
+ Assert.FileExists(result, buildOutputDirectory, "dist", "_framework", "_bin", "standalone.dll");
+ Assert.FileExists(result, buildOutputDirectory, "dist", "_framework", "_bin", "Microsoft.Extensions.Logging.Abstractions.dll"); // Verify dependencies are part of the output.
+ }
+
+ [Fact]
+ public async Task Build_SatelliteAssembliesAreCopiedToBuildOutput()
+ {
+ // Arrange
+ using var project = ProjectDirectory.Create("standalone", additionalProjects: new[] { "razorclasslibrary", "classlibrarywithsatelliteassemblies" });
+ project.AddProjectFileContent(
+@"
+
+ $(DefineConstants);REFERENCE_classlibrarywithsatelliteassemblies
+
+
+
+ ");
+
+ var result = await MSBuildProcessManager.DotnetMSBuild(project, args: "/restore");
+
+ Assert.BuildPassed(result);
+
+ var buildOutputDirectory = project.BuildOutputDirectory;
+
+ Assert.FileExists(result, buildOutputDirectory, "dist", "_framework", "_bin", "standalone.dll");
+ Assert.FileExists(result, buildOutputDirectory, "dist", "_framework", "_bin", "classlibrarywithsatelliteassemblies.dll");
+ Assert.FileExists(result, buildOutputDirectory, "dist", "_framework", "_bin", "Microsoft.CodeAnalysis.CSharp.dll");
+ Assert.FileExists(result, buildOutputDirectory, "dist", "_framework", "_bin", "fr", "Microsoft.CodeAnalysis.CSharp.resources.dll"); // Verify satellite assemblies are present in the build output.
+
+ var bootJsonPath = Path.Combine(buildOutputDirectory, "dist", "_framework", "blazor.boot.json");
+ Assert.FileContains(result, bootJsonPath, "\"Microsoft.CodeAnalysis.CSharp.dll\"");
+ Assert.FileContains(result, bootJsonPath, "\"fr\\/Microsoft.CodeAnalysis.CSharp.resources.dll\"");
+ }
+
+ [Fact]
+ public async Task Build_WithBlazorLinkOnBuildFalse_SatelliteAssembliesAreCopiedToBuildOutput()
+ {
+ // Arrange
+ using var project = ProjectDirectory.Create("standalone", additionalProjects: new[] { "razorclasslibrary", "classlibrarywithsatelliteassemblies" });
+ project.AddProjectFileContent(
+@"
+
+ false
+ $(DefineConstants);REFERENCE_classlibrarywithsatelliteassemblies
+
+
+
+ ");
+
+ var result = await MSBuildProcessManager.DotnetMSBuild(project, args: "/restore");
+
+ Assert.BuildPassed(result);
+
+ var buildOutputDirectory = project.BuildOutputDirectory;
+
+ Assert.FileExists(result, buildOutputDirectory, "dist", "_framework", "_bin", "standalone.dll");
+ Assert.FileExists(result, buildOutputDirectory, "dist", "_framework", "_bin", "classlibrarywithsatelliteassemblies.dll");
+ Assert.FileExists(result, buildOutputDirectory, "dist", "_framework", "_bin", "Microsoft.CodeAnalysis.CSharp.dll");
+ Assert.FileExists(result, buildOutputDirectory, "dist", "_framework", "_bin", "fr", "Microsoft.CodeAnalysis.CSharp.resources.dll"); // Verify satellite assemblies are present in the build output.
+
+ var bootJsonPath = Path.Combine(buildOutputDirectory, "dist", "_framework", "blazor.boot.json");
+ Assert.FileContains(result, bootJsonPath, "\"Microsoft.CodeAnalysis.CSharp.dll\"");
+ Assert.FileContains(result, bootJsonPath, "\"fr\\/Microsoft.CodeAnalysis.CSharp.resources.dll\"");
+ }
+ }
+}
diff --git a/src/Components/Blazor/Build/test/BuildIntegrationTests/FileThumbPrint.cs b/src/Components/Blazor/Build/test/BuildIntegrationTests/FileThumbPrint.cs
new file mode 100644
index 000000000000..58b5499e8bc6
--- /dev/null
+++ b/src/Components/Blazor/Build/test/BuildIntegrationTests/FileThumbPrint.cs
@@ -0,0 +1,74 @@
+// Copyright (c) .NET Foundation. All rights reserved.
+// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
+
+using System;
+using System.Collections.Generic;
+using System.IO;
+using System.Linq;
+using System.Security.Cryptography;
+
+namespace Microsoft.AspNetCore.Blazor.Build
+{
+ internal class FileThumbPrint : IEquatable
+ {
+ private FileThumbPrint(string path, DateTime lastWriteTimeUtc, string hash)
+ {
+ FilePath = path;
+ LastWriteTimeUtc = lastWriteTimeUtc;
+ Hash = hash;
+ }
+
+ public string FilePath { get; }
+
+ public DateTime LastWriteTimeUtc { get; }
+
+ public string Hash { get; }
+
+ public override string ToString()
+ {
+ return $"{Path.GetFileName(FilePath)}, {LastWriteTimeUtc.ToString("u")}, {Hash}";
+ }
+
+ ///
+ /// Returns a list of thumbprints for all files (recursive) in the specified directory, sorted by file paths.
+ ///
+ public static List CreateFolderThumbprint(ProjectDirectory project, string directoryPath, params string[] filesToIgnore)
+ {
+ directoryPath = Path.Combine(project.DirectoryPath, directoryPath);
+ var files = Directory.GetFiles(directoryPath).Where(p => !filesToIgnore.Contains(p));
+ var thumbprintLookup = new List();
+ foreach (var file in files)
+ {
+ var thumbprint = Create(file);
+ thumbprintLookup.Add(thumbprint);
+ }
+
+ thumbprintLookup.Sort(Comparer.Create((a, b) => StringComparer.Ordinal.Compare(a.FilePath, b.FilePath)));
+ return thumbprintLookup;
+ }
+
+ public static FileThumbPrint Create(string path)
+ {
+ byte[] hashBytes;
+ using (var sha1 = SHA1.Create())
+ using (var fileStream = File.OpenRead(path))
+ {
+ hashBytes = sha1.ComputeHash(fileStream);
+ }
+
+ var hash = Convert.ToBase64String(hashBytes);
+ var lastWriteTimeUtc = File.GetLastWriteTimeUtc(path);
+ return new FileThumbPrint(path, lastWriteTimeUtc, hash);
+ }
+
+ public bool Equals(FileThumbPrint other)
+ {
+ return
+ string.Equals(FilePath, other.FilePath, StringComparison.Ordinal) &&
+ LastWriteTimeUtc == other.LastWriteTimeUtc &&
+ string.Equals(Hash, other.Hash, StringComparison.Ordinal);
+ }
+
+ public override int GetHashCode() => LastWriteTimeUtc.GetHashCode();
+ }
+}
diff --git a/src/Components/Blazor/Build/test/BuildIntegrationTests/MSBuildProcessManager.cs b/src/Components/Blazor/Build/test/BuildIntegrationTests/MSBuildProcessManager.cs
new file mode 100644
index 000000000000..b7e16ca07291
--- /dev/null
+++ b/src/Components/Blazor/Build/test/BuildIntegrationTests/MSBuildProcessManager.cs
@@ -0,0 +1,282 @@
+// Copyright (c) .NET Foundation. All rights reserved.
+// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
+
+using System;
+using System.Collections.Generic;
+using System.Diagnostics;
+using System.IO;
+using System.Linq;
+using System.Reflection;
+using System.Text;
+using System.Threading;
+using System.Threading.Tasks;
+using Microsoft.Extensions.CommandLineUtils;
+
+namespace Microsoft.AspNetCore.Blazor.Build
+{
+ internal static class MSBuildProcessManager
+ {
+ public static Task DotnetMSBuild(
+ ProjectDirectory project,
+ string target = "Build",
+ string args = null)
+ {
+ var buildArgumentList = new List
+ {
+ // Disable node-reuse. We don't want msbuild processes to stick around
+ // once the test is completed.
+ "/nr:false",
+
+ // Always generate a bin log for debugging purposes
+ "/bl",
+ };
+
+ buildArgumentList.Add($"/t:{target}");
+ buildArgumentList.Add($"/p:Configuration={project.Configuration}");
+ buildArgumentList.Add(args);
+
+ var buildArguments = string.Join(" ", buildArgumentList);
+
+ return MSBuildProcessManager.RunProcessAsync(project, buildArguments);
+ }
+
+ public static async Task RunProcessAsync(
+ ProjectDirectory project,
+ string arguments,
+ TimeSpan? timeout = null)
+ {
+ var processStartInfo = new ProcessStartInfo()
+ {
+ WorkingDirectory = project.DirectoryPath,
+ UseShellExecute = false,
+ RedirectStandardError = true,
+ RedirectStandardOutput = true,
+ };
+
+ processStartInfo.FileName = DotNetMuxer.MuxerPathOrDefault();
+ processStartInfo.Arguments = $"msbuild {arguments}";
+
+ // Suppresses the 'Welcome to .NET Core!' output that times out tests and causes locked file issues.
+ // When using dotnet we're not guarunteed to run in an environment where the dotnet.exe has had its first run experience already invoked.
+ processStartInfo.EnvironmentVariables["DOTNET_SKIP_FIRST_TIME_EXPERIENCE"] = "true";
+
+ var processResult = await RunProcessCoreAsync(processStartInfo, timeout);
+
+ return new MSBuildResult(project, processResult.FileName, processResult.Arguments, processResult.ExitCode, processResult.Output);
+ }
+
+ internal static Task RunProcessCoreAsync(
+ ProcessStartInfo processStartInfo,
+ TimeSpan? timeout = null)
+ {
+ timeout = timeout ?? TimeSpan.FromSeconds(5 * 60);
+
+ var process = new Process()
+ {
+ StartInfo = processStartInfo,
+ EnableRaisingEvents = true,
+ };
+
+ var output = new StringBuilder();
+ var outputLock = new object();
+
+ var diagnostics = new StringBuilder();
+ diagnostics.AppendLine("Process execution diagnostics:");
+
+ process.ErrorDataReceived += Process_ErrorDataReceived;
+ process.OutputDataReceived += Process_OutputDataReceived;
+
+ process.Start();
+ process.BeginOutputReadLine();
+ process.BeginErrorReadLine();
+
+ var timeoutTask = GetTimeoutForProcess(process, timeout, diagnostics);
+
+ var waitTask = Task.Run(() =>
+ {
+ // We need to use two WaitForExit calls to ensure that all of the output/events are processed. Previously
+ // this code used Process.Exited, which could result in us missing some output due to the ordering of
+ // events.
+ //
+ // See the remarks here: https://msdn.microsoft.com/en-us/library/ty0d8k56(v=vs.110).aspx
+ if (!process.WaitForExit(Int32.MaxValue))
+ {
+ // unreachable - the timeoutTask will kill the process before this happens.
+ throw new TimeoutException();
+ }
+
+ process.WaitForExit();
+
+
+ string outputString;
+ lock (outputLock)
+ {
+ // This marks the end of the diagnostic info which we collect when something goes wrong.
+ diagnostics.AppendLine("Process output:");
+
+ // Expected output
+ // Process execution diagnostics:
+ // ...
+ // Process output:
+ outputString = diagnostics.ToString();
+ outputString += output.ToString();
+ }
+
+ var result = new ProcessResult(process.StartInfo.FileName, process.StartInfo.Arguments, process.ExitCode, outputString);
+ return result;
+ });
+
+ return Task.WhenAny(waitTask, timeoutTask).Unwrap();
+
+ void Process_ErrorDataReceived(object sender, DataReceivedEventArgs e)
+ {
+ lock (outputLock)
+ {
+ output.AppendLine(e.Data);
+ }
+ }
+
+ void Process_OutputDataReceived(object sender, DataReceivedEventArgs e)
+ {
+ lock (outputLock)
+ {
+ output.AppendLine(e.Data);
+ }
+ }
+
+ async Task GetTimeoutForProcess(Process process, TimeSpan? timeout, StringBuilder diagnostics)
+ {
+ await Task.Delay(timeout.Value);
+
+ // Don't timeout during debug sessions
+ while (Debugger.IsAttached)
+ {
+ Thread.Sleep(TimeSpan.FromSeconds(1));
+ }
+ if (!process.HasExited)
+ {
+ await CollectDumps(process, timeout, diagnostics);
+
+ // This is a timeout.
+ process.Kill();
+ }
+
+ throw new TimeoutException($"command '${process.StartInfo.FileName} {process.StartInfo.Arguments}' timed out after {timeout}. Output: {output.ToString()}");
+ }
+
+ static async Task CollectDumps(Process process, TimeSpan? timeout, StringBuilder diagnostics)
+ {
+ var procDumpProcess = await CaptureDump(process, timeout, diagnostics);
+ var allDotNetProcesses = Process.GetProcessesByName("dotnet");
+
+ var allDotNetChildProcessCandidates = allDotNetProcesses
+ .Where(p => p.StartTime >= process.StartTime && p.Id != process.Id);
+
+ if (!allDotNetChildProcessCandidates.Any())
+ {
+ diagnostics.AppendLine("Couldn't find any candidate child process.");
+ foreach (var dotnetProcess in allDotNetProcesses)
+ {
+ diagnostics.AppendLine($"Found dotnet process with PID {dotnetProcess.Id} and start time {dotnetProcess.StartTime}.");
+ }
+ }
+
+ foreach (var childProcess in allDotNetChildProcessCandidates)
+ {
+ diagnostics.AppendLine($"Found child process candidate '{childProcess.Id}'.");
+ }
+
+ var childrenProcessDumpProcesses = await Task.WhenAll(allDotNetChildProcessCandidates.Select(d => CaptureDump(d, timeout, diagnostics)));
+ foreach (var childProcess in childrenProcessDumpProcesses)
+ {
+ if (childProcess != null && childProcess.HasExited)
+ {
+ diagnostics.AppendLine($"ProcDump failed to run for child dotnet process candidate '{process.Id}'.");
+ childProcess.Kill();
+ }
+ }
+
+ if (procDumpProcess != null && procDumpProcess.HasExited)
+ {
+ diagnostics.AppendLine($"ProcDump failed to run for '{process.Id}'.");
+ procDumpProcess.Kill();
+ }
+ }
+
+ static async Task CaptureDump(Process process, TimeSpan? timeout, StringBuilder diagnostics)
+ {
+ var metadataAttributes = Assembly.GetExecutingAssembly()
+ .GetCustomAttributes();
+
+ var procDumpPath = metadataAttributes
+ .SingleOrDefault(ama => ama.Key == "ProcDumpToolPath")?.Value;
+
+ if (string.IsNullOrEmpty(procDumpPath))
+ {
+ diagnostics.AppendLine("ProcDumpPath not defined.");
+ return null;
+ }
+ var procDumpExePath = Path.Combine(procDumpPath, "procdump.exe");
+ if (!File.Exists(procDumpExePath))
+ {
+ diagnostics.AppendLine($"Can't find procdump.exe in '{procDumpPath}'.");
+ return null;
+ }
+
+ var dumpDirectory = metadataAttributes
+ .SingleOrDefault(ama => ama.Key == "ArtifactsLogDir")?.Value;
+
+ if (string.IsNullOrEmpty(dumpDirectory))
+ {
+ diagnostics.AppendLine("ArtifactsLogDir not defined.");
+ return null;
+ }
+
+ if (!Directory.Exists(dumpDirectory))
+ {
+ diagnostics.AppendLine($"'{dumpDirectory}' does not exist.");
+ return null;
+ }
+
+ var procDumpPattern = Path.Combine(dumpDirectory, "HangingProcess_PROCESSNAME_PID_YYMMDD_HHMMSS.dmp");
+ var procDumpStartInfo = new ProcessStartInfo(
+ procDumpExePath,
+ $"-accepteula -ma {process.Id} {procDumpPattern}")
+ {
+ CreateNoWindow = true,
+ UseShellExecute = false,
+ RedirectStandardOutput = true,
+ RedirectStandardError = true
+ };
+
+ var procDumpProcess = Process.Start(procDumpStartInfo);
+ var tcs = new TaskCompletionSource();
+
+ procDumpProcess.Exited += (s, a) => tcs.TrySetResult(null);
+ procDumpProcess.EnableRaisingEvents = true;
+
+ await Task.WhenAny(tcs.Task, Task.Delay(timeout ?? TimeSpan.FromSeconds(30)));
+ return procDumpProcess;
+ }
+ }
+
+ internal class ProcessResult
+ {
+ public ProcessResult(string fileName, string arguments, int exitCode, string output)
+ {
+ FileName = fileName;
+ Arguments = arguments;
+ ExitCode = exitCode;
+ Output = output;
+ }
+
+ public string Arguments { get; }
+
+ public string FileName { get; }
+
+ public int ExitCode { get; }
+
+ public string Output { get; }
+ }
+ }
+}
diff --git a/src/Components/Blazor/Build/test/BuildIntegrationTests/MSBuildResult.cs b/src/Components/Blazor/Build/test/BuildIntegrationTests/MSBuildResult.cs
new file mode 100644
index 000000000000..9a83df922b01
--- /dev/null
+++ b/src/Components/Blazor/Build/test/BuildIntegrationTests/MSBuildResult.cs
@@ -0,0 +1,28 @@
+// Copyright (c) .NET Foundation. All rights reserved.
+// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
+
+namespace Microsoft.AspNetCore.Blazor.Build
+{
+ internal class MSBuildResult
+ {
+ public MSBuildResult(ProjectDirectory project, string fileName, string arguments, int exitCode, string output)
+ {
+ Project = project;
+ FileName = fileName;
+ Arguments = arguments;
+ ExitCode = exitCode;
+ Output = output;
+ }
+
+ public ProjectDirectory Project { get; }
+
+ public string Arguments { get; }
+
+ public string FileName { get; }
+
+ public int ExitCode { get; }
+
+ public string Output { get; }
+ }
+
+}
diff --git a/src/Components/Blazor/Build/test/BuildIntegrationTests/ProjectDirectory.cs b/src/Components/Blazor/Build/test/BuildIntegrationTests/ProjectDirectory.cs
new file mode 100644
index 000000000000..e50b750ae491
--- /dev/null
+++ b/src/Components/Blazor/Build/test/BuildIntegrationTests/ProjectDirectory.cs
@@ -0,0 +1,211 @@
+// Copyright (c) .NET Foundation. All rights reserved.
+// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
+
+using System;
+using System.Collections.Generic;
+using System.IO;
+using System.Linq;
+using System.Reflection;
+using System.Threading;
+
+namespace Microsoft.AspNetCore.Blazor.Build
+{
+ internal class ProjectDirectory : IDisposable
+ {
+ public bool PreserveWorkingDirectory { get; set; } = false;
+
+ private static readonly string RepoRoot = GetTestAttribute("Testing.RepoRoot");
+
+ public static ProjectDirectory Create(string projectName, string baseDirectory = "", string[] additionalProjects = null)
+ {
+ var destinationPath = Path.Combine(Path.GetTempPath(), "BlazorBuild", baseDirectory, Path.GetRandomFileName());
+ Directory.CreateDirectory(destinationPath);
+
+ try
+ {
+ if (Directory.EnumerateFiles(destinationPath).Any())
+ {
+ throw new InvalidOperationException($"{destinationPath} should be empty");
+ }
+
+ if (string.IsNullOrEmpty(RepoRoot))
+ {
+ throw new InvalidOperationException("RepoRoot was not specified.");
+ }
+
+ var testAppsRoot = Path.Combine(RepoRoot, "src", "Components", "Blazor", "Build", "testassets");
+ foreach (var project in new string[] { projectName, }.Concat(additionalProjects ?? Array.Empty()))
+ {
+ var projectRoot = Path.Combine(testAppsRoot, project);
+ if (!Directory.Exists(projectRoot))
+ {
+ throw new InvalidOperationException($"Could not find project at '{projectRoot}'");
+ }
+
+ var projectDestination = Path.Combine(destinationPath, project);
+ var projectDestinationDir = Directory.CreateDirectory(projectDestination);
+ CopyDirectory(new DirectoryInfo(projectRoot), projectDestinationDir);
+ SetupDirectoryBuildFiles(RepoRoot, testAppsRoot, projectDestination);
+ }
+
+ var directoryPath = Path.Combine(destinationPath, projectName);
+ var projectPath = Path.Combine(directoryPath, projectName + ".csproj");
+
+ CopyRepositoryAssets(destinationPath);
+
+ return new ProjectDirectory(
+ destinationPath,
+ directoryPath,
+ projectPath);
+ }
+ catch
+ {
+ CleanupDirectory(destinationPath);
+ throw;
+ }
+
+ static void CopyDirectory(DirectoryInfo source, DirectoryInfo destination, bool recursive = true)
+ {
+ foreach (var file in source.EnumerateFiles())
+ {
+ file.CopyTo(Path.Combine(destination.FullName, file.Name));
+ }
+
+ if (!recursive)
+ {
+ return;
+ }
+
+ foreach (var directory in source.EnumerateDirectories())
+ {
+ if (directory.Name == "bin")
+ {
+ // Just in case someone has opened the project in an IDE or built it. We don't want to copy
+ // these folders.
+ continue;
+ }
+
+ var created = destination.CreateSubdirectory(directory.Name);
+ if (directory.Name == "obj")
+ {
+ // Copy NuGet restore assets (viz all the files at the root of the obj directory, but stop there.)
+ CopyDirectory(directory, created, recursive: false);
+ }
+ else
+ {
+ CopyDirectory(directory, created);
+ }
+ }
+ }
+
+ static void SetupDirectoryBuildFiles(string repoRoot, string testAppsRoot, string projectDestination)
+ {
+ var beforeDirectoryPropsContent =
+$@"
+
+ {repoRoot}
+
+ ";
+ File.WriteAllText(Path.Combine(projectDestination, "Before.Directory.Build.props"), beforeDirectoryPropsContent);
+
+ new List { "Directory.Build.props", "Directory.Build.targets", }
+ .ForEach(file =>
+ {
+ var source = Path.Combine(testAppsRoot, file);
+ var destination = Path.Combine(projectDestination, file);
+ File.Copy(source, destination);
+ });
+ }
+
+ static void CopyRepositoryAssets(string projectRoot)
+ {
+ const string GlobalJsonFileName = "global.json";
+ var globalJsonPath = Path.Combine(RepoRoot, GlobalJsonFileName);
+
+ var destinationFile = Path.Combine(projectRoot, GlobalJsonFileName);
+ File.Copy(globalJsonPath, destinationFile);
+ }
+ }
+
+ protected ProjectDirectory(string solutionPath, string directoryPath, string projectFilePath)
+ {
+ SolutionPath = solutionPath;
+ DirectoryPath = directoryPath;
+ ProjectFilePath = projectFilePath;
+ }
+
+ public string DirectoryPath { get; }
+
+ public string ProjectFilePath { get; }
+
+ public string SolutionPath { get; }
+
+ public string TargetFramework { get; set; } = "netstandard2.1";
+
+#if DEBUG
+ public string Configuration => "Debug";
+#elif RELEASE
+ public string Configuration => "Release";
+#else
+#error Configuration not supported
+#endif
+
+ public string IntermediateOutputDirectory => Path.Combine("obj", Configuration, TargetFramework);
+
+ public string BuildOutputDirectory => Path.Combine("bin", Configuration, TargetFramework);
+
+ public string PublishOutputDirectory => Path.Combine(BuildOutputDirectory, "publish");
+
+ internal void AddProjectFileContent(string content)
+ {
+ if (content == null)
+ {
+ throw new ArgumentNullException(nameof(content));
+ }
+
+ var existing = File.ReadAllText(ProjectFilePath);
+ var updated = existing.Replace("", content);
+ File.WriteAllText(ProjectFilePath, updated);
+ }
+
+ public void Dispose()
+ {
+ if (PreserveWorkingDirectory)
+ {
+ Console.WriteLine($"Skipping deletion of working directory {SolutionPath}");
+ }
+ else
+ {
+ CleanupDirectory(SolutionPath);
+ }
+ }
+
+ internal static void CleanupDirectory(string filePath)
+ {
+ var tries = 5;
+ var sleep = TimeSpan.FromSeconds(3);
+
+ for (var i = 0; i < tries; i++)
+ {
+ try
+ {
+ Directory.Delete(filePath, recursive: true);
+ return;
+ }
+ catch when (i < tries - 1)
+ {
+ Console.WriteLine($"Failed to delete directory {filePath}, trying again.");
+ Thread.Sleep(sleep);
+ }
+ }
+ }
+
+ private static string GetTestAttribute(string key)
+ {
+ return typeof(ProjectDirectory).Assembly
+ .GetCustomAttributes()
+ .FirstOrDefault(f => f.Key == key)
+ ?.Value;
+ }
+ }
+}
diff --git a/src/Components/Blazor/Build/test/BuildIntegrationTests/ProjectDirectoryTest.cs b/src/Components/Blazor/Build/test/BuildIntegrationTests/ProjectDirectoryTest.cs
new file mode 100644
index 000000000000..23badb4296f8
--- /dev/null
+++ b/src/Components/Blazor/Build/test/BuildIntegrationTests/ProjectDirectoryTest.cs
@@ -0,0 +1,21 @@
+// Copyright (c) .NET Foundation. All rights reserved.
+// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
+
+using Xunit;
+
+namespace Microsoft.AspNetCore.Blazor.Build
+{
+ public class ProjectDirectoryTest
+ {
+ [Fact]
+ public void ProjectDirectory_IsNotSetToBePreserved()
+ {
+ // Arrange
+ using var project = ProjectDirectory.Create("standalone");
+
+ // Act & Assert
+ // This flag is only meant for local debugging and should not be set when checking in.
+ Assert.False(project.PreserveWorkingDirectory);
+ }
+ }
+}
diff --git a/src/Components/Blazor/Build/test/BuildIntegrationTests/PublishIntegrationTest.cs b/src/Components/Blazor/Build/test/BuildIntegrationTests/PublishIntegrationTest.cs
new file mode 100644
index 000000000000..81f9577e25a7
--- /dev/null
+++ b/src/Components/Blazor/Build/test/BuildIntegrationTests/PublishIntegrationTest.cs
@@ -0,0 +1,224 @@
+// Copyright (c) .NET Foundation. All rights reserved.
+// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
+
+using System.IO;
+using System.Threading.Tasks;
+using Xunit;
+
+namespace Microsoft.AspNetCore.Blazor.Build
+{
+ public class PublishIntegrationTest
+ {
+ [Fact]
+ public async Task Publish_WithDefaultSettings_Works()
+ {
+ // Arrange
+ using var project = ProjectDirectory.Create("standalone", additionalProjects: new [] { "razorclasslibrary" });
+ var result = await MSBuildProcessManager.DotnetMSBuild(project, "Publish");
+
+ Assert.BuildPassed(result);
+
+ var publishDirectory = project.PublishOutputDirectory;
+ var blazorPublishDirectory = Path.Combine(publishDirectory, Path.GetFileNameWithoutExtension(project.ProjectFilePath));
+
+ Assert.FileExists(result, blazorPublishDirectory, "dist", "_framework", "blazor.boot.json");
+ Assert.FileExists(result, blazorPublishDirectory, "dist", "_framework", "blazor.webassembly.js");
+ Assert.FileExists(result, blazorPublishDirectory, "dist", "_framework", "wasm", "dotnet.wasm");
+ Assert.FileExists(result, blazorPublishDirectory, "dist", "_framework", "wasm", "dotnet.js");
+ Assert.FileExists(result, blazorPublishDirectory, "dist", "_framework", "_bin", "standalone.dll");
+ Assert.FileExists(result, blazorPublishDirectory, "dist", "_framework", "_bin", "Microsoft.Extensions.Logging.Abstractions.dll"); // Verify dependencies are part of the output.
+
+ // Verify referenced static web assets
+ Assert.FileExists(result, blazorPublishDirectory, "dist", "_content", "RazorClassLibrary", "wwwroot", "exampleJsInterop.js");
+ Assert.FileExists(result, blazorPublishDirectory, "dist", "_content", "RazorClassLibrary", "styles.css");
+
+ // Verify static assets are in the publish directory
+ Assert.FileExists(result, blazorPublishDirectory, "dist", "index.html");
+
+ // Verify web.config
+ Assert.FileExists(result, publishDirectory, "web.config");
+ }
+
+ [Fact]
+ public async Task Publish_WithNoBuild_Works()
+ {
+ // Arrange
+ using var project = ProjectDirectory.Create("standalone", additionalProjects: new[] { "razorclasslibrary" });
+ var result = await MSBuildProcessManager.DotnetMSBuild(project, "Build");
+
+ Assert.BuildPassed(result);
+
+ result = await MSBuildProcessManager.DotnetMSBuild(project, "Publish", "/p:NoBuild=true");
+
+ Assert.BuildPassed(result);
+
+ var publishDirectory = project.PublishOutputDirectory;
+ var blazorPublishDirectory = Path.Combine(publishDirectory, Path.GetFileNameWithoutExtension(project.ProjectFilePath));
+
+ Assert.FileExists(result, blazorPublishDirectory, "dist", "_framework", "blazor.boot.json");
+ Assert.FileExists(result, blazorPublishDirectory, "dist", "_framework", "blazor.webassembly.js");
+ Assert.FileExists(result, blazorPublishDirectory, "dist", "_framework", "wasm", "dotnet.wasm");
+ Assert.FileExists(result, blazorPublishDirectory, "dist", "_framework", "wasm", "dotnet.js");
+ Assert.FileExists(result, blazorPublishDirectory, "dist", "_framework", "_bin", "standalone.dll");
+ Assert.FileExists(result, blazorPublishDirectory, "dist", "_framework", "_bin", "Microsoft.Extensions.Logging.Abstractions.dll"); // Verify dependencies are part of the output.
+
+ // Verify static assets are in the publish directory
+ Assert.FileExists(result, blazorPublishDirectory, "dist", "index.html");
+
+ // Verify static web assets from referenced projects are copied.
+ // Uncomment once https://github.com/dotnet/aspnetcore/issues/17426 is resolved.
+ // Assert.FileExists(result, blazorPublishDirectory, "dist", "_content", "RazorClassLibrary", "wwwroot", "exampleJsInterop.js");
+ // Assert.FileExists(result, blazorPublishDirectory, "dist", "_content", "RazorClassLibrary", "styles.css");
+
+ // Verify static assets are in the publish directory
+ Assert.FileExists(result, blazorPublishDirectory, "dist", "index.html");
+
+ // Verify web.config
+ Assert.FileExists(result, publishDirectory, "web.config");
+ }
+
+ [Fact]
+ public async Task Publish_WithLinkOnBuildDisabled_Works()
+ {
+ // Arrange
+ using var project = ProjectDirectory.Create("standalone", additionalProjects: new [] { "razorclasslibrary" });
+ project.AddProjectFileContent(
+@"
+ false
+ ");
+
+ var result = await MSBuildProcessManager.DotnetMSBuild(project, "Publish");
+
+ Assert.BuildPassed(result);
+
+ var publishDirectory = project.PublishOutputDirectory;
+ var blazorPublishDirectory = Path.Combine(publishDirectory, Path.GetFileNameWithoutExtension(project.ProjectFilePath));
+
+ Assert.FileExists(result, blazorPublishDirectory, "dist", "_framework", "blazor.boot.json");
+ Assert.FileExists(result, blazorPublishDirectory, "dist", "_framework", "blazor.webassembly.js");
+ Assert.FileExists(result, blazorPublishDirectory, "dist", "_framework", "wasm", "dotnet.wasm");
+ Assert.FileExists(result, blazorPublishDirectory, "dist", "_framework", "wasm", "dotnet.js");
+ Assert.FileExists(result, blazorPublishDirectory, "dist", "_framework", "_bin", "standalone.dll");
+ Assert.FileExists(result, blazorPublishDirectory, "dist", "_framework", "_bin", "Microsoft.Extensions.Logging.Abstractions.dll"); // Verify dependencies are part of the output.
+
+ // Verify static assets are in the publish directory
+ Assert.FileExists(result, blazorPublishDirectory, "dist", "index.html");
+
+ // Verify referenced static web assets
+ Assert.FileExists(result, blazorPublishDirectory, "dist", "_content", "RazorClassLibrary", "wwwroot", "exampleJsInterop.js");
+ Assert.FileExists(result, blazorPublishDirectory, "dist", "_content", "RazorClassLibrary", "styles.css");
+
+ // Verify web.config
+ Assert.FileExists(result, publishDirectory, "web.config");
+ }
+
+ [Fact]
+ public async Task Publish_SatelliteAssemblies_AreCopiedToBuildOutput()
+ {
+ // Arrange
+ using var project = ProjectDirectory.Create("standalone", additionalProjects: new[] { "razorclasslibrary", "classlibrarywithsatelliteassemblies" });
+ project.AddProjectFileContent(
+@"
+
+ $(DefineConstants);REFERENCE_classlibrarywithsatelliteassemblies
+
+
+
+ ");
+
+ var result = await MSBuildProcessManager.DotnetMSBuild(project, "Publish", args: "/restore");
+
+ Assert.BuildPassed(result);
+
+ var publishDirectory = project.PublishOutputDirectory;
+ var blazorPublishDirectory = Path.Combine(publishDirectory, Path.GetFileNameWithoutExtension(project.ProjectFilePath));
+
+ Assert.FileExists(result, blazorPublishDirectory, "dist", "_framework", "_bin", "Microsoft.CodeAnalysis.CSharp.dll");
+ Assert.FileExists(result, blazorPublishDirectory, "dist", "_framework", "_bin", "fr", "Microsoft.CodeAnalysis.CSharp.resources.dll"); // Verify satellite assemblies are present in the build output.
+
+ var bootJsonPath = Path.Combine(blazorPublishDirectory, "dist", "_framework", "blazor.boot.json");
+ Assert.FileContains(result, bootJsonPath, "\"Microsoft.CodeAnalysis.CSharp.dll\"");
+ Assert.FileContains(result, bootJsonPath, "\"fr\\/Microsoft.CodeAnalysis.CSharp.resources.dll\"");
+ }
+
+ [Fact]
+ public async Task Publish_HostedApp_Works()
+ {
+ // Arrange
+ using var project = ProjectDirectory.Create("blazorhosted", additionalProjects: new[] { "standalone", "razorclasslibrary", });
+ project.TargetFramework = "netcoreapp5.0";
+ var result = await MSBuildProcessManager.DotnetMSBuild(project, "Publish");
+
+ Assert.BuildPassed(result);
+
+ var publishDirectory = project.PublishOutputDirectory;
+ // Make sure the main project exists
+ Assert.FileExists(result, publishDirectory, "blazorhosted.dll");
+
+ var blazorPublishDirectory = Path.Combine(publishDirectory, "standalone");
+ Assert.FileExists(result, blazorPublishDirectory, "dist", "_framework", "blazor.boot.json");
+ Assert.FileExists(result, blazorPublishDirectory, "dist", "_framework", "blazor.webassembly.js");
+ Assert.FileExists(result, blazorPublishDirectory, "dist", "_framework", "wasm", "dotnet.wasm");
+ Assert.FileExists(result, blazorPublishDirectory, "dist", "_framework", "wasm", "dotnet.js");
+ Assert.FileExists(result, blazorPublishDirectory, "dist", "_framework", "_bin", "standalone.dll");
+ Assert.FileExists(result, blazorPublishDirectory, "dist", "_framework", "_bin", "Microsoft.Extensions.Logging.Abstractions.dll"); // Verify dependencies are part of the output.
+
+ // Verify static assets are in the publish directory
+ Assert.FileExists(result, blazorPublishDirectory, "dist", "index.html");
+
+ // Verify static web assets from referenced projects are copied.
+ Assert.FileExists(result, publishDirectory, "wwwroot", "_content", "RazorClassLibrary", "wwwroot", "exampleJsInterop.js");
+ Assert.FileExists(result, publishDirectory, "wwwroot", "_content", "RazorClassLibrary", "styles.css");
+
+ // Verify static assets are in the publish directory
+ Assert.FileExists(result, blazorPublishDirectory, "dist", "index.html");
+
+ // Verify web.config
+ Assert.FileExists(result, publishDirectory, "web.config");
+
+ var blazorConfig = Path.Combine(result.Project.DirectoryPath, publishDirectory, "standalone.blazor.config");
+ var blazorConfigLines = File.ReadAllLines(blazorConfig);
+ Assert.Equal(".", blazorConfigLines[0]);
+ Assert.Equal("standalone/", blazorConfigLines[1]);
+ }
+
+ [Fact]
+ public async Task Publish_HostedApp_WithNoBuild_Works()
+ {
+ // Arrange
+ using var project = ProjectDirectory.Create("blazorhosted", additionalProjects: new[] { "standalone", "razorclasslibrary", });
+ project.TargetFramework = "netcoreapp5.0";
+ var result = await MSBuildProcessManager.DotnetMSBuild(project, "Build");
+
+ Assert.BuildPassed(result);
+
+ result = await MSBuildProcessManager.DotnetMSBuild(project, "Publish", "/p:NoBuild=true");
+
+ var publishDirectory = project.PublishOutputDirectory;
+ // Make sure the main project exists
+ Assert.FileExists(result, publishDirectory, "blazorhosted.dll");
+
+ var blazorPublishDirectory = Path.Combine(publishDirectory, "standalone");
+ Assert.FileExists(result, blazorPublishDirectory, "dist", "_framework", "blazor.boot.json");
+ Assert.FileExists(result, blazorPublishDirectory, "dist", "_framework", "blazor.webassembly.js");
+ Assert.FileExists(result, blazorPublishDirectory, "dist", "_framework", "wasm", "dotnet.wasm");
+ Assert.FileExists(result, blazorPublishDirectory, "dist", "_framework", "wasm", "dotnet.js");
+ Assert.FileExists(result, blazorPublishDirectory, "dist", "_framework", "_bin", "standalone.dll");
+ Assert.FileExists(result, blazorPublishDirectory, "dist", "_framework", "_bin", "Microsoft.Extensions.Logging.Abstractions.dll"); // Verify dependencies are part of the output.
+
+ // Verify static assets are in the publish directory
+ Assert.FileExists(result, blazorPublishDirectory, "dist", "index.html");
+
+ // Verify static web assets from referenced projects are copied.
+ // Uncomment once https://github.com/dotnet/aspnetcore/issues/17426 is resolved.
+ // Assert.FileExists(result, publishDirectory, "wwwroot", "_content", "RazorClassLibrary", "wwwroot", "exampleJsInterop.js");
+ // Assert.FileExists(result, publishDirectory, "wwwroot", "_content", "RazorClassLibrary", "styles.css");
+
+ // Verify static assets are in the publish directory
+ Assert.FileExists(result, blazorPublishDirectory, "dist", "index.html");
+
+ // Verify web.config
+ Assert.FileExists(result, publishDirectory, "web.config");
+ }
+ }
+}
diff --git a/src/Components/Blazor/Build/test/ComponentRenderingRazorIntegrationTest.cs b/src/Components/Blazor/Build/test/ComponentRenderingRazorIntegrationTest.cs
index d15cf4f58499..f4a45c7e2f80 100644
--- a/src/Components/Blazor/Build/test/ComponentRenderingRazorIntegrationTest.cs
+++ b/src/Components/Blazor/Build/test/ComponentRenderingRazorIntegrationTest.cs
@@ -96,7 +96,7 @@ public class MyComponent : ComponentBase
}
[Fact]
- public void Render_ChildComponent_TriesToSetNonParamter()
+ public void Render_ChildComponent_TriesToSetNonParameter()
{
// Arrange
AdditionalSyntaxTrees.Add(Parse(@"
@@ -408,7 +408,7 @@ public class MyComponent : ComponentBase
frame => AssertFrame.Text(frame, "Some text", 4));
}
- [Fact] // https://github.com/aspnet/Blazor/issues/773
+ [Fact] // https://github.com/dotnet/blazor/issues/773
public void Regression_773()
{
// Arrange
@@ -470,7 +470,7 @@ public void OnComponentHover(MouseEventArgs e)
frame => AssertFrame.Attribute(frame, "style", "background: #FFFFFF;", 2));
}
- [Fact(Skip = "https://github.com/aspnet/AspNetCore/issues/6185")]
+ [Fact(Skip = "https://github.com/dotnet/aspnetcore/issues/6185")]
public void Render_Component_HtmlEncoded()
{
// Arrange
@@ -501,7 +501,7 @@ public void Render_Component_HtmlBlockEncoded()
}
// Integration test for HTML block rewriting
- [Fact(Skip = "https://github.com/aspnet/AspNetCore/issues/6183")]
+ [Fact(Skip = "https://github.com/dotnet/aspnetcore/issues/6183")]
public void Render_HtmlBlock_Integration()
{
// Arrange
diff --git a/src/Components/Blazor/Build/test/Microsoft.AspNetCore.Blazor.Build.Tests.csproj b/src/Components/Blazor/Build/test/Microsoft.AspNetCore.Blazor.Build.Tests.csproj
index eee74d8755e6..56eccd10909b 100644
--- a/src/Components/Blazor/Build/test/Microsoft.AspNetCore.Blazor.Build.Tests.csproj
+++ b/src/Components/Blazor/Build/test/Microsoft.AspNetCore.Blazor.Build.Tests.csproj
@@ -5,6 +5,7 @@
$(DefaultItemExcludes);TestFiles\**\*
+ false
false
@@ -27,6 +28,8 @@
+
+
@@ -35,10 +38,32 @@
-
+
+
+
+ <_Parameter1>Testing.RepoRoot
+ <_Parameter2>$(RepoRoot)
+
+
+
+
+
+ <_TestAsset Include="..\testassets\standalone\standalone.csproj" />
+ <_TestAsset Include="..\testassets\blazorhosted\blazorhosted.csproj" />
+
+
+
+
+
diff --git a/src/Components/Blazor/Build/test/RuntimeDependenciesResolverTest.cs b/src/Components/Blazor/Build/test/RuntimeDependenciesResolverTest.cs
index 5838d419d7aa..64aad9bf4565 100644
--- a/src/Components/Blazor/Build/test/RuntimeDependenciesResolverTest.cs
+++ b/src/Components/Blazor/Build/test/RuntimeDependenciesResolverTest.cs
@@ -9,12 +9,12 @@
using Microsoft.AspNetCore.Testing;
using Xunit;
-namespace Microsoft.AspNetCore.Blazor.Build.Test
+namespace Microsoft.AspNetCore.Blazor.Build
{
public class RuntimeDependenciesResolverTest
{
- [ConditionalFact(Skip = " https://github.com/aspnet/AspNetCore/issues/12059")]
- [SkipOnHelix("https://github.com/aspnet/AspNetCore/issues/10426")]
+ [ConditionalFact(Skip = " https://github.com/dotnet/aspnetcore/issues/12059")]
+ [SkipOnHelix("https://github.com/dotnet/aspnetcore/issues/10426")]
public void FindsReferenceAssemblyGraph_ForStandaloneApp()
{
// Arrange
@@ -109,7 +109,7 @@ uncalled implementation code from mscorlib.dll anyway.
// Act
- var paths = RuntimeDependenciesResolver
+ var paths = ResolveBlazorRuntimeDependencies
.ResolveRuntimeDependenciesCore(
mainAssemblyLocation,
references,
diff --git a/src/Components/Blazor/Build/testassets/Directory.Build.props b/src/Components/Blazor/Build/testassets/Directory.Build.props
new file mode 100644
index 000000000000..f60dc0021d63
--- /dev/null
+++ b/src/Components/Blazor/Build/testassets/Directory.Build.props
@@ -0,0 +1,31 @@
+
+
+
+
+ $([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), global.json))\
+ $(RepoRoot)src\Components\
+ $(ComponentsRoot)Blazor\Build\src\
+ $(BlazorBuildRoot)ReferenceBlazorBuildFromSource.props
+
+
+ netcoreapp3.1
+
+ false
+ false
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/Servers/Kestrel/perf/PlatformBenchmarks/Directory.Build.props b/src/Components/Blazor/Build/testassets/Directory.Build.targets
similarity index 100%
rename from src/Servers/Kestrel/perf/PlatformBenchmarks/Directory.Build.props
rename to src/Components/Blazor/Build/testassets/Directory.Build.targets
diff --git a/src/Components/Blazor/Build/testassets/blazorhosted/Program.cs b/src/Components/Blazor/Build/testassets/blazorhosted/Program.cs
new file mode 100644
index 000000000000..e2efcc0c7428
--- /dev/null
+++ b/src/Components/Blazor/Build/testassets/blazorhosted/Program.cs
@@ -0,0 +1,15 @@
+using System;
+using Microsoft.AspNetCore;
+using Microsoft.AspNetCore.Hosting;
+using Microsoft.Extensions.Configuration;
+
+namespace blazorhosted.Server
+{
+ public class Program
+ {
+ public static void Main(string[] args)
+ {
+ Console.WriteLine(typeof(IWebHost));
+ }
+ }
+}
diff --git a/src/Components/Blazor/Build/testassets/blazorhosted/blazorhosted.csproj b/src/Components/Blazor/Build/testassets/blazorhosted/blazorhosted.csproj
new file mode 100644
index 000000000000..1b4127e1f49b
--- /dev/null
+++ b/src/Components/Blazor/Build/testassets/blazorhosted/blazorhosted.csproj
@@ -0,0 +1,12 @@
+
+
+
+ netcoreapp5.0
+ true
+
+
+
+
+
+
+
diff --git a/src/Components/Blazor/Build/testassets/classlibrarywithsatelliteassemblies/Class1.cs b/src/Components/Blazor/Build/testassets/classlibrarywithsatelliteassemblies/Class1.cs
new file mode 100644
index 000000000000..944699cdb327
--- /dev/null
+++ b/src/Components/Blazor/Build/testassets/classlibrarywithsatelliteassemblies/Class1.cs
@@ -0,0 +1,12 @@
+using System;
+
+namespace classlibrarywithsatelliteassemblies
+{
+ public class Class1
+ {
+ public static void Test()
+ {
+ GC.KeepAlive(typeof(Microsoft.CodeAnalysis.CSharp.CSharpCompilation));
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/Components/Blazor/Build/testassets/classlibrarywithsatelliteassemblies/classlibrarywithsatelliteassemblies.csproj b/src/Components/Blazor/Build/testassets/classlibrarywithsatelliteassemblies/classlibrarywithsatelliteassemblies.csproj
new file mode 100644
index 000000000000..7081842748da
--- /dev/null
+++ b/src/Components/Blazor/Build/testassets/classlibrarywithsatelliteassemblies/classlibrarywithsatelliteassemblies.csproj
@@ -0,0 +1,13 @@
+
+
+
+ netstandard2.1
+ 3.0
+
+
+
+
+
+
+
+
diff --git a/src/Components/Blazor/Build/testassets/razorclasslibrary/RazorClassLibrary.csproj b/src/Components/Blazor/Build/testassets/razorclasslibrary/RazorClassLibrary.csproj
new file mode 100644
index 000000000000..94e866815d23
--- /dev/null
+++ b/src/Components/Blazor/Build/testassets/razorclasslibrary/RazorClassLibrary.csproj
@@ -0,0 +1,8 @@
+
+
+
+ netstandard2.1
+ 3.0
+
+
+
diff --git a/src/Components/Blazor/Build/testassets/razorclasslibrary/wwwroot/styles.css b/src/Components/Blazor/Build/testassets/razorclasslibrary/wwwroot/styles.css
new file mode 100644
index 000000000000..5f282702bb03
--- /dev/null
+++ b/src/Components/Blazor/Build/testassets/razorclasslibrary/wwwroot/styles.css
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/src/Analyzers/shared/FeatureDetection/lib/netstandard1.0/_._ b/src/Components/Blazor/Build/testassets/razorclasslibrary/wwwroot/wwwroot/exampleJsInterop.js
similarity index 100%
rename from src/Analyzers/shared/FeatureDetection/lib/netstandard1.0/_._
rename to src/Components/Blazor/Build/testassets/razorclasslibrary/wwwroot/wwwroot/exampleJsInterop.js
diff --git a/src/Components/Blazor/Build/testassets/standalone/App.razor b/src/Components/Blazor/Build/testassets/standalone/App.razor
new file mode 100644
index 000000000000..eba23da9b5ae
--- /dev/null
+++ b/src/Components/Blazor/Build/testassets/standalone/App.razor
@@ -0,0 +1,8 @@
+
+
+
+
+
+ Sorry, there's nothing at this address.
+
+
diff --git a/src/Components/Blazor/Build/testassets/standalone/Pages/Index.razor b/src/Components/Blazor/Build/testassets/standalone/Pages/Index.razor
new file mode 100644
index 000000000000..16dac3192520
--- /dev/null
+++ b/src/Components/Blazor/Build/testassets/standalone/Pages/Index.razor
@@ -0,0 +1,5 @@
+@page "/"
+
+Hello, world!
+
+Welcome to your new app.
diff --git a/src/Components/Blazor/Build/testassets/standalone/Program.cs b/src/Components/Blazor/Build/testassets/standalone/Program.cs
new file mode 100644
index 000000000000..3e46e6331662
--- /dev/null
+++ b/src/Components/Blazor/Build/testassets/standalone/Program.cs
@@ -0,0 +1,14 @@
+using System;
+
+namespace standalone
+{
+ public class Program
+ {
+ public static void Main(string[] args)
+ {
+#if REFERENCE_classlibrarywithsatelliteassemblies
+ GC.KeepAlive(typeof(classlibrarywithsatelliteassemblies.Class1));
+#endif
+ }
+ }
+}
diff --git a/src/Components/Blazor/Build/testassets/standalone/_Imports.razor b/src/Components/Blazor/Build/testassets/standalone/_Imports.razor
new file mode 100644
index 000000000000..129b440e8600
--- /dev/null
+++ b/src/Components/Blazor/Build/testassets/standalone/_Imports.razor
@@ -0,0 +1,2 @@
+@using Microsoft.AspNetCore.Components.Routing
+@using standalone
diff --git a/src/Components/Blazor/Build/testassets/standalone/standalone.csproj b/src/Components/Blazor/Build/testassets/standalone/standalone.csproj
new file mode 100644
index 000000000000..1b13eb3d5357
--- /dev/null
+++ b/src/Components/Blazor/Build/testassets/standalone/standalone.csproj
@@ -0,0 +1,20 @@
+
+
+
+
+ netstandard2.1
+ 3.0
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/Components/Blazor/Build/testassets/standalone/wwwroot/index.html b/src/Components/Blazor/Build/testassets/standalone/wwwroot/index.html
new file mode 100644
index 000000000000..85994d6e89fe
--- /dev/null
+++ b/src/Components/Blazor/Build/testassets/standalone/wwwroot/index.html
@@ -0,0 +1,24 @@
+
+
+
+
+
+
+ standalone
+
+
+
+
+
+
+ Loading...
+
+
+ An unhandled error has occurred.
+
Reload
+
🗙
+
+
+
+
+
diff --git a/src/Components/Blazor/DevServer/src/Microsoft.AspNetCore.Blazor.DevServer.csproj b/src/Components/Blazor/DevServer/src/Microsoft.AspNetCore.Blazor.DevServer.csproj
index 4749a781cabe..366a1bce5efd 100644
--- a/src/Components/Blazor/DevServer/src/Microsoft.AspNetCore.Blazor.DevServer.csproj
+++ b/src/Components/Blazor/DevServer/src/Microsoft.AspNetCore.Blazor.DevServer.csproj
@@ -18,8 +18,9 @@
-
+
+
diff --git a/src/Components/Blazor/Directory.Build.props b/src/Components/Blazor/Directory.Build.props
index a90d83b4cc93..c48cf8a1a9db 100644
--- a/src/Components/Blazor/Directory.Build.props
+++ b/src/Components/Blazor/Directory.Build.props
@@ -1,9 +1,3 @@
-
-
-
- $(BlazorClientPreReleaseVersionLabel)
-
-
diff --git a/src/Components/Blazor/Directory.Build.targets b/src/Components/Blazor/Directory.Build.targets
index 178608d3e5ef..e1a17eb9ca9c 100644
--- a/src/Components/Blazor/Directory.Build.targets
+++ b/src/Components/Blazor/Directory.Build.targets
@@ -4,4 +4,5 @@
$(PackageVersion)
+
diff --git a/src/Components/Blazor/Http/src/Microsoft.AspNetCore.Blazor.HttpClient.csproj b/src/Components/Blazor/Http/src/Microsoft.AspNetCore.Blazor.HttpClient.csproj
index 9c5974d9d6f7..9d6deb6173bb 100644
--- a/src/Components/Blazor/Http/src/Microsoft.AspNetCore.Blazor.HttpClient.csproj
+++ b/src/Components/Blazor/Http/src/Microsoft.AspNetCore.Blazor.HttpClient.csproj
@@ -4,6 +4,7 @@
netstandard2.0
Provides experimental support for using System.Text.Json with HttpClient. Intended for use with Blazor running under WebAssembly.
false
+ false
diff --git a/src/Components/Blazor/Mono.WebAssembly.Interop/src/InternalCalls.cs b/src/Components/Blazor/Mono.WebAssembly.Interop/src/InternalCalls.cs
new file mode 100644
index 000000000000..60c0cdc42913
--- /dev/null
+++ b/src/Components/Blazor/Mono.WebAssembly.Interop/src/InternalCalls.cs
@@ -0,0 +1,25 @@
+// Copyright (c) .NET Foundation. All rights reserved.
+// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
+
+using System.Runtime.CompilerServices;
+
+namespace WebAssembly.JSInterop
+{
+ ///
+ /// Methods that map to the functions compiled into the Mono WebAssembly runtime,
+ /// as defined by 'mono_add_internal_call' calls in driver.c
+ ///
+ internal class InternalCalls
+ {
+ // The exact namespace, type, and method names must match the corresponding entries
+ // in driver.c in the Mono distribution
+
+ // We're passing asyncHandle by ref not because we want it to be writable, but so it gets
+ // passed as a pointer (4 bytes). We can pass 4-byte values, but not 8-byte ones.
+ [MethodImpl(MethodImplOptions.InternalCall)]
+ public static extern string InvokeJSMarshalled(out string exception, ref long asyncHandle, string functionIdentifier, string argsJson);
+
+ [MethodImpl(MethodImplOptions.InternalCall)]
+ public static extern TRes InvokeJSUnmarshalled(out string exception, string functionIdentifier, T0 arg0, T1 arg1, T2 arg2);
+ }
+}
diff --git a/src/Components/Blazor/Mono.WebAssembly.Interop/src/Mono.WebAssembly.Interop.csproj b/src/Components/Blazor/Mono.WebAssembly.Interop/src/Mono.WebAssembly.Interop.csproj
new file mode 100644
index 000000000000..ea714b2d92dc
--- /dev/null
+++ b/src/Components/Blazor/Mono.WebAssembly.Interop/src/Mono.WebAssembly.Interop.csproj
@@ -0,0 +1,17 @@
+
+
+
+ netstandard2.1
+ Abstractions and features for interop between Mono WebAssembly and JavaScript code.
+ wasm;javascript;interop
+ true
+ true
+ true
+ false
+
+
+
+
+
+
+
diff --git a/src/Components/Blazor/Mono.WebAssembly.Interop/src/MonoWebAssemblyJSRuntime.cs b/src/Components/Blazor/Mono.WebAssembly.Interop/src/MonoWebAssemblyJSRuntime.cs
new file mode 100644
index 000000000000..654263a12331
--- /dev/null
+++ b/src/Components/Blazor/Mono.WebAssembly.Interop/src/MonoWebAssemblyJSRuntime.cs
@@ -0,0 +1,157 @@
+// Copyright (c) .NET Foundation. All rights reserved.
+// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
+
+using System;
+using System.Text.Json;
+using Microsoft.JSInterop;
+using Microsoft.JSInterop.Infrastructure;
+using WebAssembly.JSInterop;
+
+namespace Mono.WebAssembly.Interop
+{
+ ///
+ /// Provides methods for invoking JavaScript functions for applications running
+ /// on the Mono WebAssembly runtime.
+ ///
+ public class MonoWebAssemblyJSRuntime : JSInProcessRuntime
+ {
+ ///
+ /// Gets the used to perform operations using .
+ ///
+ private static MonoWebAssemblyJSRuntime Instance { get; set; }
+
+ ///
+ /// Initializes the to be used to perform operations using .
+ ///
+ /// The instance.
+ protected static void Initialize(MonoWebAssemblyJSRuntime jsRuntime)
+ {
+ if (Instance != null)
+ {
+ throw new InvalidOperationException("MonoWebAssemblyJSRuntime has already been initialized.");
+ }
+
+ Instance = jsRuntime ?? throw new ArgumentNullException(nameof(jsRuntime));
+ }
+
+ ///
+ protected override string InvokeJS(string identifier, string argsJson)
+ {
+ var noAsyncHandle = default(long);
+ var result = InternalCalls.InvokeJSMarshalled(out var exception, ref noAsyncHandle, identifier, argsJson);
+ return exception != null
+ ? throw new JSException(exception)
+ : result;
+ }
+
+ ///
+ protected override void BeginInvokeJS(long asyncHandle, string identifier, string argsJson)
+ {
+ InternalCalls.InvokeJSMarshalled(out _, ref asyncHandle, identifier, argsJson);
+ }
+
+ // Invoked via Mono's JS interop mechanism (invoke_method)
+ private static string InvokeDotNet(string assemblyName, string methodIdentifier, string dotNetObjectId, string argsJson)
+ {
+ var callInfo = new DotNetInvocationInfo(assemblyName, methodIdentifier, dotNetObjectId == null ? default : long.Parse(dotNetObjectId), callId: null);
+ return DotNetDispatcher.Invoke(Instance, callInfo, argsJson);
+ }
+
+ // Invoked via Mono's JS interop mechanism (invoke_method)
+ private static void EndInvokeJS(string argsJson)
+ => DotNetDispatcher.EndInvokeJS(Instance, argsJson);
+
+ // Invoked via Mono's JS interop mechanism (invoke_method)
+ private static void BeginInvokeDotNet(string callId, string assemblyNameOrDotNetObjectId, string methodIdentifier, string argsJson)
+ {
+ // Figure out whether 'assemblyNameOrDotNetObjectId' is the assembly name or the instance ID
+ // We only need one for any given call. This helps to work around the limitation that we can
+ // only pass a maximum of 4 args in a call from JS to Mono WebAssembly.
+ string assemblyName;
+ long dotNetObjectId;
+ if (char.IsDigit(assemblyNameOrDotNetObjectId[0]))
+ {
+ dotNetObjectId = long.Parse(assemblyNameOrDotNetObjectId);
+ assemblyName = null;
+ }
+ else
+ {
+ dotNetObjectId = default;
+ assemblyName = assemblyNameOrDotNetObjectId;
+ }
+
+ var callInfo = new DotNetInvocationInfo(assemblyName, methodIdentifier, dotNetObjectId, callId);
+ DotNetDispatcher.BeginInvokeDotNet(Instance, callInfo, argsJson);
+ }
+
+ protected override void EndInvokeDotNet(DotNetInvocationInfo callInfo, in DotNetInvocationResult dispatchResult)
+ {
+ // For failures, the common case is to call EndInvokeDotNet with the Exception object.
+ // For these we'll serialize as something that's useful to receive on the JS side.
+ // If the value is not an Exception, we'll just rely on it being directly JSON-serializable.
+ var resultOrError = dispatchResult.Success ? dispatchResult.Result : dispatchResult.Exception.ToString();
+
+ // We pass 0 as the async handle because we don't want the JS-side code to
+ // send back any notification (we're just providing a result for an existing async call)
+ var args = JsonSerializer.Serialize(new[] { callInfo.CallId, dispatchResult.Success, resultOrError }, JsonSerializerOptions);
+ BeginInvokeJS(0, "DotNet.jsCallDispatcher.endInvokeDotNetFromJS", args);
+ }
+
+ #region Custom MonoWebAssemblyJSRuntime methods
+
+ ///
+ /// Invokes the JavaScript function registered with the specified identifier.
+ ///
+ /// The .NET type corresponding to the function's return value type.
+ /// The identifier used when registering the target function.
+ /// The result of the function invocation.
+ public TRes InvokeUnmarshalled(string identifier)
+ => InvokeUnmarshalled(identifier, null, null, null);
+
+ ///
+ /// Invokes the JavaScript function registered with the specified identifier.
+ ///
+ /// The type of the first argument.
+ /// The .NET type corresponding to the function's return value type.
+ /// The identifier used when registering the target function.
+ /// The first argument.
+ /// The result of the function invocation.
+ public TRes InvokeUnmarshalled(string identifier, T0 arg0)
+ => InvokeUnmarshalled(identifier, arg0, null, null);
+
+ ///
+ /// Invokes the JavaScript function registered with the specified identifier.
+ ///
+ /// The type of the first argument.
+ /// The type of the second argument.
+ /// The .NET type corresponding to the function's return value type.
+ /// The identifier used when registering the target function.
+ /// The first argument.
+ /// The second argument.
+ /// The result of the function invocation.
+ public TRes InvokeUnmarshalled(string identifier, T0 arg0, T1 arg1)
+ => InvokeUnmarshalled(identifier, arg0, arg1, null);
+
+ ///
+ /// Invokes the JavaScript function registered with the specified identifier.
+ ///
+ /// The type of the first argument.
+ /// The type of the second argument.
+ /// The type of the third argument.
+ /// The .NET type corresponding to the function's return value type.
+ /// The identifier used when registering the target function.
+ /// The first argument.
+ /// The second argument.
+ /// The third argument.
+ /// The result of the function invocation.
+ public TRes InvokeUnmarshalled(string identifier, T0 arg0, T1 arg1, T2 arg2)
+ {
+ var result = InternalCalls.InvokeJSUnmarshalled(out var exception, identifier, arg0, arg1, arg2);
+ return exception != null
+ ? throw new JSException(exception)
+ : result;
+ }
+
+ #endregion
+ }
+}
diff --git a/src/Components/Blazor/Server/src/Microsoft.AspNetCore.Blazor.Server.csproj b/src/Components/Blazor/Server/src/Microsoft.AspNetCore.Blazor.Server.csproj
index ab6c3b6ee62d..4bdbc1bb1b38 100644
--- a/src/Components/Blazor/Server/src/Microsoft.AspNetCore.Blazor.Server.csproj
+++ b/src/Components/Blazor/Server/src/Microsoft.AspNetCore.Blazor.Server.csproj
@@ -4,13 +4,14 @@
$(DefaultNetCoreTargetFramework)
Runtime server features for ASP.NET Core Blazor applications.
false
+ false
-
+
diff --git a/src/Components/Blazor/Server/src/MonoDebugProxy/BlazorMonoDebugProxyAppBuilderExtensions.cs b/src/Components/Blazor/Server/src/MonoDebugProxy/BlazorMonoDebugProxyAppBuilderExtensions.cs
index 533cd9939985..cbe0fe363a67 100644
--- a/src/Components/Blazor/Server/src/MonoDebugProxy/BlazorMonoDebugProxyAppBuilderExtensions.cs
+++ b/src/Components/Blazor/Server/src/MonoDebugProxy/BlazorMonoDebugProxyAppBuilderExtensions.cs
@@ -9,9 +9,9 @@
using System.Net;
using System.Net.Http;
using System.Runtime.InteropServices;
+using System.Text.Json;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Http;
-using Newtonsoft.Json;
using WsProxy;
namespace Microsoft.AspNetCore.Builder
@@ -21,6 +21,15 @@ namespace Microsoft.AspNetCore.Builder
///
public static class BlazorMonoDebugProxyAppBuilderExtensions
{
+ private static JsonSerializerOptions JsonOptions = new JsonSerializerOptions
+ {
+ PropertyNamingPolicy = JsonNamingPolicy.CamelCase,
+ PropertyNameCaseInsensitive = true,
+ IgnoreNullValues = true
+ };
+
+ private static string DefaultDebuggerHost = "http://localhost:9222";
+
///
/// Adds middleware for needed for debugging Blazor applications
/// inside Chromium dev tools.
@@ -29,6 +38,8 @@ public static void UseBlazorDebugging(this IApplicationBuilder app)
{
app.UseWebSockets();
+ app.UseVisualStudioDebuggerConnectionRequestHandlers();
+
app.Use((context, next) =>
{
var requestPath = context.Request.Path;
@@ -52,6 +63,85 @@ public static void UseBlazorDebugging(this IApplicationBuilder app)
});
}
+ private static string GetDebuggerHost()
+ {
+ var envVar = Environment.GetEnvironmentVariable("ASPNETCORE_WEBASSEMBLYDEBUGHOST");
+
+ if (string.IsNullOrEmpty(envVar))
+ {
+ return DefaultDebuggerHost;
+ }
+ else
+ {
+ return envVar;
+ }
+ }
+
+ private static int GetDebuggerPort()
+ {
+ var host = GetDebuggerHost();
+ return new Uri(host).Port;
+ }
+
+ private static void UseVisualStudioDebuggerConnectionRequestHandlers(this IApplicationBuilder app)
+ {
+ // Unfortunately VS doesn't send any deliberately distinguishing information so we know it's
+ // not a regular browser or API client. The closest we can do is look for the *absence* of a
+ // User-Agent header. In the future, we should try to get VS to send a special header to indicate
+ // this is a debugger metadata request.
+ app.Use(async (context, next) =>
+ {
+ var request = context.Request;
+ var requestPath = request.Path;
+ if (requestPath.StartsWithSegments("/json")
+ && !request.Headers.ContainsKey("User-Agent"))
+ {
+ if (requestPath.Equals("/json", StringComparison.OrdinalIgnoreCase) || requestPath.Equals("/json/list", StringComparison.OrdinalIgnoreCase))
+ {
+ var availableTabs = await GetOpenedBrowserTabs();
+
+ // Filter the list to only include tabs displaying the requested app,
+ // but only during the "choose application to debug" phase. We can't apply
+ // the same filter during the "connecting" phase (/json/list), nor do we need to.
+ if (requestPath.Equals("/json"))
+ {
+ availableTabs = availableTabs.Where(tab => tab.Url.StartsWith($"{request.Scheme}://{request.Host}{request.PathBase}/"));
+ }
+
+ var proxiedTabInfos = availableTabs.Select(tab =>
+ {
+ var underlyingV8Endpoint = tab.WebSocketDebuggerUrl;
+ var proxiedV8Endpoint = $"ws://{request.Host}{request.PathBase}/_framework/debug/ws-proxy?browser={WebUtility.UrlEncode(underlyingV8Endpoint)}";
+ return new
+ {
+ description = "",
+ devtoolsFrontendUrl = "",
+ id = tab.Id,
+ title = tab.Title,
+ type = tab.Type,
+ url = tab.Url,
+ webSocketDebuggerUrl = proxiedV8Endpoint
+ };
+ });
+
+ context.Response.ContentType = "application/json";
+ await context.Response.WriteAsync(JsonSerializer.Serialize(proxiedTabInfos));
+ }
+ else if (requestPath.Equals("/json/version", StringComparison.OrdinalIgnoreCase))
+ {
+ var browserVersionJson = await GetBrowserVersionInfoAsync();
+
+ context.Response.ContentType = "application/json";
+ await context.Response.WriteAsync(browserVersionJson);
+ }
+ }
+ else
+ {
+ await next();
+ }
+ });
+ }
+
private static async Task DebugWebSocketProxyRequest(HttpContext context)
{
if (!context.WebSockets.IsWebSocketRequest)
@@ -81,13 +171,13 @@ private static async Task DebugHome(HttpContext context)
// TODO: Allow overriding port (but not hostname, as we're connecting to the
// local browser, not to the webserver serving the app)
- var debuggerHost = "http://localhost:9222";
+ var debuggerHost = GetDebuggerHost();
var debuggerTabsListUrl = $"{debuggerHost}/json";
IEnumerable availableTabs;
try
{
- availableTabs = await GetOpenedBrowserTabs(debuggerHost);
+ availableTabs = await GetOpenedBrowserTabs();
}
catch (Exception ex)
{
@@ -147,28 +237,30 @@ There is more than one browser tab at {targetTabUrl}
.
var underlyingV8Endpoint = tabToDebug.WebSocketDebuggerUrl;
var proxyEndpoint = $"{request.Host}{request.PathBase}/_framework/debug/ws-proxy?browser={WebUtility.UrlEncode(underlyingV8Endpoint)}";
var devToolsUrlAbsolute = new Uri(debuggerHost + tabToDebug.DevtoolsFrontendUrl);
- var devToolsUrlWithProxy = $"{devToolsUrlAbsolute.Scheme}://{devToolsUrlAbsolute.Authority}{devToolsUrlAbsolute.AbsolutePath}?ws={proxyEndpoint}";
+ var wsParamName = request.IsHttps ? "wss" : "ws";
+ var devToolsUrlWithProxy = $"{devToolsUrlAbsolute.Scheme}://{devToolsUrlAbsolute.Authority}{devToolsUrlAbsolute.AbsolutePath}?{wsParamName}={proxyEndpoint}";
context.Response.Redirect(devToolsUrlWithProxy);
}
private static string GetLaunchChromeInstructions(string appRootUrl)
{
- var profilePath = Path.Combine(Path.GetTempPath(), "blazor-edge-debug");
+ var profilePath = Path.Combine(Path.GetTempPath(), "blazor-chrome-debug");
+ var debuggerPort = GetDebuggerPort();
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
{
return $@"Press Win+R and enter the following:
- chrome --remote-debugging-port=9222 --user-data-dir=""{profilePath}"" {appRootUrl}
";
+ chrome --remote-debugging-port={debuggerPort} --user-data-dir=""{profilePath}"" {appRootUrl}
";
}
else if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux))
{
return $@"In a terminal window execute the following:
- google-chrome --remote-debugging-port=9222 --user-data-dir={profilePath} {appRootUrl}
";
+ google-chrome --remote-debugging-port={debuggerPort} --user-data-dir={profilePath} {appRootUrl}
";
}
else if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX))
{
return $@"Execute the following:
- open /Applications/Google\ Chrome.app --args --remote-debugging-port=9222 --user-data-dir={profilePath} {appRootUrl}
";
+ open /Applications/Google\ Chrome.app --args --remote-debugging-port={debuggerPort} --user-data-dir={profilePath} {appRootUrl}
";
}
else
{
@@ -178,17 +270,18 @@ private static string GetLaunchChromeInstructions(string appRootUrl)
private static string GetLaunchEdgeInstructions(string appRootUrl)
{
- var profilePath = Path.Combine(Path.GetTempPath(), "blazor-chrome-debug");
+ var profilePath = Path.Combine(Path.GetTempPath(), "blazor-edge-debug");
+ var debugggerPort = GetDebuggerPort();
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
{
return $@"Press Win+R and enter the following:
- msedge --remote-debugging-port=9222 --user-data-dir=""{profilePath}"" {appRootUrl}
";
+ msedge --remote-debugging-port={debugggerPort} --user-data-dir=""{profilePath}"" --no-first-run {appRootUrl}
";
}
else if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX))
{
return $@"In a terminal window execute the following:
- open /Applications/Microsoft\ Edge\ Dev.app --args --remote-debugging-port=9222 --user-data-dir={profilePath} {appRootUrl}
";
+ open /Applications/Microsoft\ Edge\ Dev.app --args --remote-debugging-port={debugggerPort} --user-data-dir={profilePath} {appRootUrl}
";
}
else
{
@@ -196,17 +289,24 @@ private static string GetLaunchEdgeInstructions(string appRootUrl)
}
}
- private static async Task> GetOpenedBrowserTabs(string debuggerHost)
+ private static async Task GetBrowserVersionInfoAsync()
{
- using (var httpClient = new HttpClient { Timeout = TimeSpan.FromSeconds(5) })
- {
- var jsonResponse = await httpClient.GetStringAsync($"{debuggerHost}/json");
- return JsonConvert.DeserializeObject(jsonResponse);
- }
+ using var httpClient = new HttpClient { Timeout = TimeSpan.FromSeconds(5) };
+ var debuggerHost = GetDebuggerHost();
+ return await httpClient.GetStringAsync($"{debuggerHost}/json/version");
+ }
+
+ private static async Task> GetOpenedBrowserTabs()
+ {
+ using var httpClient = new HttpClient { Timeout = TimeSpan.FromSeconds(5) };
+ var debuggerHost = GetDebuggerHost();
+ var jsonResponse = await httpClient.GetStringAsync($"{debuggerHost}/json");
+ return JsonSerializer.Deserialize(jsonResponse, JsonOptions);
}
class BrowserTab
{
+ public string Id { get; set; }
public string Type { get; set; }
public string Url { get; set; }
public string Title { get; set; }
diff --git a/src/Components/Blazor/Server/src/MonoDebugProxy/ws-proxy/MonoProxy.cs b/src/Components/Blazor/Server/src/MonoDebugProxy/ws-proxy/MonoProxy.cs
index 8c440da1ce24..7aa4dcf710ae 100644
--- a/src/Components/Blazor/Server/src/MonoDebugProxy/ws-proxy/MonoProxy.cs
+++ b/src/Components/Blazor/Server/src/MonoDebugProxy/ws-proxy/MonoProxy.cs
@@ -100,7 +100,7 @@ protected override async Task AcceptEvent (string method, JObject args, Ca
break;
}
case "Debugger.paused": {
- //TODO figure out how to stich out more frames and, in particular what happens when real wasm is on the stack
+ //TODO figure out how to stitch out more frames and, in particular what happens when real wasm is on the stack
var top_func = args? ["callFrames"]? [0]? ["functionName"]?.Value ();
if (top_func == "mono_wasm_fire_bp" || top_func == "_mono_wasm_fire_bp") {
await OnBreakPointHit (args, token);
@@ -419,7 +419,7 @@ async Task GetDetails(int msg_id, int object_id, CancellationToken token, string
var res = await SendCommand("Runtime.evaluate", o, token);
- //if we fail we just buble that to the IDE (and let it panic over it)
+ //if we fail we just bubble that to the IDE (and let it panic over it)
if (res.IsErr)
{
SendResponse(msg_id, res, token);
@@ -475,7 +475,7 @@ async Task GetScopeProperties (int msg_id, int scope_id, CancellationToken token
var res = await SendCommand ("Runtime.evaluate", o, token);
- //if we fail we just buble that to the IDE (and let it panic over it)
+ //if we fail we just bubble that to the IDE (and let it panic over it)
if (res.IsErr) {
SendResponse (msg_id, res, token);
return;
@@ -594,7 +594,7 @@ async Task RuntimeReady (CancellationToken token)
var res = await EnableBreakPoint (bp, token);
var ret_code = res.Value? ["result"]? ["value"]?.Value ();
- //if we fail we just buble that to the IDE (and let it panic over it)
+ //if we fail we just bubble that to the IDE (and let it panic over it)
if (!ret_code.HasValue) {
//FIXME figure out how to inform the IDE of that.
Info ($"FAILED TO ENABLE BP {bp.LocalId}");
@@ -668,7 +668,7 @@ async Task SetBreakPoint (int msg_id, BreakPointRequest req, CancellationToken t
var res = await EnableBreakPoint (bp, token);
var ret_code = res.Value? ["result"]? ["value"]?.Value ();
- //if we fail we just buble that to the IDE (and let it panic over it)
+ //if we fail we just bubble that to the IDE (and let it panic over it)
if (!ret_code.HasValue) {
SendResponse (msg_id, res, token);
return;
diff --git a/src/Components/Blazor/Templates/src/Directory.Build.props b/src/Components/Blazor/Templates/src/Directory.Build.props
deleted file mode 100644
index ed5e01501483..000000000000
--- a/src/Components/Blazor/Templates/src/Directory.Build.props
+++ /dev/null
@@ -1,15 +0,0 @@
-
-
-
-
- false
- false
-
-
-
-
- 0.8.0-preview-19064-0339
- 3.0.0-preview-19064-0339
-
-
-
diff --git a/src/Components/Blazor/Templates/src/Directory.Build.targets b/src/Components/Blazor/Templates/src/Directory.Build.targets
deleted file mode 100644
index 7c6f423adde2..000000000000
--- a/src/Components/Blazor/Templates/src/Directory.Build.targets
+++ /dev/null
@@ -1,17 +0,0 @@
-
-
-
-
-
-
-
- TemplateBlazorVersion=$(PackageVersion);
- TemplateComponentsVersion=$(ComponentsPackageVersion);
- RepositoryCommit=$(SourceRevisionId);
-
-
-
-
diff --git a/src/Components/Blazor/Templates/src/Microsoft.AspNetCore.Blazor.Templates.csproj b/src/Components/Blazor/Templates/src/Microsoft.AspNetCore.Blazor.Templates.csproj
deleted file mode 100644
index 55364eee45fc..000000000000
--- a/src/Components/Blazor/Templates/src/Microsoft.AspNetCore.Blazor.Templates.csproj
+++ /dev/null
@@ -1,64 +0,0 @@
-
-
- netstandard2.0
- Microsoft.AspNetCore.Blazor.Templates.nuspec
- false
- False
- False
- False
- false
- none
- false
- $(NoWarn);2008
- Templates for ASP.NET Core Blazor projects.
- aspnet;templates;blazor;spa
- false
-
-
-
-
-
-
-
-
- <_TemplateConfigMainFile Include="content\**\.template.config.src\template.json" />
- <_TemplateConfigDir Include="@(_TemplateConfigMainFile->'$([System.IO.Path]::GetDirectoryName('%(_TemplateConfigMainFile.FullPath)'))')" />
- <_TemplateConfigFileToCopy Include="%(_TemplateConfigDir.Identity)\**\*.*">
- $([System.IO.Path]::GetDirectoryName('%(_TemplateConfigDir.Identity)'))\.template.config\
-
-
-
-
-
-
-
-
-
-
-
-
-
- %(DestDir)%(RecursiveDir)%(Filename)%(Extension)
- $(GeneratedContentProperties)
-
-
-
-
-
-
-
-
-
diff --git a/src/Components/Blazor/Templates/src/Microsoft.AspNetCore.Blazor.Templates.nuspec b/src/Components/Blazor/Templates/src/Microsoft.AspNetCore.Blazor.Templates.nuspec
deleted file mode 100644
index fd1975023109..000000000000
--- a/src/Components/Blazor/Templates/src/Microsoft.AspNetCore.Blazor.Templates.nuspec
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
- $CommonMetadataElements$
-
-
-
-
-
- $CommonFileElements$
-
-
-
diff --git a/src/Components/Blazor/Templates/src/content/BlazorWasm-CSharp/Shared/BlazorWasm-CSharp.Shared.csproj b/src/Components/Blazor/Templates/src/content/BlazorWasm-CSharp/Shared/BlazorWasm-CSharp.Shared.csproj
deleted file mode 100644
index 2a77f0c7cc91..000000000000
--- a/src/Components/Blazor/Templates/src/content/BlazorWasm-CSharp/Shared/BlazorWasm-CSharp.Shared.csproj
+++ /dev/null
@@ -1,8 +0,0 @@
-
-
-
- netstandard2.0
- 7.3
-
-
-
diff --git a/src/Components/Blazor/Validation/src/Microsoft.AspNetCore.Blazor.DataAnnotations.Validation.csproj b/src/Components/Blazor/Validation/src/Microsoft.AspNetCore.Blazor.DataAnnotations.Validation.csproj
index 89023db6b921..53cc678edbb0 100644
--- a/src/Components/Blazor/Validation/src/Microsoft.AspNetCore.Blazor.DataAnnotations.Validation.csproj
+++ b/src/Components/Blazor/Validation/src/Microsoft.AspNetCore.Blazor.DataAnnotations.Validation.csproj
@@ -1,7 +1,7 @@
- netstandard2.0
+ netstandard2.1
Provides experimental support for validation using DataAnnotations.
false
false
diff --git a/src/Components/Blazor/testassets/HostedInAspNet.Client/HostedInAspNet.Client.csproj b/src/Components/Blazor/testassets/HostedInAspNet.Client/HostedInAspNet.Client.csproj
index ef12ac3c4e83..e27de695c1b3 100644
--- a/src/Components/Blazor/testassets/HostedInAspNet.Client/HostedInAspNet.Client.csproj
+++ b/src/Components/Blazor/testassets/HostedInAspNet.Client/HostedInAspNet.Client.csproj
@@ -1,7 +1,7 @@
- netstandard2.0
+ netstandard2.1
Exe
true
3.0
@@ -11,17 +11,4 @@
-
-
- $(GetCurrentProjectStaticWebAssetsDependsOn);
- _ClearCurrentStaticWebAssetsForReferenceDiscovery
-
-
-
-
-
-
-
-
-
diff --git a/src/Components/Blazor/testassets/HostedInAspNet.Server/HostedInAspNet.Server.csproj b/src/Components/Blazor/testassets/HostedInAspNet.Server/HostedInAspNet.Server.csproj
index afc09e4f772e..1350803e6b1a 100644
--- a/src/Components/Blazor/testassets/HostedInAspNet.Server/HostedInAspNet.Server.csproj
+++ b/src/Components/Blazor/testassets/HostedInAspNet.Server/HostedInAspNet.Server.csproj
@@ -8,7 +8,7 @@
-
+
diff --git a/src/Components/Blazor/testassets/Microsoft.AspNetCore.Blazor.E2EPerformance/wwwroot/benchmarks/index.js b/src/Components/Blazor/testassets/Microsoft.AspNetCore.Blazor.E2EPerformance/wwwroot/benchmarks/index.js
deleted file mode 100644
index 4600066f3872..000000000000
--- a/src/Components/Blazor/testassets/Microsoft.AspNetCore.Blazor.E2EPerformance/wwwroot/benchmarks/index.js
+++ /dev/null
@@ -1,6 +0,0 @@
-import { HtmlUI } from './lib/minibench/minibench.js';
-import './appStartup.js';
-import './renderList.js';
-import './jsonHandling.js';
-
-new HtmlUI('E2E Performance', '#display');
diff --git a/src/Components/Blazor/testassets/MonoSanity/MonoSanity.csproj b/src/Components/Blazor/testassets/MonoSanity/MonoSanity.csproj
index 5297f5bca69a..e2158c8c06ae 100644
--- a/src/Components/Blazor/testassets/MonoSanity/MonoSanity.csproj
+++ b/src/Components/Blazor/testassets/MonoSanity/MonoSanity.csproj
@@ -2,6 +2,7 @@
$(DefaultNetCoreTargetFramework)
+
diff --git a/src/Components/Blazor/testassets/MonoSanity/wwwroot/index.html b/src/Components/Blazor/testassets/MonoSanity/wwwroot/index.html
index c4d1ab60e25c..8a42e8e5d1c4 100644
--- a/src/Components/Blazor/testassets/MonoSanity/wwwroot/index.html
+++ b/src/Components/Blazor/testassets/MonoSanity/wwwroot/index.html
@@ -36,14 +36,6 @@
-
- Invoke wiped method
-
-
-
Call JS from .NET
@@ -111,16 +103,6 @@
}
};
- el('invokeWipedMethod').onsubmit = function (evt) {
- evt.preventDefault();
- try {
- invokeMonoMethod('MonoSanityClient', 'MonoSanityClient', 'Examples', 'InvokeWipedMethod', []);
- el('invokeWipedMethodStackTrace').value = 'WARNING: No exception occurred';
- } catch (ex) {
- el('invokeWipedMethodStackTrace').value = ex.toString();
- }
- };
-
el('callJs').onsubmit = function (evt) {
evt.preventDefault();
var expression = el('callJsEvalExpression').value;
diff --git a/src/Components/Blazor/testassets/MonoSanity/wwwroot/loader.js b/src/Components/Blazor/testassets/MonoSanity/wwwroot/loader.js
index 48d4530d3e63..328acacdff97 100644
--- a/src/Components/Blazor/testassets/MonoSanity/wwwroot/loader.js
+++ b/src/Components/Blazor/testassets/MonoSanity/wwwroot/loader.js
@@ -12,7 +12,7 @@
window.initMono = function initMono(loadAssemblyUrls, onReadyCallback) {
window.Module = {
locateFile: function (fileName) {
- return fileName === 'mono.wasm' ? '/_framework/wasm/mono.wasm' : fileName;
+ return fileName === 'dotnet.wasm' ? '/_framework/wasm/dotnet.wasm' : fileName;
},
onRuntimeInitialized: function () {
var allAssemblyUrls = loadAssemblyUrls.concat([
@@ -117,7 +117,7 @@
}
var scriptElem = document.createElement('script');
- scriptElem.src = '/_framework/wasm/mono.js';
+ scriptElem.src = '/_framework/wasm/dotnet.js';
document.body.appendChild(scriptElem);
}
diff --git a/src/Components/Blazor/testassets/MonoSanityClient/Examples.cs b/src/Components/Blazor/testassets/MonoSanityClient/Examples.cs
index 8023ded4d9d3..1d56128e3546 100644
--- a/src/Components/Blazor/testassets/MonoSanityClient/Examples.cs
+++ b/src/Components/Blazor/testassets/MonoSanityClient/Examples.cs
@@ -31,11 +31,6 @@ public static void TriggerException(string message)
throw new InvalidOperationException(message);
}
- public static void InvokeWipedMethod()
- {
- new HttpClientHandler().Dispose();
- }
-
public static string EvaluateJavaScript(string expression)
{
var result = InternalCalls.InvokeJSUnmarshalled(out var exceptionMessage, "evaluateJsExpression", expression, null, null);
diff --git a/src/Components/Blazor/testassets/MonoSanityClient/MonoSanityClient.csproj b/src/Components/Blazor/testassets/MonoSanityClient/MonoSanityClient.csproj
index b186c391941b..e01c60084327 100644
--- a/src/Components/Blazor/testassets/MonoSanityClient/MonoSanityClient.csproj
+++ b/src/Components/Blazor/testassets/MonoSanityClient/MonoSanityClient.csproj
@@ -1,7 +1,7 @@
- netstandard2.0
+ netstandard2.1
false
false
exe
diff --git a/src/Components/Blazor/testassets/StandaloneApp/StandaloneApp.csproj b/src/Components/Blazor/testassets/StandaloneApp/StandaloneApp.csproj
index cddd429b6a40..32156c56b854 100644
--- a/src/Components/Blazor/testassets/StandaloneApp/StandaloneApp.csproj
+++ b/src/Components/Blazor/testassets/StandaloneApp/StandaloneApp.csproj
@@ -1,7 +1,7 @@
- netstandard2.0
+ netstandard2.1
true
3.0
diff --git a/src/Components/Blazor/testassets/StandaloneApp/wwwroot/index.html b/src/Components/Blazor/testassets/StandaloneApp/wwwroot/index.html
index 5da6ba26b31b..fde34bd63924 100644
--- a/src/Components/Blazor/testassets/StandaloneApp/wwwroot/index.html
+++ b/src/Components/Blazor/testassets/StandaloneApp/wwwroot/index.html
@@ -1,4 +1,4 @@
-
+
@@ -11,6 +11,12 @@
Loading...
+
+ An unhandled exception has occurred. See browser dev tools for details.
+
Reload
+
🗙
+
+
diff --git a/src/Components/Components.sln b/src/Components/Components.sln
index ba0b2476ffb3..c88695cf66e3 100644
--- a/src/Components/Components.sln
+++ b/src/Components/Components.sln
@@ -21,12 +21,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.Blazor
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.Blazor.DevServer", "Blazor\DevServer\src\Microsoft.AspNetCore.Blazor.DevServer.csproj", "{A6C8050D-7C18-4585-ADCF-833AC1765847}"
EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.Blazor.E2EPerformance", "Blazor\testassets\Microsoft.AspNetCore.Blazor.E2EPerformance\Microsoft.AspNetCore.Blazor.E2EPerformance.csproj", "{08773DD6-6FED-4BF2-BD9F-C19D2CF919BB}"
-EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.Blazor.Server", "Blazor\Server\src\Microsoft.AspNetCore.Blazor.Server.csproj", "{A4859630-F9F7-4F5C-9FF3-6C013D7C58FA}"
EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.Blazor.Templates", "Blazor\Templates\src\Microsoft.AspNetCore.Blazor.Templates.csproj", "{66036B70-6C93-4E45-A1A1-819F15CA757A}"
-EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "testassets", "testassets", "{A7ABAC29-F73F-456D-AE54-46842CFC2E10}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "HostedInAspNet.Client", "Blazor\testassets\HostedInAspNet.Client\HostedInAspNet.Client.csproj", "{FD37F740-A654-4117-BFB6-9112CE4C1D3B}"
@@ -240,12 +236,24 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Ignitor", "Ignitor\src\Igni
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Ignitor.Test", "Ignitor\test\Ignitor.Test.csproj", "{F31E8118-014E-4CCE-8A48-5282F7B9BB3E}"
EndProject
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Validation", "Validation", "{FD9BD646-9D50-42ED-A3E1-90558BA0C6B2}"
-EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.Blazor.DataAnnotations.Validation", "Blazor\Validation\src\Microsoft.AspNetCore.Blazor.DataAnnotations.Validation.csproj", "{B70F90C7-2696-4050-B24E-BF0308F4E059}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.Blazor.DataAnnotations.Validation.Tests", "Blazor\Validation\test\Microsoft.AspNetCore.Blazor.DataAnnotations.Validation.Tests.csproj", "{A5617A9D-C71E-44DE-936C-27611EB40A02}"
EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Mono.WebAssembly.Interop", "Mono.WebAssembly.Interop", "{21BB9C13-20C1-4F2B-80E4-D7C64AA3BD05}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.WebAssembly.Interop", "Blazor\Mono.WebAssembly.Interop\src\Mono.WebAssembly.Interop.csproj", "{D141CFEE-D10A-406B-8963-F86FA13732E3}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ComponentsApp.Server", "test\testassets\ComponentsApp.Server\ComponentsApp.Server.csproj", "{F2E27E1C-2E47-42C1-9AC7-36265A381717}"
+EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "benchmarkapps", "benchmarkapps", "{CCC82E97-7B58-43E2-BBBD-23D82F926367}"
+EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Wasm.Performance", "Wasm.Performance", "{F65EFF0F-ACF3-46BD-9A8F-CDA94AF1885A}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Wasm.Performance.Driver", "benchmarkapps\Wasm.Performance\Driver\Wasm.Performance.Driver.csproj", "{CA9948CA-B3FA-4C2E-A726-5E47BAD19457}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Wasm.Performance.TestApp", "benchmarkapps\Wasm.Performance\TestApp\Wasm.Performance.TestApp.csproj", "{97EA0A7D-FE5E-47D1-ADDC-4BFD702F55AB}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@@ -340,18 +348,6 @@ Global
{A6C8050D-7C18-4585-ADCF-833AC1765847}.Release|x64.Build.0 = Release|Any CPU
{A6C8050D-7C18-4585-ADCF-833AC1765847}.Release|x86.ActiveCfg = Release|Any CPU
{A6C8050D-7C18-4585-ADCF-833AC1765847}.Release|x86.Build.0 = Release|Any CPU
- {08773DD6-6FED-4BF2-BD9F-C19D2CF919BB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {08773DD6-6FED-4BF2-BD9F-C19D2CF919BB}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {08773DD6-6FED-4BF2-BD9F-C19D2CF919BB}.Debug|x64.ActiveCfg = Debug|Any CPU
- {08773DD6-6FED-4BF2-BD9F-C19D2CF919BB}.Debug|x64.Build.0 = Debug|Any CPU
- {08773DD6-6FED-4BF2-BD9F-C19D2CF919BB}.Debug|x86.ActiveCfg = Debug|Any CPU
- {08773DD6-6FED-4BF2-BD9F-C19D2CF919BB}.Debug|x86.Build.0 = Debug|Any CPU
- {08773DD6-6FED-4BF2-BD9F-C19D2CF919BB}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {08773DD6-6FED-4BF2-BD9F-C19D2CF919BB}.Release|Any CPU.Build.0 = Release|Any CPU
- {08773DD6-6FED-4BF2-BD9F-C19D2CF919BB}.Release|x64.ActiveCfg = Release|Any CPU
- {08773DD6-6FED-4BF2-BD9F-C19D2CF919BB}.Release|x64.Build.0 = Release|Any CPU
- {08773DD6-6FED-4BF2-BD9F-C19D2CF919BB}.Release|x86.ActiveCfg = Release|Any CPU
- {08773DD6-6FED-4BF2-BD9F-C19D2CF919BB}.Release|x86.Build.0 = Release|Any CPU
{A4859630-F9F7-4F5C-9FF3-6C013D7C58FA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A4859630-F9F7-4F5C-9FF3-6C013D7C58FA}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A4859630-F9F7-4F5C-9FF3-6C013D7C58FA}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -364,18 +360,6 @@ Global
{A4859630-F9F7-4F5C-9FF3-6C013D7C58FA}.Release|x64.Build.0 = Release|Any CPU
{A4859630-F9F7-4F5C-9FF3-6C013D7C58FA}.Release|x86.ActiveCfg = Release|Any CPU
{A4859630-F9F7-4F5C-9FF3-6C013D7C58FA}.Release|x86.Build.0 = Release|Any CPU
- {66036B70-6C93-4E45-A1A1-819F15CA757A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {66036B70-6C93-4E45-A1A1-819F15CA757A}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {66036B70-6C93-4E45-A1A1-819F15CA757A}.Debug|x64.ActiveCfg = Debug|Any CPU
- {66036B70-6C93-4E45-A1A1-819F15CA757A}.Debug|x64.Build.0 = Debug|Any CPU
- {66036B70-6C93-4E45-A1A1-819F15CA757A}.Debug|x86.ActiveCfg = Debug|Any CPU
- {66036B70-6C93-4E45-A1A1-819F15CA757A}.Debug|x86.Build.0 = Debug|Any CPU
- {66036B70-6C93-4E45-A1A1-819F15CA757A}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {66036B70-6C93-4E45-A1A1-819F15CA757A}.Release|Any CPU.Build.0 = Release|Any CPU
- {66036B70-6C93-4E45-A1A1-819F15CA757A}.Release|x64.ActiveCfg = Release|Any CPU
- {66036B70-6C93-4E45-A1A1-819F15CA757A}.Release|x64.Build.0 = Release|Any CPU
- {66036B70-6C93-4E45-A1A1-819F15CA757A}.Release|x86.ActiveCfg = Release|Any CPU
- {66036B70-6C93-4E45-A1A1-819F15CA757A}.Release|x86.Build.0 = Release|Any CPU
{FD37F740-A654-4117-BFB6-9112CE4C1D3B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{FD37F740-A654-4117-BFB6-9112CE4C1D3B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{FD37F740-A654-4117-BFB6-9112CE4C1D3B}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -1516,6 +1500,54 @@ Global
{A5617A9D-C71E-44DE-936C-27611EB40A02}.Release|x64.Build.0 = Release|Any CPU
{A5617A9D-C71E-44DE-936C-27611EB40A02}.Release|x86.ActiveCfg = Release|Any CPU
{A5617A9D-C71E-44DE-936C-27611EB40A02}.Release|x86.Build.0 = Release|Any CPU
+ {D141CFEE-D10A-406B-8963-F86FA13732E3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {D141CFEE-D10A-406B-8963-F86FA13732E3}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {D141CFEE-D10A-406B-8963-F86FA13732E3}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {D141CFEE-D10A-406B-8963-F86FA13732E3}.Debug|x64.Build.0 = Debug|Any CPU
+ {D141CFEE-D10A-406B-8963-F86FA13732E3}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {D141CFEE-D10A-406B-8963-F86FA13732E3}.Debug|x86.Build.0 = Debug|Any CPU
+ {D141CFEE-D10A-406B-8963-F86FA13732E3}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {D141CFEE-D10A-406B-8963-F86FA13732E3}.Release|Any CPU.Build.0 = Release|Any CPU
+ {D141CFEE-D10A-406B-8963-F86FA13732E3}.Release|x64.ActiveCfg = Release|Any CPU
+ {D141CFEE-D10A-406B-8963-F86FA13732E3}.Release|x64.Build.0 = Release|Any CPU
+ {D141CFEE-D10A-406B-8963-F86FA13732E3}.Release|x86.ActiveCfg = Release|Any CPU
+ {D141CFEE-D10A-406B-8963-F86FA13732E3}.Release|x86.Build.0 = Release|Any CPU
+ {F2E27E1C-2E47-42C1-9AC7-36265A381717}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {F2E27E1C-2E47-42C1-9AC7-36265A381717}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {F2E27E1C-2E47-42C1-9AC7-36265A381717}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {F2E27E1C-2E47-42C1-9AC7-36265A381717}.Debug|x64.Build.0 = Debug|Any CPU
+ {F2E27E1C-2E47-42C1-9AC7-36265A381717}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {F2E27E1C-2E47-42C1-9AC7-36265A381717}.Debug|x86.Build.0 = Debug|Any CPU
+ {F2E27E1C-2E47-42C1-9AC7-36265A381717}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {F2E27E1C-2E47-42C1-9AC7-36265A381717}.Release|Any CPU.Build.0 = Release|Any CPU
+ {F2E27E1C-2E47-42C1-9AC7-36265A381717}.Release|x64.ActiveCfg = Release|Any CPU
+ {F2E27E1C-2E47-42C1-9AC7-36265A381717}.Release|x64.Build.0 = Release|Any CPU
+ {F2E27E1C-2E47-42C1-9AC7-36265A381717}.Release|x86.ActiveCfg = Release|Any CPU
+ {F2E27E1C-2E47-42C1-9AC7-36265A381717}.Release|x86.Build.0 = Release|Any CPU
+ {CA9948CA-B3FA-4C2E-A726-5E47BAD19457}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {CA9948CA-B3FA-4C2E-A726-5E47BAD19457}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {CA9948CA-B3FA-4C2E-A726-5E47BAD19457}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {CA9948CA-B3FA-4C2E-A726-5E47BAD19457}.Debug|x64.Build.0 = Debug|Any CPU
+ {CA9948CA-B3FA-4C2E-A726-5E47BAD19457}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {CA9948CA-B3FA-4C2E-A726-5E47BAD19457}.Debug|x86.Build.0 = Debug|Any CPU
+ {CA9948CA-B3FA-4C2E-A726-5E47BAD19457}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {CA9948CA-B3FA-4C2E-A726-5E47BAD19457}.Release|Any CPU.Build.0 = Release|Any CPU
+ {CA9948CA-B3FA-4C2E-A726-5E47BAD19457}.Release|x64.ActiveCfg = Release|Any CPU
+ {CA9948CA-B3FA-4C2E-A726-5E47BAD19457}.Release|x64.Build.0 = Release|Any CPU
+ {CA9948CA-B3FA-4C2E-A726-5E47BAD19457}.Release|x86.ActiveCfg = Release|Any CPU
+ {CA9948CA-B3FA-4C2E-A726-5E47BAD19457}.Release|x86.Build.0 = Release|Any CPU
+ {97EA0A7D-FE5E-47D1-ADDC-4BFD702F55AB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {97EA0A7D-FE5E-47D1-ADDC-4BFD702F55AB}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {97EA0A7D-FE5E-47D1-ADDC-4BFD702F55AB}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {97EA0A7D-FE5E-47D1-ADDC-4BFD702F55AB}.Debug|x64.Build.0 = Debug|Any CPU
+ {97EA0A7D-FE5E-47D1-ADDC-4BFD702F55AB}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {97EA0A7D-FE5E-47D1-ADDC-4BFD702F55AB}.Debug|x86.Build.0 = Debug|Any CPU
+ {97EA0A7D-FE5E-47D1-ADDC-4BFD702F55AB}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {97EA0A7D-FE5E-47D1-ADDC-4BFD702F55AB}.Release|Any CPU.Build.0 = Release|Any CPU
+ {97EA0A7D-FE5E-47D1-ADDC-4BFD702F55AB}.Release|x64.ActiveCfg = Release|Any CPU
+ {97EA0A7D-FE5E-47D1-ADDC-4BFD702F55AB}.Release|x64.Build.0 = Release|Any CPU
+ {97EA0A7D-FE5E-47D1-ADDC-4BFD702F55AB}.Release|x86.ActiveCfg = Release|Any CPU
+ {97EA0A7D-FE5E-47D1-ADDC-4BFD702F55AB}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@@ -1528,9 +1560,7 @@ Global
{E8AD67A4-77D3-4B85-AE19-4711388B62B1} = {7260DED9-22A9-4E9D-92F4-5E8A4404DEAF}
{E38FDBB0-08C1-444E-A449-69C8A59D721B} = {7260DED9-22A9-4E9D-92F4-5E8A4404DEAF}
{A6C8050D-7C18-4585-ADCF-833AC1765847} = {7260DED9-22A9-4E9D-92F4-5E8A4404DEAF}
- {08773DD6-6FED-4BF2-BD9F-C19D2CF919BB} = {7260DED9-22A9-4E9D-92F4-5E8A4404DEAF}
{A4859630-F9F7-4F5C-9FF3-6C013D7C58FA} = {7260DED9-22A9-4E9D-92F4-5E8A4404DEAF}
- {66036B70-6C93-4E45-A1A1-819F15CA757A} = {7260DED9-22A9-4E9D-92F4-5E8A4404DEAF}
{A7ABAC29-F73F-456D-AE54-46842CFC2E10} = {7260DED9-22A9-4E9D-92F4-5E8A4404DEAF}
{FD37F740-A654-4117-BFB6-9112CE4C1D3B} = {A7ABAC29-F73F-456D-AE54-46842CFC2E10}
{C1E2C117-BE47-4E29-94B3-753262D97A5C} = {A7ABAC29-F73F-456D-AE54-46842CFC2E10}
@@ -1626,9 +1656,14 @@ Global
{BBF37AF9-8290-4B70-8BA8-0F6017B3B620} = {46E4300C-5726-4108-B9A2-18BB94EB26ED}
{CD0EF85C-4187-4515-A355-E5A0D4485F40} = {BDE2397D-C53A-4783-8B3A-1F54F48A6926}
{F31E8118-014E-4CCE-8A48-5282F7B9BB3E} = {BDE2397D-C53A-4783-8B3A-1F54F48A6926}
- {FD9BD646-9D50-42ED-A3E1-90558BA0C6B2} = {7260DED9-22A9-4E9D-92F4-5E8A4404DEAF}
{B70F90C7-2696-4050-B24E-BF0308F4E059} = {7260DED9-22A9-4E9D-92F4-5E8A4404DEAF}
{A5617A9D-C71E-44DE-936C-27611EB40A02} = {7260DED9-22A9-4E9D-92F4-5E8A4404DEAF}
+ {21BB9C13-20C1-4F2B-80E4-D7C64AA3BD05} = {7260DED9-22A9-4E9D-92F4-5E8A4404DEAF}
+ {D141CFEE-D10A-406B-8963-F86FA13732E3} = {21BB9C13-20C1-4F2B-80E4-D7C64AA3BD05}
+ {F2E27E1C-2E47-42C1-9AC7-36265A381717} = {44E0D4F3-4430-4175-B482-0D1AEE4BB699}
+ {F65EFF0F-ACF3-46BD-9A8F-CDA94AF1885A} = {CCC82E97-7B58-43E2-BBBD-23D82F926367}
+ {CA9948CA-B3FA-4C2E-A726-5E47BAD19457} = {F65EFF0F-ACF3-46BD-9A8F-CDA94AF1885A}
+ {97EA0A7D-FE5E-47D1-ADDC-4BFD702F55AB} = {F65EFF0F-ACF3-46BD-9A8F-CDA94AF1885A}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {CC3C47E1-AD1A-4619-9CD3-E08A0148E5CE}
diff --git a/src/Components/Components/perf/Microsoft.AspNetCore.Components.Performance.csproj b/src/Components/Components/perf/Microsoft.AspNetCore.Components.Performance.csproj
index a893d64abd8e..f40a0a40987a 100644
--- a/src/Components/Components/perf/Microsoft.AspNetCore.Components.Performance.csproj
+++ b/src/Components/Components/perf/Microsoft.AspNetCore.Components.Performance.csproj
@@ -10,7 +10,8 @@
-
+
+
diff --git a/src/Components/Components/ref/Microsoft.AspNetCore.Components.Manual.cs b/src/Components/Components/ref/Microsoft.AspNetCore.Components.Manual.cs
index fe78ce3bd49f..26646bf79bb8 100644
--- a/src/Components/Components/ref/Microsoft.AspNetCore.Components.Manual.cs
+++ b/src/Components/Components/ref/Microsoft.AspNetCore.Components.Manual.cs
@@ -46,32 +46,6 @@ internal partial interface IEventCallback
bool HasDelegate { get; }
object UnpackForRenderTree();
}
- [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)]
- public readonly partial struct EventCallback : Microsoft.AspNetCore.Components.IEventCallback
- {
- public static readonly Microsoft.AspNetCore.Components.EventCallback Empty;
- public static readonly Microsoft.AspNetCore.Components.EventCallbackFactory Factory;
- internal readonly MulticastDelegate Delegate;
- internal readonly IHandleEvent Receiver;
- public EventCallback(Microsoft.AspNetCore.Components.IHandleEvent receiver, System.MulticastDelegate @delegate) { throw null; }
- public bool HasDelegate { get { throw null; } }
- internal bool RequiresExplicitReceiver { get { throw null; } }
- public System.Threading.Tasks.Task InvokeAsync(object arg) { throw null; }
- object Microsoft.AspNetCore.Components.IEventCallback.UnpackForRenderTree() { throw null; }
- }
- [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)]
- public readonly partial struct EventCallback : Microsoft.AspNetCore.Components.IEventCallback
- {
- public static readonly Microsoft.AspNetCore.Components.EventCallback Empty;
- internal readonly MulticastDelegate Delegate;
- internal readonly IHandleEvent Receiver;
- public EventCallback(Microsoft.AspNetCore.Components.IHandleEvent receiver, System.MulticastDelegate @delegate) { throw null; }
- public bool HasDelegate { get { throw null; } }
- internal bool RequiresExplicitReceiver { get { throw null; } }
- internal Microsoft.AspNetCore.Components.EventCallback AsUntyped() { throw null; }
- public System.Threading.Tasks.Task InvokeAsync(TValue arg) { throw null; }
- object Microsoft.AspNetCore.Components.IEventCallback.UnpackForRenderTree() { throw null; }
- }
internal partial interface ICascadingValueComponent
{
object CurrentValue { get; }
diff --git a/src/Components/Components/ref/Microsoft.AspNetCore.Components.csproj b/src/Components/Components/ref/Microsoft.AspNetCore.Components.csproj
index f1aa3dab10f0..50f888c26a64 100644
--- a/src/Components/Components/ref/Microsoft.AspNetCore.Components.csproj
+++ b/src/Components/Components/ref/Microsoft.AspNetCore.Components.csproj
@@ -2,6 +2,7 @@
netstandard2.0;$(DefaultNetCoreTargetFramework)
+ $(DefaultNetCoreTargetFramework)
@@ -9,7 +10,6 @@
-
@@ -18,6 +18,5 @@
-
diff --git a/src/Components/Components/ref/Microsoft.AspNetCore.Components.netcoreapp.cs b/src/Components/Components/ref/Microsoft.AspNetCore.Components.netcoreapp.cs
index a62693a5d952..17c4d7a4f5cd 100644
--- a/src/Components/Components/ref/Microsoft.AspNetCore.Components.netcoreapp.cs
+++ b/src/Components/Components/ref/Microsoft.AspNetCore.Components.netcoreapp.cs
@@ -12,6 +12,7 @@ public static partial class BindConverter
public static string FormatValue(System.DateTimeOffset value, string format, System.Globalization.CultureInfo culture = null) { throw null; }
public static string FormatValue(decimal value, System.Globalization.CultureInfo culture = null) { throw null; }
public static string FormatValue(double value, System.Globalization.CultureInfo culture = null) { throw null; }
+ public static string FormatValue(short value, System.Globalization.CultureInfo culture = null) { throw null; }
public static string FormatValue(int value, System.Globalization.CultureInfo culture = null) { throw null; }
public static string FormatValue(long value, System.Globalization.CultureInfo culture = null) { throw null; }
public static bool? FormatValue(bool? value, System.Globalization.CultureInfo culture = null) { throw null; }
@@ -21,6 +22,7 @@ public static partial class BindConverter
public static string FormatValue(System.DateTime? value, string format, System.Globalization.CultureInfo culture = null) { throw null; }
public static string FormatValue(decimal? value, System.Globalization.CultureInfo culture = null) { throw null; }
public static string FormatValue(double? value, System.Globalization.CultureInfo culture = null) { throw null; }
+ public static string FormatValue(short? value, System.Globalization.CultureInfo culture = null) { throw null; }
public static string FormatValue(int? value, System.Globalization.CultureInfo culture = null) { throw null; }
public static string FormatValue(long? value, System.Globalization.CultureInfo culture = null) { throw null; }
public static string FormatValue(float? value, System.Globalization.CultureInfo culture = null) { throw null; }
@@ -47,6 +49,8 @@ public static partial class BindConverter
public static bool TryConvertToNullableFloat(object obj, System.Globalization.CultureInfo culture, out float? value) { throw null; }
public static bool TryConvertToNullableInt(object obj, System.Globalization.CultureInfo culture, out int? value) { throw null; }
public static bool TryConvertToNullableLong(object obj, System.Globalization.CultureInfo culture, out long? value) { throw null; }
+ public static bool TryConvertToNullableShort(object obj, System.Globalization.CultureInfo culture, out short? value) { throw null; }
+ public static bool TryConvertToShort(object obj, System.Globalization.CultureInfo culture, out short value) { throw null; }
public static bool TryConvertToString(object obj, System.Globalization.CultureInfo culture, out string value) { throw null; }
public static bool TryConvertTo(object obj, System.Globalization.CultureInfo culture, out T value) { throw null; }
}
@@ -54,35 +58,35 @@ public static partial class BindConverter
public sealed partial class BindElementAttribute : System.Attribute
{
public BindElementAttribute(string element, string suffix, string valueAttribute, string changeAttribute) { }
- public string ChangeAttribute { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } }
- public string Element { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } }
- public string Suffix { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } }
- public string ValueAttribute { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } }
+ public string ChangeAttribute { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } }
+ public string Element { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } }
+ public string Suffix { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } }
+ public string ValueAttribute { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } }
}
[System.AttributeUsageAttribute(System.AttributeTargets.Property, AllowMultiple=false, Inherited=true)]
public sealed partial class CascadingParameterAttribute : System.Attribute
{
public CascadingParameterAttribute() { }
- public string Name { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
+ public string Name { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } }
}
public partial class CascadingValue : Microsoft.AspNetCore.Components.IComponent
{
public CascadingValue() { }
[Microsoft.AspNetCore.Components.ParameterAttribute]
- public Microsoft.AspNetCore.Components.RenderFragment ChildContent { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
+ public Microsoft.AspNetCore.Components.RenderFragment ChildContent { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } }
[Microsoft.AspNetCore.Components.ParameterAttribute]
- public bool IsFixed { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
+ public bool IsFixed { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } }
[Microsoft.AspNetCore.Components.ParameterAttribute]
- public string Name { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
+ public string Name { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } }
[Microsoft.AspNetCore.Components.ParameterAttribute]
- public TValue Value { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
+ public TValue Value { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } }
public void Attach(Microsoft.AspNetCore.Components.RenderHandle renderHandle) { }
public System.Threading.Tasks.Task SetParametersAsync(Microsoft.AspNetCore.Components.ParameterView parameters) { throw null; }
}
public partial class ChangeEventArgs : System.EventArgs
{
public ChangeEventArgs() { }
- public object Value { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
+ public object Value { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } }
}
public abstract partial class ComponentBase : Microsoft.AspNetCore.Components.IComponent, Microsoft.AspNetCore.Components.IHandleAfterRender, Microsoft.AspNetCore.Components.IHandleEvent
{
@@ -119,8 +123,20 @@ protected void OnUnhandledException(System.UnhandledExceptionEventArgs e) { }
public readonly partial struct ElementReference
{
private readonly object _dummy;
+ private readonly int _dummyPrimitive;
public ElementReference(string id) { throw null; }
- public string Id { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } }
+ public string Id { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } }
+ }
+ [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)]
+ public readonly partial struct EventCallback
+ {
+ private readonly object _dummy;
+ private readonly int _dummyPrimitive;
+ public static readonly Microsoft.AspNetCore.Components.EventCallback Empty;
+ public static readonly Microsoft.AspNetCore.Components.EventCallbackFactory Factory;
+ public EventCallback(Microsoft.AspNetCore.Components.IHandleEvent receiver, System.MulticastDelegate @delegate) { throw null; }
+ public bool HasDelegate { get { throw null; } }
+ public System.Threading.Tasks.Task InvokeAsync(object arg) { throw null; }
}
public sealed partial class EventCallbackFactory
{
@@ -153,6 +169,7 @@ public static partial class EventCallbackFactoryBinderExtensions
public static Microsoft.AspNetCore.Components.EventCallback CreateBinder(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action setter, System.DateTime existingValue, string format, System.Globalization.CultureInfo culture = null) { throw null; }
public static Microsoft.AspNetCore.Components.EventCallback CreateBinder(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action setter, decimal existingValue, System.Globalization.CultureInfo culture = null) { throw null; }
public static Microsoft.AspNetCore.Components.EventCallback CreateBinder(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action setter, double existingValue, System.Globalization.CultureInfo culture = null) { throw null; }
+ public static Microsoft.AspNetCore.Components.EventCallback CreateBinder(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action setter, short existingValue, System.Globalization.CultureInfo culture = null) { throw null; }
public static Microsoft.AspNetCore.Components.EventCallback CreateBinder(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action setter, int existingValue, System.Globalization.CultureInfo culture = null) { throw null; }
public static Microsoft.AspNetCore.Components.EventCallback CreateBinder(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action setter, long existingValue, System.Globalization.CultureInfo culture = null) { throw null; }
public static Microsoft.AspNetCore.Components.EventCallback CreateBinder(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action setter, bool? existingValue, System.Globalization.CultureInfo culture = null) { throw null; }
@@ -162,6 +179,7 @@ public static partial class EventCallbackFactoryBinderExtensions
public static Microsoft.AspNetCore.Components.EventCallback CreateBinder(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action setter, System.DateTime? existingValue, string format, System.Globalization.CultureInfo culture = null) { throw null; }
public static Microsoft.AspNetCore.Components.EventCallback CreateBinder(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action setter, decimal? existingValue, System.Globalization.CultureInfo culture = null) { throw null; }
public static Microsoft.AspNetCore.Components.EventCallback CreateBinder(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action setter, double? existingValue, System.Globalization.CultureInfo culture = null) { throw null; }
+ public static Microsoft.AspNetCore.Components.EventCallback CreateBinder(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action setter, short? existingValue, System.Globalization.CultureInfo culture = null) { throw null; }
public static Microsoft.AspNetCore.Components.EventCallback CreateBinder(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action setter, int? existingValue, System.Globalization.CultureInfo culture = null) { throw null; }
public static Microsoft.AspNetCore.Components.EventCallback CreateBinder(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action setter, long? existingValue, System.Globalization.CultureInfo culture = null) { throw null; }
public static Microsoft.AspNetCore.Components.EventCallback CreateBinder(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action setter, float? existingValue, System.Globalization.CultureInfo culture = null) { throw null; }
@@ -180,19 +198,30 @@ public static partial class EventCallbackFactoryEventArgsExtensions
public readonly partial struct EventCallbackWorkItem
{
private readonly object _dummy;
+ private readonly int _dummyPrimitive;
public static readonly Microsoft.AspNetCore.Components.EventCallbackWorkItem Empty;
public EventCallbackWorkItem(System.MulticastDelegate @delegate) { throw null; }
public System.Threading.Tasks.Task InvokeAsync(object arg) { throw null; }
}
+ [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)]
+ public readonly partial struct EventCallback
+ {
+ private readonly object _dummy;
+ private readonly int _dummyPrimitive;
+ public static readonly Microsoft.AspNetCore.Components.EventCallback Empty;
+ public EventCallback(Microsoft.AspNetCore.Components.IHandleEvent receiver, System.MulticastDelegate @delegate) { throw null; }
+ public bool HasDelegate { get { throw null; } }
+ public System.Threading.Tasks.Task InvokeAsync(TValue arg) { throw null; }
+ }
[System.AttributeUsageAttribute(System.AttributeTargets.Class, AllowMultiple=true, Inherited=true)]
public sealed partial class EventHandlerAttribute : System.Attribute
{
public EventHandlerAttribute(string attributeName, System.Type eventArgsType) { }
public EventHandlerAttribute(string attributeName, System.Type eventArgsType, bool enableStopPropagation, bool enablePreventDefault) { }
- public string AttributeName { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } }
- public bool EnablePreventDefault { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } }
- public bool EnableStopPropagation { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } }
- public System.Type EventArgsType { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } }
+ public string AttributeName { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } }
+ public bool EnablePreventDefault { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } }
+ public bool EnableStopPropagation { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } }
+ public System.Type EventArgsType { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } }
}
public partial interface IComponent
{
@@ -216,21 +245,21 @@ public InjectAttribute() { }
public sealed partial class LayoutAttribute : System.Attribute
{
public LayoutAttribute(System.Type layoutType) { }
- public System.Type LayoutType { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } }
+ public System.Type LayoutType { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } }
}
public abstract partial class LayoutComponentBase : Microsoft.AspNetCore.Components.ComponentBase
{
protected LayoutComponentBase() { }
[Microsoft.AspNetCore.Components.ParameterAttribute]
- public Microsoft.AspNetCore.Components.RenderFragment Body { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
+ public Microsoft.AspNetCore.Components.RenderFragment Body { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } }
}
public partial class LayoutView : Microsoft.AspNetCore.Components.IComponent
{
public LayoutView() { }
[Microsoft.AspNetCore.Components.ParameterAttribute]
- public Microsoft.AspNetCore.Components.RenderFragment ChildContent { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
+ public Microsoft.AspNetCore.Components.RenderFragment ChildContent { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } }
[Microsoft.AspNetCore.Components.ParameterAttribute]
- public System.Type Layout { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
+ public System.Type Layout { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } }
public void Attach(Microsoft.AspNetCore.Components.RenderHandle renderHandle) { }
public System.Threading.Tasks.Task SetParametersAsync(Microsoft.AspNetCore.Components.ParameterView parameters) { throw null; }
}
@@ -242,15 +271,16 @@ public LocationChangeException(string message, System.Exception innerException)
public readonly partial struct MarkupString
{
private readonly object _dummy;
+ private readonly int _dummyPrimitive;
public MarkupString(string value) { throw null; }
- public string Value { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } }
+ public string Value { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } }
public static explicit operator Microsoft.AspNetCore.Components.MarkupString (string value) { throw null; }
public override string ToString() { throw null; }
}
public partial class NavigationException : System.Exception
{
public NavigationException(string uri) { }
- public string Location { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } }
+ public string Location { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } }
}
public abstract partial class NavigationManager
{
@@ -269,7 +299,7 @@ protected void NotifyLocationChanged(bool isInterceptedLink) { }
public abstract partial class OwningComponentBase : Microsoft.AspNetCore.Components.ComponentBase, System.IDisposable
{
protected OwningComponentBase() { }
- protected bool IsDisposed { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } }
+ protected bool IsDisposed { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } }
protected System.IServiceProvider ScopedServices { get { throw null; } }
protected virtual void Dispose(bool disposing) { }
void System.IDisposable.Dispose() { }
@@ -283,16 +313,16 @@ protected OwningComponentBase() { }
public sealed partial class ParameterAttribute : System.Attribute
{
public ParameterAttribute() { }
- public bool CaptureUnmatchedValues { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
+ public bool CaptureUnmatchedValues { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } }
}
[System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)]
public readonly partial struct ParameterValue
{
private readonly object _dummy;
private readonly int _dummyPrimitive;
- public bool Cascading { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } }
- public string Name { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } }
- public object Value { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } }
+ public bool Cascading { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } }
+ public string Name { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } }
+ public object Value { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } }
}
[System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)]
public readonly partial struct ParameterView
@@ -331,21 +361,21 @@ public void Render(Microsoft.AspNetCore.Components.RenderFragment renderFragment
public sealed partial class RouteAttribute : System.Attribute
{
public RouteAttribute(string template) { }
- public string Template { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } }
+ public string Template { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } }
}
public sealed partial class RouteData
{
public RouteData(System.Type pageType, System.Collections.Generic.IReadOnlyDictionary routeValues) { }
- public System.Type PageType { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } }
- public System.Collections.Generic.IReadOnlyDictionary RouteValues { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } }
+ public System.Type PageType { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } }
+ public System.Collections.Generic.IReadOnlyDictionary RouteValues { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } }
}
public partial class RouteView : Microsoft.AspNetCore.Components.IComponent
{
public RouteView() { }
[Microsoft.AspNetCore.Components.ParameterAttribute]
- public System.Type DefaultLayout { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
+ public System.Type DefaultLayout { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } }
[Microsoft.AspNetCore.Components.ParameterAttribute]
- public Microsoft.AspNetCore.Components.RouteData RouteData { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
+ public Microsoft.AspNetCore.Components.RouteData RouteData { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } }
public void Attach(Microsoft.AspNetCore.Components.RenderHandle renderHandle) { }
protected virtual void Render(Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder builder) { }
public System.Threading.Tasks.Task SetParametersAsync(Microsoft.AspNetCore.Components.ParameterView parameters) { throw null; }
@@ -420,17 +450,18 @@ public readonly partial struct ArrayRange
public partial class EventFieldInfo
{
public EventFieldInfo() { }
- public int ComponentId { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
- public object FieldValue { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
+ public int ComponentId { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } }
+ public object FieldValue { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } }
}
[System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)]
public readonly partial struct RenderBatch
{
private readonly object _dummy;
- public Microsoft.AspNetCore.Components.RenderTree.ArrayRange DisposedComponentIDs { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } }
- public Microsoft.AspNetCore.Components.RenderTree.ArrayRange DisposedEventHandlerIDs { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } }
- public Microsoft.AspNetCore.Components.RenderTree.ArrayRange ReferenceFrames { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } }
- public Microsoft.AspNetCore.Components.RenderTree.ArrayRange UpdatedComponents { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } }
+ private readonly int _dummyPrimitive;
+ public Microsoft.AspNetCore.Components.RenderTree.ArrayRange DisposedComponentIDs { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } }
+ public Microsoft.AspNetCore.Components.RenderTree.ArrayRange DisposedEventHandlerIDs { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } }
+ public Microsoft.AspNetCore.Components.RenderTree.ArrayRange ReferenceFrames { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } }
+ public Microsoft.AspNetCore.Components.RenderTree.ArrayRange UpdatedComponents { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } }
}
public abstract partial class Renderer : System.IDisposable
{
@@ -509,20 +540,20 @@ public partial interface INavigationInterception
public partial class LocationChangedEventArgs : System.EventArgs
{
public LocationChangedEventArgs(string location, bool isNavigationIntercepted) { }
- public bool IsNavigationIntercepted { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } }
- public string Location { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } }
+ public bool IsNavigationIntercepted { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } }
+ public string Location { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } }
}
public partial class Router : Microsoft.AspNetCore.Components.IComponent, Microsoft.AspNetCore.Components.IHandleAfterRender, System.IDisposable
{
public Router() { }
[Microsoft.AspNetCore.Components.ParameterAttribute]
- public System.Collections.Generic.IEnumerable AdditionalAssemblies { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
+ public System.Collections.Generic.IEnumerable AdditionalAssemblies { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } }
[Microsoft.AspNetCore.Components.ParameterAttribute]
- public System.Reflection.Assembly AppAssembly { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
+ public System.Reflection.Assembly AppAssembly { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } }
[Microsoft.AspNetCore.Components.ParameterAttribute]
- public Microsoft.AspNetCore.Components.RenderFragment Found { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
+ public Microsoft.AspNetCore.Components.RenderFragment Found { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } }
[Microsoft.AspNetCore.Components.ParameterAttribute]
- public Microsoft.AspNetCore.Components.RenderFragment NotFound { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
+ public Microsoft.AspNetCore.Components.RenderFragment NotFound { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } }
public void Attach(Microsoft.AspNetCore.Components.RenderHandle renderHandle) { }
public void Dispose() { }
System.Threading.Tasks.Task Microsoft.AspNetCore.Components.IHandleAfterRender.OnAfterRenderAsync() { throw null; }
diff --git a/src/Components/Components/ref/Microsoft.AspNetCore.Components.netstandard2.0.cs b/src/Components/Components/ref/Microsoft.AspNetCore.Components.netstandard2.0.cs
index a62693a5d952..17c4d7a4f5cd 100644
--- a/src/Components/Components/ref/Microsoft.AspNetCore.Components.netstandard2.0.cs
+++ b/src/Components/Components/ref/Microsoft.AspNetCore.Components.netstandard2.0.cs
@@ -12,6 +12,7 @@ public static partial class BindConverter
public static string FormatValue(System.DateTimeOffset value, string format, System.Globalization.CultureInfo culture = null) { throw null; }
public static string FormatValue(decimal value, System.Globalization.CultureInfo culture = null) { throw null; }
public static string FormatValue(double value, System.Globalization.CultureInfo culture = null) { throw null; }
+ public static string FormatValue(short value, System.Globalization.CultureInfo culture = null) { throw null; }
public static string FormatValue(int value, System.Globalization.CultureInfo culture = null) { throw null; }
public static string FormatValue(long value, System.Globalization.CultureInfo culture = null) { throw null; }
public static bool? FormatValue(bool? value, System.Globalization.CultureInfo culture = null) { throw null; }
@@ -21,6 +22,7 @@ public static partial class BindConverter
public static string FormatValue(System.DateTime? value, string format, System.Globalization.CultureInfo culture = null) { throw null; }
public static string FormatValue(decimal? value, System.Globalization.CultureInfo culture = null) { throw null; }
public static string FormatValue(double? value, System.Globalization.CultureInfo culture = null) { throw null; }
+ public static string FormatValue(short? value, System.Globalization.CultureInfo culture = null) { throw null; }
public static string FormatValue(int? value, System.Globalization.CultureInfo culture = null) { throw null; }
public static string FormatValue(long? value, System.Globalization.CultureInfo culture = null) { throw null; }
public static string FormatValue(float? value, System.Globalization.CultureInfo culture = null) { throw null; }
@@ -47,6 +49,8 @@ public static partial class BindConverter
public static bool TryConvertToNullableFloat(object obj, System.Globalization.CultureInfo culture, out float? value) { throw null; }
public static bool TryConvertToNullableInt(object obj, System.Globalization.CultureInfo culture, out int? value) { throw null; }
public static bool TryConvertToNullableLong(object obj, System.Globalization.CultureInfo culture, out long? value) { throw null; }
+ public static bool TryConvertToNullableShort(object obj, System.Globalization.CultureInfo culture, out short? value) { throw null; }
+ public static bool TryConvertToShort(object obj, System.Globalization.CultureInfo culture, out short value) { throw null; }
public static bool TryConvertToString(object obj, System.Globalization.CultureInfo culture, out string value) { throw null; }
public static bool TryConvertTo(object obj, System.Globalization.CultureInfo culture, out T value) { throw null; }
}
@@ -54,35 +58,35 @@ public static partial class BindConverter
public sealed partial class BindElementAttribute : System.Attribute
{
public BindElementAttribute(string element, string suffix, string valueAttribute, string changeAttribute) { }
- public string ChangeAttribute { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } }
- public string Element { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } }
- public string Suffix { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } }
- public string ValueAttribute { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } }
+ public string ChangeAttribute { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } }
+ public string Element { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } }
+ public string Suffix { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } }
+ public string ValueAttribute { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } }
}
[System.AttributeUsageAttribute(System.AttributeTargets.Property, AllowMultiple=false, Inherited=true)]
public sealed partial class CascadingParameterAttribute : System.Attribute
{
public CascadingParameterAttribute() { }
- public string Name { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
+ public string Name { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } }
}
public partial class CascadingValue : Microsoft.AspNetCore.Components.IComponent
{
public CascadingValue() { }
[Microsoft.AspNetCore.Components.ParameterAttribute]
- public Microsoft.AspNetCore.Components.RenderFragment ChildContent { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
+ public Microsoft.AspNetCore.Components.RenderFragment ChildContent { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } }
[Microsoft.AspNetCore.Components.ParameterAttribute]
- public bool IsFixed { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
+ public bool IsFixed { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } }
[Microsoft.AspNetCore.Components.ParameterAttribute]
- public string Name { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
+ public string Name { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } }
[Microsoft.AspNetCore.Components.ParameterAttribute]
- public TValue Value { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
+ public TValue Value { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } }
public void Attach(Microsoft.AspNetCore.Components.RenderHandle renderHandle) { }
public System.Threading.Tasks.Task SetParametersAsync(Microsoft.AspNetCore.Components.ParameterView parameters) { throw null; }
}
public partial class ChangeEventArgs : System.EventArgs
{
public ChangeEventArgs() { }
- public object Value { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
+ public object Value { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } }
}
public abstract partial class ComponentBase : Microsoft.AspNetCore.Components.IComponent, Microsoft.AspNetCore.Components.IHandleAfterRender, Microsoft.AspNetCore.Components.IHandleEvent
{
@@ -119,8 +123,20 @@ protected void OnUnhandledException(System.UnhandledExceptionEventArgs e) { }
public readonly partial struct ElementReference
{
private readonly object _dummy;
+ private readonly int _dummyPrimitive;
public ElementReference(string id) { throw null; }
- public string Id { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } }
+ public string Id { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } }
+ }
+ [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)]
+ public readonly partial struct EventCallback
+ {
+ private readonly object _dummy;
+ private readonly int _dummyPrimitive;
+ public static readonly Microsoft.AspNetCore.Components.EventCallback Empty;
+ public static readonly Microsoft.AspNetCore.Components.EventCallbackFactory Factory;
+ public EventCallback(Microsoft.AspNetCore.Components.IHandleEvent receiver, System.MulticastDelegate @delegate) { throw null; }
+ public bool HasDelegate { get { throw null; } }
+ public System.Threading.Tasks.Task InvokeAsync(object arg) { throw null; }
}
public sealed partial class EventCallbackFactory
{
@@ -153,6 +169,7 @@ public static partial class EventCallbackFactoryBinderExtensions
public static Microsoft.AspNetCore.Components.EventCallback CreateBinder(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action setter, System.DateTime existingValue, string format, System.Globalization.CultureInfo culture = null) { throw null; }
public static Microsoft.AspNetCore.Components.EventCallback CreateBinder(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action setter, decimal existingValue, System.Globalization.CultureInfo culture = null) { throw null; }
public static Microsoft.AspNetCore.Components.EventCallback CreateBinder(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action setter, double existingValue, System.Globalization.CultureInfo culture = null) { throw null; }
+ public static Microsoft.AspNetCore.Components.EventCallback CreateBinder(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action setter, short existingValue, System.Globalization.CultureInfo culture = null) { throw null; }
public static Microsoft.AspNetCore.Components.EventCallback CreateBinder(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action setter, int existingValue, System.Globalization.CultureInfo culture = null) { throw null; }
public static Microsoft.AspNetCore.Components.EventCallback CreateBinder(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action setter, long existingValue, System.Globalization.CultureInfo culture = null) { throw null; }
public static Microsoft.AspNetCore.Components.EventCallback CreateBinder(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action setter, bool? existingValue, System.Globalization.CultureInfo culture = null) { throw null; }
@@ -162,6 +179,7 @@ public static partial class EventCallbackFactoryBinderExtensions
public static Microsoft.AspNetCore.Components.EventCallback CreateBinder(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action setter, System.DateTime? existingValue, string format, System.Globalization.CultureInfo culture = null) { throw null; }
public static Microsoft.AspNetCore.Components.EventCallback CreateBinder(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action setter, decimal? existingValue, System.Globalization.CultureInfo culture = null) { throw null; }
public static Microsoft.AspNetCore.Components.EventCallback CreateBinder(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action setter, double? existingValue, System.Globalization.CultureInfo culture = null) { throw null; }
+ public static Microsoft.AspNetCore.Components.EventCallback CreateBinder(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action setter, short? existingValue, System.Globalization.CultureInfo culture = null) { throw null; }
public static Microsoft.AspNetCore.Components.EventCallback CreateBinder(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action setter, int? existingValue, System.Globalization.CultureInfo culture = null) { throw null; }
public static Microsoft.AspNetCore.Components.EventCallback CreateBinder(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action setter, long? existingValue, System.Globalization.CultureInfo culture = null) { throw null; }
public static Microsoft.AspNetCore.Components.EventCallback CreateBinder(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action setter, float? existingValue, System.Globalization.CultureInfo culture = null) { throw null; }
@@ -180,19 +198,30 @@ public static partial class EventCallbackFactoryEventArgsExtensions
public readonly partial struct EventCallbackWorkItem
{
private readonly object _dummy;
+ private readonly int _dummyPrimitive;
public static readonly Microsoft.AspNetCore.Components.EventCallbackWorkItem Empty;
public EventCallbackWorkItem(System.MulticastDelegate @delegate) { throw null; }
public System.Threading.Tasks.Task InvokeAsync(object arg) { throw null; }
}
+ [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)]
+ public readonly partial struct EventCallback
+ {
+ private readonly object _dummy;
+ private readonly int _dummyPrimitive;
+ public static readonly Microsoft.AspNetCore.Components.EventCallback Empty;
+ public EventCallback(Microsoft.AspNetCore.Components.IHandleEvent receiver, System.MulticastDelegate @delegate) { throw null; }
+ public bool HasDelegate { get { throw null; } }
+ public System.Threading.Tasks.Task InvokeAsync(TValue arg) { throw null; }
+ }
[System.AttributeUsageAttribute(System.AttributeTargets.Class, AllowMultiple=true, Inherited=true)]
public sealed partial class EventHandlerAttribute : System.Attribute
{
public EventHandlerAttribute(string attributeName, System.Type eventArgsType) { }
public EventHandlerAttribute(string attributeName, System.Type eventArgsType, bool enableStopPropagation, bool enablePreventDefault) { }
- public string AttributeName { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } }
- public bool EnablePreventDefault { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } }
- public bool EnableStopPropagation { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } }
- public System.Type EventArgsType { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } }
+ public string AttributeName { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } }
+ public bool EnablePreventDefault { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } }
+ public bool EnableStopPropagation { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } }
+ public System.Type EventArgsType { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } }
}
public partial interface IComponent
{
@@ -216,21 +245,21 @@ public InjectAttribute() { }
public sealed partial class LayoutAttribute : System.Attribute
{
public LayoutAttribute(System.Type layoutType) { }
- public System.Type LayoutType { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } }
+ public System.Type LayoutType { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } }
}
public abstract partial class LayoutComponentBase : Microsoft.AspNetCore.Components.ComponentBase
{
protected LayoutComponentBase() { }
[Microsoft.AspNetCore.Components.ParameterAttribute]
- public Microsoft.AspNetCore.Components.RenderFragment Body { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
+ public Microsoft.AspNetCore.Components.RenderFragment Body { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } }
}
public partial class LayoutView : Microsoft.AspNetCore.Components.IComponent
{
public LayoutView() { }
[Microsoft.AspNetCore.Components.ParameterAttribute]
- public Microsoft.AspNetCore.Components.RenderFragment ChildContent { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
+ public Microsoft.AspNetCore.Components.RenderFragment ChildContent { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } }
[Microsoft.AspNetCore.Components.ParameterAttribute]
- public System.Type Layout { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
+ public System.Type Layout { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } }
public void Attach(Microsoft.AspNetCore.Components.RenderHandle renderHandle) { }
public System.Threading.Tasks.Task SetParametersAsync(Microsoft.AspNetCore.Components.ParameterView parameters) { throw null; }
}
@@ -242,15 +271,16 @@ public LocationChangeException(string message, System.Exception innerException)
public readonly partial struct MarkupString
{
private readonly object _dummy;
+ private readonly int _dummyPrimitive;
public MarkupString(string value) { throw null; }
- public string Value { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } }
+ public string Value { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } }
public static explicit operator Microsoft.AspNetCore.Components.MarkupString (string value) { throw null; }
public override string ToString() { throw null; }
}
public partial class NavigationException : System.Exception
{
public NavigationException(string uri) { }
- public string Location { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } }
+ public string Location { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } }
}
public abstract partial class NavigationManager
{
@@ -269,7 +299,7 @@ protected void NotifyLocationChanged(bool isInterceptedLink) { }
public abstract partial class OwningComponentBase : Microsoft.AspNetCore.Components.ComponentBase, System.IDisposable
{
protected OwningComponentBase() { }
- protected bool IsDisposed { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } }
+ protected bool IsDisposed { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } }
protected System.IServiceProvider ScopedServices { get { throw null; } }
protected virtual void Dispose(bool disposing) { }
void System.IDisposable.Dispose() { }
@@ -283,16 +313,16 @@ protected OwningComponentBase() { }
public sealed partial class ParameterAttribute : System.Attribute
{
public ParameterAttribute() { }
- public bool CaptureUnmatchedValues { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
+ public bool CaptureUnmatchedValues { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } }
}
[System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)]
public readonly partial struct ParameterValue
{
private readonly object _dummy;
private readonly int _dummyPrimitive;
- public bool Cascading { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } }
- public string Name { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } }
- public object Value { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } }
+ public bool Cascading { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } }
+ public string Name { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } }
+ public object Value { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } }
}
[System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)]
public readonly partial struct ParameterView
@@ -331,21 +361,21 @@ public void Render(Microsoft.AspNetCore.Components.RenderFragment renderFragment
public sealed partial class RouteAttribute : System.Attribute
{
public RouteAttribute(string template) { }
- public string Template { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } }
+ public string Template { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } }
}
public sealed partial class RouteData
{
public RouteData(System.Type pageType, System.Collections.Generic.IReadOnlyDictionary routeValues) { }
- public System.Type PageType { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } }
- public System.Collections.Generic.IReadOnlyDictionary RouteValues { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } }
+ public System.Type PageType { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } }
+ public System.Collections.Generic.IReadOnlyDictionary RouteValues { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } }
}
public partial class RouteView : Microsoft.AspNetCore.Components.IComponent
{
public RouteView() { }
[Microsoft.AspNetCore.Components.ParameterAttribute]
- public System.Type DefaultLayout { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
+ public System.Type DefaultLayout { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } }
[Microsoft.AspNetCore.Components.ParameterAttribute]
- public Microsoft.AspNetCore.Components.RouteData RouteData { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
+ public Microsoft.AspNetCore.Components.RouteData RouteData { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } }
public void Attach(Microsoft.AspNetCore.Components.RenderHandle renderHandle) { }
protected virtual void Render(Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder builder) { }
public System.Threading.Tasks.Task SetParametersAsync(Microsoft.AspNetCore.Components.ParameterView parameters) { throw null; }
@@ -420,17 +450,18 @@ public readonly partial struct ArrayRange
public partial class EventFieldInfo
{
public EventFieldInfo() { }
- public int ComponentId { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
- public object FieldValue { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
+ public int ComponentId { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } }
+ public object FieldValue { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } }
}
[System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)]
public readonly partial struct RenderBatch
{
private readonly object _dummy;
- public Microsoft.AspNetCore.Components.RenderTree.ArrayRange DisposedComponentIDs { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } }
- public Microsoft.AspNetCore.Components.RenderTree.ArrayRange DisposedEventHandlerIDs { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } }
- public Microsoft.AspNetCore.Components.RenderTree.ArrayRange ReferenceFrames { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } }
- public Microsoft.AspNetCore.Components.RenderTree.ArrayRange UpdatedComponents { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } }
+ private readonly int _dummyPrimitive;
+ public Microsoft.AspNetCore.Components.RenderTree.ArrayRange DisposedComponentIDs { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } }
+ public Microsoft.AspNetCore.Components.RenderTree.ArrayRange DisposedEventHandlerIDs { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } }
+ public Microsoft.AspNetCore.Components.RenderTree.ArrayRange ReferenceFrames { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } }
+ public Microsoft.AspNetCore.Components.RenderTree.ArrayRange UpdatedComponents { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } }
}
public abstract partial class Renderer : System.IDisposable
{
@@ -509,20 +540,20 @@ public partial interface INavigationInterception
public partial class LocationChangedEventArgs : System.EventArgs
{
public LocationChangedEventArgs(string location, bool isNavigationIntercepted) { }
- public bool IsNavigationIntercepted { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } }
- public string Location { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } }
+ public bool IsNavigationIntercepted { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } }
+ public string Location { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } }
}
public partial class Router : Microsoft.AspNetCore.Components.IComponent, Microsoft.AspNetCore.Components.IHandleAfterRender, System.IDisposable
{
public Router() { }
[Microsoft.AspNetCore.Components.ParameterAttribute]
- public System.Collections.Generic.IEnumerable AdditionalAssemblies { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
+ public System.Collections.Generic.IEnumerable AdditionalAssemblies { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } }
[Microsoft.AspNetCore.Components.ParameterAttribute]
- public System.Reflection.Assembly AppAssembly { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
+ public System.Reflection.Assembly AppAssembly { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } }
[Microsoft.AspNetCore.Components.ParameterAttribute]
- public Microsoft.AspNetCore.Components.RenderFragment Found { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
+ public Microsoft.AspNetCore.Components.RenderFragment Found { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } }
[Microsoft.AspNetCore.Components.ParameterAttribute]
- public Microsoft.AspNetCore.Components.RenderFragment NotFound { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
+ public Microsoft.AspNetCore.Components.RenderFragment NotFound { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } }
public void Attach(Microsoft.AspNetCore.Components.RenderHandle renderHandle) { }
public void Dispose() { }
System.Threading.Tasks.Task Microsoft.AspNetCore.Components.IHandleAfterRender.OnAfterRenderAsync() { throw null; }
diff --git a/src/Components/Components/src/BindConverter.cs b/src/Components/Components/src/BindConverter.cs
index f77689bde2bf..0aadb8077eb9 100644
--- a/src/Components/Components/src/BindConverter.cs
+++ b/src/Components/Components/src/BindConverter.cs
@@ -15,7 +15,7 @@ namespace Microsoft.AspNetCore.Components
//
// Perf: our conversion routines present a regular API surface that allows us to specialize on types to avoid boxing.
// for instance, many of these types could be cast to IFormattable to do the appropriate formatting, but that's going
- // to allocate.
+ // to allocate.
public static class BindConverter
{
private static object BoxedTrue = true;
@@ -158,6 +158,41 @@ private static string FormatNullableLongValueCore(long? value, CultureInfo cultu
return value.Value.ToString(culture ?? CultureInfo.CurrentCulture);
}
+ ///
+ /// Formats the provided for inclusion in an attribute.
+ ///
+ /// The value to format.
+ ///
+ /// The to use while formatting. Defaults to .
+ ///
+ /// The formatted value.
+ public static string FormatValue(short value, CultureInfo culture = null) => FormatShortValueCore(value, culture);
+
+ private static string FormatShortValueCore(short value, CultureInfo culture)
+ {
+ return value.ToString(culture ?? CultureInfo.CurrentCulture);
+ }
+
+ ///
+ /// Formats the provided for inclusion in an attribute.
+ ///
+ /// The value to format.
+ ///
+ /// The to use while formatting. Defaults to .
+ ///
+ /// The formatted value.
+ public static string FormatValue(short? value, CultureInfo culture = null) => FormatNullableShortValueCore(value, culture);
+
+ private static string FormatNullableShortValueCore(short? value, CultureInfo culture)
+ {
+ if (value == null)
+ {
+ return null;
+ }
+
+ return value.Value.ToString(culture ?? CultureInfo.CurrentCulture);
+ }
+
///
/// Formats the provided for inclusion in an attribute.
///
@@ -430,7 +465,7 @@ private static string FormatNullableDateTimeOffsetValueCore(DateTimeOffset? valu
private static string FormatEnumValueCore(T value, CultureInfo culture) where T : struct, Enum
{
- return value.ToString(); // The overload that acccepts a culture is [Obsolete]
+ return value.ToString(); // The overload that accepts a culture is [Obsolete]
}
private static string FormatNullableEnumValueCore(T? value, CultureInfo culture) where T : struct, Enum
@@ -440,7 +475,7 @@ private static string FormatNullableEnumValueCore(T? value, CultureInfo cultu
return null;
}
- return value.Value.ToString(); // The overload that acccepts a culture is [Obsolete]
+ return value.Value.ToString(); // The overload that accepts a culture is [Obsolete]
}
///
@@ -649,6 +684,71 @@ private static bool ConvertToNullableLongCore(object obj, CultureInfo culture, o
return true;
}
+ ///
+ /// Attempts to convert a value to a .
+ ///
+ /// The object to convert.
+ /// The to use for conversion.
+ /// The converted value.
+ /// true if conversion is successful, otherwise false .
+ public static bool TryConvertToShort(object obj, CultureInfo culture, out short value)
+ {
+ return ConvertToShortCore(obj, culture, out value);
+ }
+
+ ///
+ /// Attempts to convert a value to a nullable .
+ ///
+ /// The object to convert.
+ /// The to use for conversion.
+ /// The converted value.
+ /// true if conversion is successful, otherwise false .
+ public static bool TryConvertToNullableShort(object obj, CultureInfo culture, out short? value)
+ {
+ return ConvertToNullableShort(obj, culture, out value);
+ }
+
+ internal static BindParser ConvertToShort = ConvertToShortCore;
+ internal static BindParser ConvertToNullableShort = ConvertToNullableShortCore;
+
+ private static bool ConvertToShortCore(object obj, CultureInfo culture, out short value)
+ {
+ var text = (string)obj;
+ if (string.IsNullOrEmpty(text))
+ {
+ value = default;
+ return false;
+ }
+
+ if (!short.TryParse(text, NumberStyles.Number, culture ?? CultureInfo.CurrentCulture, out var converted))
+ {
+ value = default;
+ return false;
+ }
+
+ value = converted;
+ return true;
+ }
+
+ private static bool ConvertToNullableShortCore(object obj, CultureInfo culture, out short? value)
+ {
+ var text = (string)obj;
+ if (string.IsNullOrEmpty(text))
+ {
+ value = default;
+ return true;
+ }
+
+ if (!short.TryParse(text, NumberStyles.Number, culture ?? CultureInfo.CurrentCulture, out var converted))
+ {
+ value = default;
+ return false;
+ }
+
+ value = converted;
+ return true;
+ }
+
///
/// Attempts to convert a value to a .
///
@@ -1166,99 +1266,107 @@ private static class FormatterDelegateCache
public static BindFormatter Get()
{
- if (!_cache.TryGetValue(typeof(T), out var formattter))
+ if (!_cache.TryGetValue(typeof(T), out var formatter))
{
// We need to replicate all of the primitive cases that we handle here so that they will behave the same way.
// The result will be cached.
if (typeof(T) == typeof(string))
{
- formattter = (BindFormatter)FormatStringValueCore;
+ formatter = (BindFormatter)FormatStringValueCore;
}
else if (typeof(T) == typeof(bool))
{
- formattter = (BindFormatter)FormatBoolValueCore;
+ formatter = (BindFormatter)FormatBoolValueCore;
}
else if (typeof(T) == typeof(bool?))
{
- formattter = (BindFormatter)FormatNullableBoolValueCore;
+ formatter = (BindFormatter)FormatNullableBoolValueCore;
}
else if (typeof(T) == typeof(int))
{
- formattter = (BindFormatter)FormatIntValueCore;
+ formatter = (BindFormatter)FormatIntValueCore;
}
else if (typeof(T) == typeof(int?))
{
- formattter = (BindFormatter)FormatNullableIntValueCore;
+ formatter = (BindFormatter)FormatNullableIntValueCore;
}
else if (typeof(T) == typeof(long))
{
- formattter = (BindFormatter)FormatLongValueCore;
+ formatter = (BindFormatter)FormatLongValueCore;
}
else if (typeof(T) == typeof(long?))
{
- formattter = (BindFormatter)FormatNullableLongValueCore;
+ formatter = (BindFormatter)FormatNullableLongValueCore;
+ }
+ else if (typeof(T) == typeof(short))
+ {
+ formatter = (BindFormatter)FormatShortValueCore;
+ }
+ else if (typeof(T) == typeof(short?))
+ {
+ formatter = (BindFormatter)FormatNullableShortValueCore;
}
else if (typeof(T) == typeof(float))
{
- formattter = (BindFormatter)FormatFloatValueCore;
+ formatter = (BindFormatter)FormatFloatValueCore;
}
else if (typeof(T) == typeof(float?))
{
- formattter = (BindFormatter)FormatNullableFloatValueCore;
+ formatter = (BindFormatter)FormatNullableFloatValueCore;
}
else if (typeof(T) == typeof(double))
{
- formattter = (BindFormatter)FormatDoubleValueCore;
+ formatter = (BindFormatter)FormatDoubleValueCore;
}
else if (typeof(T) == typeof(double?))
{
- formattter = (BindFormatter)FormatNullableDoubleValueCore;
+ formatter = (BindFormatter)FormatNullableDoubleValueCore;
}
else if (typeof(T) == typeof(decimal))
{
- formattter = (BindFormatter)FormatDecimalValueCore;
+ formatter = (BindFormatter)FormatDecimalValueCore;
}
else if (typeof(T) == typeof(decimal?))
{
- formattter = (BindFormatter)FormatNullableDecimalValueCore;
+ formatter = (BindFormatter)FormatNullableDecimalValueCore;
}
else if (typeof(T) == typeof(DateTime))
{
- formattter = (BindFormatter)FormatDateTimeValueCore;
+ formatter = (BindFormatter)FormatDateTimeValueCore;
}
else if (typeof(T) == typeof(DateTime?))
{
- formattter = (BindFormatter)FormatNullableDateTimeValueCore;
+ formatter = (BindFormatter)FormatNullableDateTimeValueCore;
}
else if (typeof(T) == typeof(DateTimeOffset))
{
- formattter = (BindFormatter)FormatDateTimeOffsetValueCore;
+ formatter = (BindFormatter)FormatDateTimeOffsetValueCore;
}
else if (typeof(T) == typeof(DateTimeOffset?))
{
- formattter = (BindFormatter)FormatNullableDateTimeOffsetValueCore;
+ formatter = (BindFormatter)FormatNullableDateTimeOffsetValueCore;
}
else if (typeof(T).IsEnum)
{
// We have to deal invoke this dynamically to work around the type constraint on Enum.TryParse.
var method = _formatEnumValue ??= typeof(BindConverter).GetMethod(nameof(FormatEnumValueCore), BindingFlags.NonPublic | BindingFlags.Static);
- formattter = method.MakeGenericMethod(typeof(T)).CreateDelegate(typeof(BindFormatter), target: null);
+ formatter = method.MakeGenericMethod(typeof(T)).CreateDelegate(typeof(BindFormatter), target: null);
}
else if (Nullable.GetUnderlyingType(typeof(T)) is Type innerType && innerType.IsEnum)
{
// We have to deal invoke this dynamically to work around the type constraint on Enum.TryParse.
var method = _formatNullableEnumValue ??= typeof(BindConverter).GetMethod(nameof(FormatNullableEnumValueCore), BindingFlags.NonPublic | BindingFlags.Static);
- formattter = method.MakeGenericMethod(innerType).CreateDelegate(typeof(BindFormatter), target: null);
+ formatter = method.MakeGenericMethod(innerType).CreateDelegate(typeof(BindFormatter), target: null);
}
else
{
- formattter = MakeTypeConverterFormatter();
+ formatter = MakeTypeConverterFormatter();
}
- _cache.TryAdd(typeof(T), formattter);
+ _cache.TryAdd(typeof(T), formatter);
}
- return (BindFormatter)formattter;
+ return (BindFormatter)formatter;
}
private static BindFormatter MakeTypeConverterFormatter()
@@ -1323,6 +1431,14 @@ public static BindParser Get()
{
parser = ConvertToNullableLong;
}
+ else if (typeof(T) == typeof(short))
+ {
+ parser = ConvertToShort;
+ }
+ else if (typeof(T) == typeof(short?))
+ {
+ parser = ConvertToNullableShort;
+ }
else if (typeof(T) == typeof(float))
{
parser = ConvertToFloat;
diff --git a/src/Components/Components/src/BindElementAttribute.cs b/src/Components/Components/src/BindElementAttribute.cs
index ffc17a6049ee..4907b3e27e35 100644
--- a/src/Components/Components/src/BindElementAttribute.cs
+++ b/src/Components/Components/src/BindElementAttribute.cs
@@ -1,4 +1,4 @@
-// Copyright (c) .NET Foundation. All rights reserved.
+// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
@@ -15,7 +15,7 @@ public sealed class BindElementAttribute : Attribute
/// Constructs an instance of .
///
/// The tag name of the element.
- /// The suffix value. For example, set this to value
for bind-value
, or set this to null
for bind
.
+ /// The suffix value. For example, set this to value for bind-value , or set this to for bind .
/// The name of the value attribute to be bound.
/// The name of an attribute that will register an associated change event.
public BindElementAttribute(string element, string suffix, string valueAttribute, string changeAttribute)
@@ -47,7 +47,7 @@ public BindElementAttribute(string element, string suffix, string valueAttribute
///
/// Gets the suffix value.
- /// For example, this will be value
to mean bind-value
, or null
to mean bind
.
+ /// For example, this will be value to mean bind-value , or to mean bind .
///
public string Suffix { get; }
diff --git a/src/Components/Components/src/CascadingValue.cs b/src/Components/Components/src/CascadingValue.cs
index db03b3d4161f..605d24134d28 100644
--- a/src/Components/Components/src/CascadingValue.cs
+++ b/src/Components/Components/src/CascadingValue.cs
@@ -105,7 +105,7 @@ public Task SetParametersAsync(ParameterView parameters)
_hasSetParametersPreviously = true;
- // It's OK for the value to be null, but some "Value" param must be suppled
+ // It's OK for the value to be null, but some "Value" param must be supplied
// because it serves no useful purpose to have a otherwise.
if (!hasSuppliedValue)
{
diff --git a/src/Components/Components/src/ComponentBase.cs b/src/Components/Components/src/ComponentBase.cs
index 51c95f386b1f..d4b38db34599 100644
--- a/src/Components/Components/src/ComponentBase.cs
+++ b/src/Components/Components/src/ComponentBase.cs
@@ -17,7 +17,7 @@ namespace Microsoft.AspNetCore.Components
// about IComponent). This gives us flexibility to change the lifecycle concepts easily,
// or for developers to design their own lifecycles as different base classes.
- // TODO: When the component lifecycle design stabilises, add proper unit tests for ComponentBase.
+ // TODO: When the component lifecycle design stabilizes, add proper unit tests for ComponentBase.
///
/// Optional base class for components. Alternatively, components may
@@ -136,7 +136,7 @@ protected virtual bool ShouldRender()
///
///
/// The and lifecycle methods
- /// are useful for performing interop, or interacting with values recieved from @ref .
+ /// are useful for performing interop, or interacting with values received from @ref .
/// Use the parameter to ensure that initialization work is only performed
/// once.
///
@@ -156,7 +156,7 @@ protected virtual void OnAfterRender(bool firstRender)
/// A representing any asynchronous operation.
///
/// The and lifecycle methods
- /// are useful for performing interop, or interacting with values recieved from @ref .
+ /// are useful for performing interop, or interacting with values received from @ref .
/// Use the parameter to ensure that initialization work is only performed
/// once.
///
@@ -246,7 +246,7 @@ private async Task RunInitAndSetParametersAsync()
}
catch // avoiding exception filters for AOT runtime support
{
- // Ignore exceptions from task cancelletions.
+ // Ignore exceptions from task cancellations.
// Awaiting a canceled task may produce either an OperationCanceledException (if produced as a consequence of
// CancellationToken.ThrowIfCancellationRequested()) or a TaskCanceledException (produced as a consequence of awaiting Task.FromCanceled).
// It's much easier to check the state of the Task (i.e. Task.IsCanceled) rather than catch two distinct exceptions.
@@ -289,7 +289,7 @@ private async Task CallStateHasChangedOnAsyncCompletion(Task task)
}
catch // avoiding exception filters for AOT runtime support
{
- // Ignore exceptions from task cancelletions, but don't bother issuing a state change.
+ // Ignore exceptions from task cancellations, but don't bother issuing a state change.
if (task.IsCanceled)
{
return;
diff --git a/src/Components/Components/src/EventCallbackFactoryBinderExtensions.cs b/src/Components/Components/src/EventCallbackFactoryBinderExtensions.cs
index 99eac1965a06..0305c1b469ea 100644
--- a/src/Components/Components/src/EventCallbackFactoryBinderExtensions.cs
+++ b/src/Components/Components/src/EventCallbackFactoryBinderExtensions.cs
@@ -12,9 +12,9 @@ namespace Microsoft.AspNetCore.Components
///
//
// NOTE: for number parsing, the HTML5 spec dictates that the DOM will represent
- // number values as floating point numbers using `.` as the period separator. This is NOT culture senstive.
+ // number values as floating point numbers using `.` as the period separator. This is NOT culture sensitive.
// Put another way, the user might see `,` as their decimal separator, but the value available in events
- // to JS code is always simpilar to what .NET parses with InvariantCulture.
+ // to JS code is always similar to what .NET parses with InvariantCulture.
//
// See: https://www.w3.org/TR/html5/sec-forms.html#number-state-typenumber
// See: https://www.w3.org/TR/html5/infrastructure.html#valid-floating-point-number
@@ -136,6 +136,25 @@ public static EventCallback CreateBinder(
return CreateBinderCore(factory, receiver, setter, culture, ConvertToLong);
}
+ ///
+ /// For internal use only.
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ public static EventCallback CreateBinder(
+ this EventCallbackFactory factory,
+ object receiver,
+ Action setter,
+ short existingValue,
+ CultureInfo culture = null)
+ {
+ return CreateBinderCore(factory, receiver, setter, culture, ConvertToShort);
+ }
+
///
/// For internal use only.
///
@@ -155,6 +174,25 @@ public static EventCallback CreateBinder(
return CreateBinderCore(factory, receiver, setter, culture, ConvertToNullableLong);
}
+ ///
+ /// For internal use only.
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ public static EventCallback CreateBinder(
+ this EventCallbackFactory factory,
+ object receiver,
+ Action setter,
+ short? existingValue,
+ CultureInfo culture = null)
+ {
+ return CreateBinderCore(factory, receiver, setter, culture, ConvertToNullableShort);
+ }
+
///
/// For internal use only.
///
diff --git a/src/Components/Components/src/Microsoft.AspNetCore.Components.csproj b/src/Components/Components/src/Microsoft.AspNetCore.Components.csproj
index 6bc25e8d43aa..fefadced4988 100644
--- a/src/Components/Components/src/Microsoft.AspNetCore.Components.csproj
+++ b/src/Components/Components/src/Microsoft.AspNetCore.Components.csproj
@@ -15,7 +15,8 @@
-
+
+
@@ -33,12 +34,16 @@
+ Projects="
+ ../../Analyzers/src/Microsoft.AspNetCore.Components.Analyzers.csproj;
+ ../../../JSInterop/Microsoft.JSInterop/src/Microsoft.JSInterop.csproj;
+ ../../../Security/Authorization/Core/src/Microsoft.AspNetCore.Authorization.csproj">
+
@@ -50,7 +55,6 @@
-
diff --git a/src/Components/Components/src/Microsoft.AspNetCore.Components.multitarget.nuspec b/src/Components/Components/src/Microsoft.AspNetCore.Components.multitarget.nuspec
index 700ea95fa92c..7017ce828ea7 100644
--- a/src/Components/Components/src/Microsoft.AspNetCore.Components.multitarget.nuspec
+++ b/src/Components/Components/src/Microsoft.AspNetCore.Components.multitarget.nuspec
@@ -9,7 +9,7 @@
-
+
diff --git a/src/Components/Components/src/Microsoft.AspNetCore.Components.netcoreapp.nuspec b/src/Components/Components/src/Microsoft.AspNetCore.Components.netcoreapp.nuspec
index 8561bc2f2f14..9ea33e53dc8e 100644
--- a/src/Components/Components/src/Microsoft.AspNetCore.Components.netcoreapp.nuspec
+++ b/src/Components/Components/src/Microsoft.AspNetCore.Components.netcoreapp.nuspec
@@ -3,7 +3,7 @@
$CommonMetadataElements$
-
+
diff --git a/src/Components/Components/src/NavigationManager.cs b/src/Components/Components/src/NavigationManager.cs
index d75077026f06..0ad565fb54c0 100644
--- a/src/Components/Components/src/NavigationManager.cs
+++ b/src/Components/Components/src/NavigationManager.cs
@@ -7,7 +7,7 @@
namespace Microsoft.AspNetCore.Components
{
///
- /// Provides an abstraction for querying and mananging URI navigation.
+ /// Provides an abstraction for querying and managing URI navigation.
///
public abstract class NavigationManager
{
@@ -134,7 +134,7 @@ protected void Initialize(string baseUri, string uri)
}
///
- /// Allows derived classes to lazyly self-initialize. Implementations that support lazy-initialization should override
+ /// Allows derived classes to lazily self-initialize. Implementations that support lazy-initialization should override
/// this method and call .
///
protected virtual void EnsureInitialized()
diff --git a/src/Components/Components/src/RenderTree/RenderTreeFrameType.cs b/src/Components/Components/src/RenderTree/RenderTreeFrameType.cs
index e73119e03800..1e6249c8d779 100644
--- a/src/Components/Components/src/RenderTree/RenderTreeFrameType.cs
+++ b/src/Components/Components/src/RenderTree/RenderTreeFrameType.cs
@@ -16,7 +16,7 @@ namespace Microsoft.AspNetCore.Components.RenderTree
public enum RenderTreeFrameType: short
{
///
- /// Used only for unintialized frames.
+ /// Used only for uninitialized frames.
///
None = 0,
diff --git a/src/Components/Components/src/RenderTree/Renderer.cs b/src/Components/Components/src/RenderTree/Renderer.cs
index 05cfb41abe24..09470cebda2c 100644
--- a/src/Components/Components/src/RenderTree/Renderer.cs
+++ b/src/Components/Components/src/RenderTree/Renderer.cs
@@ -142,7 +142,7 @@ protected async Task RenderRootComponentAsync(int componentId, ParameterView ini
// remaining work.
// During the synchronous rendering process we don't wait for the pending asynchronous
// work to finish as it will simply trigger new renders that will be handled afterwards.
- // During the asynchronous rendering process we want to wait up untill al components have
+ // During the asynchronous rendering process we want to wait up until all components have
// finished rendering so that we can produce the complete output.
var componentState = GetRequiredComponentState(componentId);
componentState.SetDirectParameters(initialParameters);
@@ -388,7 +388,7 @@ private ComponentState GetOptionalComponentState(int componentId)
: null;
///
- /// Processses pending renders requests from components if there are any.
+ /// Processes pending renders requests from components if there are any.
///
protected virtual void ProcessPendingRender()
{
diff --git a/src/Components/Components/src/Rendering/RenderTreeBuilder.cs b/src/Components/Components/src/Rendering/RenderTreeBuilder.cs
index f8a28273e4d3..3cc4aed9bf12 100644
--- a/src/Components/Components/src/Rendering/RenderTreeBuilder.cs
+++ b/src/Components/Components/src/Rendering/RenderTreeBuilder.cs
@@ -12,7 +12,7 @@ namespace Microsoft.AspNetCore.Components.Rendering
// IMPORTANT
//
// Many of these names are used in code generation. Keep these in sync with the code generation code
- // See: aspnet/AspNetCore-Tooling
+ // See: dotnet/aspnetcore-tooling
///
/// Provides methods for building a collection of entries.
@@ -242,7 +242,7 @@ public void AddAttribute(int sequence, string name, EventCallback value)
AssertCanAddAttribute();
if (_lastNonAttributeFrameType == RenderTreeFrameType.Component)
{
- // Since this is a component, we need to preserve the type of the EventCallabck, so we have
+ // Since this is a component, we need to preserve the type of the EventCallback, so we have
// to box.
Append(RenderTreeFrame.Attribute(sequence, name, (object)value));
}
diff --git a/src/Components/Components/src/Rendering/RendererSynchronizationContext.cs b/src/Components/Components/src/Rendering/RendererSynchronizationContext.cs
index 176e4d83e456..d25d50b6de3a 100644
--- a/src/Components/Components/src/Rendering/RendererSynchronizationContext.cs
+++ b/src/Components/Components/src/Rendering/RendererSynchronizationContext.cs
@@ -147,20 +147,20 @@ public override void Post(SendOrPostCallback d, object state)
// synchronously runs the callback
public override void Send(SendOrPostCallback d, object state)
{
- Task antecedant;
+ Task antecedent;
var completion = new TaskCompletionSource();
lock (_state.Lock)
{
- antecedant = _state.Task;
+ antecedent = _state.Task;
_state.Task = completion.Task;
}
// We have to block. That's the contract of Send - we don't expect this to be used
// in many scenarios in Components.
//
- // Using Wait here is ok because the antecedant task will never throw.
- antecedant.Wait();
+ // Using Wait here is ok because the antecedent task will never throw.
+ antecedent.Wait();
ExecuteSynchronously(completion, d, state);
}
@@ -195,7 +195,7 @@ private void ExecuteSynchronouslyIfPossible(SendOrPostCallback d, object state)
ExecuteSynchronously(completion, d, state);
}
- private Task Enqueue(Task antecedant, SendOrPostCallback d, object state, bool forceAsync = false)
+ private Task Enqueue(Task antecedent, SendOrPostCallback d, object state, bool forceAsync = false)
{
// If we get here is means that a callback is being explicitly queued. Let's instead add it to the queue and yield.
//
@@ -212,7 +212,7 @@ private Task Enqueue(Task antecedant, SendOrPostCallback d, object state, bool f
}
var flags = forceAsync ? TaskContinuationOptions.RunContinuationsAsynchronously : TaskContinuationOptions.None;
- return antecedant.ContinueWith(BackgroundWorkThunk, new WorkItem()
+ return antecedent.ContinueWith(BackgroundWorkThunk, new WorkItem()
{
SynchronizationContext = this,
ExecutionContext = executionContext,
diff --git a/src/Components/Components/test/CascadingParameterTest.cs b/src/Components/Components/test/CascadingParameterTest.cs
index a9066647414b..522d027d6abe 100644
--- a/src/Components/Components/test/CascadingParameterTest.cs
+++ b/src/Components/Components/test/CascadingParameterTest.cs
@@ -222,7 +222,7 @@ public void StopsNotifyingDescendantsIfTheyAreRemoved()
// Act/Assert 2: Re-render the CascadingValue; observe nested component wasn't re-rendered
providedValue = "Updated value";
- displayNestedComponent = false; // Remove the nested componet
+ displayNestedComponent = false; // Remove the nested component
component.TriggerRender();
// Assert: We did not render the nested component now it's been removed
diff --git a/src/Components/Components/test/ParameterViewTest.Assignment.cs b/src/Components/Components/test/ParameterViewTest.Assignment.cs
index 9df9feab9ff6..7dd8537f4c51 100644
--- a/src/Components/Components/test/ParameterViewTest.Assignment.cs
+++ b/src/Components/Components/test/ParameterViewTest.Assignment.cs
@@ -73,7 +73,7 @@ public void IncomingParameterMatchesInheritedDeclaredParameter_SetsValue()
[Fact]
public void IncomingParameterMatchesOverridenParameter_ThatDoesNotHasAttribute()
{
- // Test for https://github.com/aspnet/AspNetCore/issues/13162
+ // Test for https://github.com/dotnet/aspnetcore/issues/13162
// Arrange
var parameters = new ParameterViewBuilder
{
@@ -366,7 +366,7 @@ public void SettingCaptureUnmatchedValuesParameterExplicitlyAndImplicitly_Revers
public void HasDuplicateCaptureUnmatchedValuesParameters_Throws()
{
// Arrange
- var target = new HasDupliateCaptureUnmatchedValuesProperty();
+ var target = new HasDuplicateCaptureUnmatchedValuesProperty();
var parameters = new ParameterViewBuilder().Build();
// Act
@@ -374,17 +374,17 @@ public void HasDuplicateCaptureUnmatchedValuesParameters_Throws()
// Assert
Assert.Equal(
- $"Multiple properties were found on component type '{typeof(HasDupliateCaptureUnmatchedValuesProperty).FullName}' " +
+ $"Multiple properties were found on component type '{typeof(HasDuplicateCaptureUnmatchedValuesProperty).FullName}' " +
$"with '{nameof(ParameterAttribute)}.{nameof(ParameterAttribute.CaptureUnmatchedValues)}'. " +
$"Only a single property per type can use '{nameof(ParameterAttribute)}.{nameof(ParameterAttribute.CaptureUnmatchedValues)}'. " +
$"Properties:" + Environment.NewLine +
- $"{nameof(HasDupliateCaptureUnmatchedValuesProperty.CaptureUnmatchedValuesProp1)}" + Environment.NewLine +
- $"{nameof(HasDupliateCaptureUnmatchedValuesProperty.CaptureUnmatchedValuesProp2)}",
+ $"{nameof(HasDuplicateCaptureUnmatchedValuesProperty.CaptureUnmatchedValuesProp1)}" + Environment.NewLine +
+ $"{nameof(HasDuplicateCaptureUnmatchedValuesProperty.CaptureUnmatchedValuesProp2)}",
ex.Message);
}
[Fact]
- public void HasCaptureUnmatchedValuesParameteterWithWrongType_Throws()
+ public void HasCaptureUnmatchedValuesParameterWithWrongType_Throws()
{
// Arrange
var target = new HasWrongTypeCaptureUnmatchedValuesProperty();
@@ -630,7 +630,7 @@ class HasCaptureUnmatchedValuesPropertyAndCascadingParameter
[Parameter(CaptureUnmatchedValues = true)] public IReadOnlyDictionary CaptureUnmatchedValues { get; set; }
}
- class HasDupliateCaptureUnmatchedValuesProperty
+ class HasDuplicateCaptureUnmatchedValuesProperty
{
[Parameter(CaptureUnmatchedValues = true)] public Dictionary CaptureUnmatchedValuesProp1 { get; set; }
[Parameter(CaptureUnmatchedValues = true)] public IDictionary CaptureUnmatchedValuesProp2 { get; set; }
diff --git a/src/Components/Components/test/RenderTreeDiffBuilderTest.cs b/src/Components/Components/test/RenderTreeDiffBuilderTest.cs
index 28f617eba268..9f3ba7180988 100644
--- a/src/Components/Components/test/RenderTreeDiffBuilderTest.cs
+++ b/src/Components/Components/test/RenderTreeDiffBuilderTest.cs
@@ -442,7 +442,7 @@ public void HandlesDeletionOfUnkeyedItemsAroundKey()
[Fact]
public void HandlesKeyBeingAdded()
{
- // This is an anomolous situation that can't occur with .razor components.
+ // This is an anomalous situation that can't occur with .razor components.
// It represents the case where, for the same sequence number, we have an
// old frame without a key and a new frame with a key.
@@ -472,7 +472,7 @@ public void HandlesKeyBeingAdded()
[Fact]
public void HandlesKeyBeingRemoved()
{
- // This is an anomolous situation that can't occur with .razor components.
+ // This is an anomalous situation that can't occur with .razor components.
// It represents the case where, for the same sequence number, we have an
// old frame with a key and a new frame without a key.
diff --git a/src/Components/Components/test/RendererTest.cs b/src/Components/Components/test/RendererTest.cs
index d0e2affea238..77e0b06faa71 100644
--- a/src/Components/Components/test/RendererTest.cs
+++ b/src/Components/Components/test/RendererTest.cs
@@ -2575,7 +2575,7 @@ public void QueuedRenderIsSkippedIfComponentWasAlreadyDisposedInSameBatch()
[Fact]
public async Task CanCombineBindAndConditionalAttribute()
{
- // This test represents https://github.com/aspnet/Blazor/issues/624
+ // This test represents https://github.com/dotnet/blazor/issues/624
// Arrange: Rendered with textbox enabled
var renderer = new TestRenderer();
@@ -2811,7 +2811,7 @@ public void CanTriggerRenderingSynchronouslyFromInsideAfterRenderCallback()
}
[ConditionalFact]
- [SkipOnHelix("https://github.com/aspnet/AspNetCore/issues/7487")]
+ [SkipOnHelix("https://github.com/dotnet/aspnetcore/issues/7487")]
public async Task CanTriggerEventHandlerDisposedInEarlierPendingBatchAsync()
{
// This represents the scenario where the same event handler is being triggered
@@ -3574,7 +3574,7 @@ public void DisposingRenderer_CapturesExceptionsFromAllRegisteredComponents()
// Act &A Assert
renderer.Dispose();
- // All components must be disposed even if some throw as part of being diposed.
+ // All components must be disposed even if some throw as part of being disposed.
Assert.True(component.Disposed);
var aex = Assert.IsType(Assert.Single(renderer.HandledExceptions));
Assert.Contains(exception1, aex.InnerExceptions);
diff --git a/src/Components/Components/test/Rendering/RenderTreeBuilderTest.cs b/src/Components/Components/test/Rendering/RenderTreeBuilderTest.cs
index 31364dca008f..b4ad71cba2ad 100644
--- a/src/Components/Components/test/Rendering/RenderTreeBuilderTest.cs
+++ b/src/Components/Components/test/Rendering/RenderTreeBuilderTest.cs
@@ -301,7 +301,7 @@ public void CanAddMultipleAttributes_InterspersedWithOtherAttributes()
[Fact]
public void CanAddMultipleAttributes_WithChildRegion()
{
- // This represents bug https://github.com/aspnet/AspNetCore/issues/16570
+ // This represents bug https://github.com/dotnet/aspnetcore/issues/16570
// If a sequence of attributes is terminated by a call to builder.OpenRegion,
// then the attribute deduplication logic wasn't working correctly
diff --git a/src/Components/Components/test/Rendering/RendererSynchronizationContextTest.cs b/src/Components/Components/test/Rendering/RendererSynchronizationContextTest.cs
index 568d2501bbb8..c92a585bd623 100644
--- a/src/Components/Components/test/Rendering/RendererSynchronizationContextTest.cs
+++ b/src/Components/Components/test/Rendering/RendererSynchronizationContextTest.cs
@@ -40,7 +40,7 @@ public void Post_RunsAsynchronously_WhenNotBusy()
}
[Fact]
- public void Post_RunsAynchronously_WhenNotBusy_Exception()
+ public void Post_RunsAsynchronously_WhenNotBusy_Exception()
{
// Arrange
var context = new RendererSynchronizationContext();
diff --git a/src/Components/Components/test/Routing/RouteTableFactoryTests.cs b/src/Components/Components/test/Routing/RouteTableFactoryTests.cs
index 92bea90d7998..e596f2795678 100644
--- a/src/Components/Components/test/Routing/RouteTableFactoryTests.cs
+++ b/src/Components/Components/test/Routing/RouteTableFactoryTests.cs
@@ -369,7 +369,7 @@ public void ProducesAStableOrderForNonAmbiguousRoutes()
[Fact]
public void DoesNotThrowIfStableSortComparesRouteWithItself()
{
- // Test for https://github.com/aspnet/AspNetCore/issues/13313
+ // Test for https://github.com/dotnet/aspnetcore/issues/13313
// Arrange & Act
var builder = new TestRouteTableBuilder();
builder.AddRoute("r16");
diff --git a/src/Components/ComponentsNoDeps.slnf b/src/Components/ComponentsNoDeps.slnf
index 09f6a0859f95..7e09eeea25ce 100644
--- a/src/Components/ComponentsNoDeps.slnf
+++ b/src/Components/ComponentsNoDeps.slnf
@@ -13,13 +13,12 @@
"Blazor\\DevServer\\src\\Microsoft.AspNetCore.Blazor.DevServer.csproj",
"Blazor\\Http\\src\\Microsoft.AspNetCore.Blazor.HttpClient.csproj",
"Blazor\\Http\\test\\Microsoft.AspNetCore.Blazor.HttpClient.Tests.csproj",
+ "Blazor\\Mono.WebAssembly.Interop\\src\\Mono.WebAssembly.Interop.csproj",
"Blazor\\Server\\src\\Microsoft.AspNetCore.Blazor.Server.csproj",
- "Blazor\\Templates\\src\\Microsoft.AspNetCore.Blazor.Templates.csproj",
"Blazor\\Validation\\src\\Microsoft.AspNetCore.Blazor.DataAnnotations.Validation.csproj",
"Blazor\\Validation\\test\\Microsoft.AspNetCore.Blazor.DataAnnotations.Validation.Tests.csproj",
"Blazor\\testassets\\HostedInAspNet.Client\\HostedInAspNet.Client.csproj",
"Blazor\\testassets\\HostedInAspNet.Server\\HostedInAspNet.Server.csproj",
- "Blazor\\testassets\\Microsoft.AspNetCore.Blazor.E2EPerformance\\Microsoft.AspNetCore.Blazor.E2EPerformance.csproj",
"Blazor\\testassets\\MonoSanityClient\\MonoSanityClient.csproj",
"Blazor\\testassets\\MonoSanity\\MonoSanity.csproj",
"Blazor\\testassets\\StandaloneApp\\StandaloneApp.csproj",
@@ -35,6 +34,8 @@
"Server\\test\\Microsoft.AspNetCore.Components.Server.Tests.csproj",
"Web\\src\\Microsoft.AspNetCore.Components.Web.csproj",
"Web\\test\\Microsoft.AspNetCore.Components.Web.Tests.csproj",
+ "benchmarkapps\\Wasm.Performance\\Driver\\Wasm.Performance.Driver.csproj",
+ "benchmarkapps\\Wasm.Performance\\TestApp\\Wasm.Performance.TestApp.csproj",
"test\\E2ETest\\Microsoft.AspNetCore.Components.E2ETests.csproj",
"test\\testassets\\BasicTestApp\\BasicTestApp.csproj",
"test\\testassets\\TestContentPackage\\TestContentPackage.csproj",
diff --git a/src/Components/Directory.Build.props b/src/Components/Directory.Build.props
index 02d423b43e89..b614476c4c1d 100644
--- a/src/Components/Directory.Build.props
+++ b/src/Components/Directory.Build.props
@@ -2,7 +2,7 @@
-
+
@@ -12,6 +12,10 @@
aspnetcore;components
+
+ 3.1.0
+
$(MSBuildThisFileDirectory)Shared\
diff --git a/src/Components/Directory.Build.targets b/src/Components/Directory.Build.targets
index b992960cc31d..b6b1f773d930 100644
--- a/src/Components/Directory.Build.targets
+++ b/src/Components/Directory.Build.targets
@@ -3,6 +3,26 @@
true
+
+
+
+
+
+ netcoreapp3.1
+ Microsoft.AspNetCore.App
+ $(LatestAspNetCoreReferenceVersion)
+ $(LatestAspNetCoreReferenceVersion)
+ Microsoft.AspNetCore.App.Ref
+ $(LatestAspNetCoreReferenceVersion)
+ Microsoft.AspNetCore.App.Runtime.**RID**
+ linux-arm;linux-arm64;linux-musl-arm64;linux-musl-x64;linux-x64;osx-x64;rhel.6-x64;tizen.4.0.0-armel;tizen.5.0.0-armel;win-arm;win-arm64;win-x64;win-x86
+ true
+
+
+
+
diff --git a/src/Components/Forms/ref/Microsoft.AspNetCore.Components.Forms.csproj b/src/Components/Forms/ref/Microsoft.AspNetCore.Components.Forms.csproj
index 2ef391ee71ab..0709f6d84b9f 100644
--- a/src/Components/Forms/ref/Microsoft.AspNetCore.Components.Forms.csproj
+++ b/src/Components/Forms/ref/Microsoft.AspNetCore.Components.Forms.csproj
@@ -2,6 +2,7 @@
netstandard2.0;$(DefaultNetCoreTargetFramework)
+ $(DefaultNetCoreTargetFramework)
diff --git a/src/Components/Forms/ref/Microsoft.AspNetCore.Components.Forms.netcoreapp.cs b/src/Components/Forms/ref/Microsoft.AspNetCore.Components.Forms.netcoreapp.cs
index 4674ff0fb4e2..c1961a8a25f0 100644
--- a/src/Components/Forms/ref/Microsoft.AspNetCore.Components.Forms.netcoreapp.cs
+++ b/src/Components/Forms/ref/Microsoft.AspNetCore.Components.Forms.netcoreapp.cs
@@ -11,7 +11,7 @@ protected override void OnInitialized() { }
public sealed partial class EditContext
{
public EditContext(object model) { }
- public object Model { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } }
+ public object Model { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } }
public event System.EventHandler OnFieldChanged { add { } remove { } }
public event System.EventHandler OnValidationRequested { add { } remove { } }
public event System.EventHandler OnValidationStateChanged { add { } remove { } }
@@ -35,15 +35,16 @@ public static partial class EditContextDataAnnotationsExtensions
public sealed partial class FieldChangedEventArgs : System.EventArgs
{
public FieldChangedEventArgs(in Microsoft.AspNetCore.Components.Forms.FieldIdentifier fieldIdentifier) { }
- public Microsoft.AspNetCore.Components.Forms.FieldIdentifier FieldIdentifier { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } }
+ public Microsoft.AspNetCore.Components.Forms.FieldIdentifier FieldIdentifier { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } }
}
[System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)]
public readonly partial struct FieldIdentifier : System.IEquatable
{
private readonly object _dummy;
+ private readonly int _dummyPrimitive;
public FieldIdentifier(object model, string fieldName) { throw null; }
- public string FieldName { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } }
- public object Model { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } }
+ public string FieldName { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } }
+ public object Model { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } }
public static Microsoft.AspNetCore.Components.Forms.FieldIdentifier Create(System.Linq.Expressions.Expression> accessor) { throw null; }
public bool Equals(Microsoft.AspNetCore.Components.Forms.FieldIdentifier otherIdentifier) { throw null; }
public override bool Equals(object obj) { throw null; }
diff --git a/src/Components/Forms/ref/Microsoft.AspNetCore.Components.Forms.netstandard2.0.cs b/src/Components/Forms/ref/Microsoft.AspNetCore.Components.Forms.netstandard2.0.cs
index 4674ff0fb4e2..c1961a8a25f0 100644
--- a/src/Components/Forms/ref/Microsoft.AspNetCore.Components.Forms.netstandard2.0.cs
+++ b/src/Components/Forms/ref/Microsoft.AspNetCore.Components.Forms.netstandard2.0.cs
@@ -11,7 +11,7 @@ protected override void OnInitialized() { }
public sealed partial class EditContext
{
public EditContext(object model) { }
- public object Model { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } }
+ public object Model { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } }
public event System.EventHandler OnFieldChanged { add { } remove { } }
public event System.EventHandler OnValidationRequested { add { } remove { } }
public event System.EventHandler OnValidationStateChanged { add { } remove { } }
@@ -35,15 +35,16 @@ public static partial class EditContextDataAnnotationsExtensions
public sealed partial class FieldChangedEventArgs : System.EventArgs
{
public FieldChangedEventArgs(in Microsoft.AspNetCore.Components.Forms.FieldIdentifier fieldIdentifier) { }
- public Microsoft.AspNetCore.Components.Forms.FieldIdentifier FieldIdentifier { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } }
+ public Microsoft.AspNetCore.Components.Forms.FieldIdentifier FieldIdentifier { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } }
}
[System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)]
public readonly partial struct FieldIdentifier : System.IEquatable
{
private readonly object _dummy;
+ private readonly int _dummyPrimitive;
public FieldIdentifier(object model, string fieldName) { throw null; }
- public string FieldName { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } }
- public object Model { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } }
+ public string FieldName { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } }
+ public object Model { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } }
public static Microsoft.AspNetCore.Components.Forms.FieldIdentifier Create(System.Linq.Expressions.Expression> accessor) { throw null; }
public bool Equals(Microsoft.AspNetCore.Components.Forms.FieldIdentifier otherIdentifier) { throw null; }
public override bool Equals(object obj) { throw null; }
diff --git a/src/Components/Ignitor/src/ElementHive.cs b/src/Components/Ignitor/src/ElementHive.cs
index 3bb37c38ce1b..34d128ecc53b 100644
--- a/src/Components/Ignitor/src/ElementHive.cs
+++ b/src/Components/Ignitor/src/ElementHive.cs
@@ -42,7 +42,7 @@ public bool TryFindElementById(string id, [NotNullWhen(true)] out ElementNode? e
foreach (var kvp in Components)
{
var component = kvp.Value;
- if (TryGetElementFromChildren(component, out element))
+ if (TryGetElementFromChildren(component, id, out element))
{
return true;
}
@@ -50,31 +50,31 @@ public bool TryFindElementById(string id, [NotNullWhen(true)] out ElementNode? e
element = null;
return false;
+ }
- bool TryGetElementFromChildren(Node node, out ElementNode? foundNode)
+ bool TryGetElementFromChildren(Node node, string id, [NotNullWhen(true)] out ElementNode? foundNode)
+ {
+ if (node is ElementNode elementNode &&
+ elementNode.Attributes.TryGetValue("id", out var elementId) &&
+ elementId.ToString() == id)
{
- if (node is ElementNode elementNode &&
- elementNode.Attributes.TryGetValue("id", out var elementId) &&
- elementId?.ToString() == id)
- {
- foundNode = elementNode;
- return true;
- }
+ foundNode = elementNode;
+ return true;
+ }
- if (node is ContainerNode containerNode)
+ if (node is ContainerNode containerNode)
+ {
+ for (var i = 0; i < containerNode.Children.Count; i++)
{
- for (var i = 0; i < containerNode.Children.Count; i++)
+ if (TryGetElementFromChildren(containerNode.Children[i], id, out foundNode))
{
- if (TryGetElementFromChildren(containerNode.Children[i], out foundNode))
- {
- return true;
- }
+ return true;
}
}
-
- foundNode = null;
- return false;
}
+
+ foundNode = null;
+ return false;
}
private void UpdateComponent(RenderBatch batch, int componentId, ArrayBuilderSegment edits)
diff --git a/src/Components/README.md b/src/Components/README.md
index 6eacb16cdaaa..6f7ed330ff32 100644
--- a/src/Components/README.md
+++ b/src/Components/README.md
@@ -8,7 +8,7 @@ Blazor is a component based web UI framework. Blazor apps can run client-side in
Blazor uses only the latest web standards. No plugins or transpilation needed. It runs in the browser on a real .NET runtime implemented in [WebAssembly](http://webassembly.org) that executes normal .NET assemblies.
-[](https://gitter.im/aspnet/Blazor?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
+[](https://gitter.im/aspnet/blazor?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
You can learn more about Blazor at https://blazor.net.
diff --git a/src/Components/Server/ref/Microsoft.AspNetCore.Components.Server.netcoreapp.cs b/src/Components/Server/ref/Microsoft.AspNetCore.Components.Server.netcoreapp.cs
index b9cfbda974ba..6265d868b9f3 100644
--- a/src/Components/Server/ref/Microsoft.AspNetCore.Components.Server.netcoreapp.cs
+++ b/src/Components/Server/ref/Microsoft.AspNetCore.Components.Server.netcoreapp.cs
@@ -21,11 +21,11 @@ namespace Microsoft.AspNetCore.Components.Server
public sealed partial class CircuitOptions
{
public CircuitOptions() { }
- public bool DetailedErrors { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
- public int DisconnectedCircuitMaxRetained { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
- public System.TimeSpan DisconnectedCircuitRetentionPeriod { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
- public System.TimeSpan JSInteropDefaultCallTimeout { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
- public int MaxBufferedUnacknowledgedRenderBatches { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
+ public bool DetailedErrors { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } }
+ public int DisconnectedCircuitMaxRetained { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } }
+ public System.TimeSpan DisconnectedCircuitRetentionPeriod { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } }
+ public System.TimeSpan JSInteropDefaultCallTimeout { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } }
+ public int MaxBufferedUnacknowledgedRenderBatches { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } }
}
public abstract partial class RevalidatingServerAuthenticationStateProvider : Microsoft.AspNetCore.Components.Server.ServerAuthenticationStateProvider, System.IDisposable
{
diff --git a/src/Components/Server/src/CircuitDisconnectMiddleware.cs b/src/Components/Server/src/CircuitDisconnectMiddleware.cs
index d64c31e7da67..03c8c551e38b 100644
--- a/src/Components/Server/src/CircuitDisconnectMiddleware.cs
+++ b/src/Components/Server/src/CircuitDisconnectMiddleware.cs
@@ -9,7 +9,7 @@
namespace Microsoft.AspNetCore.Components.Server
{
- // We use a middlware so that we can use DI.
+ // We use a middleware so that we can use DI.
internal class CircuitDisconnectMiddleware
{
private const string CircuitIdKey = "circuitId";
@@ -97,7 +97,7 @@ private class Log
LoggerMessage.Define(LogLevel.Debug, new EventId(2, "CircuitTerminatedGracefully"), "Circuit with id '{CircuitId}' terminated gracefully.");
private static readonly Action _invalidCircuitId =
- LoggerMessage.Define(LogLevel.Debug, new EventId(3, "InvalidCircuitId"), "CircuitDisconnectMiddleware recieved an invalid circuit id '{CircuitIdSecret}'.");
+ LoggerMessage.Define(LogLevel.Debug, new EventId(3, "InvalidCircuitId"), "CircuitDisconnectMiddleware received an invalid circuit id '{CircuitIdSecret}'.");
public static void CircuitTerminatingGracefully(ILogger logger, CircuitId circuitId) => _circuitTerminatingGracefully(logger, circuitId, null);
diff --git a/src/Components/Server/src/CircuitOptions.cs b/src/Components/Server/src/CircuitOptions.cs
index 68ca25c85aa8..9f862b069d4c 100644
--- a/src/Components/Server/src/CircuitOptions.cs
+++ b/src/Components/Server/src/CircuitOptions.cs
@@ -19,7 +19,7 @@ public sealed class CircuitOptions
/// without losing any state in the event of transient connection issues.
///
///
- /// This value determines the maximium number of circuit states retained by the server.
+ /// This value determines the maximum number of circuit states retained by the server.
///
///
///
@@ -37,7 +37,7 @@ public sealed class CircuitOptions
/// without losing any state in the event of transient connection issues.
///
///
- /// This value determines the maximium duration circuit state is retained by the server before being evicted.
+ /// This value determines the maximum duration circuit state is retained by the server before being evicted.
///
///
///
diff --git a/src/Components/Server/src/Circuits/CircuitHost.cs b/src/Components/Server/src/Circuits/CircuitHost.cs
index 47a04da3a9a0..0c43ce269918 100644
--- a/src/Components/Server/src/Circuits/CircuitHost.cs
+++ b/src/Components/Server/src/Circuits/CircuitHost.cs
@@ -356,7 +356,7 @@ await Renderer.Dispatcher.InvokeAsync(() =>
// EndInvokeJSFromDotNet is used in a fire-and-forget context, so it's responsible for its own
// error handling.
- public async Task EndInvokeJSFromDotNet(long asyncCall, bool succeded, string arguments)
+ public async Task EndInvokeJSFromDotNet(long asyncCall, bool succeeded, string arguments)
{
AssertInitialized();
AssertNotDisposed();
@@ -365,7 +365,7 @@ public async Task EndInvokeJSFromDotNet(long asyncCall, bool succeded, string ar
{
await Renderer.Dispatcher.InvokeAsync(() =>
{
- if (!succeded)
+ if (!succeeded)
{
// We can log the arguments here because it is simply the JS error with the call stack.
Log.EndInvokeJSFailed(_logger, asyncCall, arguments);
@@ -578,11 +578,11 @@ private async Task TryNotifyClientErrorAsync(IClientProxy client, string error,
private static class Log
{
- private static readonly Action _intializationStarted;
- private static readonly Action _intializationSucceded;
- private static readonly Action _intializationFailed;
+ private static readonly Action _initializationStarted;
+ private static readonly Action _initializationSucceded;
+ private static readonly Action _initializationFailed;
private static readonly Action _disposeStarted;
- private static readonly Action _disposeSucceded;
+ private static readonly Action _disposeSucceeded;
private static readonly Action _disposeFailed;
private static readonly Action _onCircuitOpened;
private static readonly Action _onConnectionUp;
@@ -640,7 +640,7 @@ private static class EventIds
public static readonly EventId EndInvokeJSSucceeded = new EventId(206, "EndInvokeJSSucceeded");
public static readonly EventId DispatchEventThroughJSInterop = new EventId(207, "DispatchEventThroughJSInterop");
public static readonly EventId LocationChange = new EventId(208, "LocationChange");
- public static readonly EventId LocationChangeSucceded = new EventId(209, "LocationChangeSucceeded");
+ public static readonly EventId LocationChangeSucceeded = new EventId(209, "LocationChangeSucceeded");
public static readonly EventId LocationChangeFailed = new EventId(210, "LocationChangeFailed");
public static readonly EventId LocationChangeFailedInCircuit = new EventId(211, "LocationChangeFailedInCircuit");
public static readonly EventId OnRenderCompletedFailed = new EventId(212, "OnRenderCompletedFailed");
@@ -648,17 +648,17 @@ private static class EventIds
static Log()
{
- _intializationStarted = LoggerMessage.Define(
+ _initializationStarted = LoggerMessage.Define(
LogLevel.Debug,
EventIds.InitializationStarted,
"Circuit initialization started.");
- _intializationSucceded = LoggerMessage.Define(
+ _initializationSucceded = LoggerMessage.Define(
LogLevel.Debug,
EventIds.InitializationSucceeded,
"Circuit initialization succeeded.");
- _intializationFailed = LoggerMessage.Define(
+ _initializationFailed = LoggerMessage.Define(
LogLevel.Debug,
EventIds.InitializationFailed,
"Circuit initialization failed.");
@@ -668,10 +668,10 @@ static Log()
EventIds.DisposeStarted,
"Disposing circuit '{CircuitId}' started.");
- _disposeSucceded = LoggerMessage.Define(
+ _disposeSucceeded = LoggerMessage.Define(
LogLevel.Debug,
EventIds.DisposeSucceeded,
- "Disposing circuit '{CircuitId}' succeded.");
+ "Disposing circuit '{CircuitId}' succeeded.");
_disposeFailed = LoggerMessage.Define(
LogLevel.Debug,
@@ -726,7 +726,7 @@ static Log()
_unhandledExceptionClientDisconnected = LoggerMessage.Define(
LogLevel.Debug,
EventIds.UnhandledExceptionClientDisconnected,
- "An exception ocurred on the circuit host '{CircuitId}' while the client is disconnected.");
+ "An exception occurred on the circuit host '{CircuitId}' while the client is disconnected.");
_beginInvokeDotNetStatic = LoggerMessage.Define(
LogLevel.Debug,
@@ -780,8 +780,8 @@ static Log()
_locationChangeSucceeded = LoggerMessage.Define(
LogLevel.Debug,
- EventIds.LocationChangeSucceded,
- "Location change to '{URI}' in circuit '{CircuitId}' succeded.");
+ EventIds.LocationChangeSucceeded,
+ "Location change to '{URI}' in circuit '{CircuitId}' succeeded.");
_locationChangeFailed = LoggerMessage.Define(
LogLevel.Debug,
@@ -799,11 +799,11 @@ static Log()
"Failed to complete render batch '{RenderId}' in circuit host '{CircuitId}'.");
}
- public static void InitializationStarted(ILogger logger) => _intializationStarted(logger, null);
- public static void InitializationSucceeded(ILogger logger) => _intializationSucceded(logger, null);
- public static void InitializationFailed(ILogger logger, Exception exception) => _intializationFailed(logger, exception);
+ public static void InitializationStarted(ILogger logger) => _initializationStarted(logger, null);
+ public static void InitializationSucceeded(ILogger logger) => _initializationSucceded(logger, null);
+ public static void InitializationFailed(ILogger logger, Exception exception) => _initializationFailed(logger, exception);
public static void DisposeStarted(ILogger logger, CircuitId circuitId) => _disposeStarted(logger, circuitId, null);
- public static void DisposeSucceeded(ILogger logger, CircuitId circuitId) => _disposeSucceded(logger, circuitId, null);
+ public static void DisposeSucceeded(ILogger logger, CircuitId circuitId) => _disposeSucceeded(logger, circuitId, null);
public static void DisposeFailed(ILogger logger, CircuitId circuitId, Exception exception) => _disposeFailed(logger, circuitId, exception);
public static void CircuitOpened(ILogger logger, CircuitId circuitId) => _onCircuitOpened(logger, circuitId, null);
public static void ConnectionUp(ILogger logger, CircuitId circuitId, string connectionId) => _onConnectionUp(logger, circuitId, connectionId, null);
diff --git a/src/Components/Server/src/Circuits/CircuitIdFactory.cs b/src/Components/Server/src/Circuits/CircuitIdFactory.cs
index 544a1b791c5e..7250ee811653 100644
--- a/src/Components/Server/src/Circuits/CircuitIdFactory.cs
+++ b/src/Components/Server/src/Circuits/CircuitIdFactory.cs
@@ -20,7 +20,6 @@ internal class CircuitIdFactory
private const int SecretLength = 64;
private const int IdLength = 32;
- private readonly RandomNumberGenerator _generator = RandomNumberGenerator.Create();
private readonly IDataProtector _protector;
public CircuitIdFactory(IDataProtectionProvider provider)
@@ -35,7 +34,7 @@ public CircuitIdFactory(IDataProtectionProvider provider)
public CircuitId CreateCircuitId()
{
var buffer = new byte[SecretLength];
- _generator.GetBytes(buffer);
+ RandomNumberGenerator.Fill(buffer);
var id = new byte[IdLength];
Array.Copy(
diff --git a/src/Components/Server/src/Circuits/CircuitRegistry.cs b/src/Components/Server/src/Circuits/CircuitRegistry.cs
index ab261a108baf..f8e4971a6497 100644
--- a/src/Components/Server/src/Circuits/CircuitRegistry.cs
+++ b/src/Components/Server/src/Circuits/CircuitRegistry.cs
@@ -32,7 +32,7 @@ namespace Microsoft.AspNetCore.Components.Server.Circuits
/// the to use the new client instance that attempted to reconnect to the server. Removing the entry from
/// should ensure we no longer have to concern ourselves with entry expiration.
///
- /// Knowing when a client disconnected is not an exact science. There's a fair possiblity that a client may reconnect before the server realizes.
+ /// Knowing when a client disconnected is not an exact science. There's a fair possibility that a client may reconnect before the server realizes.
/// Consequently, we have to account for reconnects and disconnects occuring simultaneously as well as appearing out of order.
/// To manage this, we use a critical section to manage all state transitions.
///
@@ -99,7 +99,7 @@ public virtual Task DisconnectAsync(CircuitHost circuitHost, string connectionId
else
{
// DisconnectCore may fail to disconnect the circuit if it was previously marked inactive or
- // has been transfered to a new connection. Do not invoke the circuit handlers in this instance.
+ // has been transferred to a new connection. Do not invoke the circuit handlers in this instance.
// We have to do in this instance.
return Task.CompletedTask;
@@ -181,7 +181,7 @@ public virtual async Task ConnectAsync(CircuitId circuitId, IClient
{
// Transition the host from disconnected to connected if it's available. In this critical section, we return
// an existing host if it's currently considered connected or transition a disconnected host to connected.
- // Transfering also wires up the client to the new set.
+ // Transferring also wires up the client to the new set.
(circuitHost, previouslyConnected) = ConnectCore(circuitId, clientProxy, connectionId);
if (circuitHost == null)
@@ -428,7 +428,7 @@ static Log()
_connectingToDisconnectedCircuit = LoggerMessage.Define(
LogLevel.Debug,
EventIds.ConnectingToDisconnectedCircuit,
- "Transfering disconnected circuit {CircuitId} to connection {ConnectionId}.");
+ "Transferring disconnected circuit {CircuitId} to connection {ConnectionId}.");
_failedToReconnectToCircuit = LoggerMessage.Define(
LogLevel.Debug,
diff --git a/src/Components/Server/src/Circuits/RemoteJSRuntime.cs b/src/Components/Server/src/Circuits/RemoteJSRuntime.cs
index 0ef78bcf0f48..1d9205e1bae7 100644
--- a/src/Components/Server/src/Circuits/RemoteJSRuntime.cs
+++ b/src/Components/Server/src/Circuits/RemoteJSRuntime.cs
@@ -74,7 +74,7 @@ protected override void BeginInvokeJS(long asyncHandle, string identifier, strin
{
throw new InvalidOperationException(
"JavaScript interop calls cannot be issued at this time. This is because the component is being " +
- $"statically rendererd. When prerendering is enabled, JavaScript interop calls can only be performed " +
+ $"statically rendered. When prerendering is enabled, JavaScript interop calls can only be performed " +
$"during the OnAfterRenderAsync lifecycle method.");
}
diff --git a/src/Components/Server/src/Circuits/RemoteRenderer.cs b/src/Components/Server/src/Circuits/RemoteRenderer.cs
index 509944e17a1a..e7ab9c1a4c0e 100644
--- a/src/Components/Server/src/Circuits/RemoteRenderer.cs
+++ b/src/Components/Server/src/Circuits/RemoteRenderer.cs
@@ -25,7 +25,7 @@ internal class RemoteRenderer : Microsoft.AspNetCore.Components.RenderTree.Rende
private bool _disposing = false;
///
- /// Notifies when a rendering exception occured.
+ /// Notifies when a rendering exception occurred.
///
public event EventHandler UnhandledException;
@@ -90,14 +90,14 @@ protected override void ProcessPendingRender()
// as we have a client that is not acknowledging render batches fast enough (something we consider needs
// to be fast).
// The result is something as follows:
- // Lets imagine an extreme case where the server produces a new batch every milisecond.
- // Lets say the client is able to ACK a batch every 100 miliseconds.
+ // Lets imagine an extreme case where the server produces a new batch every millisecond.
+ // Lets say the client is able to ACK a batch every 100 milliseconds.
// When the app starts the client might see the sequence 0->(MaxUnacknowledgedRenderBatches-1) and then
- // after 100 miliseconds it sees it jump to 1xx, then to 2xx where xx is something between {0..99} the
+ // after 100 milliseconds it sees it jump to 1xx, then to 2xx where xx is something between {0..99} the
// reason for this is that the server slows down rendering new batches to as fast as the client can consume
// them.
// Similarly, if a client were to send events at a faster pace than the server can consume them, the server
- // would still proces the events, but would not produce new renders until it gets an ack that frees up space
+ // would still process the events, but would not produce new renders until it gets an ack that frees up space
// for a new render.
// We should never see UnacknowledgedRenderBatches.Count > _options.MaxBufferedUnacknowledgedRenderBatches
@@ -202,7 +202,7 @@ private async Task WriteBatchBytesAsync(UnacknowledgedRenderBatch pending)
{
// Send the render batch to the client
// If the "send" operation fails (synchronously or asynchronously) or the client
- // gets disconected simply give up. This likely means that
+ // gets disconnected simply give up. This likely means that
// the circuit went offline while sending the data, so simply wait until the
// client reconnects back or the circuit gets evicted because it stayed
// disconnected for too long.
@@ -247,7 +247,7 @@ public Task OnRenderCompletedAsync(long incomingBatchId, string errorMessageOrNu
// from the client that it has received and successfully applied all batches up to that point).
// If receive an ack for a previously acknowledged batch, its an error, as the messages are
- // guranteed to be delivered in order, so a message for a render batch of 2 will never arrive
+ // guaranteed to be delivered in order, so a message for a render batch of 2 will never arrive
// after a message for a render batch for 3.
// If that were to be the case, it would just be enough to relax the checks here and simply skip
// the message.
@@ -282,7 +282,7 @@ public Task OnRenderCompletedAsync(long incomingBatchId, string errorMessageOrNu
if (lastBatchId < incomingBatchId)
{
- // This exception is due to a bad client input, so we mark it as such to prevent loging it as a warning and
+ // This exception is due to a bad client input, so we mark it as such to prevent logging it as a warning and
// flooding the logs with warnings.
throw new InvalidOperationException($"Received an acknowledgement for batch with id '{incomingBatchId}' when the last batch produced was '{lastBatchId}'.");
}
diff --git a/src/Components/Server/src/ComponentHub.cs b/src/Components/Server/src/ComponentHub.cs
index cb347a30be2f..779b4b005341 100644
--- a/src/Components/Server/src/ComponentHub.cs
+++ b/src/Components/Server/src/ComponentHub.cs
@@ -302,7 +302,7 @@ private static class Log
LoggerMessage.Define(LogLevel.Debug, new EventId(7, "CreatedCircuit"), "Created circuit '{CircuitId}' with secret '{CircuitIdSecret}' for '{ConnectionId}'");
private static readonly Action _invalidCircuitId =
- LoggerMessage.Define(LogLevel.Debug, new EventId(8, "InvalidCircuitId"), "ConnectAsync recieved an invalid circuit id '{CircuitIdSecret}'");
+ LoggerMessage.Define(LogLevel.Debug, new EventId(8, "InvalidCircuitId"), "ConnectAsync received an invalid circuit id '{CircuitIdSecret}'");
public static void ReceivedConfirmationForBatch(ILogger logger, long batchId) => _receivedConfirmationForBatch(logger, batchId, null);
diff --git a/src/Components/Server/src/Directory.Build.targets b/src/Components/Server/src/Directory.Build.targets
new file mode 100644
index 000000000000..09953b9b6c9d
--- /dev/null
+++ b/src/Components/Server/src/Directory.Build.targets
@@ -0,0 +1,6 @@
+
+
+
+
+
diff --git a/src/Components/Server/src/Microsoft.AspNetCore.Components.Server.csproj b/src/Components/Server/src/Microsoft.AspNetCore.Components.Server.csproj
index b47c1c2fe36a..98fa33ca3e84 100644
--- a/src/Components/Server/src/Microsoft.AspNetCore.Components.Server.csproj
+++ b/src/Components/Server/src/Microsoft.AspNetCore.Components.Server.csproj
@@ -1,5 +1,4 @@
-
$(DefaultNetCoreTargetFramework)
Runtime server features for ASP.NET Core Components.
@@ -8,8 +7,9 @@
true
true
CS0436;$(NoWarn)
- $(DefineConstants);MESSAGEPACK_INTERNAL;COMPONENTS_SERVER
+ $(DefineConstants);ENABLE_UNSAFE_MSGPACK;SPAN_BUILTIN;MESSAGEPACK_INTERNAL;COMPONENTS_SERVER
false
+ Microsoft.Extensions.FileProviders.Embedded.Manifest.xml
@@ -22,7 +22,8 @@
-
+
+
@@ -36,9 +37,18 @@
- $(RepoRoot)src\submodules\MessagePack-CSharp\src\MessagePack\
+ $(RepoRoot)src\submodules\MessagePack-CSharp\src\MessagePack.UnityClient\Assets\Scripts\MessagePack\
+
+
+ <_FileProviderTaskAssembly>$(ArtifactsDir)bin\Microsoft.Extensions.FileProviders.Embedded.Manifest.Task\$(Configuration)\netstandard2.0\Microsoft.Extensions.FileProviders.Embedded.Manifest.Task.dll
+
+
+
+
@@ -58,15 +68,16 @@
-
+
+
-
+
@@ -83,5 +94,4 @@
-
-
+
\ No newline at end of file
diff --git a/src/Components/Server/test/Circuits/CircuitIdFactoryTest.cs b/src/Components/Server/test/Circuits/CircuitIdFactoryTest.cs
index 35bc4544168b..588eadfdd8e5 100644
--- a/src/Components/Server/test/Circuits/CircuitIdFactoryTest.cs
+++ b/src/Components/Server/test/Circuits/CircuitIdFactoryTest.cs
@@ -25,7 +25,7 @@ public void CreateCircuitId_Generates_NewRandomId()
}
[Fact]
- public void CreateCircuitId_Generates_GeneratesDifferentIds_ForSuccesiveCalls()
+ public void CreateCircuitId_Generates_GeneratesDifferentIds_ForSuccessiveCalls()
{
// Arrange
var factory = TestCircuitIdFactory.CreateTestFactory();
diff --git a/src/Components/Server/test/Circuits/RemoteRendererTest.cs b/src/Components/Server/test/Circuits/RemoteRendererTest.cs
index e7cda62bb2f5..6befe0c65d0d 100644
--- a/src/Components/Server/test/Circuits/RemoteRendererTest.cs
+++ b/src/Components/Server/test/Circuits/RemoteRendererTest.cs
@@ -179,7 +179,7 @@ public async Task ProcessBufferedRenderBatches_WritesRenders()
// Assert
Assert.Equal(new long[] { 2, 3, 4 }, renderIds);
- Assert.True(task.Wait(3000), "One or more render batches werent acknowledged");
+ Assert.True(task.Wait(3000), "One or more render batches weren't acknowledged");
await task;
}
@@ -233,7 +233,7 @@ await renderer.RenderComponentAsync(
exceptions.Add(e);
};
- // Receive the ack for the intial batch
+ // Receive the ack for the initial batch
_ = renderer.OnRenderCompletedAsync(2, null);
// Receive the ack for the second batch
_ = renderer.OnRenderCompletedAsync(3, null);
diff --git a/src/Components/Server/test/Circuits/RevalidatingServerAuthenticationStateProvider.cs b/src/Components/Server/test/Circuits/RevalidatingServerAuthenticationStateProvider.cs
index dc7d28d50269..ef4eae3630b6 100644
--- a/src/Components/Server/test/Circuits/RevalidatingServerAuthenticationStateProvider.cs
+++ b/src/Components/Server/test/Circuits/RevalidatingServerAuthenticationStateProvider.cs
@@ -9,6 +9,7 @@
using System.Threading.Tasks;
using Microsoft.AspNetCore.Components.Authorization;
using Microsoft.AspNetCore.Components.Server;
+using Microsoft.AspNetCore.Testing;
using Microsoft.Extensions.Logging.Abstractions;
using Xunit;
@@ -184,7 +185,8 @@ public async Task SuppliesCancellationTokenThatSignalsWhenRevalidationLoopIsBein
}
[Fact]
- public async Task IfValidateAuthenticationStateAsyncReturnsUnrelatedCancelledTask_TreatAsFailure()
+ [QuarantinedTest]
+ public async Task IfValidateAuthenticationStateAsyncReturnsUnrelatedCanceledTask_TreatAsFailure()
{
// Arrange
var validationTcs = new TaskCompletionSource();
@@ -200,11 +202,11 @@ public async Task IfValidateAuthenticationStateAsyncReturnsUnrelatedCancelledTas
var firstRevalidationCall = provider.RevalidationCallLog.Single();
Assert.Equal(0, authenticationStateChangedCount);
- // Act: ValidateAuthenticationStateAsync returns cancelled task, but the cancellation
+ // Act: ValidateAuthenticationStateAsync returns canceled task, but the cancellation
// is unrelated to the CT we supplied
validationTcs.TrySetCanceled(new CancellationTokenSource().Token);
- // Assert: Since we didn't ask for that operation to be cancelled, this is treated as
+ // Assert: Since we didn't ask for that operation to be canceled, this is treated as
// a failure to validate, so we force a logout
Assert.Equal(1, authenticationStateChangedCount);
var newAuthState = await provider.GetAuthenticationStateAsync();
diff --git a/src/Components/Server/test/ComponentEndpointRouteBuilderExtensionsTest.cs b/src/Components/Server/test/ComponentEndpointRouteBuilderExtensionsTest.cs
index e0a6d8ff4452..03a651d7be87 100644
--- a/src/Components/Server/test/ComponentEndpointRouteBuilderExtensionsTest.cs
+++ b/src/Components/Server/test/ComponentEndpointRouteBuilderExtensionsTest.cs
@@ -66,9 +66,9 @@ private IApplicationBuilder CreateAppBuilder()
services.AddServerSideBlazor();
services.AddSingleton(new ConfigurationBuilder().Build());
- var serviceProvder = services.BuildServiceProvider();
+ var serviceProvider = services.BuildServiceProvider();
- return new ApplicationBuilder(serviceProvder);
+ return new ApplicationBuilder(serviceProvider);
}
private class MyComponent : IComponent
diff --git a/src/Components/Server/test/Microsoft.AspNetCore.Components.Server.Tests.csproj b/src/Components/Server/test/Microsoft.AspNetCore.Components.Server.Tests.csproj
index c6e294a63ca6..2463622ac4a3 100644
--- a/src/Components/Server/test/Microsoft.AspNetCore.Components.Server.Tests.csproj
+++ b/src/Components/Server/test/Microsoft.AspNetCore.Components.Server.Tests.csproj
@@ -6,7 +6,6 @@
-
diff --git a/src/Components/Shared/src/ElementReferenceJsonConverter.cs b/src/Components/Shared/src/ElementReferenceJsonConverter.cs
index 465a688bf278..80a7738107a6 100644
--- a/src/Components/Shared/src/ElementReferenceJsonConverter.cs
+++ b/src/Components/Shared/src/ElementReferenceJsonConverter.cs
@@ -30,7 +30,7 @@ public override ElementReference Read(ref Utf8JsonReader reader, Type typeToConv
}
else
{
- throw new JsonException($"Unexcepted JSON Token {reader.TokenType}.");
+ throw new JsonException($"Unexpected JSON Token {reader.TokenType}.");
}
}
@@ -49,4 +49,4 @@ public override void Write(Utf8JsonWriter writer, ElementReference value, JsonSe
writer.WriteEndObject();
}
}
-}
\ No newline at end of file
+}
diff --git a/src/Components/Web.JS/Microsoft.AspNetCore.Components.Web.JS.npmproj b/src/Components/Web.JS/Microsoft.AspNetCore.Components.Web.JS.npmproj
index 89ca1453249a..915e6f019090 100644
--- a/src/Components/Web.JS/Microsoft.AspNetCore.Components.Web.JS.npmproj
+++ b/src/Components/Web.JS/Microsoft.AspNetCore.Components.Web.JS.npmproj
@@ -6,6 +6,11 @@
false
+
+
+
+
+
+
+
diff --git a/src/Components/Web.JS/dist/Release/blazor.server.js b/src/Components/Web.JS/dist/Release/blazor.server.js
index 30d3ae39491b..3c88d5b5a329 100644
--- a/src/Components/Web.JS/dist/Release/blazor.server.js
+++ b/src/Components/Web.JS/dist/Release/blazor.server.js
@@ -1,15 +1,15 @@
-!function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=49)}([function(e,t,n){"use strict";var r;n.d(t,"a",function(){return r}),function(e){e[e.Trace=0]="Trace",e[e.Debug=1]="Debug",e[e.Information=2]="Information",e[e.Warning=3]="Warning",e[e.Error=4]="Error",e[e.Critical=5]="Critical",e[e.None=6]="None"}(r||(r={}))},function(e,t,n){"use strict";n.d(t,"a",function(){return s}),n.d(t,"c",function(){return c}),n.d(t,"f",function(){return u}),n.d(t,"g",function(){return l}),n.d(t,"h",function(){return f}),n.d(t,"e",function(){return h}),n.d(t,"d",function(){return p}),n.d(t,"b",function(){return d});var r=n(0),o=n(7),i=function(e,t,n,r){return new(n||(n=Promise))(function(o,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?o(e.value):new n(function(t){t(e.value)}).then(a,s)}c((r=r.apply(e,t||[])).next())})},a=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]-1&&this.subject.observers.splice(e,1),0===this.subject.observers.length&&this.subject.cancelCallback&&this.subject.cancelCallback().catch(function(e){})},e}(),d=function(){function e(e){this.minimumLogLevel=e,this.outputConsole=console}return e.prototype.log=function(e,t){if(e>=this.minimumLogLevel)switch(e){case r.a.Critical:case r.a.Error:this.outputConsole.error("["+(new Date).toISOString()+"] "+r.a[e]+": "+t);break;case r.a.Warning:this.outputConsole.warn("["+(new Date).toISOString()+"] "+r.a[e]+": "+t);break;case r.a.Information:this.outputConsole.info("["+(new Date).toISOString()+"] "+r.a[e]+": "+t);break;default:this.outputConsole.log("["+(new Date).toISOString()+"] "+r.a[e]+": "+t)}},e}()},function(e,t,n){"use strict";n.r(t);var r,o,i=n(3),a=n(4),s=n(43),c=n(0),u=(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),l=function(e){function t(t){var n=e.call(this)||this;return n.logger=t,n}return u(t,e),t.prototype.send=function(e){var t=this;return e.abortSignal&&e.abortSignal.aborted?Promise.reject(new i.a):e.method?e.url?new Promise(function(n,r){var o=new XMLHttpRequest;o.open(e.method,e.url,!0),o.withCredentials=!0,o.setRequestHeader("X-Requested-With","XMLHttpRequest"),o.setRequestHeader("Content-Type","text/plain;charset=UTF-8");var s=e.headers;s&&Object.keys(s).forEach(function(e){o.setRequestHeader(e,s[e])}),e.responseType&&(o.responseType=e.responseType),e.abortSignal&&(e.abortSignal.onabort=function(){o.abort(),r(new i.a)}),e.timeout&&(o.timeout=e.timeout),o.onload=function(){e.abortSignal&&(e.abortSignal.onabort=null),o.status>=200&&o.status<300?n(new a.b(o.status,o.statusText,o.response||o.responseText)):r(new i.b(o.statusText,o.status))},o.onerror=function(){t.logger.log(c.a.Warning,"Error from HTTP request. "+o.status+": "+o.statusText+"."),r(new i.b(o.statusText,o.status))},o.ontimeout=function(){t.logger.log(c.a.Warning,"Timeout from HTTP request."),r(new i.c)},o.send(e.content||"")}):Promise.reject(new Error("No url defined.")):Promise.reject(new Error("No method defined."))},t}(a.a),f=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),h=function(e){function t(t){var n=e.call(this)||this;return"undefined"!=typeof XMLHttpRequest?n.httpClient=new l(t):n.httpClient=new s.a(t),n}return f(t,e),t.prototype.send=function(e){return e.abortSignal&&e.abortSignal.aborted?Promise.reject(new i.a):e.method?e.url?this.httpClient.send(e):Promise.reject(new Error("No url defined.")):Promise.reject(new Error("No method defined."))},t.prototype.getCookieString=function(e){return this.httpClient.getCookieString(e)},t}(a.a),p=n(44);!function(e){e[e.Invocation=1]="Invocation",e[e.StreamItem=2]="StreamItem",e[e.Completion=3]="Completion",e[e.StreamInvocation=4]="StreamInvocation",e[e.CancelInvocation=5]="CancelInvocation",e[e.Ping=6]="Ping",e[e.Close=7]="Close"}(o||(o={}));var d,g=n(1),y=function(){function e(){this.observers=[]}return e.prototype.next=function(e){for(var t=0,n=this.observers;t0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0?[2,Promise.reject(new Error("Unable to connect to the server with any of the available transports. "+i.join(" ")))]:[2,Promise.reject(new Error("None of the transports supported by the client are supported by the server."))]}})})},e.prototype.constructTransport=function(e){switch(e){case E.WebSockets:if(!this.options.WebSocket)throw new Error("'WebSocket' is not supported in your environment.");return new A(this.httpClient,this.accessTokenFactory,this.logger,this.options.logMessageContent||!1,this.options.WebSocket);case E.ServerSentEvents:if(!this.options.EventSource)throw new Error("'EventSource' is not supported in your environment.");return new O(this.httpClient,this.accessTokenFactory,this.logger,this.options.logMessageContent||!1,this.options.EventSource);case E.LongPolling:return new x(this.httpClient,this.accessTokenFactory,this.logger,this.options.logMessageContent||!1);default:throw new Error("Unknown transport: "+e+".")}},e.prototype.startTransport=function(e,t){var n=this;return this.transport.onreceive=this.onreceive,this.transport.onclose=function(e){return n.stopConnection(e)},this.transport.connect(e,t)},e.prototype.resolveTransportOrError=function(e,t,n){var r=E[e.transport];if(null==r)return this.logger.log(c.a.Debug,"Skipping transport '"+e.transport+"' because it is not supported by this client."),new Error("Skipping transport '"+e.transport+"' because it is not supported by this client.");if(!function(e,t){return!e||0!=(t&e)}(t,r))return this.logger.log(c.a.Debug,"Skipping transport '"+E[r]+"' because it was disabled by the client."),new Error("'"+E[r]+"' is disabled by the client.");if(!(e.transferFormats.map(function(e){return S[e]}).indexOf(n)>=0))return this.logger.log(c.a.Debug,"Skipping transport '"+E[r]+"' because it does not support the requested transfer format '"+S[n]+"'."),new Error("'"+E[r]+"' does not support "+S[n]+".");if(r===E.WebSockets&&!this.options.WebSocket||r===E.ServerSentEvents&&!this.options.EventSource)return this.logger.log(c.a.Debug,"Skipping transport '"+E[r]+"' because it is not supported in your environment.'"),new Error("'"+E[r]+"' is not supported in your environment.");this.logger.log(c.a.Debug,"Selecting transport '"+E[r]+"'.");try{return this.constructTransport(r)}catch(e){return e}},e.prototype.isITransport=function(e){return e&&"object"==typeof e&&"connect"in e},e.prototype.stopConnection=function(e){if(this.logger.log(c.a.Debug,"HttpConnection.stopConnection("+e+") called while in state "+this.connectionState+"."),this.transport=void 0,e=this.stopError||e,this.stopError=void 0,"Disconnected"!==this.connectionState)if("Connecting "!==this.connectionState){if("Disconnecting"===this.connectionState&&this.stopPromiseResolver(),e?this.logger.log(c.a.Error,"Connection disconnected with error '"+e+"'."):this.logger.log(c.a.Information,"Connection disconnected."),this.connectionId=void 0,this.connectionState="Disconnected",this.onclose&&this.connectionStarted){this.connectionStarted=!1;try{this.onclose(e)}catch(t){this.logger.log(c.a.Error,"HttpConnection.onclose("+e+") threw error '"+t+"'.")}}}else this.logger.log(c.a.Warning,"Call to HttpConnection.stopConnection("+e+") was ignored because the connection hasn't yet left the in the connecting state.");else this.logger.log(c.a.Debug,"Call to HttpConnection.stopConnection("+e+") was ignored because the connection is already in the disconnected state.")},e.prototype.resolveUrl=function(e){if(0===e.lastIndexOf("https://",0)||0===e.lastIndexOf("http://",0))return e;if(!g.c.isBrowser||!window.document)throw new Error("Cannot resolve '"+e+"'.");var t=window.document.createElement("a");return t.href=e,this.logger.log(c.a.Information,"Normalizing '"+e+"' to '"+t.href+"'."),t.href},e.prototype.resolveNegotiateUrl=function(e){var t=e.indexOf("?"),n=e.substring(0,-1===t?e.length:t);return"/"!==n[n.length-1]&&(n+="/"),n+="negotiate",-1===(n+=-1===t?"":e.substring(t)).indexOf("negotiateVersion")&&(n+=-1===t?"?":"&",n+="negotiateVersion="+this.negotiateVersion),n},e}();var q=function(){function e(e){this.transport=e,this.buffer=[],this.executing=!0,this.sendBufferedData=new W,this.transportResult=new W,this.sendLoopPromise=this.sendLoop()}return e.prototype.send=function(e){return this.bufferData(e),this.transportResult||(this.transportResult=new W),this.transportResult.promise},e.prototype.stop=function(){return this.executing=!1,this.sendBufferedData.resolve(),this.sendLoopPromise},e.prototype.bufferData=function(e){if(this.buffer.length&&typeof this.buffer[0]!=typeof e)throw new Error("Expected data to be of type "+typeof this.buffer+" but was of type "+typeof e);this.buffer.push(e),this.sendBufferedData.resolve()},e.prototype.sendLoop=function(){return B(this,void 0,void 0,function(){var t,n,r;return j(this,function(o){switch(o.label){case 0:return[4,this.sendBufferedData.promise];case 1:if(o.sent(),!this.executing)return this.transportResult&&this.transportResult.reject("Connection stopped."),[3,6];this.sendBufferedData=new W,t=this.transportResult,this.transportResult=void 0,n="string"==typeof this.buffer[0]?this.buffer.join(""):e.concatBuffers(this.buffer),this.buffer.length=0,o.label=2;case 2:return o.trys.push([2,4,,5]),[4,this.transport.send(n)];case 3:return o.sent(),t.resolve(),[3,5];case 4:return r=o.sent(),t.reject(r),[3,5];case 5:return[3,0];case 6:return[2]}})})},e.concatBuffers=function(e){for(var t=e.map(function(e){return e.byteLength}).reduce(function(e,t){return e+t}),n=new Uint8Array(t),r=0,o=0,i=e;o0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]-1&&this.subject.observers.splice(e,1),0===this.subject.observers.length&&this.subject.cancelCallback&&this.subject.cancelCallback().catch(function(e){})},e}(),g=function(){function e(e){this.minimumLogLevel=e,this.outputConsole=console}return e.prototype.log=function(e,t){if(e>=this.minimumLogLevel)switch(e){case r.a.Critical:case r.a.Error:this.outputConsole.error("["+(new Date).toISOString()+"] "+r.a[e]+": "+t);break;case r.a.Warning:this.outputConsole.warn("["+(new Date).toISOString()+"] "+r.a[e]+": "+t);break;case r.a.Information:this.outputConsole.info("["+(new Date).toISOString()+"] "+r.a[e]+": "+t);break;default:this.outputConsole.log("["+(new Date).toISOString()+"] "+r.a[e]+": "+t)}},e}();function y(){var e="X-SignalR-User-Agent";return u.isNode&&(e="User-Agent"),[e,v(s,b(),w(),m())]}function v(e,t,n,r){var o="Microsoft SignalR/",i=e.split(".");return o+=i[0]+"."+i[1],o+=" ("+e+"; ",o+=t&&""!==t?t+"; ":"Unknown OS; ",o+=""+n,o+=r?"; "+r:"; Unknown Runtime Version",o+=")"}function b(){if(!u.isNode)return"";switch(e.platform){case"win32":return"Windows NT";case"darwin":return"macOS";case"linux":return"Linux";default:return e.platform}}function m(){if(u.isNode)return e.versions.node}function w(){return u.isNode?"NodeJS":"Browser"}}).call(this,n(14))},function(e,t,n){"use strict";n.r(t);var r,o=n(3),i=n(4),a=n(0),s=(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),c=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]=200&&s.status<300?n(new i.b(s.status,s.statusText,s.response||s.responseText)):r(new o.b(s.statusText,s.status))},s.onerror=function(){t.logger.log(a.a.Warning,"Error from HTTP request. "+s.status+": "+s.statusText+"."),r(new o.b(s.statusText,s.status))},s.ontimeout=function(){t.logger.log(a.a.Warning,"Timeout from HTTP request."),r(new o.c)},s.send(e.content||"")}):Promise.reject(new Error("No url defined.")):Promise.reject(new Error("No method defined."))},t}(i.a),y=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),v=function(e){function t(t){var n=e.call(this)||this;return"undefined"!=typeof fetch?n.httpClient=new f(t):"undefined"!=typeof XMLHttpRequest?n.httpClient=new g(t):n.httpClient=new p.a(t),n}return y(t,e),t.prototype.send=function(e){return e.abortSignal&&e.abortSignal.aborted?Promise.reject(new o.a):e.method?e.url?this.httpClient.send(e):Promise.reject(new Error("No url defined.")):Promise.reject(new Error("No method defined."))},t.prototype.getCookieString=function(e){return this.httpClient.getCookieString(e)},t}(i.a),b=n(44);!function(e){e[e.Invocation=1]="Invocation",e[e.StreamItem=2]="StreamItem",e[e.Completion=3]="Completion",e[e.StreamInvocation=4]="StreamInvocation",e[e.CancelInvocation=5]="CancelInvocation",e[e.Ping=6]="Ping",e[e.Close=7]="Close"}(h||(h={}));var m,w=n(1),E=function(){function e(){this.observers=[]}return e.prototype.next=function(e){for(var t=0,n=this.observers;t0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0?[2,Promise.reject(new Error("Unable to connect to the server with any of the available transports. "+i.join(" ")))]:[2,Promise.reject(new Error("None of the transports supported by the client are supported by the server."))]}})})},e.prototype.constructTransport=function(e){switch(e){case I.WebSockets:if(!this.options.WebSocket)throw new Error("'WebSocket' is not supported in your environment.");return new F(this.httpClient,this.accessTokenFactory,this.logger,this.options.logMessageContent||!1,this.options.WebSocket);case I.ServerSentEvents:if(!this.options.EventSource)throw new Error("'EventSource' is not supported in your environment.");return new B(this.httpClient,this.accessTokenFactory,this.logger,this.options.logMessageContent||!1,this.options.EventSource,this.options.withCredentials);case I.LongPolling:return new M(this.httpClient,this.accessTokenFactory,this.logger,this.options.logMessageContent||!1,this.options.withCredentials);default:throw new Error("Unknown transport: "+e+".")}},e.prototype.startTransport=function(e,t){var n=this;return this.transport.onreceive=this.onreceive,this.transport.onclose=function(e){return n.stopConnection(e)},this.transport.connect(e,t)},e.prototype.resolveTransportOrError=function(e,t,n){var r=I[e.transport];if(null==r)return this.logger.log(a.a.Debug,"Skipping transport '"+e.transport+"' because it is not supported by this client."),new Error("Skipping transport '"+e.transport+"' because it is not supported by this client.");if(!function(e,t){return!e||0!=(t&e)}(t,r))return this.logger.log(a.a.Debug,"Skipping transport '"+I[r]+"' because it was disabled by the client."),new Error("'"+I[r]+"' is disabled by the client.");if(!(e.transferFormats.map(function(e){return k[e]}).indexOf(n)>=0))return this.logger.log(a.a.Debug,"Skipping transport '"+I[r]+"' because it does not support the requested transfer format '"+k[n]+"'."),new Error("'"+I[r]+"' does not support "+k[n]+".");if(r===I.WebSockets&&!this.options.WebSocket||r===I.ServerSentEvents&&!this.options.EventSource)return this.logger.log(a.a.Debug,"Skipping transport '"+I[r]+"' because it is not supported in your environment.'"),new Error("'"+I[r]+"' is not supported in your environment.");this.logger.log(a.a.Debug,"Selecting transport '"+I[r]+"'.");try{return this.constructTransport(r)}catch(e){return e}},e.prototype.isITransport=function(e){return e&&"object"==typeof e&&"connect"in e},e.prototype.stopConnection=function(e){var t=this;if(this.logger.log(a.a.Debug,"HttpConnection.stopConnection("+e+") called while in state "+this.connectionState+"."),this.transport=void 0,e=this.stopError||e,this.stopError=void 0,"Disconnected"!==this.connectionState){if("Connecting "===this.connectionState)throw this.logger.log(a.a.Warning,"Call to HttpConnection.stopConnection("+e+") was ignored because the connection is still in the connecting state."),new Error("HttpConnection.stopConnection("+e+") was called while the connection is still in the connecting state.");if("Disconnecting"===this.connectionState&&this.stopPromiseResolver(),e?this.logger.log(a.a.Error,"Connection disconnected with error '"+e+"'."):this.logger.log(a.a.Information,"Connection disconnected."),this.sendQueue&&(this.sendQueue.stop().catch(function(e){t.logger.log(a.a.Error,"TransportSendQueue.stop() threw error '"+e+"'.")}),this.sendQueue=void 0),this.connectionId=void 0,this.connectionState="Disconnected",this.connectionStarted){this.connectionStarted=!1;try{this.onclose&&this.onclose(e)}catch(t){this.logger.log(a.a.Error,"HttpConnection.onclose("+e+") threw error '"+t+"'.")}}}else this.logger.log(a.a.Debug,"Call to HttpConnection.stopConnection("+e+") was ignored because the connection is already in the disconnected state.")},e.prototype.resolveUrl=function(e){if(0===e.lastIndexOf("https://",0)||0===e.lastIndexOf("http://",0))return e;if(!w.c.isBrowser||!window.document)throw new Error("Cannot resolve '"+e+"'.");var t=window.document.createElement("a");return t.href=e,this.logger.log(a.a.Information,"Normalizing '"+e+"' to '"+t.href+"'."),t.href},e.prototype.resolveNegotiateUrl=function(e){var t=e.indexOf("?"),n=e.substring(0,-1===t?e.length:t);return"/"!==n[n.length-1]&&(n+="/"),n+="negotiate",-1===(n+=-1===t?"":e.substring(t)).indexOf("negotiateVersion")&&(n+=-1===t?"?":"&",n+="negotiateVersion="+this.negotiateVersion),n},e}();var K=function(){function e(e){this.transport=e,this.buffer=[],this.executing=!0,this.sendBufferedData=new V,this.transportResult=new V,this.sendLoopPromise=this.sendLoop()}return e.prototype.send=function(e){return this.bufferData(e),this.transportResult||(this.transportResult=new V),this.transportResult.promise},e.prototype.stop=function(){return this.executing=!1,this.sendBufferedData.resolve(),this.sendLoopPromise},e.prototype.bufferData=function(e){if(this.buffer.length&&typeof this.buffer[0]!=typeof e)throw new Error("Expected data to be of type "+typeof this.buffer+" but was of type "+typeof e);this.buffer.push(e),this.sendBufferedData.resolve()},e.prototype.sendLoop=function(){return H(this,void 0,void 0,function(){var t,n,r;return q(this,function(o){switch(o.label){case 0:return[4,this.sendBufferedData.promise];case 1:if(o.sent(),!this.executing)return this.transportResult&&this.transportResult.reject("Connection stopped."),[3,6];this.sendBufferedData=new V,t=this.transportResult,this.transportResult=void 0,n="string"==typeof this.buffer[0]?this.buffer.join(""):e.concatBuffers(this.buffer),this.buffer.length=0,o.label=2;case 2:return o.trys.push([2,4,,5]),[4,this.transport.send(n)];case 3:return o.sent(),t.resolve(),[3,5];case 4:return r=o.sent(),t.reject(r),[3,5];case 5:return[3,0];case 6:return[2]}})})},e.concatBuffers=function(e){for(var t=e.map(function(e){return e.byteLength}).reduce(function(e,t){return e+t}),n=new Uint8Array(t),r=0,o=0,i=e;o
* @license MIT
*/
-var r=n(50),o=n(51),i=n(52);function a(){return c.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function s(e,t){if(a()=a())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a().toString(16)+" bytes");return 0|e}function d(e,t){if(c.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var r=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return F(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return H(e).length;default:if(r)return F(e).length;t=(""+t).toLowerCase(),r=!0}}function g(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function y(e,t,n,r,o){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=o?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(o)return-1;n=e.length-1}else if(n<0){if(!o)return-1;n=0}if("string"==typeof t&&(t=c.from(t,r)),c.isBuffer(t))return 0===t.length?-1:v(e,t,n,r,o);if("number"==typeof t)return t&=255,c.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):v(e,[t],n,r,o);throw new TypeError("val must be string, number or Buffer")}function v(e,t,n,r,o){var i,a=1,s=e.length,c=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;a=2,s/=2,c/=2,n/=2}function u(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(o){var l=-1;for(i=n;is&&(n=s-c),i=n;i>=0;i--){for(var f=!0,h=0;ho&&(r=o):r=o;var i=t.length;if(i%2!=0)throw new TypeError("Invalid hex string");r>i/2&&(r=i/2);for(var a=0;a>8,o=n%256,i.push(o),i.push(r);return i}(t,e.length-n),e,n,r)}function _(e,t,n){return 0===t&&n===e.length?r.fromByteArray(e):r.fromByteArray(e.slice(t,n))}function I(e,t,n){n=Math.min(e.length,n);for(var r=[],o=t;o239?4:u>223?3:u>191?2:1;if(o+f<=n)switch(f){case 1:u<128&&(l=u);break;case 2:128==(192&(i=e[o+1]))&&(c=(31&u)<<6|63&i)>127&&(l=c);break;case 3:i=e[o+1],a=e[o+2],128==(192&i)&&128==(192&a)&&(c=(15&u)<<12|(63&i)<<6|63&a)>2047&&(c<55296||c>57343)&&(l=c);break;case 4:i=e[o+1],a=e[o+2],s=e[o+3],128==(192&i)&&128==(192&a)&&128==(192&s)&&(c=(15&u)<<18|(63&i)<<12|(63&a)<<6|63&s)>65535&&c<1114112&&(l=c)}null===l?(l=65533,f=1):l>65535&&(l-=65536,r.push(l>>>10&1023|55296),l=56320|1023&l),r.push(l),o+=f}return function(e){var t=e.length;if(t<=T)return String.fromCharCode.apply(String,e);var n="",r=0;for(;rthis.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return x(this,t,n);case"utf8":case"utf-8":return I(this,t,n);case"ascii":return k(this,t,n);case"latin1":case"binary":return P(this,t,n);case"base64":return _(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return R(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}.apply(this,arguments)},c.prototype.equals=function(e){if(!c.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===c.compare(this,e)},c.prototype.inspect=function(){var e="",n=t.INSPECT_MAX_BYTES;return this.length>0&&(e=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(e+=" ... ")),""},c.prototype.compare=function(e,t,n,r,o){if(!c.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===o&&(o=this.length),t<0||n>e.length||r<0||o>this.length)throw new RangeError("out of range index");if(r>=o&&t>=n)return 0;if(r>=o)return-1;if(t>=n)return 1;if(this===e)return 0;for(var i=(o>>>=0)-(r>>>=0),a=(n>>>=0)-(t>>>=0),s=Math.min(i,a),u=this.slice(r,o),l=e.slice(t,n),f=0;fo)&&(n=o),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var i=!1;;)switch(r){case"hex":return b(this,e,t,n);case"utf8":case"utf-8":return m(this,e,t,n);case"ascii":return w(this,e,t,n);case"latin1":case"binary":return E(this,e,t,n);case"base64":return S(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return C(this,e,t,n);default:if(i)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),i=!0}},c.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var T=4096;function k(e,t,n){var r="";n=Math.min(e.length,n);for(var o=t;or)&&(n=r);for(var o="",i=t;in)throw new RangeError("Trying to access beyond buffer length")}function O(e,t,n,r,o,i){if(!c.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>o||te.length)throw new RangeError("Index out of range")}function L(e,t,n,r){t<0&&(t=65535+t+1);for(var o=0,i=Math.min(e.length-n,2);o>>8*(r?o:1-o)}function M(e,t,n,r){t<0&&(t=4294967295+t+1);for(var o=0,i=Math.min(e.length-n,4);o>>8*(r?o:3-o)&255}function A(e,t,n,r,o,i){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function B(e,t,n,r,i){return i||A(e,0,n,4),o.write(e,t,n,r,23,4),n+4}function j(e,t,n,r,i){return i||A(e,0,n,8),o.write(e,t,n,r,52,8),n+8}c.prototype.slice=function(e,t){var n,r=this.length;if((e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t0&&(o*=256);)r+=this[e+--t]*o;return r},c.prototype.readUInt8=function(e,t){return t||D(e,1,this.length),this[e]},c.prototype.readUInt16LE=function(e,t){return t||D(e,2,this.length),this[e]|this[e+1]<<8},c.prototype.readUInt16BE=function(e,t){return t||D(e,2,this.length),this[e]<<8|this[e+1]},c.prototype.readUInt32LE=function(e,t){return t||D(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},c.prototype.readUInt32BE=function(e,t){return t||D(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},c.prototype.readIntLE=function(e,t,n){e|=0,t|=0,n||D(e,t,this.length);for(var r=this[e],o=1,i=0;++i=(o*=128)&&(r-=Math.pow(2,8*t)),r},c.prototype.readIntBE=function(e,t,n){e|=0,t|=0,n||D(e,t,this.length);for(var r=t,o=1,i=this[e+--r];r>0&&(o*=256);)i+=this[e+--r]*o;return i>=(o*=128)&&(i-=Math.pow(2,8*t)),i},c.prototype.readInt8=function(e,t){return t||D(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},c.prototype.readInt16LE=function(e,t){t||D(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},c.prototype.readInt16BE=function(e,t){t||D(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},c.prototype.readInt32LE=function(e,t){return t||D(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},c.prototype.readInt32BE=function(e,t){return t||D(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},c.prototype.readFloatLE=function(e,t){return t||D(e,4,this.length),o.read(this,e,!0,23,4)},c.prototype.readFloatBE=function(e,t){return t||D(e,4,this.length),o.read(this,e,!1,23,4)},c.prototype.readDoubleLE=function(e,t){return t||D(e,8,this.length),o.read(this,e,!0,52,8)},c.prototype.readDoubleBE=function(e,t){return t||D(e,8,this.length),o.read(this,e,!1,52,8)},c.prototype.writeUIntLE=function(e,t,n,r){(e=+e,t|=0,n|=0,r)||O(this,e,t,n,Math.pow(2,8*n)-1,0);var o=1,i=0;for(this[t]=255&e;++i=0&&(i*=256);)this[t+o]=e/i&255;return t+n},c.prototype.writeUInt8=function(e,t,n){return e=+e,t|=0,n||O(this,e,t,1,255,0),c.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},c.prototype.writeUInt16LE=function(e,t,n){return e=+e,t|=0,n||O(this,e,t,2,65535,0),c.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):L(this,e,t,!0),t+2},c.prototype.writeUInt16BE=function(e,t,n){return e=+e,t|=0,n||O(this,e,t,2,65535,0),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):L(this,e,t,!1),t+2},c.prototype.writeUInt32LE=function(e,t,n){return e=+e,t|=0,n||O(this,e,t,4,4294967295,0),c.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):M(this,e,t,!0),t+4},c.prototype.writeUInt32BE=function(e,t,n){return e=+e,t|=0,n||O(this,e,t,4,4294967295,0),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):M(this,e,t,!1),t+4},c.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t|=0,!r){var o=Math.pow(2,8*n-1);O(this,e,t,n,o-1,-o)}var i=0,a=1,s=0;for(this[t]=255&e;++i>0)-s&255;return t+n},c.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t|=0,!r){var o=Math.pow(2,8*n-1);O(this,e,t,n,o-1,-o)}var i=n-1,a=1,s=0;for(this[t+i]=255&e;--i>=0&&(a*=256);)e<0&&0===s&&0!==this[t+i+1]&&(s=1),this[t+i]=(e/a>>0)-s&255;return t+n},c.prototype.writeInt8=function(e,t,n){return e=+e,t|=0,n||O(this,e,t,1,127,-128),c.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},c.prototype.writeInt16LE=function(e,t,n){return e=+e,t|=0,n||O(this,e,t,2,32767,-32768),c.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):L(this,e,t,!0),t+2},c.prototype.writeInt16BE=function(e,t,n){return e=+e,t|=0,n||O(this,e,t,2,32767,-32768),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):L(this,e,t,!1),t+2},c.prototype.writeInt32LE=function(e,t,n){return e=+e,t|=0,n||O(this,e,t,4,2147483647,-2147483648),c.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):M(this,e,t,!0),t+4},c.prototype.writeInt32BE=function(e,t,n){return e=+e,t|=0,n||O(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):M(this,e,t,!1),t+4},c.prototype.writeFloatLE=function(e,t,n){return B(this,e,t,!0,n)},c.prototype.writeFloatBE=function(e,t,n){return B(this,e,t,!1,n)},c.prototype.writeDoubleLE=function(e,t,n){return j(this,e,t,!0,n)},c.prototype.writeDoubleBE=function(e,t,n){return j(this,e,t,!1,n)},c.prototype.copy=function(e,t,n,r){if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t=0;--o)e[o+t]=this[o+n];else if(i<1e3||!c.TYPED_ARRAY_SUPPORT)for(o=0;o>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(i=t;i55295&&n<57344){if(!o){if(n>56319){(t-=3)>-1&&i.push(239,191,189);continue}if(a+1===r){(t-=3)>-1&&i.push(239,191,189);continue}o=n;continue}if(n<56320){(t-=3)>-1&&i.push(239,191,189),o=n;continue}n=65536+(o-55296<<10|n-56320)}else o&&(t-=3)>-1&&i.push(239,191,189);if(o=null,n<128){if((t-=1)<0)break;i.push(n)}else if(n<2048){if((t-=2)<0)break;i.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;i.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;i.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return i}function H(e){return r.toByteArray(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(U,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function q(e,t,n,r){for(var o=0;o=t.length||o>=e.length);++o)t[o+n]=e[o];return o}}).call(this,n(9))},function(e,t,n){"use strict";n.d(t,"a",function(){return r});var r=function(){function e(){}return e.prototype.log=function(e,t){},e.instance=new e,e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return r});var r=function(){function e(){}return e.write=function(t){return""+t+e.RecordSeparator},e.parse=function(t){if(t[t.length-1]!==e.RecordSeparator)throw new Error("Message is incomplete.");var n=t.split(e.RecordSeparator);return n.pop(),n},e.RecordSeparatorCode=30,e.RecordSeparator=String.fromCharCode(e.RecordSeparatorCode),e}()},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){"use strict";var r=n(23),o=Object.keys||function(e){var t=[];for(var n in e)t.push(n);return t};e.exports=f;var i=n(21);i.inherits=n(15);var a=n(36),s=n(41);i.inherits(f,a);for(var c=o(s.prototype),u=0;u=0,"must have a non-negative type"),o(a,"must have a decode function"),this.registerEncoder(function(e){return e instanceof t},function(t){var o=i(),a=r.allocUnsafe(1);return a.writeInt8(e,0),o.append(a),o.append(n(t)),o}),this.registerDecoder(e,a),this},registerEncoder:function(e,n){return o(e,"must have an encode function"),o(n,"must have an encode function"),t.push({check:e,encode:n}),this},registerDecoder:function(e,t){return o(e>=0,"must have a non-negative type"),o(t,"must have a decode function"),n.push({type:e,decode:t}),this},encoder:a.encoder,decoder:a.decoder,buffer:!0,type:"msgpack5",IncompleteBufferError:s.IncompleteBufferError}}},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(o,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?o(e.value):new n(function(t){t(e.value)}).then(a,s)}c((r=r.apply(e,t||[])).next())})},o=this&&this.__generator||function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0&&!t)throw new Error("New logical elements must start empty, or allowExistingContents must be true");return e[r]=[],e}function s(e,t,n){var i=e;if(e instanceof Comment&&(u(i)&&u(i).length>0))throw new Error("Not implemented: inserting non-empty logical container");if(c(i))throw new Error("Not implemented: moving existing logical children");var a=u(t);if(n0;)e(r,0);var i=r;i.parentNode.removeChild(i)},t.getLogicalParent=c,t.getLogicalSiblingEnd=function(e){return e[i]||null},t.getLogicalChild=function(e,t){return u(e)[t]},t.isSvgElement=function(e){return"http://www.w3.org/2000/svg"===l(e).namespaceURI},t.getLogicalChildrenArray=u,t.permuteLogicalChildren=function(e,t){var n=u(e);t.forEach(function(e){e.moveRangeStart=n[e.fromSiblingIndex],e.moveRangeEnd=function e(t){if(t instanceof Element)return t;var n=f(t);if(n)return n.previousSibling;var r=c(t);return r instanceof Element?r.lastChild:e(r)}(e.moveRangeStart)}),t.forEach(function(t){var r=t.moveToBeforeMarker=document.createComment("marker"),o=n[t.toSiblingIndex+1];o?o.parentNode.insertBefore(r,o):h(r,e)}),t.forEach(function(e){for(var t=e.moveToBeforeMarker,n=t.parentNode,r=e.moveRangeStart,o=e.moveRangeEnd,i=r;i;){var a=i.nextSibling;if(n.insertBefore(i,t),i===o)break;i=a}n.removeChild(t)}),t.forEach(function(e){n[e.toSiblingIndex]=e.moveRangeStart})},t.getClosestDomElement=l},function(e,t,n){var r=n(6),o=r.Buffer;function i(e,t){for(var n in e)t[n]=e[n]}function a(e,t,n){return o(e,t,n)}o.from&&o.alloc&&o.allocUnsafe&&o.allocUnsafeSlow?e.exports=r:(i(r,t),t.Buffer=a),i(o,a),a.from=function(e,t,n){if("number"==typeof e)throw new TypeError("Argument must not be a number");return o(e,t,n)},a.alloc=function(e,t,n){if("number"!=typeof e)throw new TypeError("Argument must be a number");var r=o(e);return void 0!==t?"string"==typeof n?r.fill(t,n):r.fill(t):r.fill(0),r},a.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return o(e)},a.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return r.SlowBuffer(e)}},function(e,t){"function"==typeof Object.create?e.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){e[e.Trace=0]="Trace",e[e.Debug=1]="Debug",e[e.Information=2]="Information",e[e.Warning=3]="Warning",e[e.Error=4]="Error",e[e.Critical=5]="Critical",e[e.None=6]="None"}(t.LogLevel||(t.LogLevel={}))},function(e,t,n){"use strict";var r;!function(e){window.DotNet=e;var t=[],n={},r={},o=1,i=null;function a(e){t.push(e)}function s(e,t,n,r){var o=u();if(o.invokeDotNetFromJS){var i=JSON.stringify(r,g),a=o.invokeDotNetFromJS(e,t,n,i);return a?f(a):null}throw new Error("The current dispatcher does not support synchronous calls from JS to .NET. Use invokeMethodAsync instead.")}function c(e,t,r,i){if(e&&r)throw new Error("For instance method calls, assemblyName should be null. Received '"+e+"'.");var a=o++,s=new Promise(function(e,t){n[a]={resolve:e,reject:t}});try{var c=JSON.stringify(i,g);u().beginInvokeDotNetFromJS(a,e,t,r,c)}catch(e){l(a,!1,e)}return s}function u(){if(null!==i)return i;throw new Error("No .NET call dispatcher has been set.")}function l(e,t,r){if(!n.hasOwnProperty(e))throw new Error("There is no pending async call with ID "+e+".");var o=n[e];delete n[e],t?o.resolve(r):o.reject(r)}function f(e){return e?JSON.parse(e,function(e,n){return t.reduce(function(t,n){return n(e,t)},n)}):null}function h(e){return e instanceof Error?e.message+"\n"+e.stack:e?e.toString():"null"}function p(e){if(r.hasOwnProperty(e))return r[e];var t,n=window,o="window";if(e.split(".").forEach(function(e){if(!(e in n))throw new Error("Could not find '"+e+"' in '"+o+"'.");t=n,n=n[e],o+="."+e}),n instanceof Function)return n=n.bind(t),r[e]=n,n;throw new Error("The value '"+o+"' is not a function.")}e.attachDispatcher=function(e){i=e},e.attachReviver=a,e.invokeMethod=function(e,t){for(var n=[],r=2;r1)for(var n=1;nthis.length)&&(r=this.length),n>=this.length)return e||i.alloc(0);if(r<=0)return e||i.alloc(0);var o,a,s=!!e,c=this._offset(n),u=r-n,l=u,f=s&&t||0,h=c[1];if(0===n&&r==this.length){if(!s)return 1===this._bufs.length?this._bufs[0]:i.concat(this._bufs,this.length);for(a=0;a(o=this._bufs[a].length-h))){this._bufs[a].copy(e,f,h,h+l);break}this._bufs[a].copy(e,f,h),f+=o,l-=o,h&&(h=0)}return e},a.prototype.shallowSlice=function(e,t){e=e||0,t=t||this.length,e<0&&(e+=this.length),t<0&&(t+=this.length);var n=this._offset(e),r=this._offset(t),o=this._bufs.slice(n[0],r[0]+1);return 0==r[1]?o.pop():o[o.length-1]=o[o.length-1].slice(0,r[1]),0!=n[1]&&(o[0]=o[0].slice(n[1])),new a(o)},a.prototype.toString=function(e,t,n){return this.slice(t,n).toString(e)},a.prototype.consume=function(e){for(;this._bufs.length;){if(!(e>=this._bufs[0].length)){this._bufs[0]=this._bufs[0].slice(e),this.length-=e;break}e-=this._bufs[0].length,this.length-=this._bufs[0].length,this._bufs.shift()}return this},a.prototype.duplicate=function(){for(var e=0,t=new a;e0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]=i)return e;switch(e){case"%s":return String(r[n++]);case"%d":return Number(r[n++]);case"%j":try{return JSON.stringify(r[n++])}catch(e){return"[Circular]"}default:return e}}),c=r[n];n=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),d(n)?r.showHidden=n:n&&t._extend(r,n),b(r.showHidden)&&(r.showHidden=!1),b(r.depth)&&(r.depth=2),b(r.colors)&&(r.colors=!1),b(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=c),l(r,e,r.depth)}function c(e,t){var n=s.styles[t];return n?"["+s.colors[n][0]+"m"+e+"["+s.colors[n][1]+"m":e}function u(e,t){return e}function l(e,n,r){if(e.customInspect&&n&&C(n.inspect)&&n.inspect!==t.inspect&&(!n.constructor||n.constructor.prototype!==n)){var o=n.inspect(r,e);return v(o)||(o=l(e,o,r)),o}var i=function(e,t){if(b(t))return e.stylize("undefined","undefined");if(v(t)){var n="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(n,"string")}if(y(t))return e.stylize(""+t,"number");if(d(t))return e.stylize(""+t,"boolean");if(g(t))return e.stylize("null","null")}(e,n);if(i)return i;var a=Object.keys(n),s=function(e){var t={};return e.forEach(function(e,n){t[e]=!0}),t}(a);if(e.showHidden&&(a=Object.getOwnPropertyNames(n)),S(n)&&(a.indexOf("message")>=0||a.indexOf("description")>=0))return f(n);if(0===a.length){if(C(n)){var c=n.name?": "+n.name:"";return e.stylize("[Function"+c+"]","special")}if(m(n))return e.stylize(RegExp.prototype.toString.call(n),"regexp");if(E(n))return e.stylize(Date.prototype.toString.call(n),"date");if(S(n))return f(n)}var u,w="",_=!1,I=["{","}"];(p(n)&&(_=!0,I=["[","]"]),C(n))&&(w=" [Function"+(n.name?": "+n.name:"")+"]");return m(n)&&(w=" "+RegExp.prototype.toString.call(n)),E(n)&&(w=" "+Date.prototype.toUTCString.call(n)),S(n)&&(w=" "+f(n)),0!==a.length||_&&0!=n.length?r<0?m(n)?e.stylize(RegExp.prototype.toString.call(n),"regexp"):e.stylize("[Object]","special"):(e.seen.push(n),u=_?function(e,t,n,r,o){for(var i=[],a=0,s=t.length;a=0&&0,e+t.replace(/\u001b\[\d\d?m/g,"").length+1},0)>60)return n[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+n[1];return n[0]+t+" "+e.join(", ")+" "+n[1]}(u,w,I)):I[0]+w+I[1]}function f(e){return"["+Error.prototype.toString.call(e)+"]"}function h(e,t,n,r,o,i){var a,s,c;if((c=Object.getOwnPropertyDescriptor(t,o)||{value:t[o]}).get?s=c.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):c.set&&(s=e.stylize("[Setter]","special")),k(r,o)||(a="["+o+"]"),s||(e.seen.indexOf(c.value)<0?(s=g(n)?l(e,c.value,null):l(e,c.value,n-1)).indexOf("\n")>-1&&(s=i?s.split("\n").map(function(e){return" "+e}).join("\n").substr(2):"\n"+s.split("\n").map(function(e){return" "+e}).join("\n")):s=e.stylize("[Circular]","special")),b(a)){if(i&&o.match(/^\d+$/))return s;(a=JSON.stringify(""+o)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(a=a.substr(1,a.length-2),a=e.stylize(a,"name")):(a=a.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),a=e.stylize(a,"string"))}return a+": "+s}function p(e){return Array.isArray(e)}function d(e){return"boolean"==typeof e}function g(e){return null===e}function y(e){return"number"==typeof e}function v(e){return"string"==typeof e}function b(e){return void 0===e}function m(e){return w(e)&&"[object RegExp]"===_(e)}function w(e){return"object"==typeof e&&null!==e}function E(e){return w(e)&&"[object Date]"===_(e)}function S(e){return w(e)&&("[object Error]"===_(e)||e instanceof Error)}function C(e){return"function"==typeof e}function _(e){return Object.prototype.toString.call(e)}function I(e){return e<10?"0"+e.toString(10):e.toString(10)}t.debuglog=function(n){if(b(i)&&(i=e.env.NODE_DEBUG||""),n=n.toUpperCase(),!a[n])if(new RegExp("\\b"+n+"\\b","i").test(i)){var r=e.pid;a[n]=function(){var e=t.format.apply(t,arguments);console.error("%s %d: %s",n,r,e)}}else a[n]=function(){};return a[n]},t.inspect=s,s.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},s.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},t.isArray=p,t.isBoolean=d,t.isNull=g,t.isNullOrUndefined=function(e){return null==e},t.isNumber=y,t.isString=v,t.isSymbol=function(e){return"symbol"==typeof e},t.isUndefined=b,t.isRegExp=m,t.isObject=w,t.isDate=E,t.isError=S,t.isFunction=C,t.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},t.isBuffer=n(54);var T=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function k(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.log=function(){var e,n;console.log("%s - %s",(e=new Date,n=[I(e.getHours()),I(e.getMinutes()),I(e.getSeconds())].join(":"),[e.getDate(),T[e.getMonth()],n].join(" ")),t.format.apply(t,arguments))},t.inherits=n(55),t._extend=function(e,t){if(!t||!w(t))return e;for(var n=Object.keys(t),r=n.length;r--;)e[n[r]]=t[n[r]];return e};var P="undefined"!=typeof Symbol?Symbol("util.promisify.custom"):void 0;function x(e,t){if(!e){var n=new Error("Promise was rejected with a falsy value");n.reason=e,e=n}return t(e)}t.promisify=function(e){if("function"!=typeof e)throw new TypeError('The "original" argument must be of type Function');if(P&&e[P]){var t;if("function"!=typeof(t=e[P]))throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(t,P,{value:t,enumerable:!1,writable:!1,configurable:!0}),t}function t(){for(var t,n,r=new Promise(function(e,r){t=e,n=r}),o=[],i=0;i0?("string"==typeof t||a.objectMode||Object.getPrototypeOf(t)===u.prototype||(t=function(e){return u.from(e)}(t)),r?a.endEmitted?e.emit("error",new Error("stream.unshift() after end event")):E(e,a,t,!0):a.ended?e.emit("error",new Error("stream.push() after EOF")):(a.reading=!1,a.decoder&&!n?(t=a.decoder.write(t),a.objectMode||0!==t.length?E(e,a,t,!1):T(e,a)):E(e,a,t,!1))):r||(a.reading=!1));return function(e){return!e.ended&&(e.needReadable||e.lengtht.highWaterMark&&(t.highWaterMark=function(e){return e>=S?e=S:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function _(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(p("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?o.nextTick(I,e):I(e))}function I(e){p("emit readable"),e.emit("readable"),R(e)}function T(e,t){t.readingMore||(t.readingMore=!0,o.nextTick(k,e,t))}function k(e,t){for(var n=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length=t.length?(n=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.head.data:t.buffer.concat(t.length),t.buffer.clear()):n=function(e,t,n){var r;ei.length?i.length:e;if(a===i.length?o+=i:o+=i.slice(0,e),0===(e-=a)){a===i.length?(++r,n.next?t.head=n.next:t.head=t.tail=null):(t.head=n,n.data=i.slice(a));break}++r}return t.length-=r,o}(e,t):function(e,t){var n=u.allocUnsafe(e),r=t.head,o=1;r.data.copy(n),e-=r.data.length;for(;r=r.next;){var i=r.data,a=e>i.length?i.length:e;if(i.copy(n,n.length-e,0,a),0===(e-=a)){a===i.length?(++o,r.next?t.head=r.next:t.head=t.tail=null):(t.head=r,r.data=i.slice(a));break}++o}return t.length-=o,n}(e,t);return r}(e,t.buffer,t.decoder),n);var n}function O(e){var t=e._readableState;if(t.length>0)throw new Error('"endReadable()" called on non-empty stream');t.endEmitted||(t.ended=!0,o.nextTick(L,t,e))}function L(e,t){e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function M(e,t){for(var n=0,r=e.length;n=t.highWaterMark||t.ended))return p("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?O(this):_(this),null;if(0===(e=C(e,t))&&t.ended)return 0===t.length&&O(this),null;var r,o=t.needReadable;return p("need readable",o),(0===t.length||t.length-e0?D(e,t):null)?(t.needReadable=!0,e=0):t.length-=e,0===t.length&&(t.ended||(t.needReadable=!0),n!==e&&t.ended&&O(this)),null!==r&&this.emit("data",r),r},m.prototype._read=function(e){this.emit("error",new Error("_read() is not implemented"))},m.prototype.pipe=function(e,t){var n=this,i=this._readableState;switch(i.pipesCount){case 0:i.pipes=e;break;case 1:i.pipes=[i.pipes,e];break;default:i.pipes.push(e)}i.pipesCount+=1,p("pipe count=%d opts=%j",i.pipesCount,t);var c=(!t||!1!==t.end)&&e!==r.stdout&&e!==r.stderr?l:m;function u(t,r){p("onunpipe"),t===n&&r&&!1===r.hasUnpiped&&(r.hasUnpiped=!0,p("cleanup"),e.removeListener("close",v),e.removeListener("finish",b),e.removeListener("drain",f),e.removeListener("error",y),e.removeListener("unpipe",u),n.removeListener("end",l),n.removeListener("end",m),n.removeListener("data",g),h=!0,!i.awaitDrain||e._writableState&&!e._writableState.needDrain||f())}function l(){p("onend"),e.end()}i.endEmitted?o.nextTick(c):n.once("end",c),e.on("unpipe",u);var f=function(e){return function(){var t=e._readableState;p("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&s(e,"data")&&(t.flowing=!0,R(e))}}(n);e.on("drain",f);var h=!1;var d=!1;function g(t){p("ondata"),d=!1,!1!==e.write(t)||d||((1===i.pipesCount&&i.pipes===e||i.pipesCount>1&&-1!==M(i.pipes,e))&&!h&&(p("false write response, pause",n._readableState.awaitDrain),n._readableState.awaitDrain++,d=!0),n.pause())}function y(t){p("onerror",t),m(),e.removeListener("error",y),0===s(e,"error")&&e.emit("error",t)}function v(){e.removeListener("finish",b),m()}function b(){p("onfinish"),e.removeListener("close",v),m()}function m(){p("unpipe"),n.unpipe(e)}return n.on("data",g),function(e,t,n){if("function"==typeof e.prependListener)return e.prependListener(t,n);e._events&&e._events[t]?a(e._events[t])?e._events[t].unshift(n):e._events[t]=[n,e._events[t]]:e.on(t,n)}(e,"error",y),e.once("close",v),e.once("finish",b),e.emit("pipe",n),i.flowing||(p("pipe resume"),n.resume()),e},m.prototype.unpipe=function(e){var t=this._readableState,n={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes?this:(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,n),this);if(!e){var r=t.pipes,o=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var i=0;i0&&a.length>o&&!a.warned){a.warned=!0;var c=new Error("Possible EventEmitter memory leak detected. "+a.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");c.name="MaxListenersExceededWarning",c.emitter=e,c.type=t,c.count=a.length,s=c,console&&console.warn&&console.warn(s)}return e}function f(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},o=function(){for(var e=[],t=0;t0&&(a=t[0]),a instanceof Error)throw a;var s=new Error("Unhandled error."+(a?" ("+a.message+")":""));throw s.context=a,s}var c=o[e];if(void 0===c)return!1;if("function"==typeof c)i(c,this,t);else{var u=c.length,l=d(c,u);for(n=0;n=0;i--)if(n[i]===t||n[i].listener===t){a=n[i].listener,o=i;break}if(o<0)return this;0===o?n.shift():function(e,t){for(;t+1=0;r--)this.removeListener(e,t[r]);return this},s.prototype.listeners=function(e){return h(this,e,!0)},s.prototype.rawListeners=function(e){return h(this,e,!1)},s.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):p.call(e,t)},s.prototype.listenerCount=p,s.prototype.eventNames=function(){return this._eventsCount>0?r(this._events):[]}},function(e,t,n){e.exports=n(37).EventEmitter},function(e,t,n){"use strict";var r=n(23);function o(e,t){e.emit("error",t)}e.exports={destroy:function(e,t){var n=this,i=this._readableState&&this._readableState.destroyed,a=this._writableState&&this._writableState.destroyed;return i||a?(t?t(e):!e||this._writableState&&this._writableState.errorEmitted||r.nextTick(o,this,e),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,function(e){!t&&e?(r.nextTick(o,n,e),n._writableState&&(n._writableState.errorEmitted=!0)):t&&t(e)}),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}}},function(e,t,n){"use strict";var r=n(61).Buffer,o=r.isEncoding||function(e){switch((e=""+e)&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function i(e){var t;switch(this.encoding=function(e){var t=function(e){if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}(e);if("string"!=typeof t&&(r.isEncoding===o||!o(e)))throw new Error("Unknown encoding: "+e);return t||e}(e),this.encoding){case"utf16le":this.text=c,this.end=u,t=4;break;case"utf8":this.fillLast=s,t=4;break;case"base64":this.text=l,this.end=f,t=3;break;default:return this.write=h,void(this.end=p)}this.lastNeed=0,this.lastTotal=0,this.lastChar=r.allocUnsafe(t)}function a(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function s(e){var t=this.lastTotal-this.lastNeed,n=function(e,t,n){if(128!=(192&t[0]))return e.lastNeed=0,"�";if(e.lastNeed>1&&t.length>1){if(128!=(192&t[1]))return e.lastNeed=1,"�";if(e.lastNeed>2&&t.length>2&&128!=(192&t[2]))return e.lastNeed=2,"�"}}(this,e);return void 0!==n?n:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function c(e,t){if((e.length-t)%2==0){var n=e.toString("utf16le",t);if(n){var r=n.charCodeAt(n.length-1);if(r>=55296&&r<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],n.slice(0,-1)}return n}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function u(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var n=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,n)}return t}function l(e,t){var n=(e.length-t)%3;return 0===n?e.toString("base64",t):(this.lastNeed=3-n,this.lastTotal=3,1===n?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-n))}function f(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function h(e){return e.toString(this.encoding)}function p(e){return e&&e.length?this.write(e):""}t.StringDecoder=i,i.prototype.write=function(e){if(0===e.length)return"";var t,n;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";n=this.lastNeed,this.lastNeed=0}else n=0;return n=0)return o>0&&(e.lastNeed=o-1),o;if(--r=0)return o>0&&(e.lastNeed=o-2),o;if(--r=0)return o>0&&(2===o?o=0:e.lastNeed=o-3),o;return 0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=n;var r=e.length-(n-this.lastNeed);return e.copy(this.lastChar,0,r),e.toString("utf8",t,r)},i.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length}},function(e,t,n){"use strict";(function(t,r,o){var i=n(23);function a(e){var t=this;this.next=null,this.entry=null,this.finish=function(){!function(e,t,n){var r=e.entry;e.entry=null;for(;r;){var o=r.callback;t.pendingcb--,o(n),r=r.next}t.corkedRequestsFree?t.corkedRequestsFree.next=e:t.corkedRequestsFree=e}(t,e)}}e.exports=b;var s,c=!t.browser&&["v0.10","v0.9."].indexOf(t.version.slice(0,5))>-1?r:i.nextTick;b.WritableState=v;var u=n(21);u.inherits=n(15);var l={deprecate:n(64)},f=n(38),h=n(14).Buffer,p=o.Uint8Array||function(){};var d,g=n(39);function y(){}function v(e,t){s=s||n(10),e=e||{};var r=t instanceof s;this.objectMode=!!e.objectMode,r&&(this.objectMode=this.objectMode||!!e.writableObjectMode);var o=e.highWaterMark,u=e.writableHighWaterMark,l=this.objectMode?16:16384;this.highWaterMark=o||0===o?o:r&&(u||0===u)?u:l,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var f=!1===e.decodeStrings;this.decodeStrings=!f,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var n=e._writableState,r=n.sync,o=n.writecb;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(n),t)!function(e,t,n,r,o){--t.pendingcb,n?(i.nextTick(o,r),i.nextTick(_,e,t),e._writableState.errorEmitted=!0,e.emit("error",r)):(o(r),e._writableState.errorEmitted=!0,e.emit("error",r),_(e,t))}(e,n,r,t,o);else{var a=S(n);a||n.corked||n.bufferProcessing||!n.bufferedRequest||E(e,n),r?c(w,e,n,a,o):w(e,n,a,o)}}(t,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new a(this)}function b(e){if(s=s||n(10),!(d.call(b,this)||this instanceof s))return new b(e);this._writableState=new v(e,this),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.final&&(this._final=e.final)),f.call(this)}function m(e,t,n,r,o,i,a){t.writelen=r,t.writecb=a,t.writing=!0,t.sync=!0,n?e._writev(o,t.onwrite):e._write(o,i,t.onwrite),t.sync=!1}function w(e,t,n,r){n||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,r(),_(e,t)}function E(e,t){t.bufferProcessing=!0;var n=t.bufferedRequest;if(e._writev&&n&&n.next){var r=t.bufferedRequestCount,o=new Array(r),i=t.corkedRequestsFree;i.entry=n;for(var s=0,c=!0;n;)o[s]=n,n.isBuf||(c=!1),n=n.next,s+=1;o.allBuffers=c,m(e,t,!0,t.length,o,"",i.finish),t.pendingcb++,t.lastBufferedRequest=null,i.next?(t.corkedRequestsFree=i.next,i.next=null):t.corkedRequestsFree=new a(t),t.bufferedRequestCount=0}else{for(;n;){var u=n.chunk,l=n.encoding,f=n.callback;if(m(e,t,!1,t.objectMode?1:u.length,u,l,f),n=n.next,t.bufferedRequestCount--,t.writing)break}null===n&&(t.lastBufferedRequest=null)}t.bufferedRequest=n,t.bufferProcessing=!1}function S(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function C(e,t){e._final(function(n){t.pendingcb--,n&&e.emit("error",n),t.prefinished=!0,e.emit("prefinish"),_(e,t)})}function _(e,t){var n=S(t);return n&&(!function(e,t){t.prefinished||t.finalCalled||("function"==typeof e._final?(t.pendingcb++,t.finalCalled=!0,i.nextTick(C,e,t)):(t.prefinished=!0,e.emit("prefinish")))}(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"))),n}u.inherits(b,f),v.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(v.prototype,"buffer",{get:l.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(d=Function.prototype[Symbol.hasInstance],Object.defineProperty(b,Symbol.hasInstance,{value:function(e){return!!d.call(this,e)||this===b&&(e&&e._writableState instanceof v)}})):d=function(e){return e instanceof this},b.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},b.prototype.write=function(e,t,n){var r,o=this._writableState,a=!1,s=!o.objectMode&&(r=e,h.isBuffer(r)||r instanceof p);return s&&!h.isBuffer(e)&&(e=function(e){return h.from(e)}(e)),"function"==typeof t&&(n=t,t=null),s?t="buffer":t||(t=o.defaultEncoding),"function"!=typeof n&&(n=y),o.ended?function(e,t){var n=new Error("write after end");e.emit("error",n),i.nextTick(t,n)}(this,n):(s||function(e,t,n,r){var o=!0,a=!1;return null===n?a=new TypeError("May not write null values to stream"):"string"==typeof n||void 0===n||t.objectMode||(a=new TypeError("Invalid non-string/buffer chunk")),a&&(e.emit("error",a),i.nextTick(r,a),o=!1),o}(this,o,e,n))&&(o.pendingcb++,a=function(e,t,n,r,o,i){if(!n){var a=function(e,t,n){e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=h.from(t,n));return t}(t,r,o);r!==a&&(n=!0,o="buffer",r=a)}var s=t.objectMode?1:r.length;t.length+=s;var c=t.length-1))throw new TypeError("Unknown encoding: "+e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(b.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),b.prototype._write=function(e,t,n){n(new Error("_write() is not implemented"))},b.prototype._writev=null,b.prototype.end=function(e,t,n){var r=this._writableState;"function"==typeof e?(n=e,e=null,t=null):"function"==typeof t&&(n=t,t=null),null!=e&&this.write(e,t),r.corked&&(r.corked=1,this.uncork()),r.ending||r.finished||function(e,t,n){t.ending=!0,_(e,t),n&&(t.finished?i.nextTick(n):e.once("finish",n));t.ended=!0,e.writable=!1}(this,r,n)},Object.defineProperty(b.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),b.prototype.destroy=g.destroy,b.prototype._undestroy=g.undestroy,b.prototype._destroy=function(e,t){this.end(),t(e)}}).call(this,n(20),n(62).setImmediate,n(9))},function(e,t,n){"use strict";e.exports=a;var r=n(10),o=n(21);function i(e,t){var n=this._transformState;n.transforming=!1;var r=n.writecb;if(!r)return this.emit("error",new Error("write callback called multiple times"));n.writechunk=null,n.writecb=null,null!=t&&this.push(t),r(e);var o=this._readableState;o.reading=!1,(o.needReadable||o.length=200&&c.statusCode<300?r(new a.b(c.statusCode,c.statusMessage||"",u)):o(new i.b(c.statusMessage||"",c.statusCode||0))});t.abortSignal&&(t.abortSignal.onabort=function(){f.abort(),o(new i.a)})})},n.prototype.getCookieString=function(e){return this.cookieJar.getCookieString(e)},n}(a.a)}).call(this,n(6).Buffer)},function(e,t,n){"use strict";(function(e){n.d(t,"a",function(){return i});var r=n(8),o=n(1),i=function(){function t(){}return t.prototype.writeHandshakeRequest=function(e){return r.a.write(JSON.stringify(e))},t.prototype.parseHandshakeResponse=function(t){var n,i;if(Object(o.g)(t)||void 0!==e&&t instanceof e){var a=new Uint8Array(t);if(-1===(c=a.indexOf(r.a.RecordSeparatorCode)))throw new Error("Message is incomplete.");var s=c+1;n=String.fromCharCode.apply(null,a.slice(0,s)),i=a.byteLength>s?a.slice(s).buffer:null}else{var c,u=t;if(-1===(c=u.indexOf(r.a.RecordSeparator)))throw new Error("Message is incomplete.");s=c+1;n=u.substring(0,s),i=u.length>s?u.substring(s):null}var l=r.a.parse(n),f=JSON.parse(l[0]);if(f.type)throw new Error("Expected a handshake response from the server.");return[i,f]},t}()}).call(this,n(6).Buffer)},,,,,function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(o,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?o(e.value):new n(function(t){t(e.value)}).then(a,s)}c((r=r.apply(e,t||[])).next())})},o=this&&this.__generator||function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},a=this&&this.__spread||function(){for(var e=[],t=0;t0?r-4:r,f=0;f>16&255,s[c++]=t>>8&255,s[c++]=255&t;2===a&&(t=o[e.charCodeAt(f)]<<2|o[e.charCodeAt(f+1)]>>4,s[c++]=255&t);1===a&&(t=o[e.charCodeAt(f)]<<10|o[e.charCodeAt(f+1)]<<4|o[e.charCodeAt(f+2)]>>2,s[c++]=t>>8&255,s[c++]=255&t);return s},t.fromByteArray=function(e){for(var t,n=e.length,o=n%3,i=[],a=0,s=n-o;as?s:a+16383));1===o?(t=e[n-1],i.push(r[t>>2]+r[t<<4&63]+"==")):2===o&&(t=(e[n-2]<<8)+e[n-1],i.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+"="));return i.join("")};for(var r=[],o=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,c=a.length;s0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}function l(e,t,n){for(var o,i,a=[],s=t;s>18&63]+r[i>>12&63]+r[i>>6&63]+r[63&i]);return a.join("")}o["-".charCodeAt(0)]=62,o["_".charCodeAt(0)]=63},function(e,t){t.read=function(e,t,n,r,o){var i,a,s=8*o-r-1,c=(1<>1,l=-7,f=n?o-1:0,h=n?-1:1,p=e[t+f];for(f+=h,i=p&(1<<-l)-1,p>>=-l,l+=s;l>0;i=256*i+e[t+f],f+=h,l-=8);for(a=i&(1<<-l)-1,i>>=-l,l+=r;l>0;a=256*a+e[t+f],f+=h,l-=8);if(0===i)i=1-u;else{if(i===c)return a?NaN:1/0*(p?-1:1);a+=Math.pow(2,r),i-=u}return(p?-1:1)*a*Math.pow(2,i-r)},t.write=function(e,t,n,r,o,i){var a,s,c,u=8*i-o-1,l=(1<>1,h=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,p=r?0:i-1,d=r?1:-1,g=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=l):(a=Math.floor(Math.log(t)/Math.LN2),t*(c=Math.pow(2,-a))<1&&(a--,c*=2),(t+=a+f>=1?h/c:h*Math.pow(2,1-f))*c>=2&&(a++,c/=2),a+f>=l?(s=0,a=l):a+f>=1?(s=(t*c-1)*Math.pow(2,o),a+=f):(s=t*Math.pow(2,f-1)*Math.pow(2,o),a=0));o>=8;e[n+p]=255&s,p+=d,s/=256,o-=8);for(a=a<0;e[n+p]=255&a,p+=d,a/=256,u-=8);e[n+p-d]|=128*g}},function(e,t){var n={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==n.call(e)}},function(e,t,n){"use strict";(function(t){
+var r=n(50),o=n(51),i=n(52);function a(){return c.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function s(e,t){if(a()=a())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a().toString(16)+" bytes");return 0|e}function d(e,t){if(c.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var r=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return F(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return H(e).length;default:if(r)return F(e).length;t=(""+t).toLowerCase(),r=!0}}function g(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function y(e,t,n,r,o){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=o?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(o)return-1;n=e.length-1}else if(n<0){if(!o)return-1;n=0}if("string"==typeof t&&(t=c.from(t,r)),c.isBuffer(t))return 0===t.length?-1:v(e,t,n,r,o);if("number"==typeof t)return t&=255,c.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):v(e,[t],n,r,o);throw new TypeError("val must be string, number or Buffer")}function v(e,t,n,r,o){var i,a=1,s=e.length,c=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;a=2,s/=2,c/=2,n/=2}function u(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(o){var l=-1;for(i=n;is&&(n=s-c),i=n;i>=0;i--){for(var f=!0,h=0;ho&&(r=o):r=o;var i=t.length;if(i%2!=0)throw new TypeError("Invalid hex string");r>i/2&&(r=i/2);for(var a=0;a>8,o=n%256,i.push(o),i.push(r);return i}(t,e.length-n),e,n,r)}function _(e,t,n){return 0===t&&n===e.length?r.fromByteArray(e):r.fromByteArray(e.slice(t,n))}function T(e,t,n){n=Math.min(e.length,n);for(var r=[],o=t;o239?4:u>223?3:u>191?2:1;if(o+f<=n)switch(f){case 1:u<128&&(l=u);break;case 2:128==(192&(i=e[o+1]))&&(c=(31&u)<<6|63&i)>127&&(l=c);break;case 3:i=e[o+1],a=e[o+2],128==(192&i)&&128==(192&a)&&(c=(15&u)<<12|(63&i)<<6|63&a)>2047&&(c<55296||c>57343)&&(l=c);break;case 4:i=e[o+1],a=e[o+2],s=e[o+3],128==(192&i)&&128==(192&a)&&128==(192&s)&&(c=(15&u)<<18|(63&i)<<12|(63&a)<<6|63&s)>65535&&c<1114112&&(l=c)}null===l?(l=65533,f=1):l>65535&&(l-=65536,r.push(l>>>10&1023|55296),l=56320|1023&l),r.push(l),o+=f}return function(e){var t=e.length;if(t<=I)return String.fromCharCode.apply(String,e);var n="",r=0;for(;rthis.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return x(this,t,n);case"utf8":case"utf-8":return T(this,t,n);case"ascii":return k(this,t,n);case"latin1":case"binary":return P(this,t,n);case"base64":return _(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return R(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}.apply(this,arguments)},c.prototype.equals=function(e){if(!c.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===c.compare(this,e)},c.prototype.inspect=function(){var e="",n=t.INSPECT_MAX_BYTES;return this.length>0&&(e=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(e+=" ... ")),""},c.prototype.compare=function(e,t,n,r,o){if(!c.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===o&&(o=this.length),t<0||n>e.length||r<0||o>this.length)throw new RangeError("out of range index");if(r>=o&&t>=n)return 0;if(r>=o)return-1;if(t>=n)return 1;if(this===e)return 0;for(var i=(o>>>=0)-(r>>>=0),a=(n>>>=0)-(t>>>=0),s=Math.min(i,a),u=this.slice(r,o),l=e.slice(t,n),f=0;fo)&&(n=o),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var i=!1;;)switch(r){case"hex":return b(this,e,t,n);case"utf8":case"utf-8":return m(this,e,t,n);case"ascii":return w(this,e,t,n);case"latin1":case"binary":return E(this,e,t,n);case"base64":return S(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return C(this,e,t,n);default:if(i)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),i=!0}},c.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var I=4096;function k(e,t,n){var r="";n=Math.min(e.length,n);for(var o=t;or)&&(n=r);for(var o="",i=t;in)throw new RangeError("Trying to access beyond buffer length")}function O(e,t,n,r,o,i){if(!c.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>o||te.length)throw new RangeError("Index out of range")}function L(e,t,n,r){t<0&&(t=65535+t+1);for(var o=0,i=Math.min(e.length-n,2);o>>8*(r?o:1-o)}function M(e,t,n,r){t<0&&(t=4294967295+t+1);for(var o=0,i=Math.min(e.length-n,4);o>>8*(r?o:3-o)&255}function A(e,t,n,r,o,i){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function j(e,t,n,r,i){return i||A(e,0,n,4),o.write(e,t,n,r,23,4),n+4}function B(e,t,n,r,i){return i||A(e,0,n,8),o.write(e,t,n,r,52,8),n+8}c.prototype.slice=function(e,t){var n,r=this.length;if((e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t0&&(o*=256);)r+=this[e+--t]*o;return r},c.prototype.readUInt8=function(e,t){return t||D(e,1,this.length),this[e]},c.prototype.readUInt16LE=function(e,t){return t||D(e,2,this.length),this[e]|this[e+1]<<8},c.prototype.readUInt16BE=function(e,t){return t||D(e,2,this.length),this[e]<<8|this[e+1]},c.prototype.readUInt32LE=function(e,t){return t||D(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},c.prototype.readUInt32BE=function(e,t){return t||D(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},c.prototype.readIntLE=function(e,t,n){e|=0,t|=0,n||D(e,t,this.length);for(var r=this[e],o=1,i=0;++i=(o*=128)&&(r-=Math.pow(2,8*t)),r},c.prototype.readIntBE=function(e,t,n){e|=0,t|=0,n||D(e,t,this.length);for(var r=t,o=1,i=this[e+--r];r>0&&(o*=256);)i+=this[e+--r]*o;return i>=(o*=128)&&(i-=Math.pow(2,8*t)),i},c.prototype.readInt8=function(e,t){return t||D(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},c.prototype.readInt16LE=function(e,t){t||D(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},c.prototype.readInt16BE=function(e,t){t||D(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},c.prototype.readInt32LE=function(e,t){return t||D(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},c.prototype.readInt32BE=function(e,t){return t||D(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},c.prototype.readFloatLE=function(e,t){return t||D(e,4,this.length),o.read(this,e,!0,23,4)},c.prototype.readFloatBE=function(e,t){return t||D(e,4,this.length),o.read(this,e,!1,23,4)},c.prototype.readDoubleLE=function(e,t){return t||D(e,8,this.length),o.read(this,e,!0,52,8)},c.prototype.readDoubleBE=function(e,t){return t||D(e,8,this.length),o.read(this,e,!1,52,8)},c.prototype.writeUIntLE=function(e,t,n,r){(e=+e,t|=0,n|=0,r)||O(this,e,t,n,Math.pow(2,8*n)-1,0);var o=1,i=0;for(this[t]=255&e;++i=0&&(i*=256);)this[t+o]=e/i&255;return t+n},c.prototype.writeUInt8=function(e,t,n){return e=+e,t|=0,n||O(this,e,t,1,255,0),c.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},c.prototype.writeUInt16LE=function(e,t,n){return e=+e,t|=0,n||O(this,e,t,2,65535,0),c.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):L(this,e,t,!0),t+2},c.prototype.writeUInt16BE=function(e,t,n){return e=+e,t|=0,n||O(this,e,t,2,65535,0),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):L(this,e,t,!1),t+2},c.prototype.writeUInt32LE=function(e,t,n){return e=+e,t|=0,n||O(this,e,t,4,4294967295,0),c.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):M(this,e,t,!0),t+4},c.prototype.writeUInt32BE=function(e,t,n){return e=+e,t|=0,n||O(this,e,t,4,4294967295,0),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):M(this,e,t,!1),t+4},c.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t|=0,!r){var o=Math.pow(2,8*n-1);O(this,e,t,n,o-1,-o)}var i=0,a=1,s=0;for(this[t]=255&e;++i>0)-s&255;return t+n},c.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t|=0,!r){var o=Math.pow(2,8*n-1);O(this,e,t,n,o-1,-o)}var i=n-1,a=1,s=0;for(this[t+i]=255&e;--i>=0&&(a*=256);)e<0&&0===s&&0!==this[t+i+1]&&(s=1),this[t+i]=(e/a>>0)-s&255;return t+n},c.prototype.writeInt8=function(e,t,n){return e=+e,t|=0,n||O(this,e,t,1,127,-128),c.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},c.prototype.writeInt16LE=function(e,t,n){return e=+e,t|=0,n||O(this,e,t,2,32767,-32768),c.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):L(this,e,t,!0),t+2},c.prototype.writeInt16BE=function(e,t,n){return e=+e,t|=0,n||O(this,e,t,2,32767,-32768),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):L(this,e,t,!1),t+2},c.prototype.writeInt32LE=function(e,t,n){return e=+e,t|=0,n||O(this,e,t,4,2147483647,-2147483648),c.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):M(this,e,t,!0),t+4},c.prototype.writeInt32BE=function(e,t,n){return e=+e,t|=0,n||O(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):M(this,e,t,!1),t+4},c.prototype.writeFloatLE=function(e,t,n){return j(this,e,t,!0,n)},c.prototype.writeFloatBE=function(e,t,n){return j(this,e,t,!1,n)},c.prototype.writeDoubleLE=function(e,t,n){return B(this,e,t,!0,n)},c.prototype.writeDoubleBE=function(e,t,n){return B(this,e,t,!1,n)},c.prototype.copy=function(e,t,n,r){if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t=0;--o)e[o+t]=this[o+n];else if(i<1e3||!c.TYPED_ARRAY_SUPPORT)for(o=0;o>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(i=t;i55295&&n<57344){if(!o){if(n>56319){(t-=3)>-1&&i.push(239,191,189);continue}if(a+1===r){(t-=3)>-1&&i.push(239,191,189);continue}o=n;continue}if(n<56320){(t-=3)>-1&&i.push(239,191,189),o=n;continue}n=65536+(o-55296<<10|n-56320)}else o&&(t-=3)>-1&&i.push(239,191,189);if(o=null,n<128){if((t-=1)<0)break;i.push(n)}else if(n<2048){if((t-=2)<0)break;i.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;i.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;i.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return i}function H(e){return r.toByteArray(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(U,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function q(e,t,n,r){for(var o=0;o=t.length||o>=e.length);++o)t[o+n]=e[o];return o}}).call(this,n(9))},function(e,t,n){"use strict";n.d(t,"a",function(){return r});var r=function(){function e(){}return e.prototype.log=function(e,t){},e.instance=new e,e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return r});var r=function(){function e(){}return e.write=function(t){return""+t+e.RecordSeparator},e.parse=function(t){if(t[t.length-1]!==e.RecordSeparator)throw new Error("Message is incomplete.");var n=t.split(e.RecordSeparator);return n.pop(),n},e.RecordSeparatorCode=30,e.RecordSeparator=String.fromCharCode(e.RecordSeparatorCode),e}()},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){"use strict";var r=n(23),o=Object.keys||function(e){var t=[];for(var n in e)t.push(n);return t};e.exports=f;var i=n(21);i.inherits=n(16);var a=n(36),s=n(41);i.inherits(f,a);for(var c=o(s.prototype),u=0;u=0,"must have a non-negative type"),o(a,"must have a decode function"),this.registerEncoder(function(e){return e instanceof t},function(t){var o=i(),a=r.allocUnsafe(1);return a.writeInt8(e,0),o.append(a),o.append(n(t)),o}),this.registerDecoder(e,a),this},registerEncoder:function(e,n){return o(e,"must have an encode function"),o(n,"must have an encode function"),t.push({check:e,encode:n}),this},registerDecoder:function(e,t){return o(e>=0,"must have a non-negative type"),o(t,"must have a decode function"),n.push({type:e,decode:t}),this},encoder:a.encoder,decoder:a.decoder,buffer:!0,type:"msgpack5",IncompleteBufferError:s.IncompleteBufferError}}},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(o,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?o(e.value):new n(function(t){t(e.value)}).then(a,s)}c((r=r.apply(e,t||[])).next())})},o=this&&this.__generator||function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0&&!t)throw new Error("New logical elements must start empty, or allowExistingContents must be true");return r in e||(e[r]=[]),e}function s(e,t,n){var i=e;if(e instanceof Comment&&(u(i)&&u(i).length>0))throw new Error("Not implemented: inserting non-empty logical container");if(c(i))throw new Error("Not implemented: moving existing logical children");var a=u(t);if(n0;)e(r,0);var i=r;i.parentNode.removeChild(i)},t.getLogicalParent=c,t.getLogicalSiblingEnd=function(e){return e[i]||null},t.getLogicalChild=function(e,t){return u(e)[t]},t.isSvgElement=function(e){return"http://www.w3.org/2000/svg"===l(e).namespaceURI},t.getLogicalChildrenArray=u,t.permuteLogicalChildren=function(e,t){var n=u(e);t.forEach(function(e){e.moveRangeStart=n[e.fromSiblingIndex],e.moveRangeEnd=function e(t){if(t instanceof Element)return t;var n=f(t);if(n)return n.previousSibling;var r=c(t);return r instanceof Element?r.lastChild:e(r)}(e.moveRangeStart)}),t.forEach(function(t){var r=t.moveToBeforeMarker=document.createComment("marker"),o=n[t.toSiblingIndex+1];o?o.parentNode.insertBefore(r,o):h(r,e)}),t.forEach(function(e){for(var t=e.moveToBeforeMarker,n=t.parentNode,r=e.moveRangeStart,o=e.moveRangeEnd,i=r;i;){var a=i.nextSibling;if(n.insertBefore(i,t),i===o)break;i=a}n.removeChild(t)}),t.forEach(function(e){n[e.toSiblingIndex]=e.moveRangeStart})},t.getClosestDomElement=l},function(e,t){var n,r,o=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function s(e){if(n===setTimeout)return setTimeout(e,0);if((n===i||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:i}catch(e){n=i}try{r="function"==typeof clearTimeout?clearTimeout:a}catch(e){r=a}}();var c,u=[],l=!1,f=-1;function h(){l&&c&&(l=!1,c.length?u=c.concat(u):f=-1,u.length&&p())}function p(){if(!l){var e=s(h);l=!0;for(var t=u.length;t;){for(c=u,u=[];++f1)for(var n=1;nthis.length)&&(r=this.length),n>=this.length)return e||i.alloc(0);if(r<=0)return e||i.alloc(0);var o,a,s=!!e,c=this._offset(n),u=r-n,l=u,f=s&&t||0,h=c[1];if(0===n&&r==this.length){if(!s)return 1===this._bufs.length?this._bufs[0]:i.concat(this._bufs,this.length);for(a=0;a(o=this._bufs[a].length-h))){this._bufs[a].copy(e,f,h,h+l);break}this._bufs[a].copy(e,f,h),f+=o,l-=o,h&&(h=0)}return e},a.prototype.shallowSlice=function(e,t){e=e||0,t=t||this.length,e<0&&(e+=this.length),t<0&&(t+=this.length);var n=this._offset(e),r=this._offset(t),o=this._bufs.slice(n[0],r[0]+1);return 0==r[1]?o.pop():o[o.length-1]=o[o.length-1].slice(0,r[1]),0!=n[1]&&(o[0]=o[0].slice(n[1])),new a(o)},a.prototype.toString=function(e,t,n){return this.slice(t,n).toString(e)},a.prototype.consume=function(e){for(;this._bufs.length;){if(!(e>=this._bufs[0].length)){this._bufs[0]=this._bufs[0].slice(e),this.length-=e;break}e-=this._bufs[0].length,this.length-=this._bufs[0].length,this._bufs.shift()}return this},a.prototype.duplicate=function(){for(var e=0,t=new a;e0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]=i)return e;switch(e){case"%s":return String(r[n++]);case"%d":return Number(r[n++]);case"%j":try{return JSON.stringify(r[n++])}catch(e){return"[Circular]"}default:return e}}),c=r[n];n=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),d(n)?r.showHidden=n:n&&t._extend(r,n),b(r.showHidden)&&(r.showHidden=!1),b(r.depth)&&(r.depth=2),b(r.colors)&&(r.colors=!1),b(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=c),l(r,e,r.depth)}function c(e,t){var n=s.styles[t];return n?"["+s.colors[n][0]+"m"+e+"["+s.colors[n][1]+"m":e}function u(e,t){return e}function l(e,n,r){if(e.customInspect&&n&&C(n.inspect)&&n.inspect!==t.inspect&&(!n.constructor||n.constructor.prototype!==n)){var o=n.inspect(r,e);return v(o)||(o=l(e,o,r)),o}var i=function(e,t){if(b(t))return e.stylize("undefined","undefined");if(v(t)){var n="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(n,"string")}if(y(t))return e.stylize(""+t,"number");if(d(t))return e.stylize(""+t,"boolean");if(g(t))return e.stylize("null","null")}(e,n);if(i)return i;var a=Object.keys(n),s=function(e){var t={};return e.forEach(function(e,n){t[e]=!0}),t}(a);if(e.showHidden&&(a=Object.getOwnPropertyNames(n)),S(n)&&(a.indexOf("message")>=0||a.indexOf("description")>=0))return f(n);if(0===a.length){if(C(n)){var c=n.name?": "+n.name:"";return e.stylize("[Function"+c+"]","special")}if(m(n))return e.stylize(RegExp.prototype.toString.call(n),"regexp");if(E(n))return e.stylize(Date.prototype.toString.call(n),"date");if(S(n))return f(n)}var u,w="",_=!1,T=["{","}"];(p(n)&&(_=!0,T=["[","]"]),C(n))&&(w=" [Function"+(n.name?": "+n.name:"")+"]");return m(n)&&(w=" "+RegExp.prototype.toString.call(n)),E(n)&&(w=" "+Date.prototype.toUTCString.call(n)),S(n)&&(w=" "+f(n)),0!==a.length||_&&0!=n.length?r<0?m(n)?e.stylize(RegExp.prototype.toString.call(n),"regexp"):e.stylize("[Object]","special"):(e.seen.push(n),u=_?function(e,t,n,r,o){for(var i=[],a=0,s=t.length;a=0&&0,e+t.replace(/\u001b\[\d\d?m/g,"").length+1},0)>60)return n[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+n[1];return n[0]+t+" "+e.join(", ")+" "+n[1]}(u,w,T)):T[0]+w+T[1]}function f(e){return"["+Error.prototype.toString.call(e)+"]"}function h(e,t,n,r,o,i){var a,s,c;if((c=Object.getOwnPropertyDescriptor(t,o)||{value:t[o]}).get?s=c.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):c.set&&(s=e.stylize("[Setter]","special")),k(r,o)||(a="["+o+"]"),s||(e.seen.indexOf(c.value)<0?(s=g(n)?l(e,c.value,null):l(e,c.value,n-1)).indexOf("\n")>-1&&(s=i?s.split("\n").map(function(e){return" "+e}).join("\n").substr(2):"\n"+s.split("\n").map(function(e){return" "+e}).join("\n")):s=e.stylize("[Circular]","special")),b(a)){if(i&&o.match(/^\d+$/))return s;(a=JSON.stringify(""+o)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(a=a.substr(1,a.length-2),a=e.stylize(a,"name")):(a=a.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),a=e.stylize(a,"string"))}return a+": "+s}function p(e){return Array.isArray(e)}function d(e){return"boolean"==typeof e}function g(e){return null===e}function y(e){return"number"==typeof e}function v(e){return"string"==typeof e}function b(e){return void 0===e}function m(e){return w(e)&&"[object RegExp]"===_(e)}function w(e){return"object"==typeof e&&null!==e}function E(e){return w(e)&&"[object Date]"===_(e)}function S(e){return w(e)&&("[object Error]"===_(e)||e instanceof Error)}function C(e){return"function"==typeof e}function _(e){return Object.prototype.toString.call(e)}function T(e){return e<10?"0"+e.toString(10):e.toString(10)}t.debuglog=function(n){if(b(i)&&(i=e.env.NODE_DEBUG||""),n=n.toUpperCase(),!a[n])if(new RegExp("\\b"+n+"\\b","i").test(i)){var r=e.pid;a[n]=function(){var e=t.format.apply(t,arguments);console.error("%s %d: %s",n,r,e)}}else a[n]=function(){};return a[n]},t.inspect=s,s.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},s.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},t.isArray=p,t.isBoolean=d,t.isNull=g,t.isNullOrUndefined=function(e){return null==e},t.isNumber=y,t.isString=v,t.isSymbol=function(e){return"symbol"==typeof e},t.isUndefined=b,t.isRegExp=m,t.isObject=w,t.isDate=E,t.isError=S,t.isFunction=C,t.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},t.isBuffer=n(54);var I=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function k(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.log=function(){var e,n;console.log("%s - %s",(e=new Date,n=[T(e.getHours()),T(e.getMinutes()),T(e.getSeconds())].join(":"),[e.getDate(),I[e.getMonth()],n].join(" ")),t.format.apply(t,arguments))},t.inherits=n(55),t._extend=function(e,t){if(!t||!w(t))return e;for(var n=Object.keys(t),r=n.length;r--;)e[n[r]]=t[n[r]];return e};var P="undefined"!=typeof Symbol?Symbol("util.promisify.custom"):void 0;function x(e,t){if(!e){var n=new Error("Promise was rejected with a falsy value");n.reason=e,e=n}return t(e)}t.promisify=function(e){if("function"!=typeof e)throw new TypeError('The "original" argument must be of type Function');if(P&&e[P]){var t;if("function"!=typeof(t=e[P]))throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(t,P,{value:t,enumerable:!1,writable:!1,configurable:!0}),t}function t(){for(var t,n,r=new Promise(function(e,r){t=e,n=r}),o=[],i=0;i0?("string"==typeof t||a.objectMode||Object.getPrototypeOf(t)===u.prototype||(t=function(e){return u.from(e)}(t)),r?a.endEmitted?e.emit("error",new Error("stream.unshift() after end event")):E(e,a,t,!0):a.ended?e.emit("error",new Error("stream.push() after EOF")):(a.reading=!1,a.decoder&&!n?(t=a.decoder.write(t),a.objectMode||0!==t.length?E(e,a,t,!1):I(e,a)):E(e,a,t,!1))):r||(a.reading=!1));return function(e){return!e.ended&&(e.needReadable||e.lengtht.highWaterMark&&(t.highWaterMark=function(e){return e>=S?e=S:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function _(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(p("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?o.nextTick(T,e):T(e))}function T(e){p("emit readable"),e.emit("readable"),R(e)}function I(e,t){t.readingMore||(t.readingMore=!0,o.nextTick(k,e,t))}function k(e,t){for(var n=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length=t.length?(n=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.head.data:t.buffer.concat(t.length),t.buffer.clear()):n=function(e,t,n){var r;ei.length?i.length:e;if(a===i.length?o+=i:o+=i.slice(0,e),0===(e-=a)){a===i.length?(++r,n.next?t.head=n.next:t.head=t.tail=null):(t.head=n,n.data=i.slice(a));break}++r}return t.length-=r,o}(e,t):function(e,t){var n=u.allocUnsafe(e),r=t.head,o=1;r.data.copy(n),e-=r.data.length;for(;r=r.next;){var i=r.data,a=e>i.length?i.length:e;if(i.copy(n,n.length-e,0,a),0===(e-=a)){a===i.length?(++o,r.next?t.head=r.next:t.head=t.tail=null):(t.head=r,r.data=i.slice(a));break}++o}return t.length-=o,n}(e,t);return r}(e,t.buffer,t.decoder),n);var n}function O(e){var t=e._readableState;if(t.length>0)throw new Error('"endReadable()" called on non-empty stream');t.endEmitted||(t.ended=!0,o.nextTick(L,t,e))}function L(e,t){e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function M(e,t){for(var n=0,r=e.length;n=t.highWaterMark||t.ended))return p("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?O(this):_(this),null;if(0===(e=C(e,t))&&t.ended)return 0===t.length&&O(this),null;var r,o=t.needReadable;return p("need readable",o),(0===t.length||t.length-e0?D(e,t):null)?(t.needReadable=!0,e=0):t.length-=e,0===t.length&&(t.ended||(t.needReadable=!0),n!==e&&t.ended&&O(this)),null!==r&&this.emit("data",r),r},m.prototype._read=function(e){this.emit("error",new Error("_read() is not implemented"))},m.prototype.pipe=function(e,t){var n=this,i=this._readableState;switch(i.pipesCount){case 0:i.pipes=e;break;case 1:i.pipes=[i.pipes,e];break;default:i.pipes.push(e)}i.pipesCount+=1,p("pipe count=%d opts=%j",i.pipesCount,t);var c=(!t||!1!==t.end)&&e!==r.stdout&&e!==r.stderr?l:m;function u(t,r){p("onunpipe"),t===n&&r&&!1===r.hasUnpiped&&(r.hasUnpiped=!0,p("cleanup"),e.removeListener("close",v),e.removeListener("finish",b),e.removeListener("drain",f),e.removeListener("error",y),e.removeListener("unpipe",u),n.removeListener("end",l),n.removeListener("end",m),n.removeListener("data",g),h=!0,!i.awaitDrain||e._writableState&&!e._writableState.needDrain||f())}function l(){p("onend"),e.end()}i.endEmitted?o.nextTick(c):n.once("end",c),e.on("unpipe",u);var f=function(e){return function(){var t=e._readableState;p("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&s(e,"data")&&(t.flowing=!0,R(e))}}(n);e.on("drain",f);var h=!1;var d=!1;function g(t){p("ondata"),d=!1,!1!==e.write(t)||d||((1===i.pipesCount&&i.pipes===e||i.pipesCount>1&&-1!==M(i.pipes,e))&&!h&&(p("false write response, pause",n._readableState.awaitDrain),n._readableState.awaitDrain++,d=!0),n.pause())}function y(t){p("onerror",t),m(),e.removeListener("error",y),0===s(e,"error")&&e.emit("error",t)}function v(){e.removeListener("finish",b),m()}function b(){p("onfinish"),e.removeListener("close",v),m()}function m(){p("unpipe"),n.unpipe(e)}return n.on("data",g),function(e,t,n){if("function"==typeof e.prependListener)return e.prependListener(t,n);e._events&&e._events[t]?a(e._events[t])?e._events[t].unshift(n):e._events[t]=[n,e._events[t]]:e.on(t,n)}(e,"error",y),e.once("close",v),e.once("finish",b),e.emit("pipe",n),i.flowing||(p("pipe resume"),n.resume()),e},m.prototype.unpipe=function(e){var t=this._readableState,n={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes?this:(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,n),this);if(!e){var r=t.pipes,o=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var i=0;i0&&a.length>o&&!a.warned){a.warned=!0;var c=new Error("Possible EventEmitter memory leak detected. "+a.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");c.name="MaxListenersExceededWarning",c.emitter=e,c.type=t,c.count=a.length,s=c,console&&console.warn&&console.warn(s)}return e}function f(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},o=function(){for(var e=[],t=0;t0&&(a=t[0]),a instanceof Error)throw a;var s=new Error("Unhandled error."+(a?" ("+a.message+")":""));throw s.context=a,s}var c=o[e];if(void 0===c)return!1;if("function"==typeof c)i(c,this,t);else{var u=c.length,l=d(c,u);for(n=0;n=0;i--)if(n[i]===t||n[i].listener===t){a=n[i].listener,o=i;break}if(o<0)return this;0===o?n.shift():function(e,t){for(;t+1=0;r--)this.removeListener(e,t[r]);return this},s.prototype.listeners=function(e){return h(this,e,!0)},s.prototype.rawListeners=function(e){return h(this,e,!1)},s.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):p.call(e,t)},s.prototype.listenerCount=p,s.prototype.eventNames=function(){return this._eventsCount>0?r(this._events):[]}},function(e,t,n){e.exports=n(37).EventEmitter},function(e,t,n){"use strict";var r=n(23);function o(e,t){e.emit("error",t)}e.exports={destroy:function(e,t){var n=this,i=this._readableState&&this._readableState.destroyed,a=this._writableState&&this._writableState.destroyed;return i||a?(t?t(e):!e||this._writableState&&this._writableState.errorEmitted||r.nextTick(o,this,e),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,function(e){!t&&e?(r.nextTick(o,n,e),n._writableState&&(n._writableState.errorEmitted=!0)):t&&t(e)}),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}}},function(e,t,n){"use strict";var r=n(61).Buffer,o=r.isEncoding||function(e){switch((e=""+e)&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function i(e){var t;switch(this.encoding=function(e){var t=function(e){if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}(e);if("string"!=typeof t&&(r.isEncoding===o||!o(e)))throw new Error("Unknown encoding: "+e);return t||e}(e),this.encoding){case"utf16le":this.text=c,this.end=u,t=4;break;case"utf8":this.fillLast=s,t=4;break;case"base64":this.text=l,this.end=f,t=3;break;default:return this.write=h,void(this.end=p)}this.lastNeed=0,this.lastTotal=0,this.lastChar=r.allocUnsafe(t)}function a(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function s(e){var t=this.lastTotal-this.lastNeed,n=function(e,t,n){if(128!=(192&t[0]))return e.lastNeed=0,"�";if(e.lastNeed>1&&t.length>1){if(128!=(192&t[1]))return e.lastNeed=1,"�";if(e.lastNeed>2&&t.length>2&&128!=(192&t[2]))return e.lastNeed=2,"�"}}(this,e);return void 0!==n?n:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function c(e,t){if((e.length-t)%2==0){var n=e.toString("utf16le",t);if(n){var r=n.charCodeAt(n.length-1);if(r>=55296&&r<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],n.slice(0,-1)}return n}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function u(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var n=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,n)}return t}function l(e,t){var n=(e.length-t)%3;return 0===n?e.toString("base64",t):(this.lastNeed=3-n,this.lastTotal=3,1===n?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-n))}function f(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function h(e){return e.toString(this.encoding)}function p(e){return e&&e.length?this.write(e):""}t.StringDecoder=i,i.prototype.write=function(e){if(0===e.length)return"";var t,n;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";n=this.lastNeed,this.lastNeed=0}else n=0;return n=0)return o>0&&(e.lastNeed=o-1),o;if(--r=0)return o>0&&(e.lastNeed=o-2),o;if(--r=0)return o>0&&(2===o?o=0:e.lastNeed=o-3),o;return 0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=n;var r=e.length-(n-this.lastNeed);return e.copy(this.lastChar,0,r),e.toString("utf8",t,r)},i.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length}},function(e,t,n){"use strict";(function(t,r,o){var i=n(23);function a(e){var t=this;this.next=null,this.entry=null,this.finish=function(){!function(e,t,n){var r=e.entry;e.entry=null;for(;r;){var o=r.callback;t.pendingcb--,o(n),r=r.next}t.corkedRequestsFree?t.corkedRequestsFree.next=e:t.corkedRequestsFree=e}(t,e)}}e.exports=b;var s,c=!t.browser&&["v0.10","v0.9."].indexOf(t.version.slice(0,5))>-1?r:i.nextTick;b.WritableState=v;var u=n(21);u.inherits=n(16);var l={deprecate:n(64)},f=n(38),h=n(15).Buffer,p=o.Uint8Array||function(){};var d,g=n(39);function y(){}function v(e,t){s=s||n(10),e=e||{};var r=t instanceof s;this.objectMode=!!e.objectMode,r&&(this.objectMode=this.objectMode||!!e.writableObjectMode);var o=e.highWaterMark,u=e.writableHighWaterMark,l=this.objectMode?16:16384;this.highWaterMark=o||0===o?o:r&&(u||0===u)?u:l,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var f=!1===e.decodeStrings;this.decodeStrings=!f,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var n=e._writableState,r=n.sync,o=n.writecb;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(n),t)!function(e,t,n,r,o){--t.pendingcb,n?(i.nextTick(o,r),i.nextTick(_,e,t),e._writableState.errorEmitted=!0,e.emit("error",r)):(o(r),e._writableState.errorEmitted=!0,e.emit("error",r),_(e,t))}(e,n,r,t,o);else{var a=S(n);a||n.corked||n.bufferProcessing||!n.bufferedRequest||E(e,n),r?c(w,e,n,a,o):w(e,n,a,o)}}(t,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new a(this)}function b(e){if(s=s||n(10),!(d.call(b,this)||this instanceof s))return new b(e);this._writableState=new v(e,this),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.final&&(this._final=e.final)),f.call(this)}function m(e,t,n,r,o,i,a){t.writelen=r,t.writecb=a,t.writing=!0,t.sync=!0,n?e._writev(o,t.onwrite):e._write(o,i,t.onwrite),t.sync=!1}function w(e,t,n,r){n||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,r(),_(e,t)}function E(e,t){t.bufferProcessing=!0;var n=t.bufferedRequest;if(e._writev&&n&&n.next){var r=t.bufferedRequestCount,o=new Array(r),i=t.corkedRequestsFree;i.entry=n;for(var s=0,c=!0;n;)o[s]=n,n.isBuf||(c=!1),n=n.next,s+=1;o.allBuffers=c,m(e,t,!0,t.length,o,"",i.finish),t.pendingcb++,t.lastBufferedRequest=null,i.next?(t.corkedRequestsFree=i.next,i.next=null):t.corkedRequestsFree=new a(t),t.bufferedRequestCount=0}else{for(;n;){var u=n.chunk,l=n.encoding,f=n.callback;if(m(e,t,!1,t.objectMode?1:u.length,u,l,f),n=n.next,t.bufferedRequestCount--,t.writing)break}null===n&&(t.lastBufferedRequest=null)}t.bufferedRequest=n,t.bufferProcessing=!1}function S(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function C(e,t){e._final(function(n){t.pendingcb--,n&&e.emit("error",n),t.prefinished=!0,e.emit("prefinish"),_(e,t)})}function _(e,t){var n=S(t);return n&&(!function(e,t){t.prefinished||t.finalCalled||("function"==typeof e._final?(t.pendingcb++,t.finalCalled=!0,i.nextTick(C,e,t)):(t.prefinished=!0,e.emit("prefinish")))}(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"))),n}u.inherits(b,f),v.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(v.prototype,"buffer",{get:l.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(d=Function.prototype[Symbol.hasInstance],Object.defineProperty(b,Symbol.hasInstance,{value:function(e){return!!d.call(this,e)||this===b&&(e&&e._writableState instanceof v)}})):d=function(e){return e instanceof this},b.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},b.prototype.write=function(e,t,n){var r,o=this._writableState,a=!1,s=!o.objectMode&&(r=e,h.isBuffer(r)||r instanceof p);return s&&!h.isBuffer(e)&&(e=function(e){return h.from(e)}(e)),"function"==typeof t&&(n=t,t=null),s?t="buffer":t||(t=o.defaultEncoding),"function"!=typeof n&&(n=y),o.ended?function(e,t){var n=new Error("write after end");e.emit("error",n),i.nextTick(t,n)}(this,n):(s||function(e,t,n,r){var o=!0,a=!1;return null===n?a=new TypeError("May not write null values to stream"):"string"==typeof n||void 0===n||t.objectMode||(a=new TypeError("Invalid non-string/buffer chunk")),a&&(e.emit("error",a),i.nextTick(r,a),o=!1),o}(this,o,e,n))&&(o.pendingcb++,a=function(e,t,n,r,o,i){if(!n){var a=function(e,t,n){e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=h.from(t,n));return t}(t,r,o);r!==a&&(n=!0,o="buffer",r=a)}var s=t.objectMode?1:r.length;t.length+=s;var c=t.length-1))throw new TypeError("Unknown encoding: "+e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(b.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),b.prototype._write=function(e,t,n){n(new Error("_write() is not implemented"))},b.prototype._writev=null,b.prototype.end=function(e,t,n){var r=this._writableState;"function"==typeof e?(n=e,e=null,t=null):"function"==typeof t&&(n=t,t=null),null!=e&&this.write(e,t),r.corked&&(r.corked=1,this.uncork()),r.ending||r.finished||function(e,t,n){t.ending=!0,_(e,t),n&&(t.finished?i.nextTick(n):e.once("finish",n));t.ended=!0,e.writable=!1}(this,r,n)},Object.defineProperty(b.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),b.prototype.destroy=g.destroy,b.prototype._undestroy=g.undestroy,b.prototype._destroy=function(e,t){this.end(),t(e)}}).call(this,n(14),n(62).setImmediate,n(9))},function(e,t,n){"use strict";e.exports=a;var r=n(10),o=n(21);function i(e,t){var n=this._transformState;n.transforming=!1;var r=n.writecb;if(!r)return this.emit("error",new Error("write callback called multiple times"));n.writechunk=null,n.writecb=null,null!=t&&this.push(t),r(e);var o=this._readableState;o.reading=!1,(o.needReadable||o.length=200&&c.statusCode<300?r(new a.b(c.statusCode,c.statusMessage||"",u)):o(new i.b(c.statusMessage||"",c.statusCode||0))});t.abortSignal&&(t.abortSignal.onabort=function(){f.abort(),o(new i.a)})})},n.prototype.getCookieString=function(e){return this.cookieJar.getCookieString(e)},n}(a.a)}).call(this,n(6).Buffer)},function(e,t,n){"use strict";(function(e){n.d(t,"a",function(){return i});var r=n(8),o=n(1),i=function(){function t(){}return t.prototype.writeHandshakeRequest=function(e){return r.a.write(JSON.stringify(e))},t.prototype.parseHandshakeResponse=function(t){var n,i;if(Object(o.i)(t)||void 0!==e&&t instanceof e){var a=new Uint8Array(t);if(-1===(c=a.indexOf(r.a.RecordSeparatorCode)))throw new Error("Message is incomplete.");var s=c+1;n=String.fromCharCode.apply(null,a.slice(0,s)),i=a.byteLength>s?a.slice(s).buffer:null}else{var c,u=t;if(-1===(c=u.indexOf(r.a.RecordSeparator)))throw new Error("Message is incomplete.");s=c+1;n=u.substring(0,s),i=u.length>s?u.substring(s):null}var l=r.a.parse(n),f=JSON.parse(l[0]);if(f.type)throw new Error("Expected a handshake response from the server.");return[i,f]},t}()}).call(this,n(6).Buffer)},,,,,function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(o,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?o(e.value):new n(function(t){t(e.value)}).then(a,s)}c((r=r.apply(e,t||[])).next())})},o=this&&this.__generator||function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},a=this&&this.__spread||function(){for(var e=[],t=0;t0?r-4:r,f=0;f>16&255,s[c++]=t>>8&255,s[c++]=255&t;2===a&&(t=o[e.charCodeAt(f)]<<2|o[e.charCodeAt(f+1)]>>4,s[c++]=255&t);1===a&&(t=o[e.charCodeAt(f)]<<10|o[e.charCodeAt(f+1)]<<4|o[e.charCodeAt(f+2)]>>2,s[c++]=t>>8&255,s[c++]=255&t);return s},t.fromByteArray=function(e){for(var t,n=e.length,o=n%3,i=[],a=0,s=n-o;as?s:a+16383));1===o?(t=e[n-1],i.push(r[t>>2]+r[t<<4&63]+"==")):2===o&&(t=(e[n-2]<<8)+e[n-1],i.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+"="));return i.join("")};for(var r=[],o=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,c=a.length;s0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}function l(e,t,n){for(var o,i,a=[],s=t;s>18&63]+r[i>>12&63]+r[i>>6&63]+r[63&i]);return a.join("")}o["-".charCodeAt(0)]=62,o["_".charCodeAt(0)]=63},function(e,t){t.read=function(e,t,n,r,o){var i,a,s=8*o-r-1,c=(1<>1,l=-7,f=n?o-1:0,h=n?-1:1,p=e[t+f];for(f+=h,i=p&(1<<-l)-1,p>>=-l,l+=s;l>0;i=256*i+e[t+f],f+=h,l-=8);for(a=i&(1<<-l)-1,i>>=-l,l+=r;l>0;a=256*a+e[t+f],f+=h,l-=8);if(0===i)i=1-u;else{if(i===c)return a?NaN:1/0*(p?-1:1);a+=Math.pow(2,r),i-=u}return(p?-1:1)*a*Math.pow(2,i-r)},t.write=function(e,t,n,r,o,i){var a,s,c,u=8*i-o-1,l=(1<>1,h=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,p=r?0:i-1,d=r?1:-1,g=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=l):(a=Math.floor(Math.log(t)/Math.LN2),t*(c=Math.pow(2,-a))<1&&(a--,c*=2),(t+=a+f>=1?h/c:h*Math.pow(2,1-f))*c>=2&&(a++,c/=2),a+f>=l?(s=0,a=l):a+f>=1?(s=(t*c-1)*Math.pow(2,o),a+=f):(s=t*Math.pow(2,f-1)*Math.pow(2,o),a=0));o>=8;e[n+p]=255&s,p+=d,s/=256,o-=8);for(a=a<0;e[n+p]=255&a,p+=d,a/=256,u-=8);e[n+p-d]|=128*g}},function(e,t){var n={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==n.call(e)}},function(e,t,n){"use strict";(function(t){
/*!
* The buffer module from node.js, for the browser.
*
* @author Feross Aboukhadijeh
* @license MIT
*/
-function r(e,t){if(e===t)return 0;for(var n=e.length,r=t.length,o=0,i=Math.min(n,r);o=0;u--)if(l[u]!==f[u])return!1;for(u=l.length-1;u>=0;u--)if(c=l[u],!b(e[c],t[c],n,r))return!1;return!0}(e,t,n,a))}return n?e===t:e==t}function m(e){return"[object Arguments]"==Object.prototype.toString.call(e)}function w(e,t){if(!e||!t)return!1;if("[object RegExp]"==Object.prototype.toString.call(t))return t.test(e);try{if(e instanceof t)return!0}catch(e){}return!Error.isPrototypeOf(t)&&!0===t.call({},e)}function E(e,t,n,r){var o;if("function"!=typeof t)throw new TypeError('"block" argument must be a function');"string"==typeof n&&(r=n,n=null),o=function(e){var t;try{e()}catch(e){t=e}return t}(t),r=(n&&n.name?" ("+n.name+").":".")+(r?" "+r:"."),e&&!o&&y(o,n,"Missing expected exception"+r);var a="string"==typeof r,s=!e&&o&&!n;if((!e&&i.isError(o)&&a&&w(o,n)||s)&&y(o,n,"Got unwanted exception"+r),e&&o&&n&&!w(o,n)||!e&&o)throw o}f.AssertionError=function(e){var t;this.name="AssertionError",this.actual=e.actual,this.expected=e.expected,this.operator=e.operator,e.message?(this.message=e.message,this.generatedMessage=!1):(this.message=d(g((t=this).actual),128)+" "+t.operator+" "+d(g(t.expected),128),this.generatedMessage=!0);var n=e.stackStartFunction||y;if(Error.captureStackTrace)Error.captureStackTrace(this,n);else{var r=new Error;if(r.stack){var o=r.stack,i=p(n),a=o.indexOf("\n"+i);if(a>=0){var s=o.indexOf("\n",a+1);o=o.substring(s+1)}this.stack=o}}},i.inherits(f.AssertionError,Error),f.fail=y,f.ok=v,f.equal=function(e,t,n){e!=t&&y(e,t,n,"==",f.equal)},f.notEqual=function(e,t,n){e==t&&y(e,t,n,"!=",f.notEqual)},f.deepEqual=function(e,t,n){b(e,t,!1)||y(e,t,n,"deepEqual",f.deepEqual)},f.deepStrictEqual=function(e,t,n){b(e,t,!0)||y(e,t,n,"deepStrictEqual",f.deepStrictEqual)},f.notDeepEqual=function(e,t,n){b(e,t,!1)&&y(e,t,n,"notDeepEqual",f.notDeepEqual)},f.notDeepStrictEqual=function e(t,n,r){b(t,n,!0)&&y(t,n,r,"notDeepStrictEqual",e)},f.strictEqual=function(e,t,n){e!==t&&y(e,t,n,"===",f.strictEqual)},f.notStrictEqual=function(e,t,n){e===t&&y(e,t,n,"!==",f.notStrictEqual)},f.throws=function(e,t,n){E(!0,e,t,n)},f.doesNotThrow=function(e,t,n){E(!1,e,t,n)},f.ifError=function(e){if(e)throw e};var S=Object.keys||function(e){var t=[];for(var n in e)a.call(e,n)&&t.push(n);return t}}).call(this,n(9))},function(e,t){e.exports=function(e){return e&&"object"==typeof e&&"function"==typeof e.copy&&"function"==typeof e.fill&&"function"==typeof e.readUInt8}},function(e,t){"function"==typeof Object.create?e.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}},function(e,t,n){e.exports=n(10)},function(e,t){var n={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==n.call(e)}},function(e,t){},function(e,t,n){"use strict";var r=n(14).Buffer,o=n(60);e.exports=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.head=null,this.tail=null,this.length=0}return e.prototype.push=function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length},e.prototype.unshift=function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length},e.prototype.shift=function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}},e.prototype.clear=function(){this.head=this.tail=null,this.length=0},e.prototype.join=function(e){if(0===this.length)return"";for(var t=this.head,n=""+t.data;t=t.next;)n+=e+t.data;return n},e.prototype.concat=function(e){if(0===this.length)return r.alloc(0);if(1===this.length)return this.head.data;for(var t,n,o,i=r.allocUnsafe(e>>>0),a=this.head,s=0;a;)t=a.data,n=i,o=s,t.copy(n,o),s+=a.data.length,a=a.next;return i},e}(),o&&o.inspect&&o.inspect.custom&&(e.exports.prototype[o.inspect.custom]=function(){var e=o.inspect({length:this.length});return this.constructor.name+" "+e})},function(e,t){},function(e,t,n){var r=n(6),o=r.Buffer;function i(e,t){for(var n in e)t[n]=e[n]}function a(e,t,n){return o(e,t,n)}o.from&&o.alloc&&o.allocUnsafe&&o.allocUnsafeSlow?e.exports=r:(i(r,t),t.Buffer=a),i(o,a),a.from=function(e,t,n){if("number"==typeof e)throw new TypeError("Argument must not be a number");return o(e,t,n)},a.alloc=function(e,t,n){if("number"!=typeof e)throw new TypeError("Argument must be a number");var r=o(e);return void 0!==t?"string"==typeof n?r.fill(t,n):r.fill(t):r.fill(0),r},a.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return o(e)},a.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return r.SlowBuffer(e)}},function(e,t,n){(function(e){var r=void 0!==e&&e||"undefined"!=typeof self&&self||window,o=Function.prototype.apply;function i(e,t){this._id=e,this._clearFn=t}t.setTimeout=function(){return new i(o.call(setTimeout,r,arguments),clearTimeout)},t.setInterval=function(){return new i(o.call(setInterval,r,arguments),clearInterval)},t.clearTimeout=t.clearInterval=function(e){e&&e.close()},i.prototype.unref=i.prototype.ref=function(){},i.prototype.close=function(){this._clearFn.call(r,this._id)},t.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},t.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},t._unrefActive=t.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;t>=0&&(e._idleTimeoutId=setTimeout(function(){e._onTimeout&&e._onTimeout()},t))},n(63),t.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==e&&e.setImmediate||this&&this.setImmediate,t.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==e&&e.clearImmediate||this&&this.clearImmediate}).call(this,n(9))},function(e,t,n){(function(e,t){!function(e,n){"use strict";if(!e.setImmediate){var r,o,i,a,s,c=1,u={},l=!1,f=e.document,h=Object.getPrototypeOf&&Object.getPrototypeOf(e);h=h&&h.setTimeout?h:e,"[object process]"==={}.toString.call(e.process)?r=function(e){t.nextTick(function(){d(e)})}:!function(){if(e.postMessage&&!e.importScripts){var t=!0,n=e.onmessage;return e.onmessage=function(){t=!1},e.postMessage("","*"),e.onmessage=n,t}}()?e.MessageChannel?((i=new MessageChannel).port1.onmessage=function(e){d(e.data)},r=function(e){i.port2.postMessage(e)}):f&&"onreadystatechange"in f.createElement("script")?(o=f.documentElement,r=function(e){var t=f.createElement("script");t.onreadystatechange=function(){d(e),t.onreadystatechange=null,o.removeChild(t),t=null},o.appendChild(t)}):r=function(e){setTimeout(d,0,e)}:(a="setImmediate$"+Math.random()+"$",s=function(t){t.source===e&&"string"==typeof t.data&&0===t.data.indexOf(a)&&d(+t.data.slice(a.length))},e.addEventListener?e.addEventListener("message",s,!1):e.attachEvent("onmessage",s),r=function(t){e.postMessage(a+t,"*")}),h.setImmediate=function(e){"function"!=typeof e&&(e=new Function(""+e));for(var t=new Array(arguments.length-1),n=0;n0?this._transform(null,t,n):n()},e.exports.decoder=c,e.exports.encoder=s},function(e,t,n){(t=e.exports=n(36)).Stream=t,t.Readable=t,t.Writable=n(41),t.Duplex=n(10),t.Transform=n(42),t.PassThrough=n(67)},function(e,t,n){"use strict";e.exports=i;var r=n(42),o=n(21);function i(e){if(!(this instanceof i))return new i(e);r.call(this,e)}o.inherits=n(15),o.inherits(i,r),i.prototype._transform=function(e,t,n){n(null,e)}},function(e,t,n){var r=n(22);function o(e){Error.call(this),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name,this.message=e||"unable to decode"}n(35).inherits(o,Error),e.exports=function(e){return function(e){e instanceof r||(e=r().append(e));var t=i(e);if(t)return e.consume(t.bytesConsumed),t.value;throw new o};function t(e,t,n){return t>=n+e}function n(e,t){return{value:e,bytesConsumed:t}}function i(e,r){r=void 0===r?0:r;var o=e.length-r;if(o<=0)return null;var i,l,f,h=e.readUInt8(r),p=0;if(!function(e,t){var n=function(e){switch(e){case 196:return 2;case 197:return 3;case 198:return 5;case 199:return 3;case 200:return 4;case 201:return 6;case 202:return 5;case 203:return 9;case 204:return 2;case 205:return 3;case 206:return 5;case 207:return 9;case 208:return 2;case 209:return 3;case 210:return 5;case 211:return 9;case 212:return 3;case 213:return 4;case 214:return 6;case 215:return 10;case 216:return 18;case 217:return 2;case 218:return 3;case 219:return 5;case 222:return 3;default:return-1}}(e);return!(-1!==n&&t=0;f--)p+=e.readUInt8(r+f+1)*Math.pow(2,8*(7-f));return n(p,9);case 208:return n(p=e.readInt8(r+1),2);case 209:return n(p=e.readInt16BE(r+1),3);case 210:return n(p=e.readInt32BE(r+1),5);case 211:return n(p=function(e,t){var n=128==(128&e[t]);if(n)for(var r=1,o=t+7;o>=t;o--){var i=(255^e[o])+r;e[o]=255&i,r=i>>8}var a=e.readUInt32BE(t+0),s=e.readUInt32BE(t+4);return(4294967296*a+s)*(n?-1:1)}(e.slice(r+1,r+9),0),9);case 202:return n(p=e.readFloatBE(r+1),5);case 203:return n(p=e.readDoubleBE(r+1),9);case 217:return t(i=e.readUInt8(r+1),o,2)?n(p=e.toString("utf8",r+2,r+2+i),2+i):null;case 218:return t(i=e.readUInt16BE(r+1),o,3)?n(p=e.toString("utf8",r+3,r+3+i),3+i):null;case 219:return t(i=e.readUInt32BE(r+1),o,5)?n(p=e.toString("utf8",r+5,r+5+i),5+i):null;case 196:return t(i=e.readUInt8(r+1),o,2)?n(p=e.slice(r+2,r+2+i),2+i):null;case 197:return t(i=e.readUInt16BE(r+1),o,3)?n(p=e.slice(r+3,r+3+i),3+i):null;case 198:return t(i=e.readUInt32BE(r+1),o,5)?n(p=e.slice(r+5,r+5+i),5+i):null;case 220:return o<3?null:(i=e.readUInt16BE(r+1),a(e,r,i,3));case 221:return o<5?null:(i=e.readUInt32BE(r+1),a(e,r,i,5));case 222:return i=e.readUInt16BE(r+1),s(e,r,i,3);case 223:throw new Error("map too big to decode in JS");case 212:return c(e,r,1);case 213:return c(e,r,2);case 214:return c(e,r,4);case 215:return c(e,r,8);case 216:return c(e,r,16);case 199:return i=e.readUInt8(r+1),l=e.readUInt8(r+2),t(i,o,3)?u(e,r,l,i,3):null;case 200:return i=e.readUInt16BE(r+1),l=e.readUInt8(r+3),t(i,o,4)?u(e,r,l,i,4):null;case 201:return i=e.readUInt32BE(r+1),l=e.readUInt8(r+5),t(i,o,6)?u(e,r,l,i,6):null}if(144==(240&h))return a(e,r,i=15&h,1);if(128==(240&h))return s(e,r,i=15&h,1);if(160==(224&h))return t(i=31&h,o,1)?n(p=e.toString("utf8",r+1,r+i+1),i+1):null;if(h>=224)return n(p=h-256,1);if(h<128)return n(h,1);throw new Error("not implemented yet")}function a(e,t,r,o){var a,s=[],c=0;for(t+=o,a=0;ai)&&((n=r.allocUnsafe(9))[0]=203,n.writeDoubleBE(e,1)),n}e.exports=function(e,t,n,i){function s(c,u){var l,f,h;if(void 0===c)throw new Error("undefined is not encodable in msgpack!");if(null===c)(l=r.allocUnsafe(1))[0]=192;else if(!0===c)(l=r.allocUnsafe(1))[0]=195;else if(!1===c)(l=r.allocUnsafe(1))[0]=194;else if("string"==typeof c)(f=r.byteLength(c))<32?((l=r.allocUnsafe(1+f))[0]=160|f,f>0&&l.write(c,1)):f<=255&&!n?((l=r.allocUnsafe(2+f))[0]=217,l[1]=f,l.write(c,2)):f<=65535?((l=r.allocUnsafe(3+f))[0]=218,l.writeUInt16BE(f,1),l.write(c,3)):((l=r.allocUnsafe(5+f))[0]=219,l.writeUInt32BE(f,1),l.write(c,5));else if(c&&(c.readUInt32LE||c instanceof Uint8Array))c instanceof Uint8Array&&(c=r.from(c)),c.length<=255?((l=r.allocUnsafe(2))[0]=196,l[1]=c.length):c.length<=65535?((l=r.allocUnsafe(3))[0]=197,l.writeUInt16BE(c.length,1)):((l=r.allocUnsafe(5))[0]=198,l.writeUInt32BE(c.length,1)),l=o([l,c]);else if(Array.isArray(c))c.length<16?(l=r.allocUnsafe(1))[0]=144|c.length:c.length<65536?((l=r.allocUnsafe(3))[0]=220,l.writeUInt16BE(c.length,1)):((l=r.allocUnsafe(5))[0]=221,l.writeUInt32BE(c.length,1)),l=c.reduce(function(e,t){return e.append(s(t,!0)),e},o().append(l));else{if(!i&&"function"==typeof c.getDate)return function(e){var t,n=1*e,i=Math.floor(n/1e3),a=1e6*(n-1e3*i);if(a||i>4294967295){(t=new r(10))[0]=215,t[1]=-1;var s=4*a,c=i/Math.pow(2,32),u=s+c&4294967295,l=4294967295&i;t.writeInt32BE(u,2),t.writeInt32BE(l,6)}else(t=new r(6))[0]=214,t[1]=-1,t.writeUInt32BE(Math.floor(n/1e3),2);return o().append(t)}(c);if("object"==typeof c)l=function(t){var n,i,a=-1,s=[];for(n=0;n>8),s.push(255&a)):(s.push(201),s.push(a>>24),s.push(a>>16&255),s.push(a>>8&255),s.push(255&a));return o().append(r.from(s)).append(i)}(c)||function(e){var t,n,i=[],a=0;for(t in e)e.hasOwnProperty(t)&&void 0!==e[t]&&"function"!=typeof e[t]&&(++a,i.push(s(t,!0)),i.push(s(e[t],!0)));a<16?(n=r.allocUnsafe(1))[0]=128|a:((n=r.allocUnsafe(3))[0]=222,n.writeUInt16BE(a,1));return i.unshift(n),i.reduce(function(e,t){return e.append(t)},o())}(c);else if("number"==typeof c){if((h=c)!==Math.floor(h))return a(c,t);if(c>=0)if(c<128)(l=r.allocUnsafe(1))[0]=c;else if(c<256)(l=r.allocUnsafe(2))[0]=204,l[1]=c;else if(c<65536)(l=r.allocUnsafe(3))[0]=205,l.writeUInt16BE(c,1);else if(c<=4294967295)(l=r.allocUnsafe(5))[0]=206,l.writeUInt32BE(c,1);else{if(!(c<=9007199254740991))return a(c,!0);(l=r.allocUnsafe(9))[0]=207,function(e,t){for(var n=7;n>=0;n--)e[n+1]=255&t,t/=256}(l,c)}else if(c>=-32)(l=r.allocUnsafe(1))[0]=256+c;else if(c>=-128)(l=r.allocUnsafe(2))[0]=208,l.writeInt8(c,1);else if(c>=-32768)(l=r.allocUnsafe(3))[0]=209,l.writeInt16BE(c,1);else if(c>-214748365)(l=r.allocUnsafe(5))[0]=210,l.writeInt32BE(c,1);else{if(!(c>=-9007199254740991))return a(c,!0);(l=r.allocUnsafe(9))[0]=211,function(e,t,n){var r=n<0;r&&(n=Math.abs(n));var o=n%4294967296,i=n/4294967296;if(e.writeUInt32BE(Math.floor(i),t+0),e.writeUInt32BE(o,t+4),r)for(var a=1,s=t+7;s>=t;s--){var c=(255^e[s])+a;e[s]=255&c,a=c>>8}}(l,1,c)}}}if(!l)throw new Error("not implemented yet");return u?l:l.slice()}return s}},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(o,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?o(e.value):new n(function(t){t(e.value)}).then(a,s)}c((r=r.apply(e,t||[])).next())})},o=this&&this.__generator||function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]this.nextBatchId?this.fatalError?(this.logger.log(s.LogLevel.Debug,"Received a new batch "+e+" but errored out on a previous batch "+(this.nextBatchId-1)),[4,n.send("OnRenderCompleted",this.nextBatchId-1,this.fatalError.toString())]):[3,4]:[3,5];case 3:return o.sent(),[2];case 4:return this.logger.log(s.LogLevel.Debug,"Waiting for batch "+this.nextBatchId+". Batch "+e+" not processed."),[2];case 5:return o.trys.push([5,7,,8]),this.nextBatchId++,this.logger.log(s.LogLevel.Debug,"Applying batch "+e+"."),i.renderBatch(this.browserRendererId,new a.OutOfProcessRenderBatch(t)),[4,this.completeBatch(n,e)];case 6:return o.sent(),[3,8];case 7:throw r=o.sent(),this.fatalError=r.toString(),this.logger.log(s.LogLevel.Error,"There was an error applying batch "+e+"."),n.send("OnRenderCompleted",e,r.toString()),r;case 8:return[2]}})})},e.prototype.getLastBatchid=function(){return this.nextBatchId-1},e.prototype.completeBatch=function(e,t){return r(this,void 0,void 0,function(){return o(this,function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,e.send("OnRenderCompleted",t,null)];case 1:return n.sent(),[3,3];case 2:return n.sent(),this.logger.log(s.LogLevel.Warning,"Failed to deliver completion notification for render '"+t+"'."),[3,3];case 3:return[2]}})})},e}();t.RenderQueue=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(72),o=Math.pow(2,32),i=Math.pow(2,21)-1,a=function(){function e(e){this.batchData=e;var t=new l(e);this.arrayRangeReader=new f(e),this.arrayBuilderSegmentReader=new h(e),this.diffReader=new s(e),this.editReader=new c(e,t),this.frameReader=new u(e,t)}return e.prototype.updatedComponents=function(){return p(this.batchData,this.batchData.length-20)},e.prototype.referenceFrames=function(){return p(this.batchData,this.batchData.length-16)},e.prototype.disposedComponentIds=function(){return p(this.batchData,this.batchData.length-12)},e.prototype.disposedEventHandlerIds=function(){return p(this.batchData,this.batchData.length-8)},e.prototype.updatedComponentsEntry=function(e,t){var n=e+4*t;return p(this.batchData,n)},e.prototype.referenceFramesEntry=function(e,t){return e+20*t},e.prototype.disposedComponentIdsEntry=function(e,t){var n=e+4*t;return p(this.batchData,n)},e.prototype.disposedEventHandlerIdsEntry=function(e,t){var n=e+8*t;return g(this.batchData,n)},e}();t.OutOfProcessRenderBatch=a;var s=function(){function e(e){this.batchDataUint8=e}return e.prototype.componentId=function(e){return p(this.batchDataUint8,e)},e.prototype.edits=function(e){return e+4},e.prototype.editsEntry=function(e,t){return e+16*t},e}(),c=function(){function e(e,t){this.batchDataUint8=e,this.stringReader=t}return e.prototype.editType=function(e){return p(this.batchDataUint8,e)},e.prototype.siblingIndex=function(e){return p(this.batchDataUint8,e+4)},e.prototype.newTreeIndex=function(e){return p(this.batchDataUint8,e+8)},e.prototype.moveToSiblingIndex=function(e){return p(this.batchDataUint8,e+8)},e.prototype.removedAttributeName=function(e){var t=p(this.batchDataUint8,e+12);return this.stringReader.readString(t)},e}(),u=function(){function e(e,t){this.batchDataUint8=e,this.stringReader=t}return e.prototype.frameType=function(e){return p(this.batchDataUint8,e)},e.prototype.subtreeLength=function(e){return p(this.batchDataUint8,e+4)},e.prototype.elementReferenceCaptureId=function(e){var t=p(this.batchDataUint8,e+4);return this.stringReader.readString(t)},e.prototype.componentId=function(e){return p(this.batchDataUint8,e+8)},e.prototype.elementName=function(e){var t=p(this.batchDataUint8,e+8);return this.stringReader.readString(t)},e.prototype.textContent=function(e){var t=p(this.batchDataUint8,e+4);return this.stringReader.readString(t)},e.prototype.markupContent=function(e){var t=p(this.batchDataUint8,e+4);return this.stringReader.readString(t)},e.prototype.attributeName=function(e){var t=p(this.batchDataUint8,e+4);return this.stringReader.readString(t)},e.prototype.attributeValue=function(e){var t=p(this.batchDataUint8,e+8);return this.stringReader.readString(t)},e.prototype.attributeEventHandlerId=function(e){return g(this.batchDataUint8,e+12)},e}(),l=function(){function e(e){this.batchDataUint8=e,this.stringTableStartIndex=p(e,e.length-4)}return e.prototype.readString=function(e){if(-1===e)return null;var t,n=p(this.batchDataUint8,this.stringTableStartIndex+4*e),o=function(e,t){for(var n=0,r=0,o=0;o<4;o++){var i=e[t+o];if(n|=(127&i)<>>0)}function g(e,t){var n=d(e,t+4);if(n>i)throw new Error("Cannot read uint64 with high order part "+n+", because the result would exceed Number.MAX_SAFE_INTEGER.");return n*o+d(e,t)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r="function"==typeof TextDecoder?new TextDecoder("utf-8"):null;t.decodeUtf8=r?r.decode.bind(r):function(e){var t=0,n=e.length,r=[],o=[];for(;t65535&&(u-=65536,r.push(u>>>10&1023|55296),u=56320|1023&u),r.push(u)}r.length>1024&&(o.push(String.fromCharCode.apply(null,r)),r.length=0)}return o.push(String.fromCharCode.apply(null,r)),o.join("")}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(16),o=function(){function e(){}return e.prototype.log=function(e,t){},e.instance=new e,e}();t.NullLogger=o;var i=function(){function e(e){this.minimumLogLevel=e}return e.prototype.log=function(e,t){if(e>=this.minimumLogLevel)switch(e){case r.LogLevel.Critical:case r.LogLevel.Error:console.error("["+(new Date).toISOString()+"] "+r.LogLevel[e]+": "+t);break;case r.LogLevel.Warning:console.warn("["+(new Date).toISOString()+"] "+r.LogLevel[e]+": "+t);break;case r.LogLevel.Information:console.info("["+(new Date).toISOString()+"] "+r.LogLevel[e]+": "+t);break;default:console.log("["+(new Date).toISOString()+"] "+r.LogLevel[e]+": "+t)}},e}();t.ConsoleLogger=i},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(o,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?o(e.value):new n(function(t){t(e.value)}).then(a,s)}c((r=r.apply(e,t||[])).next())})},o=this&&this.__generator||function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]Retry Alternatively, reload
',this.message=this.modal.querySelector("h5"),this.button=this.modal.querySelector("button"),this.reloadParagraph=this.modal.querySelector("p"),this.button.addEventListener("click",function(){return r(a,void 0,void 0,function(){var e;return o(this,function(t){switch(t.label){case 0:this.show(),t.label=1;case 1:return t.trys.push([1,3,,4]),[4,window.Blazor.reconnect()];case 2:return t.sent()||this.rejected(),[3,4];case 3:return e=t.sent(),this.logger.log(i.LogLevel.Error,e),this.failed(),[3,4];case 4:return[2]}})})}),this.reloadParagraph.querySelector("a").addEventListener("click",function(){return location.reload()})}return e.prototype.show=function(){this.addedToDom||(this.addedToDom=!0,this.document.body.appendChild(this.modal)),this.modal.style.display="block",this.button.style.display="none",this.reloadParagraph.style.display="none",this.message.textContent="Attempting to reconnect to the server..."},e.prototype.hide=function(){this.modal.style.display="none"},e.prototype.failed=function(){this.button.style.display="block",this.reloadParagraph.style.display="none",this.message.innerHTML="Reconnection failed. Try reloading the page if you're unable to reconnect.",this.message.querySelector("a").addEventListener("click",function(){return location.reload()})},e.prototype.rejected=function(){this.button.style.display="none",this.reloadParagraph.style.display="none",this.message.innerHTML="Could not reconnect to the server. Reload the page to restore functionality.",this.message.querySelector("a").addEventListener("click",function(){return location.reload()})},e}();t.DefaultReconnectDisplay=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e){this.dialog=e}return e.prototype.show=function(){this.removeClasses(),this.dialog.classList.add(e.ShowClassName)},e.prototype.hide=function(){this.removeClasses(),this.dialog.classList.add(e.HideClassName)},e.prototype.failed=function(){this.removeClasses(),this.dialog.classList.add(e.FailedClassName)},e.prototype.rejected=function(){this.removeClasses(),this.dialog.classList.add(e.RejectedClassName)},e.prototype.removeClasses=function(){this.dialog.classList.remove(e.ShowClassName,e.HideClassName,e.FailedClassName,e.RejectedClassName)},e.ShowClassName="components-reconnect-show",e.HideClassName="components-reconnect-hide",e.FailedClassName="components-reconnect-failed",e.RejectedClassName="components-reconnect-rejected",e}();t.UserSpecifiedDisplay=r},function(e,t,n){"use strict";n.r(t);var r=n(6),o=n(11),i=n(2),a=function(){function e(){}return e.write=function(e){var t=e.byteLength||e.length,n=[];do{var r=127&t;(t>>=7)>0&&(r|=128),n.push(r)}while(t>0);t=e.byteLength||e.length;var o=new Uint8Array(n.length+t);return o.set(n,0),o.set(e,n.length),o.buffer},e.parse=function(e){for(var t=[],n=new Uint8Array(e),r=[0,7,14,21,28],o=0;o7)throw new Error("Messages bigger than 2GB are not supported.");if(!(n.byteLength>=o+i+a))throw new Error("Incomplete message.");t.push(n.slice?n.slice(o+i,o+i+a):n.subarray(o+i,o+i+a)),o=o+i+a}return t},e}();var s=new Uint8Array([145,i.MessageType.Ping]),c=function(){function e(){this.name="messagepack",this.version=1,this.transferFormat=i.TransferFormat.Binary,this.errorResult=1,this.voidResult=2,this.nonVoidResult=3}return e.prototype.parseMessages=function(e,t){if(!(e instanceof r.Buffer||(n=e,n&&"undefined"!=typeof ArrayBuffer&&(n instanceof ArrayBuffer||n.constructor&&"ArrayBuffer"===n.constructor.name))))throw new Error("Invalid input for MessagePack hub protocol. Expected an ArrayBuffer or Buffer.");var n;null===t&&(t=i.NullLogger.instance);for(var o=[],s=0,c=a.parse(e);s=3?e[2]:void 0,error:e[1],type:i.MessageType.Close}},e.prototype.createPingMessage=function(e){if(e.length<1)throw new Error("Invalid payload for Ping message.");return{type:i.MessageType.Ping}},e.prototype.createInvocationMessage=function(e,t){if(t.length<5)throw new Error("Invalid payload for Invocation message.");var n=t[2];return n?{arguments:t[4],headers:e,invocationId:n,streamIds:[],target:t[3],type:i.MessageType.Invocation}:{arguments:t[4],headers:e,streamIds:[],target:t[3],type:i.MessageType.Invocation}},e.prototype.createStreamItemMessage=function(e,t){if(t.length<4)throw new Error("Invalid payload for StreamItem message.");return{headers:e,invocationId:t[2],item:t[3],type:i.MessageType.StreamItem}},e.prototype.createCompletionMessage=function(e,t){if(t.length<4)throw new Error("Invalid payload for Completion message.");var n,r,o=t[3];if(o!==this.voidResult&&t.length<5)throw new Error("Invalid payload for Completion message.");switch(o){case this.errorResult:n=t[4];break;case this.nonVoidResult:r=t[4]}return{error:n,headers:e,invocationId:t[2],result:r,type:i.MessageType.Completion}},e.prototype.writeInvocation=function(e){var t=o().encode([i.MessageType.Invocation,e.headers||{},e.invocationId||null,e.target,e.arguments,e.streamIds]);return a.write(t.slice())},e.prototype.writeStreamInvocation=function(e){var t=o().encode([i.MessageType.StreamInvocation,e.headers||{},e.invocationId,e.target,e.arguments,e.streamIds]);return a.write(t.slice())},e.prototype.writeStreamItem=function(e){var t=o().encode([i.MessageType.StreamItem,e.headers||{},e.invocationId,e.item]);return a.write(t.slice())},e.prototype.writeCompletion=function(e){var t,n=o(),r=e.error?this.errorResult:e.result?this.nonVoidResult:this.voidResult;switch(r){case this.errorResult:t=n.encode([i.MessageType.Completion,e.headers||{},e.invocationId,r,e.error]);break;case this.voidResult:t=n.encode([i.MessageType.Completion,e.headers||{},e.invocationId,r]);break;case this.nonVoidResult:t=n.encode([i.MessageType.Completion,e.headers||{},e.invocationId,r,e.result])}return a.write(t.slice())},e.prototype.writeCancelInvocation=function(e){var t=o().encode([i.MessageType.CancelInvocation,e.headers||{},e.invocationId]);return a.write(t.slice())},e.prototype.readHeaders=function(e){var t=e[1];if("object"!=typeof t)throw new Error("Invalid headers.");return t},e}();n.d(t,"VERSION",function(){return u}),n.d(t,"MessagePackHubProtocol",function(){return c});var u="3.1.1-dev"}]);
\ No newline at end of file
+function r(e,t){if(e===t)return 0;for(var n=e.length,r=t.length,o=0,i=Math.min(n,r);o=0;u--)if(l[u]!==f[u])return!1;for(u=l.length-1;u>=0;u--)if(c=l[u],!b(e[c],t[c],n,r))return!1;return!0}(e,t,n,a))}return n?e===t:e==t}function m(e){return"[object Arguments]"==Object.prototype.toString.call(e)}function w(e,t){if(!e||!t)return!1;if("[object RegExp]"==Object.prototype.toString.call(t))return t.test(e);try{if(e instanceof t)return!0}catch(e){}return!Error.isPrototypeOf(t)&&!0===t.call({},e)}function E(e,t,n,r){var o;if("function"!=typeof t)throw new TypeError('"block" argument must be a function');"string"==typeof n&&(r=n,n=null),o=function(e){var t;try{e()}catch(e){t=e}return t}(t),r=(n&&n.name?" ("+n.name+").":".")+(r?" "+r:"."),e&&!o&&y(o,n,"Missing expected exception"+r);var a="string"==typeof r,s=!e&&o&&!n;if((!e&&i.isError(o)&&a&&w(o,n)||s)&&y(o,n,"Got unwanted exception"+r),e&&o&&n&&!w(o,n)||!e&&o)throw o}f.AssertionError=function(e){var t;this.name="AssertionError",this.actual=e.actual,this.expected=e.expected,this.operator=e.operator,e.message?(this.message=e.message,this.generatedMessage=!1):(this.message=d(g((t=this).actual),128)+" "+t.operator+" "+d(g(t.expected),128),this.generatedMessage=!0);var n=e.stackStartFunction||y;if(Error.captureStackTrace)Error.captureStackTrace(this,n);else{var r=new Error;if(r.stack){var o=r.stack,i=p(n),a=o.indexOf("\n"+i);if(a>=0){var s=o.indexOf("\n",a+1);o=o.substring(s+1)}this.stack=o}}},i.inherits(f.AssertionError,Error),f.fail=y,f.ok=v,f.equal=function(e,t,n){e!=t&&y(e,t,n,"==",f.equal)},f.notEqual=function(e,t,n){e==t&&y(e,t,n,"!=",f.notEqual)},f.deepEqual=function(e,t,n){b(e,t,!1)||y(e,t,n,"deepEqual",f.deepEqual)},f.deepStrictEqual=function(e,t,n){b(e,t,!0)||y(e,t,n,"deepStrictEqual",f.deepStrictEqual)},f.notDeepEqual=function(e,t,n){b(e,t,!1)&&y(e,t,n,"notDeepEqual",f.notDeepEqual)},f.notDeepStrictEqual=function e(t,n,r){b(t,n,!0)&&y(t,n,r,"notDeepStrictEqual",e)},f.strictEqual=function(e,t,n){e!==t&&y(e,t,n,"===",f.strictEqual)},f.notStrictEqual=function(e,t,n){e===t&&y(e,t,n,"!==",f.notStrictEqual)},f.throws=function(e,t,n){E(!0,e,t,n)},f.doesNotThrow=function(e,t,n){E(!1,e,t,n)},f.ifError=function(e){if(e)throw e};var S=Object.keys||function(e){var t=[];for(var n in e)a.call(e,n)&&t.push(n);return t}}).call(this,n(9))},function(e,t){e.exports=function(e){return e&&"object"==typeof e&&"function"==typeof e.copy&&"function"==typeof e.fill&&"function"==typeof e.readUInt8}},function(e,t){"function"==typeof Object.create?e.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}},function(e,t,n){e.exports=n(10)},function(e,t){var n={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==n.call(e)}},function(e,t){},function(e,t,n){"use strict";var r=n(15).Buffer,o=n(60);e.exports=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.head=null,this.tail=null,this.length=0}return e.prototype.push=function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length},e.prototype.unshift=function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length},e.prototype.shift=function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}},e.prototype.clear=function(){this.head=this.tail=null,this.length=0},e.prototype.join=function(e){if(0===this.length)return"";for(var t=this.head,n=""+t.data;t=t.next;)n+=e+t.data;return n},e.prototype.concat=function(e){if(0===this.length)return r.alloc(0);if(1===this.length)return this.head.data;for(var t,n,o,i=r.allocUnsafe(e>>>0),a=this.head,s=0;a;)t=a.data,n=i,o=s,t.copy(n,o),s+=a.data.length,a=a.next;return i},e}(),o&&o.inspect&&o.inspect.custom&&(e.exports.prototype[o.inspect.custom]=function(){var e=o.inspect({length:this.length});return this.constructor.name+" "+e})},function(e,t){},function(e,t,n){var r=n(6),o=r.Buffer;function i(e,t){for(var n in e)t[n]=e[n]}function a(e,t,n){return o(e,t,n)}o.from&&o.alloc&&o.allocUnsafe&&o.allocUnsafeSlow?e.exports=r:(i(r,t),t.Buffer=a),i(o,a),a.from=function(e,t,n){if("number"==typeof e)throw new TypeError("Argument must not be a number");return o(e,t,n)},a.alloc=function(e,t,n){if("number"!=typeof e)throw new TypeError("Argument must be a number");var r=o(e);return void 0!==t?"string"==typeof n?r.fill(t,n):r.fill(t):r.fill(0),r},a.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return o(e)},a.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return r.SlowBuffer(e)}},function(e,t,n){(function(e){var r=void 0!==e&&e||"undefined"!=typeof self&&self||window,o=Function.prototype.apply;function i(e,t){this._id=e,this._clearFn=t}t.setTimeout=function(){return new i(o.call(setTimeout,r,arguments),clearTimeout)},t.setInterval=function(){return new i(o.call(setInterval,r,arguments),clearInterval)},t.clearTimeout=t.clearInterval=function(e){e&&e.close()},i.prototype.unref=i.prototype.ref=function(){},i.prototype.close=function(){this._clearFn.call(r,this._id)},t.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},t.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},t._unrefActive=t.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;t>=0&&(e._idleTimeoutId=setTimeout(function(){e._onTimeout&&e._onTimeout()},t))},n(63),t.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==e&&e.setImmediate||this&&this.setImmediate,t.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==e&&e.clearImmediate||this&&this.clearImmediate}).call(this,n(9))},function(e,t,n){(function(e,t){!function(e,n){"use strict";if(!e.setImmediate){var r,o,i,a,s,c=1,u={},l=!1,f=e.document,h=Object.getPrototypeOf&&Object.getPrototypeOf(e);h=h&&h.setTimeout?h:e,"[object process]"==={}.toString.call(e.process)?r=function(e){t.nextTick(function(){d(e)})}:!function(){if(e.postMessage&&!e.importScripts){var t=!0,n=e.onmessage;return e.onmessage=function(){t=!1},e.postMessage("","*"),e.onmessage=n,t}}()?e.MessageChannel?((i=new MessageChannel).port1.onmessage=function(e){d(e.data)},r=function(e){i.port2.postMessage(e)}):f&&"onreadystatechange"in f.createElement("script")?(o=f.documentElement,r=function(e){var t=f.createElement("script");t.onreadystatechange=function(){d(e),t.onreadystatechange=null,o.removeChild(t),t=null},o.appendChild(t)}):r=function(e){setTimeout(d,0,e)}:(a="setImmediate$"+Math.random()+"$",s=function(t){t.source===e&&"string"==typeof t.data&&0===t.data.indexOf(a)&&d(+t.data.slice(a.length))},e.addEventListener?e.addEventListener("message",s,!1):e.attachEvent("onmessage",s),r=function(t){e.postMessage(a+t,"*")}),h.setImmediate=function(e){"function"!=typeof e&&(e=new Function(""+e));for(var t=new Array(arguments.length-1),n=0;n0?this._transform(null,t,n):n()},e.exports.decoder=c,e.exports.encoder=s},function(e,t,n){(t=e.exports=n(36)).Stream=t,t.Readable=t,t.Writable=n(41),t.Duplex=n(10),t.Transform=n(42),t.PassThrough=n(67)},function(e,t,n){"use strict";e.exports=i;var r=n(42),o=n(21);function i(e){if(!(this instanceof i))return new i(e);r.call(this,e)}o.inherits=n(16),o.inherits(i,r),i.prototype._transform=function(e,t,n){n(null,e)}},function(e,t,n){var r=n(22);function o(e){Error.call(this),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name,this.message=e||"unable to decode"}n(34).inherits(o,Error),e.exports=function(e){return function(e){e instanceof r||(e=r().append(e));var t=i(e);if(t)return e.consume(t.bytesConsumed),t.value;throw new o};function t(e,t,n){return t>=n+e}function n(e,t){return{value:e,bytesConsumed:t}}function i(e,r){r=void 0===r?0:r;var o=e.length-r;if(o<=0)return null;var i,l,f,h=e.readUInt8(r),p=0;if(!function(e,t){var n=function(e){switch(e){case 196:return 2;case 197:return 3;case 198:return 5;case 199:return 3;case 200:return 4;case 201:return 6;case 202:return 5;case 203:return 9;case 204:return 2;case 205:return 3;case 206:return 5;case 207:return 9;case 208:return 2;case 209:return 3;case 210:return 5;case 211:return 9;case 212:return 3;case 213:return 4;case 214:return 6;case 215:return 10;case 216:return 18;case 217:return 2;case 218:return 3;case 219:return 5;case 222:return 3;default:return-1}}(e);return!(-1!==n&&t=0;f--)p+=e.readUInt8(r+f+1)*Math.pow(2,8*(7-f));return n(p,9);case 208:return n(p=e.readInt8(r+1),2);case 209:return n(p=e.readInt16BE(r+1),3);case 210:return n(p=e.readInt32BE(r+1),5);case 211:return n(p=function(e,t){var n=128==(128&e[t]);if(n)for(var r=1,o=t+7;o>=t;o--){var i=(255^e[o])+r;e[o]=255&i,r=i>>8}var a=e.readUInt32BE(t+0),s=e.readUInt32BE(t+4);return(4294967296*a+s)*(n?-1:1)}(e.slice(r+1,r+9),0),9);case 202:return n(p=e.readFloatBE(r+1),5);case 203:return n(p=e.readDoubleBE(r+1),9);case 217:return t(i=e.readUInt8(r+1),o,2)?n(p=e.toString("utf8",r+2,r+2+i),2+i):null;case 218:return t(i=e.readUInt16BE(r+1),o,3)?n(p=e.toString("utf8",r+3,r+3+i),3+i):null;case 219:return t(i=e.readUInt32BE(r+1),o,5)?n(p=e.toString("utf8",r+5,r+5+i),5+i):null;case 196:return t(i=e.readUInt8(r+1),o,2)?n(p=e.slice(r+2,r+2+i),2+i):null;case 197:return t(i=e.readUInt16BE(r+1),o,3)?n(p=e.slice(r+3,r+3+i),3+i):null;case 198:return t(i=e.readUInt32BE(r+1),o,5)?n(p=e.slice(r+5,r+5+i),5+i):null;case 220:return o<3?null:(i=e.readUInt16BE(r+1),a(e,r,i,3));case 221:return o<5?null:(i=e.readUInt32BE(r+1),a(e,r,i,5));case 222:return i=e.readUInt16BE(r+1),s(e,r,i,3);case 223:throw new Error("map too big to decode in JS");case 212:return c(e,r,1);case 213:return c(e,r,2);case 214:return c(e,r,4);case 215:return c(e,r,8);case 216:return c(e,r,16);case 199:return i=e.readUInt8(r+1),l=e.readUInt8(r+2),t(i,o,3)?u(e,r,l,i,3):null;case 200:return i=e.readUInt16BE(r+1),l=e.readUInt8(r+3),t(i,o,4)?u(e,r,l,i,4):null;case 201:return i=e.readUInt32BE(r+1),l=e.readUInt8(r+5),t(i,o,6)?u(e,r,l,i,6):null}if(144==(240&h))return a(e,r,i=15&h,1);if(128==(240&h))return s(e,r,i=15&h,1);if(160==(224&h))return t(i=31&h,o,1)?n(p=e.toString("utf8",r+1,r+i+1),i+1):null;if(h>=224)return n(p=h-256,1);if(h<128)return n(h,1);throw new Error("not implemented yet")}function a(e,t,r,o){var a,s=[],c=0;for(t+=o,a=0;ai)&&((n=r.allocUnsafe(9))[0]=203,n.writeDoubleBE(e,1)),n}e.exports=function(e,t,n,i){function s(c,u){var l,f,h;if(void 0===c)throw new Error("undefined is not encodable in msgpack!");if(null===c)(l=r.allocUnsafe(1))[0]=192;else if(!0===c)(l=r.allocUnsafe(1))[0]=195;else if(!1===c)(l=r.allocUnsafe(1))[0]=194;else if("string"==typeof c)(f=r.byteLength(c))<32?((l=r.allocUnsafe(1+f))[0]=160|f,f>0&&l.write(c,1)):f<=255&&!n?((l=r.allocUnsafe(2+f))[0]=217,l[1]=f,l.write(c,2)):f<=65535?((l=r.allocUnsafe(3+f))[0]=218,l.writeUInt16BE(f,1),l.write(c,3)):((l=r.allocUnsafe(5+f))[0]=219,l.writeUInt32BE(f,1),l.write(c,5));else if(c&&(c.readUInt32LE||c instanceof Uint8Array))c instanceof Uint8Array&&(c=r.from(c)),c.length<=255?((l=r.allocUnsafe(2))[0]=196,l[1]=c.length):c.length<=65535?((l=r.allocUnsafe(3))[0]=197,l.writeUInt16BE(c.length,1)):((l=r.allocUnsafe(5))[0]=198,l.writeUInt32BE(c.length,1)),l=o([l,c]);else if(Array.isArray(c))c.length<16?(l=r.allocUnsafe(1))[0]=144|c.length:c.length<65536?((l=r.allocUnsafe(3))[0]=220,l.writeUInt16BE(c.length,1)):((l=r.allocUnsafe(5))[0]=221,l.writeUInt32BE(c.length,1)),l=c.reduce(function(e,t){return e.append(s(t,!0)),e},o().append(l));else{if(!i&&"function"==typeof c.getDate)return function(e){var t,n=1*e,i=Math.floor(n/1e3),a=1e6*(n-1e3*i);if(a||i>4294967295){(t=new r(10))[0]=215,t[1]=-1;var s=4*a,c=i/Math.pow(2,32),u=s+c&4294967295,l=4294967295&i;t.writeInt32BE(u,2),t.writeInt32BE(l,6)}else(t=new r(6))[0]=214,t[1]=-1,t.writeUInt32BE(Math.floor(n/1e3),2);return o().append(t)}(c);if("object"==typeof c)l=function(t){var n,i,a=-1,s=[];for(n=0;n>8),s.push(255&a)):(s.push(201),s.push(a>>24),s.push(a>>16&255),s.push(a>>8&255),s.push(255&a));return o().append(r.from(s)).append(i)}(c)||function(e){var t,n,i=[],a=0;for(t in e)e.hasOwnProperty(t)&&void 0!==e[t]&&"function"!=typeof e[t]&&(++a,i.push(s(t,!0)),i.push(s(e[t],!0)));a<16?(n=r.allocUnsafe(1))[0]=128|a:((n=r.allocUnsafe(3))[0]=222,n.writeUInt16BE(a,1));return i.unshift(n),i.reduce(function(e,t){return e.append(t)},o())}(c);else if("number"==typeof c){if((h=c)!==Math.floor(h))return a(c,t);if(c>=0)if(c<128)(l=r.allocUnsafe(1))[0]=c;else if(c<256)(l=r.allocUnsafe(2))[0]=204,l[1]=c;else if(c<65536)(l=r.allocUnsafe(3))[0]=205,l.writeUInt16BE(c,1);else if(c<=4294967295)(l=r.allocUnsafe(5))[0]=206,l.writeUInt32BE(c,1);else{if(!(c<=9007199254740991))return a(c,!0);(l=r.allocUnsafe(9))[0]=207,function(e,t){for(var n=7;n>=0;n--)e[n+1]=255&t,t/=256}(l,c)}else if(c>=-32)(l=r.allocUnsafe(1))[0]=256+c;else if(c>=-128)(l=r.allocUnsafe(2))[0]=208,l.writeInt8(c,1);else if(c>=-32768)(l=r.allocUnsafe(3))[0]=209,l.writeInt16BE(c,1);else if(c>-214748365)(l=r.allocUnsafe(5))[0]=210,l.writeInt32BE(c,1);else{if(!(c>=-9007199254740991))return a(c,!0);(l=r.allocUnsafe(9))[0]=211,function(e,t,n){var r=n<0;r&&(n=Math.abs(n));var o=n%4294967296,i=n/4294967296;if(e.writeUInt32BE(Math.floor(i),t+0),e.writeUInt32BE(o,t+4),r)for(var a=1,s=t+7;s>=t;s--){var c=(255^e[s])+a;e[s]=255&c,a=c>>8}}(l,1,c)}}}if(!l)throw new Error("not implemented yet");return u?l:l.slice()}return s}},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(o,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?o(e.value):new n(function(t){t(e.value)}).then(a,s)}c((r=r.apply(e,t||[])).next())})},o=this&&this.__generator||function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]this.nextBatchId?this.fatalError?(this.logger.log(s.LogLevel.Debug,"Received a new batch "+e+" but errored out on a previous batch "+(this.nextBatchId-1)),[4,n.send("OnRenderCompleted",this.nextBatchId-1,this.fatalError.toString())]):[3,4]:[3,5];case 3:return o.sent(),[2];case 4:return this.logger.log(s.LogLevel.Debug,"Waiting for batch "+this.nextBatchId+". Batch "+e+" not processed."),[2];case 5:return o.trys.push([5,7,,8]),this.nextBatchId++,this.logger.log(s.LogLevel.Debug,"Applying batch "+e+"."),i.renderBatch(this.browserRendererId,new a.OutOfProcessRenderBatch(t)),[4,this.completeBatch(n,e)];case 6:return o.sent(),[3,8];case 7:throw r=o.sent(),this.fatalError=r.toString(),this.logger.log(s.LogLevel.Error,"There was an error applying batch "+e+"."),n.send("OnRenderCompleted",e,r.toString()),r;case 8:return[2]}})})},e.prototype.getLastBatchid=function(){return this.nextBatchId-1},e.prototype.completeBatch=function(e,t){return r(this,void 0,void 0,function(){return o(this,function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,e.send("OnRenderCompleted",t,null)];case 1:return n.sent(),[3,3];case 2:return n.sent(),this.logger.log(s.LogLevel.Warning,"Failed to deliver completion notification for render '"+t+"'."),[3,3];case 3:return[2]}})})},e}();t.RenderQueue=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(72),o=Math.pow(2,32),i=Math.pow(2,21)-1,a=function(){function e(e){this.batchData=e;var t=new l(e);this.arrayRangeReader=new f(e),this.arrayBuilderSegmentReader=new h(e),this.diffReader=new s(e),this.editReader=new c(e,t),this.frameReader=new u(e,t)}return e.prototype.updatedComponents=function(){return p(this.batchData,this.batchData.length-20)},e.prototype.referenceFrames=function(){return p(this.batchData,this.batchData.length-16)},e.prototype.disposedComponentIds=function(){return p(this.batchData,this.batchData.length-12)},e.prototype.disposedEventHandlerIds=function(){return p(this.batchData,this.batchData.length-8)},e.prototype.updatedComponentsEntry=function(e,t){var n=e+4*t;return p(this.batchData,n)},e.prototype.referenceFramesEntry=function(e,t){return e+20*t},e.prototype.disposedComponentIdsEntry=function(e,t){var n=e+4*t;return p(this.batchData,n)},e.prototype.disposedEventHandlerIdsEntry=function(e,t){var n=e+8*t;return g(this.batchData,n)},e}();t.OutOfProcessRenderBatch=a;var s=function(){function e(e){this.batchDataUint8=e}return e.prototype.componentId=function(e){return p(this.batchDataUint8,e)},e.prototype.edits=function(e){return e+4},e.prototype.editsEntry=function(e,t){return e+16*t},e}(),c=function(){function e(e,t){this.batchDataUint8=e,this.stringReader=t}return e.prototype.editType=function(e){return p(this.batchDataUint8,e)},e.prototype.siblingIndex=function(e){return p(this.batchDataUint8,e+4)},e.prototype.newTreeIndex=function(e){return p(this.batchDataUint8,e+8)},e.prototype.moveToSiblingIndex=function(e){return p(this.batchDataUint8,e+8)},e.prototype.removedAttributeName=function(e){var t=p(this.batchDataUint8,e+12);return this.stringReader.readString(t)},e}(),u=function(){function e(e,t){this.batchDataUint8=e,this.stringReader=t}return e.prototype.frameType=function(e){return p(this.batchDataUint8,e)},e.prototype.subtreeLength=function(e){return p(this.batchDataUint8,e+4)},e.prototype.elementReferenceCaptureId=function(e){var t=p(this.batchDataUint8,e+4);return this.stringReader.readString(t)},e.prototype.componentId=function(e){return p(this.batchDataUint8,e+8)},e.prototype.elementName=function(e){var t=p(this.batchDataUint8,e+8);return this.stringReader.readString(t)},e.prototype.textContent=function(e){var t=p(this.batchDataUint8,e+4);return this.stringReader.readString(t)},e.prototype.markupContent=function(e){var t=p(this.batchDataUint8,e+4);return this.stringReader.readString(t)},e.prototype.attributeName=function(e){var t=p(this.batchDataUint8,e+4);return this.stringReader.readString(t)},e.prototype.attributeValue=function(e){var t=p(this.batchDataUint8,e+8);return this.stringReader.readString(t)},e.prototype.attributeEventHandlerId=function(e){return g(this.batchDataUint8,e+12)},e}(),l=function(){function e(e){this.batchDataUint8=e,this.stringTableStartIndex=p(e,e.length-4)}return e.prototype.readString=function(e){if(-1===e)return null;var t,n=p(this.batchDataUint8,this.stringTableStartIndex+4*e),o=function(e,t){for(var n=0,r=0,o=0;o<4;o++){var i=e[t+o];if(n|=(127&i)<>>0)}function g(e,t){var n=d(e,t+4);if(n>i)throw new Error("Cannot read uint64 with high order part "+n+", because the result would exceed Number.MAX_SAFE_INTEGER.");return n*o+d(e,t)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r="function"==typeof TextDecoder?new TextDecoder("utf-8"):null;t.decodeUtf8=r?r.decode.bind(r):function(e){var t=0,n=e.length,r=[],o=[];for(;t65535&&(u-=65536,r.push(u>>>10&1023|55296),u=56320|1023&u),r.push(u)}r.length>1024&&(o.push(String.fromCharCode.apply(null,r)),r.length=0)}return o.push(String.fromCharCode.apply(null,r)),o.join("")}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(17),o=function(){function e(){}return e.prototype.log=function(e,t){},e.instance=new e,e}();t.NullLogger=o;var i=function(){function e(e){this.minimumLogLevel=e}return e.prototype.log=function(e,t){if(e>=this.minimumLogLevel)switch(e){case r.LogLevel.Critical:case r.LogLevel.Error:console.error("["+(new Date).toISOString()+"] "+r.LogLevel[e]+": "+t);break;case r.LogLevel.Warning:console.warn("["+(new Date).toISOString()+"] "+r.LogLevel[e]+": "+t);break;case r.LogLevel.Information:console.info("["+(new Date).toISOString()+"] "+r.LogLevel[e]+": "+t);break;default:console.log("["+(new Date).toISOString()+"] "+r.LogLevel[e]+": "+t)}},e}();t.ConsoleLogger=i},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(o,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?o(e.value):new n(function(t){t(e.value)}).then(a,s)}c((r=r.apply(e,t||[])).next())})},o=this&&this.__generator||function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]Retry Alternatively, reload
',this.message=this.modal.querySelector("h5"),this.button=this.modal.querySelector("button"),this.reloadParagraph=this.modal.querySelector("p"),this.button.addEventListener("click",function(){return r(a,void 0,void 0,function(){var e;return o(this,function(t){switch(t.label){case 0:this.show(),t.label=1;case 1:return t.trys.push([1,3,,4]),[4,window.Blazor.reconnect()];case 2:return t.sent()||this.rejected(),[3,4];case 3:return e=t.sent(),this.logger.log(i.LogLevel.Error,e),this.failed(),[3,4];case 4:return[2]}})})}),this.reloadParagraph.querySelector("a").addEventListener("click",function(){return location.reload()})}return e.prototype.show=function(){this.addedToDom||(this.addedToDom=!0,this.document.body.appendChild(this.modal)),this.modal.style.display="block",this.button.style.display="none",this.reloadParagraph.style.display="none",this.message.textContent="Attempting to reconnect to the server..."},e.prototype.hide=function(){this.modal.style.display="none"},e.prototype.failed=function(){this.button.style.display="block",this.reloadParagraph.style.display="none",this.message.innerHTML="Reconnection failed. Try reloading the page if you're unable to reconnect.",this.message.querySelector("a").addEventListener("click",function(){return location.reload()})},e.prototype.rejected=function(){this.button.style.display="none",this.reloadParagraph.style.display="none",this.message.innerHTML="Could not reconnect to the server. Reload the page to restore functionality.",this.message.querySelector("a").addEventListener("click",function(){return location.reload()})},e}();t.DefaultReconnectDisplay=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e){this.dialog=e}return e.prototype.show=function(){this.removeClasses(),this.dialog.classList.add(e.ShowClassName)},e.prototype.hide=function(){this.removeClasses(),this.dialog.classList.add(e.HideClassName)},e.prototype.failed=function(){this.removeClasses(),this.dialog.classList.add(e.FailedClassName)},e.prototype.rejected=function(){this.removeClasses(),this.dialog.classList.add(e.RejectedClassName)},e.prototype.removeClasses=function(){this.dialog.classList.remove(e.ShowClassName,e.HideClassName,e.FailedClassName,e.RejectedClassName)},e.ShowClassName="components-reconnect-show",e.HideClassName="components-reconnect-hide",e.FailedClassName="components-reconnect-failed",e.RejectedClassName="components-reconnect-rejected",e}();t.UserSpecifiedDisplay=r},function(e,t,n){"use strict";n.r(t);var r=n(6),o=n(11),i=n(2),a=function(){function e(){}return e.write=function(e){var t=e.byteLength||e.length,n=[];do{var r=127&t;(t>>=7)>0&&(r|=128),n.push(r)}while(t>0);t=e.byteLength||e.length;var o=new Uint8Array(n.length+t);return o.set(n,0),o.set(e,n.length),o.buffer},e.parse=function(e){for(var t=[],n=new Uint8Array(e),r=[0,7,14,21,28],o=0;o7)throw new Error("Messages bigger than 2GB are not supported.");if(!(n.byteLength>=o+i+a))throw new Error("Incomplete message.");t.push(n.slice?n.slice(o+i,o+i+a):n.subarray(o+i,o+i+a)),o=o+i+a}return t},e}();var s=new Uint8Array([145,i.MessageType.Ping]),c=function(){function e(){this.name="messagepack",this.version=1,this.transferFormat=i.TransferFormat.Binary,this.errorResult=1,this.voidResult=2,this.nonVoidResult=3}return e.prototype.parseMessages=function(e,t){if(!(e instanceof r.Buffer||(n=e,n&&"undefined"!=typeof ArrayBuffer&&(n instanceof ArrayBuffer||n.constructor&&"ArrayBuffer"===n.constructor.name))))throw new Error("Invalid input for MessagePack hub protocol. Expected an ArrayBuffer or Buffer.");var n;null===t&&(t=i.NullLogger.instance);for(var o=[],s=0,c=a.parse(e);s=3?e[2]:void 0,error:e[1],type:i.MessageType.Close}},e.prototype.createPingMessage=function(e){if(e.length<1)throw new Error("Invalid payload for Ping message.");return{type:i.MessageType.Ping}},e.prototype.createInvocationMessage=function(e,t){if(t.length<5)throw new Error("Invalid payload for Invocation message.");var n=t[2];return n?{arguments:t[4],headers:e,invocationId:n,streamIds:[],target:t[3],type:i.MessageType.Invocation}:{arguments:t[4],headers:e,streamIds:[],target:t[3],type:i.MessageType.Invocation}},e.prototype.createStreamItemMessage=function(e,t){if(t.length<4)throw new Error("Invalid payload for StreamItem message.");return{headers:e,invocationId:t[2],item:t[3],type:i.MessageType.StreamItem}},e.prototype.createCompletionMessage=function(e,t){if(t.length<4)throw new Error("Invalid payload for Completion message.");var n,r,o=t[3];if(o!==this.voidResult&&t.length<5)throw new Error("Invalid payload for Completion message.");switch(o){case this.errorResult:n=t[4];break;case this.nonVoidResult:r=t[4]}return{error:n,headers:e,invocationId:t[2],result:r,type:i.MessageType.Completion}},e.prototype.writeInvocation=function(e){var t,n=o();return t=e.streamIds?n.encode([i.MessageType.Invocation,e.headers||{},e.invocationId||null,e.target,e.arguments,e.streamIds]):n.encode([i.MessageType.Invocation,e.headers||{},e.invocationId||null,e.target,e.arguments]),a.write(t.slice())},e.prototype.writeStreamInvocation=function(e){var t,n=o();return t=e.streamIds?n.encode([i.MessageType.StreamInvocation,e.headers||{},e.invocationId,e.target,e.arguments,e.streamIds]):n.encode([i.MessageType.StreamInvocation,e.headers||{},e.invocationId,e.target,e.arguments]),a.write(t.slice())},e.prototype.writeStreamItem=function(e){var t=o().encode([i.MessageType.StreamItem,e.headers||{},e.invocationId,e.item]);return a.write(t.slice())},e.prototype.writeCompletion=function(e){var t,n=o(),r=e.error?this.errorResult:e.result?this.nonVoidResult:this.voidResult;switch(r){case this.errorResult:t=n.encode([i.MessageType.Completion,e.headers||{},e.invocationId,r,e.error]);break;case this.voidResult:t=n.encode([i.MessageType.Completion,e.headers||{},e.invocationId,r]);break;case this.nonVoidResult:t=n.encode([i.MessageType.Completion,e.headers||{},e.invocationId,r,e.result])}return a.write(t.slice())},e.prototype.writeCancelInvocation=function(e){var t=o().encode([i.MessageType.CancelInvocation,e.headers||{},e.invocationId]);return a.write(t.slice())},e.prototype.readHeaders=function(e){var t=e[1];if("object"!=typeof t)throw new Error("Invalid headers.");return t},e}();n.d(t,"VERSION",function(){return u}),n.d(t,"MessagePackHubProtocol",function(){return c});var u="5.0.0-dev"}]);
\ No newline at end of file
diff --git a/src/Components/Web.JS/dist/Release/blazor.webassembly.js b/src/Components/Web.JS/dist/Release/blazor.webassembly.js
index 5279765b23d8..f0b6c6e59827 100644
--- a/src/Components/Web.JS/dist/Release/blazor.webassembly.js
+++ b/src/Components/Web.JS/dist/Release/blazor.webassembly.js
@@ -1 +1 @@
-!function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=45)}([,,,,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),n(25),n(18);var r=n(26),o=n(13),a={},i=!1;function l(e,t,n){var o=a[e];o||(o=a[e]=new r.BrowserRenderer(e)),o.attachRootComponentToLogicalElement(n,t)}t.attachRootComponentToLogicalElement=l,t.attachRootComponentToElement=function(e,t,n){var r=document.querySelector(e);if(!r)throw new Error("Could not find any element matching selector '"+e+"'.");l(n||0,o.toLogicalElement(r,!0),t)},t.renderBatch=function(e,t){var n=a[e];if(!n)throw new Error("There is no browser renderer with ID "+e+".");for(var r=t.arrayRangeReader,o=t.updatedComponents(),l=r.values(o),u=r.count(o),s=t.referenceFrames(),c=r.values(s),d=t.diffReader,f=0;f0&&o[o.length-1])&&(6===a[0]||2===a[0])){i=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]0&&!t)throw new Error("New logical elements must start empty, or allowExistingContents must be true");return e[r]=[],e}function l(e,t,n){var a=e;if(e instanceof Comment&&(s(a)&&s(a).length>0))throw new Error("Not implemented: inserting non-empty logical container");if(u(a))throw new Error("Not implemented: moving existing logical children");var i=s(t);if(n0;)e(r,0);var a=r;a.parentNode.removeChild(a)},t.getLogicalParent=u,t.getLogicalSiblingEnd=function(e){return e[a]||null},t.getLogicalChild=function(e,t){return s(e)[t]},t.isSvgElement=function(e){return"http://www.w3.org/2000/svg"===c(e).namespaceURI},t.getLogicalChildrenArray=s,t.permuteLogicalChildren=function(e,t){var n=s(e);t.forEach(function(e){e.moveRangeStart=n[e.fromSiblingIndex],e.moveRangeEnd=function e(t){if(t instanceof Element)return t;var n=d(t);if(n)return n.previousSibling;var r=u(t);return r instanceof Element?r.lastChild:e(r)}(e.moveRangeStart)}),t.forEach(function(t){var r=t.moveToBeforeMarker=document.createComment("marker"),o=n[t.toSiblingIndex+1];o?o.parentNode.insertBefore(r,o):f(r,e)}),t.forEach(function(e){for(var t=e.moveToBeforeMarker,n=t.parentNode,r=e.moveRangeStart,o=e.moveRangeEnd,a=r;a;){var i=a.nextSibling;if(n.insertBefore(a,t),a===o)break;a=i}n.removeChild(t)}),t.forEach(function(e){n[e.toSiblingIndex]=e.moveRangeStart})},t.getClosestDomElement=c},,,,function(e,t,n){"use strict";var r;!function(e){window.DotNet=e;var t=[],n={},r={},o=1,a=null;function i(e){t.push(e)}function l(e,t,n,r){var o=s();if(o.invokeDotNetFromJS){var a=JSON.stringify(r,h),i=o.invokeDotNetFromJS(e,t,n,a);return i?d(i):null}throw new Error("The current dispatcher does not support synchronous calls from JS to .NET. Use invokeMethodAsync instead.")}function u(e,t,r,a){if(e&&r)throw new Error("For instance method calls, assemblyName should be null. Received '"+e+"'.");var i=o++,l=new Promise(function(e,t){n[i]={resolve:e,reject:t}});try{var u=JSON.stringify(a,h);s().beginInvokeDotNetFromJS(i,e,t,r,u)}catch(e){c(i,!1,e)}return l}function s(){if(null!==a)return a;throw new Error("No .NET call dispatcher has been set.")}function c(e,t,r){if(!n.hasOwnProperty(e))throw new Error("There is no pending async call with ID "+e+".");var o=n[e];delete n[e],t?o.resolve(r):o.reject(r)}function d(e){return e?JSON.parse(e,function(e,n){return t.reduce(function(t,n){return n(e,t)},n)}):null}function f(e){return e instanceof Error?e.message+"\n"+e.stack:e?e.toString():"null"}function p(e){if(r.hasOwnProperty(e))return r[e];var t,n=window,o="window";if(e.split(".").forEach(function(e){if(!(e in n))throw new Error("Could not find '"+e+"' in '"+o+"'.");t=n,n=n[e],o+="."+e}),n instanceof Function)return n=n.bind(t),r[e]=n,n;throw new Error("The value '"+o+"' is not a function.")}e.attachDispatcher=function(e){a=e},e.attachReviver=i,e.invokeMethod=function(e,t){for(var n=[],r=2;r0&&o[o.length-1])&&(6===a[0]||2===a[0])){i=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]0&&o[o.length-1])&&(6===a[0]||2===a[0])){i=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]-1?a.substring(0,l):"",s=l>-1?a.substring(l+1):a,c=t.monoPlatform.findMethod(e,u,s,i);t.monoPlatform.callMethod(c,null,r)},callMethod:function(e,n,r){if(r.length>4)throw new Error("Currently, MonoPlatform supports passing a maximum of 4 arguments from JS to .NET. You tried to pass "+r.length+".");var o=Module.stackSave();try{for(var a=Module.stackAlloc(r.length),l=Module.stackAlloc(4),u=0;u>2,r=Module.HEAPU32[n+1];if(r>y)throw new Error("Cannot read uint64 with high order part "+r+", because the result would exceed Number.MAX_SAFE_INTEGER.");return r*v+Module.HEAPU32[n]},readFloatField:function(e,t){return Module.getValue(e+(t||0),"float")},readObjectField:function(e,t){return Module.getValue(e+(t||0),"i32")},readStringField:function(e,n){var r=Module.getValue(e+(n||0),"i32");return 0===r?null:t.monoPlatform.toJavaScriptString(r)},readStructField:function(e,t){return e+(t||0)}};var w=document.createElement("a");function E(e){return e+12}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(32),o=window.chrome&&navigator.userAgent.indexOf("Edge")<0,a=!1;function i(){return a&&o}t.hasDebuggingEnabled=i,t.attachDebuggerHotkey=function(e){a=e.some(function(e){return/\.pdb$/.test(r.getFileNameFromUrl(e))});var t=navigator.platform.match(/^Mac/i)?"Cmd":"Alt";i()&&console.info("Debugging hotkey: Shift+"+t+"+D (when application has focus)"),document.addEventListener("keydown",function(e){var t;e.shiftKey&&(e.metaKey||e.altKey)&&"KeyD"===e.code&&(a?o?((t=document.createElement("a")).href="_framework/debug?url="+encodeURIComponent(location.href),t.target="_blank",t.rel="noopener noreferrer",t.click()):console.error("Currently, only Edge(Chromium) or Chrome is supported for debugging."):console.error("Cannot start debugging, because the application was not compiled with debugging enabled."))})}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(18),o=function(){function e(e){this.batchAddress=e,this.arrayRangeReader=a,this.arrayBuilderSegmentReader=i,this.diffReader=l,this.editReader=u,this.frameReader=s}return e.prototype.updatedComponents=function(){return r.platform.readStructField(this.batchAddress,0)},e.prototype.referenceFrames=function(){return r.platform.readStructField(this.batchAddress,a.structLength)},e.prototype.disposedComponentIds=function(){return r.platform.readStructField(this.batchAddress,2*a.structLength)},e.prototype.disposedEventHandlerIds=function(){return r.platform.readStructField(this.batchAddress,3*a.structLength)},e.prototype.updatedComponentsEntry=function(e,t){return c(e,t,l.structLength)},e.prototype.referenceFramesEntry=function(e,t){return c(e,t,s.structLength)},e.prototype.disposedComponentIdsEntry=function(e,t){var n=c(e,t,4);return r.platform.readInt32Field(n)},e.prototype.disposedEventHandlerIdsEntry=function(e,t){var n=c(e,t,8);return r.platform.readUint64Field(n)},e}();t.SharedMemoryRenderBatch=o;var a={structLength:8,values:function(e){return r.platform.readObjectField(e,0)},count:function(e){return r.platform.readInt32Field(e,4)}},i={structLength:12,values:function(e){var t=r.platform.readObjectField(e,0),n=r.platform.getObjectFieldsBaseAddress(t);return r.platform.readObjectField(n,0)},offset:function(e){return r.platform.readInt32Field(e,4)},count:function(e){return r.platform.readInt32Field(e,8)}},l={structLength:4+i.structLength,componentId:function(e){return r.platform.readInt32Field(e,0)},edits:function(e){return r.platform.readStructField(e,4)},editsEntry:function(e,t){return c(e,t,u.structLength)}},u={structLength:20,editType:function(e){return r.platform.readInt32Field(e,0)},siblingIndex:function(e){return r.platform.readInt32Field(e,4)},newTreeIndex:function(e){return r.platform.readInt32Field(e,8)},moveToSiblingIndex:function(e){return r.platform.readInt32Field(e,8)},removedAttributeName:function(e){return r.platform.readStringField(e,16)}},s={structLength:36,frameType:function(e){return r.platform.readInt16Field(e,4)},subtreeLength:function(e){return r.platform.readInt32Field(e,8)},elementReferenceCaptureId:function(e){return r.platform.readStringField(e,16)},componentId:function(e){return r.platform.readInt32Field(e,12)},elementName:function(e){return r.platform.readStringField(e,16)},textContent:function(e){return r.platform.readStringField(e,16)},markupContent:function(e){return r.platform.readStringField(e,16)},attributeName:function(e){return r.platform.readStringField(e,16)},attributeValue:function(e){return r.platform.readStringField(e,24)},attributeEventHandlerId:function(e){return r.platform.readUint64Field(e,8)}};function c(e,t,n){return r.platform.getArrayEntryPtr(e,t,n)}}]);
\ No newline at end of file
+!function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=42)}([,,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),n(23),n(17);var r=n(24),o=n(11),a={},i=!1;function u(e,t,n){var o=a[e];o||(o=a[e]=new r.BrowserRenderer(e)),o.attachRootComponentToLogicalElement(n,t)}t.attachRootComponentToLogicalElement=u,t.attachRootComponentToElement=function(e,t,n){var r=document.querySelector(e);if(!r)throw new Error("Could not find any element matching selector '"+e+"'.");u(n||0,o.toLogicalElement(r,!0),t)},t.renderBatch=function(e,t){var n=a[e];if(!n)throw new Error("There is no browser renderer with ID "+e+".");for(var r=t.arrayRangeReader,o=t.updatedComponents(),u=r.values(o),l=r.count(o),s=t.referenceFrames(),c=r.values(s),d=t.diffReader,f=0;f0&&o[o.length-1])&&(6===a[0]||2===a[0])){i=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]0&&!t)throw new Error("New logical elements must start empty, or allowExistingContents must be true");return r in e||(e[r]=[]),e}function u(e,t,n){var a=e;if(e instanceof Comment&&(s(a)&&s(a).length>0))throw new Error("Not implemented: inserting non-empty logical container");if(l(a))throw new Error("Not implemented: moving existing logical children");var i=s(t);if(n0;)e(r,0);var a=r;a.parentNode.removeChild(a)},t.getLogicalParent=l,t.getLogicalSiblingEnd=function(e){return e[a]||null},t.getLogicalChild=function(e,t){return s(e)[t]},t.isSvgElement=function(e){return"http://www.w3.org/2000/svg"===c(e).namespaceURI},t.getLogicalChildrenArray=s,t.permuteLogicalChildren=function(e,t){var n=s(e);t.forEach(function(e){e.moveRangeStart=n[e.fromSiblingIndex],e.moveRangeEnd=function e(t){if(t instanceof Element)return t;var n=d(t);if(n)return n.previousSibling;var r=l(t);return r instanceof Element?r.lastChild:e(r)}(e.moveRangeStart)}),t.forEach(function(t){var r=t.moveToBeforeMarker=document.createComment("marker"),o=n[t.toSiblingIndex+1];o?o.parentNode.insertBefore(r,o):f(r,e)}),t.forEach(function(e){for(var t=e.moveToBeforeMarker,n=t.parentNode,r=e.moveRangeStart,o=e.moveRangeEnd,a=r;a;){var i=a.nextSibling;if(n.insertBefore(a,t),a===o)break;a=i}n.removeChild(t)}),t.forEach(function(e){n[e.toSiblingIndex]=e.moveRangeStart})},t.getClosestDomElement=c},,,,,function(e,t,n){"use strict";var r;!function(e){window.DotNet=e;var t=[],n={},r={},o=1,a=null;function i(e){t.push(e)}function u(e,t,n,r){var o=s();if(o.invokeDotNetFromJS){var a=JSON.stringify(r,h),i=o.invokeDotNetFromJS(e,t,n,a);return i?d(i):null}throw new Error("The current dispatcher does not support synchronous calls from JS to .NET. Use invokeMethodAsync instead.")}function l(e,t,r,a){if(e&&r)throw new Error("For instance method calls, assemblyName should be null. Received '"+e+"'.");var i=o++,u=new Promise(function(e,t){n[i]={resolve:e,reject:t}});try{var l=JSON.stringify(a,h);s().beginInvokeDotNetFromJS(i,e,t,r,l)}catch(e){c(i,!1,e)}return u}function s(){if(null!==a)return a;throw new Error("No .NET call dispatcher has been set.")}function c(e,t,r){if(!n.hasOwnProperty(e))throw new Error("There is no pending async call with ID "+e+".");var o=n[e];delete n[e],t?o.resolve(r):o.reject(r)}function d(e){return e?JSON.parse(e,function(e,n){return t.reduce(function(t,n){return n(e,t)},n)}):null}function f(e){return e instanceof Error?e.message+"\n"+e.stack:e?e.toString():"null"}function p(e){if(r.hasOwnProperty(e))return r[e];var t,n=window,o="window";if(e.split(".").forEach(function(e){if(!(e in n))throw new Error("Could not find '"+e+"' in '"+o+"'.");t=n,n=n[e],o+="."+e}),n instanceof Function)return n=n.bind(t),r[e]=n,n;throw new Error("The value '"+o+"' is not a function.")}e.attachDispatcher=function(e){a=e},e.attachReviver=i,e.invokeMethod=function(e,t){for(var n=[],r=2;r0&&o[o.length-1])&&(6===a[0]||2===a[0])){i=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]0&&o[o.length-1])&&(6===a[0]||2===a[0])){i=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]>2,r=Module.HEAPU32[n+1];if(r>s)throw new Error("Cannot read uint64 with high order part "+r+", because the result would exceed Number.MAX_SAFE_INTEGER.");return r*l+Module.HEAPU32[n]},readFloatField:function(e,t){return Module.getValue(e+(t||0),"float")},readObjectField:function(e,t){return Module.getValue(e+(t||0),"i32")},readStringField:function(e,n){var r=Module.getValue(e+(n||0),"i32");return 0===r?null:t.monoPlatform.toJavaScriptString(r)},readStructField:function(e,t){return e+(t||0)}};var c=document.createElement("a");function d(e){return e+12}function f(e,t,n){var r="["+e+"] "+t+":"+n;return Module.mono_bind_static_method(r)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(33),o=window.chrome&&navigator.userAgent.indexOf("Edge")<0,a=!1;function i(){return a&&o}t.hasDebuggingEnabled=i,t.attachDebuggerHotkey=function(e){a=e.some(function(e){return/\.pdb$/.test(r.getFileNameFromUrl(e))});var t=navigator.platform.match(/^Mac/i)?"Cmd":"Alt";i()&&console.info("Debugging hotkey: Shift+"+t+"+D (when application has focus)"),document.addEventListener("keydown",function(e){var t;e.shiftKey&&(e.metaKey||e.altKey)&&"KeyD"===e.code&&(a?o?((t=document.createElement("a")).href="_framework/debug?url="+encodeURIComponent(location.href),t.target="_blank",t.rel="noopener noreferrer",t.click()):console.error("Currently, only Edge(Chromium) or Chrome is supported for debugging."):console.error("Cannot start debugging, because the application was not compiled with debugging enabled."))})}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(17),o=function(){function e(e){this.batchAddress=e,this.arrayRangeReader=a,this.arrayBuilderSegmentReader=i,this.diffReader=u,this.editReader=l,this.frameReader=s}return e.prototype.updatedComponents=function(){return r.platform.readStructField(this.batchAddress,0)},e.prototype.referenceFrames=function(){return r.platform.readStructField(this.batchAddress,a.structLength)},e.prototype.disposedComponentIds=function(){return r.platform.readStructField(this.batchAddress,2*a.structLength)},e.prototype.disposedEventHandlerIds=function(){return r.platform.readStructField(this.batchAddress,3*a.structLength)},e.prototype.updatedComponentsEntry=function(e,t){return c(e,t,u.structLength)},e.prototype.referenceFramesEntry=function(e,t){return c(e,t,s.structLength)},e.prototype.disposedComponentIdsEntry=function(e,t){var n=c(e,t,4);return r.platform.readInt32Field(n)},e.prototype.disposedEventHandlerIdsEntry=function(e,t){var n=c(e,t,8);return r.platform.readUint64Field(n)},e}();t.SharedMemoryRenderBatch=o;var a={structLength:8,values:function(e){return r.platform.readObjectField(e,0)},count:function(e){return r.platform.readInt32Field(e,4)}},i={structLength:12,values:function(e){var t=r.platform.readObjectField(e,0),n=r.platform.getObjectFieldsBaseAddress(t);return r.platform.readObjectField(n,0)},offset:function(e){return r.platform.readInt32Field(e,4)},count:function(e){return r.platform.readInt32Field(e,8)}},u={structLength:4+i.structLength,componentId:function(e){return r.platform.readInt32Field(e,0)},edits:function(e){return r.platform.readStructField(e,4)},editsEntry:function(e,t){return c(e,t,l.structLength)}},l={structLength:20,editType:function(e){return r.platform.readInt32Field(e,0)},siblingIndex:function(e){return r.platform.readInt32Field(e,4)},newTreeIndex:function(e){return r.platform.readInt32Field(e,8)},moveToSiblingIndex:function(e){return r.platform.readInt32Field(e,8)},removedAttributeName:function(e){return r.platform.readStringField(e,16)}},s={structLength:36,frameType:function(e){return r.platform.readInt16Field(e,4)},subtreeLength:function(e){return r.platform.readInt32Field(e,8)},elementReferenceCaptureId:function(e){return r.platform.readStringField(e,16)},componentId:function(e){return r.platform.readInt32Field(e,12)},elementName:function(e){return r.platform.readStringField(e,16)},textContent:function(e){return r.platform.readStringField(e,16)},markupContent:function(e){return r.platform.readStringField(e,16)},attributeName:function(e){return r.platform.readStringField(e,16)},attributeValue:function(e){return r.platform.readStringField(e,24)},attributeEventHandlerId:function(e){return r.platform.readUint64Field(e,8)}};function c(e,t,n){return r.platform.getArrayEntryPtr(e,t,n)}}]);
\ No newline at end of file
diff --git a/src/Components/Web.JS/package.json b/src/Components/Web.JS/package.json
index ca36ee98080f..e750da915cc4 100644
--- a/src/Components/Web.JS/package.json
+++ b/src/Components/Web.JS/package.json
@@ -14,9 +14,9 @@
"test": "jest"
},
"devDependencies": {
- "@aspnet/signalr": "link:../../SignalR/clients/ts/signalr",
- "@aspnet/signalr-protocol-msgpack": "link:../../SignalR/clients/ts/signalr-protocol-msgpack",
- "@dotnet/jsinterop": "https://dotnet.myget.org/F/aspnetcore-dev/npm/@dotnet/jsinterop/-/@dotnet/jsinterop-3.0.0-preview9.19415.3.tgz",
+ "@microsoft/signalr": "link:../../SignalR/clients/ts/signalr",
+ "@microsoft/signalr-protocol-msgpack": "link:../../SignalR/clients/ts/signalr-protocol-msgpack",
+ "@microsoft/dotnet-js-interop": "https://dotnet.myget.org/F/aspnetcore-dev/npm/@microsoft/dotnet-js-interop/-/@microsoft/dotnet-js-interop-5.0.0-alpha1.19572.2.tgz",
"@types/emscripten": "0.0.31",
"@types/jest": "^24.0.6",
"@types/jsdom": "11.0.6",
diff --git a/src/Components/Web.JS/src/Boot.Server.ts b/src/Components/Web.JS/src/Boot.Server.ts
index 4ea227247c0d..a7934b51124d 100644
--- a/src/Components/Web.JS/src/Boot.Server.ts
+++ b/src/Components/Web.JS/src/Boot.Server.ts
@@ -1,7 +1,7 @@
-import '@dotnet/jsinterop';
+import '@microsoft/dotnet-js-interop';
import './GlobalExports';
-import * as signalR from '@aspnet/signalr';
-import { MessagePackHubProtocol } from '@aspnet/signalr-protocol-msgpack';
+import * as signalR from '@microsoft/signalr';
+import { MessagePackHubProtocol } from '@microsoft/signalr-protocol-msgpack';
import { showErrorNotification } from './BootErrors';
import { shouldAutoStart } from './BootCommon';
import { RenderQueue } from './Platform/Circuits/RenderQueue';
diff --git a/src/Components/Web.JS/src/Boot.WebAssembly.ts b/src/Components/Web.JS/src/Boot.WebAssembly.ts
index 74bd496b0285..fcc7a8f5a94c 100644
--- a/src/Components/Web.JS/src/Boot.WebAssembly.ts
+++ b/src/Components/Web.JS/src/Boot.WebAssembly.ts
@@ -1,8 +1,7 @@
-import '@dotnet/jsinterop';
+import '@microsoft/dotnet-js-interop';
import './GlobalExports';
import * as Environment from './Environment';
import { monoPlatform } from './Platform/Mono/MonoPlatform';
-import { getAssemblyNameFromUrl } from './Platform/Url';
import { renderBatch } from './Rendering/Renderer';
import { SharedMemoryRenderBatch } from './Rendering/RenderBatch/SharedMemoryRenderBatch';
import { Pointer } from './Platform/Platform';
@@ -39,15 +38,13 @@ async function boot(options?: any): Promise {
// Fetch the boot JSON file
const bootConfig = await fetchBootConfigAsync();
- const embeddedResourcesPromise = loadEmbeddedResourcesAsync(bootConfig);
if (!bootConfig.linkerEnabled) {
console.info('Blazor is running in dev mode without IL stripping. To make the bundle size significantly smaller, publish the application or see https://go.microsoft.com/fwlink/?linkid=870414');
}
// Determine the URLs of the assemblies we want to load, then begin fetching them all
- const loadAssemblyUrls = [bootConfig.main]
- .concat(bootConfig.assemblyReferences)
+ const loadAssemblyUrls = bootConfig.assemblies
.map(filename => `_framework/_bin/${filename}`);
try {
@@ -56,12 +53,8 @@ async function boot(options?: any): Promise {
throw new Error(`Failed to start platform. Reason: ${ex}`);
}
- // Before we start running .NET code, be sure embedded content resources are all loaded
- await embeddedResourcesPromise;
-
// Start up the application
- const mainAssemblyName = getAssemblyNameFromUrl(bootConfig.main);
- platform.callEntryPoint(mainAssemblyName, bootConfig.entryPoint, []);
+ platform.callEntryPoint(bootConfig.entryAssembly);
}
async function fetchBootConfigAsync() {
@@ -71,40 +64,16 @@ async function fetchBootConfigAsync() {
return bootConfigResponse.json() as Promise;
}
-function loadEmbeddedResourcesAsync(bootConfig: BootJsonData): Promise {
- const cssLoadingPromises = bootConfig.cssReferences.map(cssReference => {
- const linkElement = document.createElement('link');
- linkElement.rel = 'stylesheet';
- linkElement.href = cssReference;
- return loadResourceFromElement(linkElement);
- });
- const jsLoadingPromises = bootConfig.jsReferences.map(jsReference => {
- const scriptElement = document.createElement('script');
- scriptElement.src = jsReference;
- return loadResourceFromElement(scriptElement);
- });
- return Promise.all(cssLoadingPromises.concat(jsLoadingPromises));
-}
-
-function loadResourceFromElement(element: HTMLElement) {
- return new Promise((resolve, reject) => {
- element.onload = resolve;
- element.onerror = reject;
- document.head!.appendChild(element);
- });
-}
-
// Keep in sync with BootJsonData in Microsoft.AspNetCore.Blazor.Build
interface BootJsonData {
- main: string;
- entryPoint: string;
- assemblyReferences: string[];
- cssReferences: string[];
- jsReferences: string[];
+ entryAssembly: string;
+ assemblies: string[];
linkerEnabled: boolean;
}
window['Blazor'].start = boot;
if (shouldAutoStart()) {
- boot();
+ boot().catch(error => {
+ Module.printErr(error); // Logs it, and causes the error UI to appear
+ });
}
diff --git a/src/Components/Web.JS/src/Platform/Circuits/DefaultReconnectDisplay.ts b/src/Components/Web.JS/src/Platform/Circuits/DefaultReconnectDisplay.ts
index b8f755d8acb4..58d9eb7e37dd 100644
--- a/src/Components/Web.JS/src/Platform/Circuits/DefaultReconnectDisplay.ts
+++ b/src/Components/Web.JS/src/Platform/Circuits/DefaultReconnectDisplay.ts
@@ -22,7 +22,7 @@ export class DefaultReconnectDisplay implements ReconnectDisplay {
'right: 0',
'bottom: 0',
'left: 0',
- 'z-index: 1000',
+ 'z-index: 1050',
'display: none',
'overflow: hidden',
'background-color: #fff',
diff --git a/src/Components/Web.JS/src/Platform/Circuits/RenderQueue.ts b/src/Components/Web.JS/src/Platform/Circuits/RenderQueue.ts
index 311df1b43ec8..f4548eed47c9 100644
--- a/src/Components/Web.JS/src/Platform/Circuits/RenderQueue.ts
+++ b/src/Components/Web.JS/src/Platform/Circuits/RenderQueue.ts
@@ -1,7 +1,7 @@
import { renderBatch } from '../../Rendering/Renderer';
import { OutOfProcessRenderBatch } from '../../Rendering/RenderBatch/OutOfProcessRenderBatch';
import { Logger, LogLevel } from '../Logging/Logger';
-import { HubConnection } from '@aspnet/signalr';
+import { HubConnection } from '@microsoft/signalr';
export class RenderQueue {
private static instance: RenderQueue;
diff --git a/src/Components/Web.JS/src/Platform/Mono/MonoPlatform.ts b/src/Components/Web.JS/src/Platform/Mono/MonoPlatform.ts
index 997b3d7bca6e..321a708f579d 100644
--- a/src/Components/Web.JS/src/Platform/Mono/MonoPlatform.ts
+++ b/src/Components/Web.JS/src/Platform/Mono/MonoPlatform.ts
@@ -1,18 +1,9 @@
-import { MethodHandle, System_Object, System_String, System_Array, Pointer, Platform } from '../Platform';
+import { System_Object, System_String, System_Array, Pointer, Platform } from '../Platform';
import { getFileNameFromUrl } from '../Url';
import { attachDebuggerHotkey, hasDebuggingEnabled } from './MonoDebugger';
import { showErrorNotification } from '../../BootErrors';
-const assemblyHandleCache: { [assemblyName: string]: number } = {};
-const typeHandleCache: { [fullyQualifiedTypeName: string]: number } = {};
-const methodHandleCache: { [fullyQualifiedMethodName: string]: MethodHandle } = {};
-
-let assembly_load: (assemblyName: string) => number;
-let find_class: (assemblyHandle: number, namespace: string, className: string) => number;
-let find_method: (typeHandle: number, methodName: string, unknownArg: number) => MethodHandle;
-let invoke_method: (method: MethodHandle, target: System_Object, argsArrayPtr: number, exceptionFlagIntPtr: number) => System_Object;
let mono_string_get_utf8: (managedString: System_String) => Mono.Utf8Ptr;
-let mono_string: (jsString: string) => System_String;
const appBinDirName = 'appBinDir';
const uint64HighOrderShift = Math.pow(2, 32);
const maxSafeNumberHighPart = Math.pow(2, 21) - 1; // The high-order int32 from Number.MAX_SAFE_INTEGER
@@ -22,7 +13,7 @@ export const monoPlatform: Platform = {
return new Promise((resolve, reject) => {
attachDebuggerHotkey(loadAssemblyUrls);
- // mono.js assumes the existence of this
+ // dotnet.js assumes the existence of this
window['Browser'] = {
init: () => { },
};
@@ -37,52 +28,16 @@ export const monoPlatform: Platform = {
});
},
- findMethod: findMethod,
-
- callEntryPoint: function callEntryPoint(assemblyName: string, entrypointMethod: string, args: System_Object[]): void {
- // Parse the entrypointMethod, which is of the form MyApp.MyNamespace.MyTypeName::MyMethodName
- // Note that we don't support specifying a method overload, so it has to be unique
- const entrypointSegments = entrypointMethod.split('::');
- if (entrypointSegments.length != 2) {
- throw new Error('Malformed entry point method name; could not resolve class name and method name.');
- }
- const typeFullName = entrypointSegments[0];
- const methodName = entrypointSegments[1];
- const lastDot = typeFullName.lastIndexOf('.');
- const namespace = lastDot > -1 ? typeFullName.substring(0, lastDot) : '';
- const typeShortName = lastDot > -1 ? typeFullName.substring(lastDot + 1) : typeFullName;
-
- const entryPointMethodHandle = monoPlatform.findMethod(assemblyName, namespace, typeShortName, methodName);
- monoPlatform.callMethod(entryPointMethodHandle, null, args);
- },
-
- callMethod: function callMethod(method: MethodHandle, target: System_Object, args: System_Object[]): System_Object {
- if (args.length > 4) {
- // Hopefully this restriction can be eased soon, but for now make it clear what's going on
- throw new Error(`Currently, MonoPlatform supports passing a maximum of 4 arguments from JS to .NET. You tried to pass ${args.length}.`);
- }
-
- const stack = Module.stackSave();
-
- try {
- const argsBuffer = Module.stackAlloc(args.length);
- const exceptionFlagManagedInt = Module.stackAlloc(4);
- for (let i = 0; i < args.length; ++i) {
- Module.setValue(argsBuffer + i * 4, args[i], 'i32');
- }
- Module.setValue(exceptionFlagManagedInt, 0, 'i32');
-
- const res = invoke_method(method, target, argsBuffer, exceptionFlagManagedInt);
-
- if (Module.getValue(exceptionFlagManagedInt, 'i32') !== 0) {
- // If the exception flag is set, the returned value is exception.ToString()
- throw new Error(monoPlatform.toJavaScriptString(res));
- }
-
- return res;
- } finally {
- Module.stackRestore(stack);
- }
+ callEntryPoint: function callEntryPoint(assemblyName: string) {
+ // Instead of using Module.mono_call_assembly_entry_point, we have our own logic for invoking
+ // the entrypoint which adds support for async main.
+ // Currently we disregard the return value from the entrypoint, whether it's sync or async.
+ // In the future, we might want Blazor.start to return a Promise>, where the
+ // outer promise reflects the startup process, and the inner one reflects the possibly-async
+ // .NET entrypoint method.
+ const invokeEntrypoint = bindStaticMethod('Microsoft.AspNetCore.Blazor', 'Microsoft.AspNetCore.Blazor.Hosting.EntrypointInvoker', 'InvokeEntrypoint');
+ // Note we're passing in null because passing arrays is problematic until https://github.com/mono/mono/issues/18245 is resolved.
+ invokeEntrypoint(assemblyName, null);
},
toJavaScriptString: function toJavaScriptString(managedString: System_String) {
@@ -96,10 +51,6 @@ export const monoPlatform: Platform = {
return res;
},
- toDotNetString: function toDotNetString(jsString: string): System_String {
- return mono_string(jsString);
- },
-
toUint8Array: function toUint8Array(array: System_Array): Uint8Array {
const dataPtr = getArrayDataPointer(array);
const length = Module.getValue(dataPtr, 'i32');
@@ -160,44 +111,6 @@ export const monoPlatform: Platform = {
},
};
-function findAssembly(assemblyName: string): number {
- let assemblyHandle = assemblyHandleCache[assemblyName];
- if (!assemblyHandle) {
- assemblyHandle = assembly_load(assemblyName);
- if (!assemblyHandle) {
- throw new Error(`Could not find assembly "${assemblyName}"`);
- }
- assemblyHandleCache[assemblyName] = assemblyHandle;
- }
- return assemblyHandle;
-}
-
-function findType(assemblyName: string, namespace: string, className: string): number {
- const fullyQualifiedTypeName = `[${assemblyName}]${namespace}.${className}`;
- let typeHandle = typeHandleCache[fullyQualifiedTypeName];
- if (!typeHandle) {
- typeHandle = find_class(findAssembly(assemblyName), namespace, className);
- if (!typeHandle) {
- throw new Error(`Could not find type "${className}" in namespace "${namespace}" in assembly "${assemblyName}"`);
- }
- typeHandleCache[fullyQualifiedTypeName] = typeHandle;
- }
- return typeHandle;
-}
-
-function findMethod(assemblyName: string, namespace: string, className: string, methodName: string): MethodHandle {
- const fullyQualifiedMethodName = `[${assemblyName}]${namespace}.${className}::${methodName}`;
- let methodHandle = methodHandleCache[fullyQualifiedMethodName];
- if (!methodHandle) {
- methodHandle = find_method(findType(assemblyName, namespace, className), methodName, -1);
- if (!methodHandle) {
- throw new Error(`Could not find method "${methodName}" on type "${namespace}.${className}"`);
- }
- methodHandleCache[fullyQualifiedMethodName] = methodHandle;
- }
- return methodHandle;
-}
-
function addScriptTagsToDocument() {
const browserSupportsNativeWebAssembly = typeof WebAssembly !== 'undefined' && WebAssembly.validate;
if (!browserSupportsNativeWebAssembly) {
@@ -205,7 +118,7 @@ function addScriptTagsToDocument() {
}
const scriptElem = document.createElement('script');
- scriptElem.src = '_framework/wasm/mono.js';
+ scriptElem.src = '_framework/wasm/dotnet.js';
scriptElem.defer = true;
document.body.appendChild(scriptElem);
}
@@ -229,7 +142,7 @@ function addGlobalModuleScriptTagsToDocument(callback: () => void) {
function createEmscriptenModuleInstance(loadAssemblyUrls: string[], onReady: () => void, onError: (reason?: any) => void) {
const module = {} as typeof Module;
- const wasmBinaryFile = '_framework/wasm/mono.wasm';
+ const wasmBinaryFile = '_framework/wasm/dotnet.wasm';
const suppressMessages = ['DEBUGGING ENABLED'];
module.print = line => (suppressMessages.indexOf(line) < 0 && console.log(`WASM: ${line}`));
@@ -244,7 +157,7 @@ function createEmscriptenModuleInstance(loadAssemblyUrls: string[], onReady: ()
module.locateFile = fileName => {
switch (fileName) {
- case 'mono.wasm': return wasmBinaryFile;
+ case 'dotnet.wasm': return wasmBinaryFile;
default: return fileName;
}
};
@@ -256,24 +169,8 @@ function createEmscriptenModuleInstance(loadAssemblyUrls: string[], onReady: ()
'number',
'number',
]);
- assembly_load = Module.cwrap('mono_wasm_assembly_load', 'number', ['string']);
- find_class = Module.cwrap('mono_wasm_assembly_find_class', 'number', [
- 'number',
- 'string',
- 'string',
- ]);
- find_method = Module.cwrap('mono_wasm_assembly_find_method', 'number', [
- 'number',
- 'string',
- 'number',
- ]);
- invoke_method = Module.cwrap('mono_wasm_invoke_method', 'number', [
- 'number',
- 'number',
- 'number',
- ]);
+
mono_string_get_utf8 = Module.cwrap('mono_wasm_string_get_utf8', 'number', ['number']);
- mono_string = Module.cwrap('mono_wasm_string_from_js', 'number', ['string']);
MONO.loaded_files = [];
@@ -346,10 +243,16 @@ function getArrayDataPointer