Merge branch 'master' into johluo/tooling-consolidation-fixup
This commit is contained in:
commit
50d914f1af
|
|
@ -19,8 +19,6 @@ pr:
|
|||
- '*'
|
||||
|
||||
variables:
|
||||
- name: DOTNET_CLI_HOME
|
||||
value: $(Agent.BuildDirectory)
|
||||
- name: DOTNET_SKIP_FIRST_TIME_EXPERIENCE
|
||||
value: true
|
||||
- name: _TeamName
|
||||
|
|
@ -626,7 +624,6 @@ stages:
|
|||
# Helix x64
|
||||
- template: jobs/default-build.yml
|
||||
parameters:
|
||||
condition: in(variables['Build.Reason'], 'PullRequest')
|
||||
jobName: Helix_x64
|
||||
jobDisplayName: 'Tests: Helix x64'
|
||||
agentOs: Windows
|
||||
|
|
@ -648,54 +645,6 @@ stages:
|
|||
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 -nobl -all -pack -arch x64 /p:ASPNETCORE_TEST_LOG_DIR=artifacts/log
|
||||
displayName: Build shared fx
|
||||
- script: .\restore.cmd -ci -nobl /p:BuildInteropProjects=true
|
||||
displayName: Restore interop projects
|
||||
- script: .\build.cmd -ci -nobl -NoRestore -test -all -projects eng\helix\helix.proj /p:IsHelixJob=true /p:IsHelixDaily=true /p:BuildInteropProjects=true /p:RunTemplateTests=true /p:ASPNETCORE_TEST_LOG_DIR=artifacts/log
|
||||
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 -nobl
|
||||
displayName: Restore
|
||||
- script: ./build.sh -ci --nobl --arch arm64 -test --no-build-nodejs --all -projects $(Build.SourcesDirectory)/eng/helix/helix.proj /p:IsHelixJob=true /p:IsHelixDaily=true /p:ASPNETCORE_TEST_LOG_DIR=artifacts/log
|
||||
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'
|
||||
|
|
@ -704,14 +653,16 @@ stages:
|
|||
vmImage: 'ubuntu-16.04'
|
||||
variables:
|
||||
DotNetCoreSdkDir: $(Agent.ToolsDirectory)/dotnet
|
||||
# This isn't needed in the path because build does not need to _use_ global tools.
|
||||
DOTNET_CLI_HOME: $(System.DefaultWorkingDirectory)
|
||||
DOTNET_SYSTEM_GLOBALIZATION_INVARIANT: true
|
||||
steps:
|
||||
- script: |
|
||||
source eng/common/native/common-library.sh
|
||||
mkdir -p $HOME/bin
|
||||
GetFile https://github.com/stedolan/jq/releases/download/jq-1.6/jq-linux64 $HOME/bin/jq
|
||||
chmod +x $HOME/bin/jq
|
||||
echo "##vso[task.prependpath]$HOME/bin"
|
||||
mkdir -p $(System.DefaultWorkingDirectory)/.tools
|
||||
GetFile https://github.com/stedolan/jq/releases/download/jq-1.6/jq-linux64 $(System.DefaultWorkingDirectory)/.tools/jq
|
||||
chmod +x $(System.DefaultWorkingDirectory)/.tools/jq
|
||||
echo "##vso[task.prependpath]$(System.DefaultWorkingDirectory)/.tools"
|
||||
displayName: Install jq
|
||||
- ${{ if ne(variables['System.TeamProject'], 'public') }}:
|
||||
- task: Bash@3
|
||||
|
|
|
|||
|
|
@ -29,8 +29,6 @@ stages:
|
|||
jobDisplayName: "Build: Components"
|
||||
agentOs: Windows
|
||||
steps:
|
||||
- script: git submodule init
|
||||
- script: git submodule update --recursive
|
||||
- script: ./build.cmd
|
||||
-ci
|
||||
-arch x64
|
||||
|
|
@ -54,8 +52,6 @@ stages:
|
|||
jobDisplayName: "Build: Servers"
|
||||
agentOs: Windows
|
||||
steps:
|
||||
- script: git submodule init
|
||||
- script: git submodule update --recursive
|
||||
- script: ./build.cmd
|
||||
-ci
|
||||
-arch x64
|
||||
|
|
@ -79,8 +75,6 @@ stages:
|
|||
jobDisplayName: "Build: Project Templates"
|
||||
agentOs: Windows
|
||||
steps:
|
||||
- script: git submodule init
|
||||
- script: git submodule update --recursive
|
||||
- script: ./build.cmd
|
||||
-ci
|
||||
-arch x64
|
||||
|
|
@ -104,8 +98,6 @@ stages:
|
|||
jobDisplayName: "Build: Everything"
|
||||
agentOs: Windows
|
||||
steps:
|
||||
- script: git submodule init
|
||||
- script: git submodule update --recursive
|
||||
- script: ./build.cmd
|
||||
-ci
|
||||
-arch x64
|
||||
|
|
|
|||
|
|
@ -0,0 +1,63 @@
|
|||
# We only want to run full helix matrix on master
|
||||
pr: none
|
||||
trigger: none
|
||||
schedules:
|
||||
- cron: "0 */12 * * *"
|
||||
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_matrix_x64
|
||||
jobDisplayName: 'Tests: Helix full matrix x64'
|
||||
agentOs: Windows
|
||||
timeoutInMinutes: 240
|
||||
steps:
|
||||
# Build the shared framework
|
||||
- script: ./build.cmd -ci -nobl -all -pack -arch x64 /p:ASPNETCORE_TEST_LOG_DIR=artifacts/log
|
||||
displayName: Build shared fx
|
||||
- script: .\restore.cmd -ci /p:BuildInteropProjects=true
|
||||
displayName: Restore interop projects
|
||||
- script: .\build.cmd -ci -nobl -NoRestore -test -all -projects eng\helix\helix.proj /p:IsHelixDaily=true /p:IsRequiredCheck=true /p:IsHelixJob=true /p:BuildInteropProjects=true /p:RunTemplateTests=true /p:ASPNETCORE_TEST_LOG_DIR=artifacts/log
|
||||
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
|
||||
|
||||
# Helix ARM64
|
||||
- template: jobs/default-build.yml
|
||||
parameters:
|
||||
jobName: Helix_matrix_arm64
|
||||
jobDisplayName: "Tests: Helix ARM64 matrix"
|
||||
agentOs: Linux
|
||||
timeoutInMinutes: 180
|
||||
steps:
|
||||
- script: ./restore.sh -ci -nobl
|
||||
displayName: Restore
|
||||
- script: ./build.sh -ci --nobl --arch arm64 -test --no-build-nodejs --all -projects $(Build.SourcesDirectory)/eng/helix/helix.proj /p:IsHelixJob=true /p:IsHelixDaily=true /p:ASPNETCORE_TEST_LOG_DIR=artifacts/log
|
||||
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
|
||||
|
|
@ -52,7 +52,7 @@ parameters:
|
|||
condition: ''
|
||||
# jobName: '' - use agentOs by default.
|
||||
# jobDisplayName: '' - use agentOs by default.
|
||||
artifacts: []
|
||||
artifacts: []
|
||||
buildDirectory: ''
|
||||
buildScript: ''
|
||||
installTar: true
|
||||
|
|
@ -80,7 +80,7 @@ jobs:
|
|||
enableMicrobuild: true
|
||||
enablePublishBuildAssets: true
|
||||
enablePublishUsingPipelines: ${{ variables._PublishUsingPipelines }}
|
||||
enablePublishTestResults: true # publish test results to AzDO (populates AzDO Tests tab)
|
||||
enablePublishTestResults: ${{ eq(parameters.isTestingJob, 'true') }} # publish test results to AzDO (populates AzDO Tests tab)
|
||||
enableTelemetry: true
|
||||
helixRepo: dotnet/aspnetcore
|
||||
helixType: build.product/
|
||||
|
|
@ -116,12 +116,13 @@ jobs:
|
|||
- BuildScriptArgs: ${{ parameters.buildArgs }}
|
||||
- _BuildConfig: ${{ parameters.configuration }}
|
||||
- BuildConfiguration: ${{ parameters.configuration }}
|
||||
- BuildDirectory: ${{ parameters.buildDirectory }}
|
||||
- DOTNET_CLI_HOME: $(Agent.BuildDirectory)
|
||||
- ${{ if eq(parameters.buildDirectory, '') }}:
|
||||
- BuildDirectory: $(System.DefaultWorkingDirectory)
|
||||
- ${{ if ne(parameters.buildDirectory, '') }}:
|
||||
- BuildDirectory: ${{ parameters.buildDirectory }}
|
||||
- DOTNET_CLI_HOME: $(System.DefaultWorkingDirectory)
|
||||
- DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
|
||||
- TeamName: AspNetCore
|
||||
- ${{ if and(eq(parameters.installJdk, 'true'), eq(parameters.agentOs, 'Windows')) }}:
|
||||
- JAVA_HOME: $(Agent.BuildDirectory)\.tools\jdk\win-x64
|
||||
- ${{ if or(ne(parameters.codeSign, true), ne(variables['System.TeamProject'], 'internal')) }}:
|
||||
- _SignType: ''
|
||||
- ${{ if and(eq(parameters.codeSign, true), eq(variables['System.TeamProject'], 'internal')) }}:
|
||||
|
|
@ -164,6 +165,12 @@ jobs:
|
|||
- ${{ if and(eq(parameters.installTar, 'true'), eq(parameters.agentOs, 'Windows')) }}:
|
||||
- powershell: ./eng/scripts/InstallTar.ps1
|
||||
displayName: Find or install Tar
|
||||
- ${{ if eq(parameters.agentOs, 'Windows') }}:
|
||||
- powershell: Write-Host "##vso[task.prependpath]$(DOTNET_CLI_HOME)\.dotnet\tools"
|
||||
displayName: Add dotnet tools to path
|
||||
- ${{ if ne(parameters.agentOs, 'Windows') }}:
|
||||
- script: echo "##vso[task.prependpath]$(DOTNET_CLI_HOME)/.dotnet/tools"
|
||||
displayName: Add dotnet tools to path
|
||||
|
||||
- ${{ parameters.beforeBuild }}
|
||||
|
||||
|
|
@ -191,10 +198,10 @@ jobs:
|
|||
- ${{ if eq(parameters.steps, '')}}:
|
||||
- ${{ if eq(parameters.buildScript, '') }}:
|
||||
- ${{ if eq(parameters.agentOs, 'Windows') }}:
|
||||
- script: .\$(BuildDirectory)\build.cmd -ci -nobl -Configuration $(BuildConfiguration) $(BuildScriptArgs) /p:DotNetSignType=$(_SignType)
|
||||
- script: $(BuildDirectory)\build.cmd -ci -nobl -Configuration $(BuildConfiguration) $(BuildScriptArgs) /p:DotNetSignType=$(_SignType)
|
||||
displayName: Run build.cmd
|
||||
- ${{ if ne(parameters.agentOs, 'Windows') }}:
|
||||
- script: ./$(BuildDirectory)/build.sh --ci --nobl --configuration $(BuildConfiguration) $(BuildScriptArgs)
|
||||
- script: $(BuildDirectory)/build.sh --ci --nobl --configuration $(BuildConfiguration) $(BuildScriptArgs)
|
||||
displayName: Run build.sh
|
||||
- ${{ if ne(parameters.buildScript, '') }}:
|
||||
- script: $(BuildScript) -ci -nobl -Configuration $(BuildConfiguration) $(BuildScriptArgs)
|
||||
|
|
@ -232,10 +239,7 @@ jobs:
|
|||
condition: and(or(succeeded(), eq('${{ artifact.publishOnError }}', 'true')), or(eq(variables['system.pullrequest.isfork'], false), eq('${{ artifact.includeForks }}', 'true')))
|
||||
continueOnError: true
|
||||
inputs:
|
||||
${{ if eq(parameters.buildDirectory, '') }}:
|
||||
pathtoPublish: ${{ artifact.path }}
|
||||
${{ if ne(parameters.buildDirectory, '') }}:
|
||||
pathtoPublish: ${{ parameters.buildDirectory }}\${{ artifact.path }}
|
||||
pathtoPublish: $(BuildDirectory)/${{ artifact.path }}
|
||||
${{ if eq(artifact.name, '') }}:
|
||||
artifactName: artifacts-$(AgentOsName)-$(BuildConfiguration)
|
||||
${{ if ne(artifact.name, '') }}:
|
||||
|
|
@ -243,18 +247,7 @@ jobs:
|
|||
artifactType: Container
|
||||
parallel: true
|
||||
|
||||
- ${{ if eq(parameters.isTestingJob, true) }}:
|
||||
- task: PublishTestResults@2
|
||||
displayName: Publish VSTest test results
|
||||
condition: always()
|
||||
continueOnError: true
|
||||
inputs:
|
||||
testRunTitle: $(AgentOsName)-$(BuildConfiguration)
|
||||
testRunner: vstest
|
||||
testResultsFiles: '**/artifacts/**/*.trx'
|
||||
mergeTestResults: true
|
||||
buildConfiguration: $(BuildConfiguration)
|
||||
buildPlatform: $(AgentOsName)
|
||||
- ${{ if and(eq(parameters.isTestingJob, true), ne(parameters.jobName, 'Windows_Templates_Test')) }}:
|
||||
- task: PublishTestResults@2
|
||||
displayName: Publish js test results
|
||||
condition: always()
|
||||
|
|
@ -263,12 +256,3 @@ jobs:
|
|||
testResultsFiles: '**/artifacts/log/**/*.junit.xml'
|
||||
buildConfiguration: $(BuildConfiguration)
|
||||
buildPlatform: $(AgentOsName)
|
||||
- task: PublishTestResults@2
|
||||
displayName: Publish Java test results
|
||||
condition: always()
|
||||
inputs:
|
||||
testRunner: junit
|
||||
testResultsFiles: '**/TEST-junit-jupiter.xml'
|
||||
buildConfiguration: $(BuildConfiguration)
|
||||
buildPlatform: $(AgentOsName)
|
||||
mergeTestResults: true
|
||||
|
|
|
|||
|
|
@ -0,0 +1,14 @@
|
|||
blank_issues_enabled: true
|
||||
contact_links:
|
||||
- name: Issue with .NET runtime or core .NET libraries
|
||||
url: https://github.com/dotnet/runtime/issues/new/choose
|
||||
about: Please open issues relating to the .NET runtime or core .NET libraries in dotnet/runtime.
|
||||
- name: Issue with .NET SDK
|
||||
url: https://github.com/dotnet/sdk/issues/new/choose
|
||||
about: Please open issues relating to the .NET SDK itself in dotnet/sdk.
|
||||
- name: Issue with Entity Framework Core
|
||||
url: https://github.com/dotnet/efcore/issues/new/choose
|
||||
about: Please open issues relating to Entity Framework Core in dotnet/efcore.
|
||||
- name: Issue with Roslyn compiler
|
||||
url: https://github.com/dotnet/roslyn/issues/new/choose
|
||||
about: Please open issues relating to the Roslyn .NET compiler in dotnet/roslyn.
|
||||
|
|
@ -2,14 +2,12 @@
|
|||
<configuration>
|
||||
<packageSources>
|
||||
<clear />
|
||||
<add key="dotnet-core" value="https://dotnetfeed.blob.core.windows.net/dotnet-core/index.json" />
|
||||
<add key="dotnet-eng" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json" />
|
||||
<add key="dotnet-tools" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json" />
|
||||
<add key="dotnet5" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet5/nuget/v3/index.json" />
|
||||
<add key="dotnet5-transport" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet5-transport/nuget/v3/index.json" />
|
||||
<add key="roslyn" value="https://dotnet.myget.org/F/roslyn/api/v3/index.json" />
|
||||
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" />
|
||||
<add key="aspnetcore-dev" value="https://dotnet.myget.org/F/aspnetcore-dev/api/v3/index.json" />
|
||||
<add key="aspnetcore-tools" value="https://dotnet.myget.org/F/aspnetcore-tools/api/v3/index.json" />
|
||||
<add key="roslyn-tools" value="https://dotnet.myget.org/F/roslyn-tools/api/v3/index.json" />
|
||||
<!-- Used for the SiteExtension 3.1 bits that are included in the 5.0 build -->
|
||||
<add key="dotnet31-transport" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet3.1-transport/nuget/v3/index.json" />
|
||||
|
|
|
|||
23
build.ps1
23
build.ps1
|
|
@ -253,9 +253,7 @@ $RunRestore = if ($NoRestore) { $false }
|
|||
# Target selection
|
||||
$MSBuildArguments += "/p:Restore=$RunRestore"
|
||||
$MSBuildArguments += "/p:Build=$RunBuild"
|
||||
if (-not $RunBuild) {
|
||||
$MSBuildArguments += "/p:NoBuild=true"
|
||||
}
|
||||
if (-not $RunBuild) { $MSBuildArguments += "/p:NoBuild=true" }
|
||||
$MSBuildArguments += "/p:Pack=$Pack"
|
||||
$MSBuildArguments += "/p:Test=$Test"
|
||||
$MSBuildArguments += "/p:Sign=$Sign"
|
||||
|
|
@ -364,18 +362,23 @@ Remove-Item variable:global:_MSBuildExe -ea Ignore
|
|||
# Import Arcade
|
||||
. "$PSScriptRoot/eng/common/tools.ps1"
|
||||
|
||||
# Add default .binlog location if not already on the command line. tools.ps1 does not handle this; it just checks
|
||||
# $BinaryLog, $CI and $ExcludeCIBinarylog values for an error case. But tools.ps1 provides a nice function to help.
|
||||
if ($BinaryLog) {
|
||||
$bl = GetMSBuildBinaryLogCommandLineArgument($MSBuildArguments)
|
||||
if (-not $bl) {
|
||||
$MSBuildArguments += "/bl:" + (Join-Path $LogDir "Build.binlog")
|
||||
}
|
||||
} elseif ($CI) {
|
||||
# Ensure the artifacts/log directory isn't empty to avoid warnings.
|
||||
New-Item (Join-Path $LogDir "empty.log") -ItemType File -ErrorAction SilentlyContinue >$null
|
||||
}
|
||||
|
||||
# Capture MSBuild crash logs
|
||||
$env:MSBUILDDEBUGPATH = $LogDir
|
||||
|
||||
$local:exit_code = $null
|
||||
try {
|
||||
# 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
|
||||
}
|
||||
|
||||
# Set this global property so Arcade will always initialize the toolset. The error message you get when you build on a clean machine
|
||||
# with -norestore is not obvious about what to do to fix it. As initialization takes very little time, we think always initializing
|
||||
# the toolset is a better default behavior.
|
||||
|
|
|
|||
29
build.sh
29
build.sh
|
|
@ -288,10 +288,6 @@ if [ -z "$configuration" ]; then
|
|||
fi
|
||||
msbuild_args[${#msbuild_args[*]}]="-p:Configuration=$configuration"
|
||||
|
||||
# Set verbosity
|
||||
echo "Setting msbuild verbosity to $verbosity"
|
||||
msbuild_args[${#msbuild_args[*]}]="-verbosity:$verbosity"
|
||||
|
||||
# Set up additional runtime args
|
||||
toolset_build_args=()
|
||||
if [ ! -z "$dotnet_runtime_source_feed$dotnet_runtime_source_feed_key" ]; then
|
||||
|
|
@ -328,15 +324,28 @@ fi
|
|||
# Import Arcade
|
||||
. "$DIR/eng/common/tools.sh"
|
||||
|
||||
# Add default .binlog location if not already on the command line. tools.sh does not handle this; it just checks
|
||||
# $binary_log, $ci and $exclude_ci_binary_log values for an error case.
|
||||
if [[ "$binary_log" == true ]]; then
|
||||
found=false
|
||||
for arg in "${msbuild_args[@]}"; do
|
||||
opt="$(echo "${arg/#--/-}" | awk '{print tolower($0)}')"
|
||||
if [[ "$opt" == [-/]bl:* || "$opt" == [-/]binarylogger:* ]]; then
|
||||
found=true
|
||||
break
|
||||
fi
|
||||
done
|
||||
if [[ "$found" == false ]]; then
|
||||
msbuild_args[${#msbuild_args[*]}]="/bl:$log_dir/Build.binlog"
|
||||
fi
|
||||
elif [[ "$ci" == true ]]; then
|
||||
# Ensure the artifacts/log directory isn't empty to avoid warnings.
|
||||
touch "$log_dir/empty.log"
|
||||
fi
|
||||
|
||||
# Capture MSBuild crash logs
|
||||
export MSBUILDDEBUGPATH="$log_dir"
|
||||
|
||||
# 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
|
||||
|
||||
# Set this global property so Arcade will always initialize the toolset. The error message you get when you build on a clean machine
|
||||
# with -norestore is not obvious about what to do to fix it. As initialization takes very little time, we think always initializing
|
||||
# the toolset is a better default behavior.
|
||||
|
|
|
|||
|
|
@ -13,280 +13,280 @@
|
|||
<Uri>https://github.com/dotnet/blazor</Uri>
|
||||
<Sha>dd7fb4d3931d556458f62642c2edfc59f6295bfb</Sha>
|
||||
</Dependency>
|
||||
<Dependency Name="dotnet-ef" Version="5.0.0-preview.6.20264.4">
|
||||
<Dependency Name="dotnet-ef" Version="5.0.0-preview.6.20276.1">
|
||||
<Uri>https://github.com/dotnet/efcore</Uri>
|
||||
<Sha>7f81b608c2ceb19f6072b8b3cec6ad45fcc2d6a9</Sha>
|
||||
<Sha>6268c397a483eb1bba8274129461b5246fbacae2</Sha>
|
||||
</Dependency>
|
||||
<Dependency Name="Microsoft.EntityFrameworkCore.InMemory" Version="5.0.0-preview.6.20264.4">
|
||||
<Dependency Name="Microsoft.EntityFrameworkCore.InMemory" Version="5.0.0-preview.6.20276.1">
|
||||
<Uri>https://github.com/dotnet/efcore</Uri>
|
||||
<Sha>7f81b608c2ceb19f6072b8b3cec6ad45fcc2d6a9</Sha>
|
||||
<Sha>6268c397a483eb1bba8274129461b5246fbacae2</Sha>
|
||||
</Dependency>
|
||||
<Dependency Name="Microsoft.EntityFrameworkCore.Relational" Version="5.0.0-preview.6.20264.4">
|
||||
<Dependency Name="Microsoft.EntityFrameworkCore.Relational" Version="5.0.0-preview.6.20276.1">
|
||||
<Uri>https://github.com/dotnet/efcore</Uri>
|
||||
<Sha>7f81b608c2ceb19f6072b8b3cec6ad45fcc2d6a9</Sha>
|
||||
<Sha>6268c397a483eb1bba8274129461b5246fbacae2</Sha>
|
||||
</Dependency>
|
||||
<Dependency Name="Microsoft.EntityFrameworkCore.Sqlite" Version="5.0.0-preview.6.20264.4">
|
||||
<Dependency Name="Microsoft.EntityFrameworkCore.Sqlite" Version="5.0.0-preview.6.20276.1">
|
||||
<Uri>https://github.com/dotnet/efcore</Uri>
|
||||
<Sha>7f81b608c2ceb19f6072b8b3cec6ad45fcc2d6a9</Sha>
|
||||
<Sha>6268c397a483eb1bba8274129461b5246fbacae2</Sha>
|
||||
</Dependency>
|
||||
<Dependency Name="Microsoft.EntityFrameworkCore.SqlServer" Version="5.0.0-preview.6.20264.4">
|
||||
<Dependency Name="Microsoft.EntityFrameworkCore.SqlServer" Version="5.0.0-preview.6.20276.1">
|
||||
<Uri>https://github.com/dotnet/efcore</Uri>
|
||||
<Sha>7f81b608c2ceb19f6072b8b3cec6ad45fcc2d6a9</Sha>
|
||||
<Sha>6268c397a483eb1bba8274129461b5246fbacae2</Sha>
|
||||
</Dependency>
|
||||
<Dependency Name="Microsoft.EntityFrameworkCore.Tools" Version="5.0.0-preview.6.20264.4">
|
||||
<Dependency Name="Microsoft.EntityFrameworkCore.Tools" Version="5.0.0-preview.6.20276.1">
|
||||
<Uri>https://github.com/dotnet/efcore</Uri>
|
||||
<Sha>7f81b608c2ceb19f6072b8b3cec6ad45fcc2d6a9</Sha>
|
||||
<Sha>6268c397a483eb1bba8274129461b5246fbacae2</Sha>
|
||||
</Dependency>
|
||||
<Dependency Name="Microsoft.EntityFrameworkCore" Version="5.0.0-preview.6.20264.4">
|
||||
<Dependency Name="Microsoft.EntityFrameworkCore" Version="5.0.0-preview.6.20276.1">
|
||||
<Uri>https://github.com/dotnet/efcore</Uri>
|
||||
<Sha>7f81b608c2ceb19f6072b8b3cec6ad45fcc2d6a9</Sha>
|
||||
<Sha>6268c397a483eb1bba8274129461b5246fbacae2</Sha>
|
||||
</Dependency>
|
||||
<Dependency Name="Microsoft.Extensions.Caching.Abstractions" Version="5.0.0-preview.6.20264.1" CoherentParentDependency="Microsoft.AspNetCore.Razor.Language">
|
||||
<Dependency Name="Microsoft.Extensions.Caching.Abstractions" Version="5.0.0-preview.6.20271.10" CoherentParentDependency="Microsoft.AspNetCore.Razor.Language">
|
||||
<Uri>https://github.com/dotnet/runtime</Uri>
|
||||
<Sha>bdd7235c43d762cea051cfc2071e14de48175f0c</Sha>
|
||||
<Sha>c44dc40b763b7c74012622a0a6120cd8ffa35ce4</Sha>
|
||||
</Dependency>
|
||||
<Dependency Name="Microsoft.Extensions.Caching.Memory" Version="5.0.0-preview.6.20264.1" CoherentParentDependency="Microsoft.AspNetCore.Razor.Language">
|
||||
<Dependency Name="Microsoft.Extensions.Caching.Memory" Version="5.0.0-preview.6.20271.10" CoherentParentDependency="Microsoft.AspNetCore.Razor.Language">
|
||||
<Uri>https://github.com/dotnet/runtime</Uri>
|
||||
<Sha>bdd7235c43d762cea051cfc2071e14de48175f0c</Sha>
|
||||
<Sha>c44dc40b763b7c74012622a0a6120cd8ffa35ce4</Sha>
|
||||
</Dependency>
|
||||
<Dependency Name="Microsoft.Extensions.Configuration.Abstractions" Version="5.0.0-preview.6.20264.1" CoherentParentDependency="Microsoft.AspNetCore.Razor.Language">
|
||||
<Dependency Name="Microsoft.Extensions.Configuration.Abstractions" Version="5.0.0-preview.6.20271.10" CoherentParentDependency="Microsoft.AspNetCore.Razor.Language">
|
||||
<Uri>https://github.com/dotnet/runtime</Uri>
|
||||
<Sha>bdd7235c43d762cea051cfc2071e14de48175f0c</Sha>
|
||||
<Sha>c44dc40b763b7c74012622a0a6120cd8ffa35ce4</Sha>
|
||||
</Dependency>
|
||||
<Dependency Name="Microsoft.Extensions.Configuration.Binder" Version="5.0.0-preview.6.20264.1" CoherentParentDependency="Microsoft.AspNetCore.Razor.Language">
|
||||
<Dependency Name="Microsoft.Extensions.Configuration.Binder" Version="5.0.0-preview.6.20271.10" CoherentParentDependency="Microsoft.AspNetCore.Razor.Language">
|
||||
<Uri>https://github.com/dotnet/runtime</Uri>
|
||||
<Sha>bdd7235c43d762cea051cfc2071e14de48175f0c</Sha>
|
||||
<Sha>c44dc40b763b7c74012622a0a6120cd8ffa35ce4</Sha>
|
||||
</Dependency>
|
||||
<Dependency Name="Microsoft.Extensions.Configuration.CommandLine" Version="5.0.0-preview.6.20264.1" CoherentParentDependency="Microsoft.AspNetCore.Razor.Language">
|
||||
<Dependency Name="Microsoft.Extensions.Configuration.CommandLine" Version="5.0.0-preview.6.20271.10" CoherentParentDependency="Microsoft.AspNetCore.Razor.Language">
|
||||
<Uri>https://github.com/dotnet/runtime</Uri>
|
||||
<Sha>bdd7235c43d762cea051cfc2071e14de48175f0c</Sha>
|
||||
<Sha>c44dc40b763b7c74012622a0a6120cd8ffa35ce4</Sha>
|
||||
</Dependency>
|
||||
<Dependency Name="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="5.0.0-preview.6.20264.1" CoherentParentDependency="Microsoft.AspNetCore.Razor.Language">
|
||||
<Dependency Name="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="5.0.0-preview.6.20271.10" CoherentParentDependency="Microsoft.AspNetCore.Razor.Language">
|
||||
<Uri>https://github.com/dotnet/runtime</Uri>
|
||||
<Sha>bdd7235c43d762cea051cfc2071e14de48175f0c</Sha>
|
||||
<Sha>c44dc40b763b7c74012622a0a6120cd8ffa35ce4</Sha>
|
||||
</Dependency>
|
||||
<Dependency Name="Microsoft.Extensions.Configuration.FileExtensions" Version="5.0.0-preview.6.20264.1" CoherentParentDependency="Microsoft.AspNetCore.Razor.Language">
|
||||
<Dependency Name="Microsoft.Extensions.Configuration.FileExtensions" Version="5.0.0-preview.6.20271.10" CoherentParentDependency="Microsoft.AspNetCore.Razor.Language">
|
||||
<Uri>https://github.com/dotnet/runtime</Uri>
|
||||
<Sha>bdd7235c43d762cea051cfc2071e14de48175f0c</Sha>
|
||||
<Sha>c44dc40b763b7c74012622a0a6120cd8ffa35ce4</Sha>
|
||||
</Dependency>
|
||||
<Dependency Name="Microsoft.Extensions.Configuration.Ini" Version="5.0.0-preview.6.20264.1" CoherentParentDependency="Microsoft.AspNetCore.Razor.Language">
|
||||
<Dependency Name="Microsoft.Extensions.Configuration.Ini" Version="5.0.0-preview.6.20271.10" CoherentParentDependency="Microsoft.AspNetCore.Razor.Language">
|
||||
<Uri>https://github.com/dotnet/runtime</Uri>
|
||||
<Sha>bdd7235c43d762cea051cfc2071e14de48175f0c</Sha>
|
||||
<Sha>c44dc40b763b7c74012622a0a6120cd8ffa35ce4</Sha>
|
||||
</Dependency>
|
||||
<Dependency Name="Microsoft.Extensions.Configuration.Json" Version="5.0.0-preview.6.20264.1" CoherentParentDependency="Microsoft.AspNetCore.Razor.Language">
|
||||
<Dependency Name="Microsoft.Extensions.Configuration.Json" Version="5.0.0-preview.6.20271.10" CoherentParentDependency="Microsoft.AspNetCore.Razor.Language">
|
||||
<Uri>https://github.com/dotnet/runtime</Uri>
|
||||
<Sha>bdd7235c43d762cea051cfc2071e14de48175f0c</Sha>
|
||||
<Sha>c44dc40b763b7c74012622a0a6120cd8ffa35ce4</Sha>
|
||||
</Dependency>
|
||||
<Dependency Name="Microsoft.Extensions.Configuration.UserSecrets" Version="5.0.0-preview.6.20264.1" CoherentParentDependency="Microsoft.AspNetCore.Razor.Language">
|
||||
<Dependency Name="Microsoft.Extensions.Configuration.UserSecrets" Version="5.0.0-preview.6.20271.10" CoherentParentDependency="Microsoft.AspNetCore.Razor.Language">
|
||||
<Uri>https://github.com/dotnet/runtime</Uri>
|
||||
<Sha>bdd7235c43d762cea051cfc2071e14de48175f0c</Sha>
|
||||
<Sha>c44dc40b763b7c74012622a0a6120cd8ffa35ce4</Sha>
|
||||
</Dependency>
|
||||
<Dependency Name="Microsoft.Extensions.Configuration.Xml" Version="5.0.0-preview.6.20264.1" CoherentParentDependency="Microsoft.AspNetCore.Razor.Language">
|
||||
<Dependency Name="Microsoft.Extensions.Configuration.Xml" Version="5.0.0-preview.6.20271.10" CoherentParentDependency="Microsoft.AspNetCore.Razor.Language">
|
||||
<Uri>https://github.com/dotnet/runtime</Uri>
|
||||
<Sha>bdd7235c43d762cea051cfc2071e14de48175f0c</Sha>
|
||||
<Sha>c44dc40b763b7c74012622a0a6120cd8ffa35ce4</Sha>
|
||||
</Dependency>
|
||||
<Dependency Name="Microsoft.Extensions.Configuration" Version="5.0.0-preview.6.20264.1" CoherentParentDependency="Microsoft.AspNetCore.Razor.Language">
|
||||
<Dependency Name="Microsoft.Extensions.Configuration" Version="5.0.0-preview.6.20271.10" CoherentParentDependency="Microsoft.AspNetCore.Razor.Language">
|
||||
<Uri>https://github.com/dotnet/runtime</Uri>
|
||||
<Sha>bdd7235c43d762cea051cfc2071e14de48175f0c</Sha>
|
||||
<Sha>c44dc40b763b7c74012622a0a6120cd8ffa35ce4</Sha>
|
||||
</Dependency>
|
||||
<Dependency Name="Microsoft.Extensions.DependencyInjection.Abstractions" Version="5.0.0-preview.6.20264.1" CoherentParentDependency="Microsoft.AspNetCore.Razor.Language">
|
||||
<Dependency Name="Microsoft.Extensions.DependencyInjection.Abstractions" Version="5.0.0-preview.6.20271.10" CoherentParentDependency="Microsoft.AspNetCore.Razor.Language">
|
||||
<Uri>https://github.com/dotnet/runtime</Uri>
|
||||
<Sha>bdd7235c43d762cea051cfc2071e14de48175f0c</Sha>
|
||||
<Sha>c44dc40b763b7c74012622a0a6120cd8ffa35ce4</Sha>
|
||||
</Dependency>
|
||||
<Dependency Name="Microsoft.Extensions.DependencyInjection" Version="5.0.0-preview.6.20264.1" CoherentParentDependency="Microsoft.AspNetCore.Razor.Language">
|
||||
<Dependency Name="Microsoft.Extensions.DependencyInjection" Version="5.0.0-preview.6.20271.10" CoherentParentDependency="Microsoft.AspNetCore.Razor.Language">
|
||||
<Uri>https://github.com/dotnet/runtime</Uri>
|
||||
<Sha>bdd7235c43d762cea051cfc2071e14de48175f0c</Sha>
|
||||
<Sha>c44dc40b763b7c74012622a0a6120cd8ffa35ce4</Sha>
|
||||
</Dependency>
|
||||
<Dependency Name="Microsoft.Extensions.FileProviders.Abstractions" Version="5.0.0-preview.6.20264.1" CoherentParentDependency="Microsoft.AspNetCore.Razor.Language">
|
||||
<Dependency Name="Microsoft.Extensions.FileProviders.Abstractions" Version="5.0.0-preview.6.20271.10" CoherentParentDependency="Microsoft.AspNetCore.Razor.Language">
|
||||
<Uri>https://github.com/dotnet/runtime</Uri>
|
||||
<Sha>bdd7235c43d762cea051cfc2071e14de48175f0c</Sha>
|
||||
<Sha>c44dc40b763b7c74012622a0a6120cd8ffa35ce4</Sha>
|
||||
</Dependency>
|
||||
<Dependency Name="Microsoft.Extensions.FileProviders.Composite" Version="5.0.0-preview.6.20264.1" CoherentParentDependency="Microsoft.AspNetCore.Razor.Language">
|
||||
<Dependency Name="Microsoft.Extensions.FileProviders.Composite" Version="5.0.0-preview.6.20271.10" CoherentParentDependency="Microsoft.AspNetCore.Razor.Language">
|
||||
<Uri>https://github.com/dotnet/runtime</Uri>
|
||||
<Sha>bdd7235c43d762cea051cfc2071e14de48175f0c</Sha>
|
||||
<Sha>c44dc40b763b7c74012622a0a6120cd8ffa35ce4</Sha>
|
||||
</Dependency>
|
||||
<Dependency Name="Microsoft.Extensions.FileProviders.Physical" Version="5.0.0-preview.6.20264.1" CoherentParentDependency="Microsoft.AspNetCore.Razor.Language">
|
||||
<Dependency Name="Microsoft.Extensions.FileProviders.Physical" Version="5.0.0-preview.6.20271.10" CoherentParentDependency="Microsoft.AspNetCore.Razor.Language">
|
||||
<Uri>https://github.com/dotnet/runtime</Uri>
|
||||
<Sha>bdd7235c43d762cea051cfc2071e14de48175f0c</Sha>
|
||||
<Sha>c44dc40b763b7c74012622a0a6120cd8ffa35ce4</Sha>
|
||||
</Dependency>
|
||||
<Dependency Name="Microsoft.Extensions.FileSystemGlobbing" Version="5.0.0-preview.6.20264.1" CoherentParentDependency="Microsoft.AspNetCore.Razor.Language">
|
||||
<Dependency Name="Microsoft.Extensions.FileSystemGlobbing" Version="5.0.0-preview.6.20271.10" CoherentParentDependency="Microsoft.AspNetCore.Razor.Language">
|
||||
<Uri>https://github.com/dotnet/runtime</Uri>
|
||||
<Sha>bdd7235c43d762cea051cfc2071e14de48175f0c</Sha>
|
||||
<Sha>c44dc40b763b7c74012622a0a6120cd8ffa35ce4</Sha>
|
||||
</Dependency>
|
||||
<Dependency Name="Microsoft.Extensions.Hosting.Abstractions" Version="5.0.0-preview.6.20264.1" CoherentParentDependency="Microsoft.AspNetCore.Razor.Language">
|
||||
<Dependency Name="Microsoft.Extensions.Hosting.Abstractions" Version="5.0.0-preview.6.20271.10" CoherentParentDependency="Microsoft.AspNetCore.Razor.Language">
|
||||
<Uri>https://github.com/dotnet/runtime</Uri>
|
||||
<Sha>bdd7235c43d762cea051cfc2071e14de48175f0c</Sha>
|
||||
<Sha>c44dc40b763b7c74012622a0a6120cd8ffa35ce4</Sha>
|
||||
</Dependency>
|
||||
<Dependency Name="Microsoft.Extensions.Hosting" Version="5.0.0-preview.6.20264.1" CoherentParentDependency="Microsoft.AspNetCore.Razor.Language">
|
||||
<Dependency Name="Microsoft.Extensions.Hosting" Version="5.0.0-preview.6.20271.10" CoherentParentDependency="Microsoft.AspNetCore.Razor.Language">
|
||||
<Uri>https://github.com/dotnet/runtime</Uri>
|
||||
<Sha>bdd7235c43d762cea051cfc2071e14de48175f0c</Sha>
|
||||
<Sha>c44dc40b763b7c74012622a0a6120cd8ffa35ce4</Sha>
|
||||
</Dependency>
|
||||
<Dependency Name="Microsoft.Extensions.Http" Version="5.0.0-preview.6.20264.1" CoherentParentDependency="Microsoft.AspNetCore.Razor.Language">
|
||||
<Dependency Name="Microsoft.Extensions.Http" Version="5.0.0-preview.6.20271.10" CoherentParentDependency="Microsoft.AspNetCore.Razor.Language">
|
||||
<Uri>https://github.com/dotnet/runtime</Uri>
|
||||
<Sha>bdd7235c43d762cea051cfc2071e14de48175f0c</Sha>
|
||||
<Sha>c44dc40b763b7c74012622a0a6120cd8ffa35ce4</Sha>
|
||||
</Dependency>
|
||||
<Dependency Name="Microsoft.Extensions.Logging.Abstractions" Version="5.0.0-preview.6.20264.1" CoherentParentDependency="Microsoft.AspNetCore.Razor.Language">
|
||||
<Dependency Name="Microsoft.Extensions.Logging.Abstractions" Version="5.0.0-preview.6.20271.10" CoherentParentDependency="Microsoft.AspNetCore.Razor.Language">
|
||||
<Uri>https://github.com/dotnet/runtime</Uri>
|
||||
<Sha>bdd7235c43d762cea051cfc2071e14de48175f0c</Sha>
|
||||
<Sha>c44dc40b763b7c74012622a0a6120cd8ffa35ce4</Sha>
|
||||
</Dependency>
|
||||
<Dependency Name="Microsoft.Extensions.Logging.Configuration" Version="5.0.0-preview.6.20264.1" CoherentParentDependency="Microsoft.AspNetCore.Razor.Language">
|
||||
<Dependency Name="Microsoft.Extensions.Logging.Configuration" Version="5.0.0-preview.6.20271.10" CoherentParentDependency="Microsoft.AspNetCore.Razor.Language">
|
||||
<Uri>https://github.com/dotnet/runtime</Uri>
|
||||
<Sha>bdd7235c43d762cea051cfc2071e14de48175f0c</Sha>
|
||||
<Sha>c44dc40b763b7c74012622a0a6120cd8ffa35ce4</Sha>
|
||||
</Dependency>
|
||||
<Dependency Name="Microsoft.Extensions.Logging.Console" Version="5.0.0-preview.6.20264.1" CoherentParentDependency="Microsoft.AspNetCore.Razor.Language">
|
||||
<Dependency Name="Microsoft.Extensions.Logging.Console" Version="5.0.0-preview.6.20271.10" CoherentParentDependency="Microsoft.AspNetCore.Razor.Language">
|
||||
<Uri>https://github.com/dotnet/runtime</Uri>
|
||||
<Sha>bdd7235c43d762cea051cfc2071e14de48175f0c</Sha>
|
||||
<Sha>c44dc40b763b7c74012622a0a6120cd8ffa35ce4</Sha>
|
||||
</Dependency>
|
||||
<Dependency Name="Microsoft.Extensions.Logging.Debug" Version="5.0.0-preview.6.20264.1" CoherentParentDependency="Microsoft.AspNetCore.Razor.Language">
|
||||
<Dependency Name="Microsoft.Extensions.Logging.Debug" Version="5.0.0-preview.6.20271.10" CoherentParentDependency="Microsoft.AspNetCore.Razor.Language">
|
||||
<Uri>https://github.com/dotnet/runtime</Uri>
|
||||
<Sha>bdd7235c43d762cea051cfc2071e14de48175f0c</Sha>
|
||||
<Sha>c44dc40b763b7c74012622a0a6120cd8ffa35ce4</Sha>
|
||||
</Dependency>
|
||||
<Dependency Name="Microsoft.Extensions.Logging.EventSource" Version="5.0.0-preview.6.20264.1" CoherentParentDependency="Microsoft.AspNetCore.Razor.Language">
|
||||
<Dependency Name="Microsoft.Extensions.Logging.EventSource" Version="5.0.0-preview.6.20271.10" CoherentParentDependency="Microsoft.AspNetCore.Razor.Language">
|
||||
<Uri>https://github.com/dotnet/runtime</Uri>
|
||||
<Sha>bdd7235c43d762cea051cfc2071e14de48175f0c</Sha>
|
||||
<Sha>c44dc40b763b7c74012622a0a6120cd8ffa35ce4</Sha>
|
||||
</Dependency>
|
||||
<Dependency Name="Microsoft.Extensions.Logging.EventLog" Version="5.0.0-preview.6.20264.1" CoherentParentDependency="Microsoft.AspNetCore.Razor.Language">
|
||||
<Dependency Name="Microsoft.Extensions.Logging.EventLog" Version="5.0.0-preview.6.20271.10" CoherentParentDependency="Microsoft.AspNetCore.Razor.Language">
|
||||
<Uri>https://github.com/dotnet/runtime</Uri>
|
||||
<Sha>bdd7235c43d762cea051cfc2071e14de48175f0c</Sha>
|
||||
<Sha>c44dc40b763b7c74012622a0a6120cd8ffa35ce4</Sha>
|
||||
</Dependency>
|
||||
<Dependency Name="Microsoft.Extensions.Logging.TraceSource" Version="5.0.0-preview.6.20264.1" CoherentParentDependency="Microsoft.AspNetCore.Razor.Language">
|
||||
<Dependency Name="Microsoft.Extensions.Logging.TraceSource" Version="5.0.0-preview.6.20271.10" CoherentParentDependency="Microsoft.AspNetCore.Razor.Language">
|
||||
<Uri>https://github.com/dotnet/runtime</Uri>
|
||||
<Sha>bdd7235c43d762cea051cfc2071e14de48175f0c</Sha>
|
||||
<Sha>c44dc40b763b7c74012622a0a6120cd8ffa35ce4</Sha>
|
||||
</Dependency>
|
||||
<Dependency Name="Microsoft.Extensions.Logging" Version="5.0.0-preview.6.20264.1" CoherentParentDependency="Microsoft.AspNetCore.Razor.Language">
|
||||
<Dependency Name="Microsoft.Extensions.Logging" Version="5.0.0-preview.6.20271.10" CoherentParentDependency="Microsoft.AspNetCore.Razor.Language">
|
||||
<Uri>https://github.com/dotnet/runtime</Uri>
|
||||
<Sha>bdd7235c43d762cea051cfc2071e14de48175f0c</Sha>
|
||||
<Sha>c44dc40b763b7c74012622a0a6120cd8ffa35ce4</Sha>
|
||||
</Dependency>
|
||||
<Dependency Name="Microsoft.Extensions.Options.ConfigurationExtensions" Version="5.0.0-preview.6.20264.1" CoherentParentDependency="Microsoft.AspNetCore.Razor.Language">
|
||||
<Dependency Name="Microsoft.Extensions.Options.ConfigurationExtensions" Version="5.0.0-preview.6.20271.10" CoherentParentDependency="Microsoft.AspNetCore.Razor.Language">
|
||||
<Uri>https://github.com/dotnet/runtime</Uri>
|
||||
<Sha>bdd7235c43d762cea051cfc2071e14de48175f0c</Sha>
|
||||
<Sha>c44dc40b763b7c74012622a0a6120cd8ffa35ce4</Sha>
|
||||
</Dependency>
|
||||
<Dependency Name="Microsoft.Extensions.Options.DataAnnotations" Version="5.0.0-preview.6.20264.1" CoherentParentDependency="Microsoft.AspNetCore.Razor.Language">
|
||||
<Dependency Name="Microsoft.Extensions.Options.DataAnnotations" Version="5.0.0-preview.6.20271.10" CoherentParentDependency="Microsoft.AspNetCore.Razor.Language">
|
||||
<Uri>https://github.com/dotnet/runtime</Uri>
|
||||
<Sha>bdd7235c43d762cea051cfc2071e14de48175f0c</Sha>
|
||||
<Sha>c44dc40b763b7c74012622a0a6120cd8ffa35ce4</Sha>
|
||||
</Dependency>
|
||||
<Dependency Name="Microsoft.Extensions.Options" Version="5.0.0-preview.6.20264.1" CoherentParentDependency="Microsoft.AspNetCore.Razor.Language">
|
||||
<Dependency Name="Microsoft.Extensions.Options" Version="5.0.0-preview.6.20271.10" CoherentParentDependency="Microsoft.AspNetCore.Razor.Language">
|
||||
<Uri>https://github.com/dotnet/runtime</Uri>
|
||||
<Sha>bdd7235c43d762cea051cfc2071e14de48175f0c</Sha>
|
||||
<Sha>c44dc40b763b7c74012622a0a6120cd8ffa35ce4</Sha>
|
||||
</Dependency>
|
||||
<Dependency Name="Microsoft.Extensions.Primitives" Version="5.0.0-preview.6.20264.1" CoherentParentDependency="Microsoft.AspNetCore.Razor.Language">
|
||||
<Dependency Name="Microsoft.Extensions.Primitives" Version="5.0.0-preview.6.20271.10" CoherentParentDependency="Microsoft.AspNetCore.Razor.Language">
|
||||
<Uri>https://github.com/dotnet/runtime</Uri>
|
||||
<Sha>bdd7235c43d762cea051cfc2071e14de48175f0c</Sha>
|
||||
<Sha>c44dc40b763b7c74012622a0a6120cd8ffa35ce4</Sha>
|
||||
</Dependency>
|
||||
<Dependency Name="Microsoft.Extensions.Internal.Transport" Version="5.0.0-preview.6.20264.1" CoherentParentDependency="Microsoft.AspNetCore.Razor.Language">
|
||||
<Dependency Name="Microsoft.Extensions.Internal.Transport" Version="5.0.0-preview.6.20271.10" CoherentParentDependency="Microsoft.AspNetCore.Razor.Language">
|
||||
<Uri>https://github.com/dotnet/runtime</Uri>
|
||||
<Sha>bdd7235c43d762cea051cfc2071e14de48175f0c</Sha>
|
||||
<Sha>c44dc40b763b7c74012622a0a6120cd8ffa35ce4</Sha>
|
||||
</Dependency>
|
||||
<Dependency Name="Microsoft.Win32.Registry" Version="5.0.0-preview.6.20264.1" CoherentParentDependency="Microsoft.AspNetCore.Razor.Language">
|
||||
<Dependency Name="Microsoft.Win32.Registry" Version="5.0.0-preview.6.20271.10" CoherentParentDependency="Microsoft.AspNetCore.Razor.Language">
|
||||
<Uri>https://github.com/dotnet/runtime</Uri>
|
||||
<Sha>bdd7235c43d762cea051cfc2071e14de48175f0c</Sha>
|
||||
<Sha>c44dc40b763b7c74012622a0a6120cd8ffa35ce4</Sha>
|
||||
</Dependency>
|
||||
<Dependency Name="Microsoft.Win32.SystemEvents" Version="5.0.0-preview.6.20264.1" CoherentParentDependency="Microsoft.AspNetCore.Razor.Language">
|
||||
<Dependency Name="Microsoft.Win32.SystemEvents" Version="5.0.0-preview.6.20271.10" CoherentParentDependency="Microsoft.AspNetCore.Razor.Language">
|
||||
<Uri>https://github.com/dotnet/runtime</Uri>
|
||||
<Sha>bdd7235c43d762cea051cfc2071e14de48175f0c</Sha>
|
||||
<Sha>c44dc40b763b7c74012622a0a6120cd8ffa35ce4</Sha>
|
||||
</Dependency>
|
||||
<Dependency Name="System.ComponentModel.Annotations" Version="5.0.0-preview.6.20264.1" CoherentParentDependency="Microsoft.AspNetCore.Razor.Language">
|
||||
<Dependency Name="System.ComponentModel.Annotations" Version="5.0.0-preview.6.20271.10" CoherentParentDependency="Microsoft.AspNetCore.Razor.Language">
|
||||
<Uri>https://github.com/dotnet/runtime</Uri>
|
||||
<Sha>bdd7235c43d762cea051cfc2071e14de48175f0c</Sha>
|
||||
<Sha>c44dc40b763b7c74012622a0a6120cd8ffa35ce4</Sha>
|
||||
</Dependency>
|
||||
<Dependency Name="System.Diagnostics.DiagnosticSource" Version="5.0.0-preview.6.20264.1" CoherentParentDependency="Microsoft.AspNetCore.Razor.Language">
|
||||
<Dependency Name="System.Diagnostics.DiagnosticSource" Version="5.0.0-preview.6.20271.10" CoherentParentDependency="Microsoft.AspNetCore.Razor.Language">
|
||||
<Uri>https://github.com/dotnet/runtime</Uri>
|
||||
<Sha>bdd7235c43d762cea051cfc2071e14de48175f0c</Sha>
|
||||
<Sha>c44dc40b763b7c74012622a0a6120cd8ffa35ce4</Sha>
|
||||
</Dependency>
|
||||
<Dependency Name="System.Diagnostics.EventLog" Version="5.0.0-preview.6.20264.1" CoherentParentDependency="Microsoft.AspNetCore.Razor.Language">
|
||||
<Dependency Name="System.Diagnostics.EventLog" Version="5.0.0-preview.6.20271.10" CoherentParentDependency="Microsoft.AspNetCore.Razor.Language">
|
||||
<Uri>https://github.com/dotnet/runtime</Uri>
|
||||
<Sha>bdd7235c43d762cea051cfc2071e14de48175f0c</Sha>
|
||||
<Sha>c44dc40b763b7c74012622a0a6120cd8ffa35ce4</Sha>
|
||||
</Dependency>
|
||||
<Dependency Name="System.Drawing.Common" Version="5.0.0-preview.6.20264.1" CoherentParentDependency="Microsoft.AspNetCore.Razor.Language">
|
||||
<Dependency Name="System.Drawing.Common" Version="5.0.0-preview.6.20271.10" CoherentParentDependency="Microsoft.AspNetCore.Razor.Language">
|
||||
<Uri>https://github.com/dotnet/runtime</Uri>
|
||||
<Sha>bdd7235c43d762cea051cfc2071e14de48175f0c</Sha>
|
||||
<Sha>c44dc40b763b7c74012622a0a6120cd8ffa35ce4</Sha>
|
||||
</Dependency>
|
||||
<Dependency Name="System.IO.Pipelines" Version="5.0.0-preview.6.20264.1" CoherentParentDependency="Microsoft.AspNetCore.Razor.Language">
|
||||
<Dependency Name="System.IO.Pipelines" Version="5.0.0-preview.6.20271.10" CoherentParentDependency="Microsoft.AspNetCore.Razor.Language">
|
||||
<Uri>https://github.com/dotnet/runtime</Uri>
|
||||
<Sha>bdd7235c43d762cea051cfc2071e14de48175f0c</Sha>
|
||||
<Sha>c44dc40b763b7c74012622a0a6120cd8ffa35ce4</Sha>
|
||||
</Dependency>
|
||||
<Dependency Name="System.Net.Http.WinHttpHandler" Version="5.0.0-preview.6.20264.1" CoherentParentDependency="Microsoft.AspNetCore.Razor.Language">
|
||||
<Dependency Name="System.Net.Http.WinHttpHandler" Version="5.0.0-preview.6.20271.10" CoherentParentDependency="Microsoft.AspNetCore.Razor.Language">
|
||||
<Uri>https://github.com/dotnet/runtime</Uri>
|
||||
<Sha>bdd7235c43d762cea051cfc2071e14de48175f0c</Sha>
|
||||
<Sha>c44dc40b763b7c74012622a0a6120cd8ffa35ce4</Sha>
|
||||
</Dependency>
|
||||
<Dependency Name="System.Net.WebSockets.WebSocketProtocol" Version="5.0.0-preview.6.20264.1" CoherentParentDependency="Microsoft.AspNetCore.Razor.Language">
|
||||
<Dependency Name="System.Net.WebSockets.WebSocketProtocol" Version="5.0.0-preview.6.20271.10" CoherentParentDependency="Microsoft.AspNetCore.Razor.Language">
|
||||
<Uri>https://github.com/dotnet/runtime</Uri>
|
||||
<Sha>bdd7235c43d762cea051cfc2071e14de48175f0c</Sha>
|
||||
<Sha>c44dc40b763b7c74012622a0a6120cd8ffa35ce4</Sha>
|
||||
</Dependency>
|
||||
<Dependency Name="System.Reflection.Metadata" Version="5.0.0-preview.6.20264.1" CoherentParentDependency="Microsoft.AspNetCore.Razor.Language">
|
||||
<Dependency Name="System.Reflection.Metadata" Version="5.0.0-preview.6.20271.10" CoherentParentDependency="Microsoft.AspNetCore.Razor.Language">
|
||||
<Uri>https://github.com/dotnet/runtime</Uri>
|
||||
<Sha>bdd7235c43d762cea051cfc2071e14de48175f0c</Sha>
|
||||
<Sha>c44dc40b763b7c74012622a0a6120cd8ffa35ce4</Sha>
|
||||
</Dependency>
|
||||
<Dependency Name="System.Runtime.CompilerServices.Unsafe" Version="5.0.0-preview.6.20264.1" CoherentParentDependency="Microsoft.AspNetCore.Razor.Language">
|
||||
<Dependency Name="System.Runtime.CompilerServices.Unsafe" Version="5.0.0-preview.6.20271.10" CoherentParentDependency="Microsoft.AspNetCore.Razor.Language">
|
||||
<Uri>https://github.com/dotnet/runtime</Uri>
|
||||
<Sha>bdd7235c43d762cea051cfc2071e14de48175f0c</Sha>
|
||||
<Sha>c44dc40b763b7c74012622a0a6120cd8ffa35ce4</Sha>
|
||||
</Dependency>
|
||||
<Dependency Name="System.Security.Cryptography.Cng" Version="5.0.0-preview.6.20264.1" CoherentParentDependency="Microsoft.AspNetCore.Razor.Language">
|
||||
<Dependency Name="System.Security.Cryptography.Cng" Version="5.0.0-preview.6.20271.10" CoherentParentDependency="Microsoft.AspNetCore.Razor.Language">
|
||||
<Uri>https://github.com/dotnet/runtime</Uri>
|
||||
<Sha>bdd7235c43d762cea051cfc2071e14de48175f0c</Sha>
|
||||
<Sha>c44dc40b763b7c74012622a0a6120cd8ffa35ce4</Sha>
|
||||
</Dependency>
|
||||
<Dependency Name="System.Security.Cryptography.Pkcs" Version="5.0.0-preview.6.20264.1" CoherentParentDependency="Microsoft.AspNetCore.Razor.Language">
|
||||
<Dependency Name="System.Security.Cryptography.Pkcs" Version="5.0.0-preview.6.20271.10" CoherentParentDependency="Microsoft.AspNetCore.Razor.Language">
|
||||
<Uri>https://github.com/dotnet/runtime</Uri>
|
||||
<Sha>bdd7235c43d762cea051cfc2071e14de48175f0c</Sha>
|
||||
<Sha>c44dc40b763b7c74012622a0a6120cd8ffa35ce4</Sha>
|
||||
</Dependency>
|
||||
<Dependency Name="System.Security.Cryptography.Xml" Version="5.0.0-preview.6.20264.1" CoherentParentDependency="Microsoft.AspNetCore.Razor.Language">
|
||||
<Dependency Name="System.Security.Cryptography.Xml" Version="5.0.0-preview.6.20271.10" CoherentParentDependency="Microsoft.AspNetCore.Razor.Language">
|
||||
<Uri>https://github.com/dotnet/runtime</Uri>
|
||||
<Sha>bdd7235c43d762cea051cfc2071e14de48175f0c</Sha>
|
||||
<Sha>c44dc40b763b7c74012622a0a6120cd8ffa35ce4</Sha>
|
||||
</Dependency>
|
||||
<Dependency Name="System.Security.Permissions" Version="5.0.0-preview.6.20264.1" CoherentParentDependency="Microsoft.AspNetCore.Razor.Language">
|
||||
<Dependency Name="System.Security.Permissions" Version="5.0.0-preview.6.20271.10" CoherentParentDependency="Microsoft.AspNetCore.Razor.Language">
|
||||
<Uri>https://github.com/dotnet/runtime</Uri>
|
||||
<Sha>bdd7235c43d762cea051cfc2071e14de48175f0c</Sha>
|
||||
<Sha>c44dc40b763b7c74012622a0a6120cd8ffa35ce4</Sha>
|
||||
</Dependency>
|
||||
<Dependency Name="System.Security.Principal.Windows" Version="5.0.0-preview.6.20264.1" CoherentParentDependency="Microsoft.AspNetCore.Razor.Language">
|
||||
<Dependency Name="System.Security.Principal.Windows" Version="5.0.0-preview.6.20271.10" CoherentParentDependency="Microsoft.AspNetCore.Razor.Language">
|
||||
<Uri>https://github.com/dotnet/runtime</Uri>
|
||||
<Sha>bdd7235c43d762cea051cfc2071e14de48175f0c</Sha>
|
||||
<Sha>c44dc40b763b7c74012622a0a6120cd8ffa35ce4</Sha>
|
||||
</Dependency>
|
||||
<Dependency Name="System.ServiceProcess.ServiceController" Version="5.0.0-preview.6.20264.1" CoherentParentDependency="Microsoft.AspNetCore.Razor.Language">
|
||||
<Dependency Name="System.ServiceProcess.ServiceController" Version="5.0.0-preview.6.20271.10" CoherentParentDependency="Microsoft.AspNetCore.Razor.Language">
|
||||
<Uri>https://github.com/dotnet/runtime</Uri>
|
||||
<Sha>bdd7235c43d762cea051cfc2071e14de48175f0c</Sha>
|
||||
<Sha>c44dc40b763b7c74012622a0a6120cd8ffa35ce4</Sha>
|
||||
</Dependency>
|
||||
<Dependency Name="System.Text.Encodings.Web" Version="5.0.0-preview.6.20264.1" CoherentParentDependency="Microsoft.AspNetCore.Razor.Language">
|
||||
<Dependency Name="System.Text.Encodings.Web" Version="5.0.0-preview.6.20271.10" CoherentParentDependency="Microsoft.AspNetCore.Razor.Language">
|
||||
<Uri>https://github.com/dotnet/runtime</Uri>
|
||||
<Sha>bdd7235c43d762cea051cfc2071e14de48175f0c</Sha>
|
||||
<Sha>c44dc40b763b7c74012622a0a6120cd8ffa35ce4</Sha>
|
||||
</Dependency>
|
||||
<Dependency Name="System.Text.Json" Version="5.0.0-preview.6.20264.1" CoherentParentDependency="Microsoft.AspNetCore.Razor.Language">
|
||||
<Dependency Name="System.Text.Json" Version="5.0.0-preview.6.20271.10" CoherentParentDependency="Microsoft.AspNetCore.Razor.Language">
|
||||
<Uri>https://github.com/dotnet/runtime</Uri>
|
||||
<Sha>bdd7235c43d762cea051cfc2071e14de48175f0c</Sha>
|
||||
<Sha>c44dc40b763b7c74012622a0a6120cd8ffa35ce4</Sha>
|
||||
</Dependency>
|
||||
<Dependency Name="System.Threading.Channels" Version="5.0.0-preview.6.20264.1" CoherentParentDependency="Microsoft.AspNetCore.Razor.Language">
|
||||
<Dependency Name="System.Threading.Channels" Version="5.0.0-preview.6.20271.10" CoherentParentDependency="Microsoft.AspNetCore.Razor.Language">
|
||||
<Uri>https://github.com/dotnet/runtime</Uri>
|
||||
<Sha>bdd7235c43d762cea051cfc2071e14de48175f0c</Sha>
|
||||
<Sha>c44dc40b763b7c74012622a0a6120cd8ffa35ce4</Sha>
|
||||
</Dependency>
|
||||
<Dependency Name="System.Windows.Extensions" Version="5.0.0-preview.6.20264.1" CoherentParentDependency="Microsoft.AspNetCore.Razor.Language">
|
||||
<Dependency Name="System.Windows.Extensions" Version="5.0.0-preview.6.20271.10" CoherentParentDependency="Microsoft.AspNetCore.Razor.Language">
|
||||
<Uri>https://github.com/dotnet/runtime</Uri>
|
||||
<Sha>bdd7235c43d762cea051cfc2071e14de48175f0c</Sha>
|
||||
<Sha>c44dc40b763b7c74012622a0a6120cd8ffa35ce4</Sha>
|
||||
</Dependency>
|
||||
<Dependency Name="Microsoft.Extensions.DependencyModel" Version="5.0.0-preview.6.20264.1" CoherentParentDependency="Microsoft.AspNetCore.Razor.Language">
|
||||
<Dependency Name="Microsoft.Extensions.DependencyModel" Version="5.0.0-preview.6.20271.10" CoherentParentDependency="Microsoft.AspNetCore.Razor.Language">
|
||||
<Uri>https://github.com/dotnet/runtime</Uri>
|
||||
<Sha>bdd7235c43d762cea051cfc2071e14de48175f0c</Sha>
|
||||
<Sha>c44dc40b763b7c74012622a0a6120cd8ffa35ce4</Sha>
|
||||
</Dependency>
|
||||
<Dependency Name="Microsoft.NETCore.App.Ref" Version="5.0.0-preview.6.20264.1" CoherentParentDependency="Microsoft.AspNetCore.Razor.Language">
|
||||
<Dependency Name="Microsoft.NETCore.App.Ref" Version="5.0.0-preview.6.20271.10" CoherentParentDependency="Microsoft.AspNetCore.Razor.Language">
|
||||
<Uri>https://github.com/dotnet/runtime</Uri>
|
||||
<Sha>bdd7235c43d762cea051cfc2071e14de48175f0c</Sha>
|
||||
<Sha>c44dc40b763b7c74012622a0a6120cd8ffa35ce4</Sha>
|
||||
</Dependency>
|
||||
<!--
|
||||
Win-x64 is used here because we have picked an arbitrary runtime identifier to flow the version of the latest NETCore.App runtime.
|
||||
All Runtime.$rid packages should have the same version.
|
||||
-->
|
||||
<Dependency Name="Microsoft.NETCore.App.Runtime.win-x64" Version="5.0.0-preview.6.20264.1" CoherentParentDependency="Microsoft.AspNetCore.Razor.Language">
|
||||
<Dependency Name="Microsoft.NETCore.App.Runtime.win-x64" Version="5.0.0-preview.6.20271.10" CoherentParentDependency="Microsoft.AspNetCore.Razor.Language">
|
||||
<Uri>https://github.com/dotnet/runtime</Uri>
|
||||
<Sha>bdd7235c43d762cea051cfc2071e14de48175f0c</Sha>
|
||||
<Sha>c44dc40b763b7c74012622a0a6120cd8ffa35ce4</Sha>
|
||||
</Dependency>
|
||||
<Dependency Name="Microsoft.NETCore.App.Internal" Version="5.0.0-preview.6.20264.1" CoherentParentDependency="Microsoft.AspNetCore.Razor.Language">
|
||||
<Dependency Name="Microsoft.NETCore.App.Internal" Version="5.0.0-preview.6.20271.10" CoherentParentDependency="Microsoft.AspNetCore.Razor.Language">
|
||||
<Uri>https://github.com/dotnet/runtime</Uri>
|
||||
<Sha>bdd7235c43d762cea051cfc2071e14de48175f0c</Sha>
|
||||
<Sha>c44dc40b763b7c74012622a0a6120cd8ffa35ce4</Sha>
|
||||
</Dependency>
|
||||
</ProductDependencies>
|
||||
<ToolsetDependencies>
|
||||
<!-- Listed explicitly to workaround https://github.com/dotnet/cli/issues/10528 -->
|
||||
<Dependency Name="Microsoft.NETCore.Platforms" Version="5.0.0-preview.6.20264.1" CoherentParentDependency="Microsoft.AspNetCore.Razor.Language">
|
||||
<Dependency Name="Microsoft.NETCore.Platforms" Version="5.0.0-preview.6.20271.10" CoherentParentDependency="Microsoft.AspNetCore.Razor.Language">
|
||||
<Uri>https://github.com/dotnet/runtime</Uri>
|
||||
<Sha>bdd7235c43d762cea051cfc2071e14de48175f0c</Sha>
|
||||
<Sha>c44dc40b763b7c74012622a0a6120cd8ffa35ce4</Sha>
|
||||
</Dependency>
|
||||
<Dependency Name="Microsoft.DotNet.GenAPI" Version="5.0.0-beta.20261.9">
|
||||
<Uri>https://github.com/dotnet/arcade</Uri>
|
||||
|
|
@ -300,9 +300,9 @@
|
|||
<Uri>https://github.com/dotnet/arcade</Uri>
|
||||
<Sha>898e51ed5fdcc4871087ac5754ca9056e58e575d</Sha>
|
||||
</Dependency>
|
||||
<Dependency Name="Microsoft.Net.Compilers.Toolset" Version="3.7.0-2.20259.1" CoherentParentDependency="Microsoft.AspNetCore.Razor.Language">
|
||||
<Dependency Name="Microsoft.Net.Compilers.Toolset" Version="3.7.0-3.20271.4" CoherentParentDependency="Microsoft.AspNetCore.Razor.Language">
|
||||
<Uri>https://github.com/dotnet/roslyn</Uri>
|
||||
<Sha>d0ef8687ce735c8aa32035396f521705a8ff7392</Sha>
|
||||
<Sha>f598328fb99345233f52a67f5a65cd39affa9fd4</Sha>
|
||||
</Dependency>
|
||||
</ToolsetDependencies>
|
||||
</Dependencies>
|
||||
|
|
|
|||
|
|
@ -64,79 +64,79 @@
|
|||
<!-- Packages from dotnet/arcade -->
|
||||
<MicrosoftDotNetGenAPIPackageVersion>5.0.0-beta.20261.9</MicrosoftDotNetGenAPIPackageVersion>
|
||||
<!-- Packages from dotnet/roslyn -->
|
||||
<MicrosoftNetCompilersToolsetPackageVersion>3.7.0-2.20259.1</MicrosoftNetCompilersToolsetPackageVersion>
|
||||
<MicrosoftNetCompilersToolsetPackageVersion>3.7.0-3.20271.4</MicrosoftNetCompilersToolsetPackageVersion>
|
||||
<!-- Packages from dotnet/runtime -->
|
||||
<MicrosoftExtensionsDependencyModelPackageVersion>5.0.0-preview.6.20264.1</MicrosoftExtensionsDependencyModelPackageVersion>
|
||||
<MicrosoftNETCoreAppInternalPackageVersion>5.0.0-preview.6.20264.1</MicrosoftNETCoreAppInternalPackageVersion>
|
||||
<MicrosoftNETCoreAppRefPackageVersion>5.0.0-preview.6.20264.1</MicrosoftNETCoreAppRefPackageVersion>
|
||||
<MicrosoftNETCoreAppRuntimewinx64PackageVersion>5.0.0-preview.6.20264.1</MicrosoftNETCoreAppRuntimewinx64PackageVersion>
|
||||
<MicrosoftWin32RegistryPackageVersion>5.0.0-preview.6.20264.1</MicrosoftWin32RegistryPackageVersion>
|
||||
<MicrosoftWin32SystemEventsPackageVersion>5.0.0-preview.6.20264.1</MicrosoftWin32SystemEventsPackageVersion>
|
||||
<MicrosoftExtensionsCachingAbstractionsPackageVersion>5.0.0-preview.6.20264.1</MicrosoftExtensionsCachingAbstractionsPackageVersion>
|
||||
<MicrosoftExtensionsCachingMemoryPackageVersion>5.0.0-preview.6.20264.1</MicrosoftExtensionsCachingMemoryPackageVersion>
|
||||
<MicrosoftExtensionsConfigurationAbstractionsPackageVersion>5.0.0-preview.6.20264.1</MicrosoftExtensionsConfigurationAbstractionsPackageVersion>
|
||||
<MicrosoftExtensionsConfigurationBinderPackageVersion>5.0.0-preview.6.20264.1</MicrosoftExtensionsConfigurationBinderPackageVersion>
|
||||
<MicrosoftExtensionsConfigurationCommandLinePackageVersion>5.0.0-preview.6.20264.1</MicrosoftExtensionsConfigurationCommandLinePackageVersion>
|
||||
<MicrosoftExtensionsConfigurationEnvironmentVariablesPackageVersion>5.0.0-preview.6.20264.1</MicrosoftExtensionsConfigurationEnvironmentVariablesPackageVersion>
|
||||
<MicrosoftExtensionsConfigurationFileExtensionsPackageVersion>5.0.0-preview.6.20264.1</MicrosoftExtensionsConfigurationFileExtensionsPackageVersion>
|
||||
<MicrosoftExtensionsConfigurationIniPackageVersion>5.0.0-preview.6.20264.1</MicrosoftExtensionsConfigurationIniPackageVersion>
|
||||
<MicrosoftExtensionsConfigurationJsonPackageVersion>5.0.0-preview.6.20264.1</MicrosoftExtensionsConfigurationJsonPackageVersion>
|
||||
<MicrosoftExtensionsConfigurationPackageVersion>5.0.0-preview.6.20264.1</MicrosoftExtensionsConfigurationPackageVersion>
|
||||
<MicrosoftExtensionsConfigurationUserSecretsPackageVersion>5.0.0-preview.6.20264.1</MicrosoftExtensionsConfigurationUserSecretsPackageVersion>
|
||||
<MicrosoftExtensionsConfigurationXmlPackageVersion>5.0.0-preview.6.20264.1</MicrosoftExtensionsConfigurationXmlPackageVersion>
|
||||
<MicrosoftExtensionsDependencyInjectionAbstractionsPackageVersion>5.0.0-preview.6.20264.1</MicrosoftExtensionsDependencyInjectionAbstractionsPackageVersion>
|
||||
<MicrosoftExtensionsDependencyInjectionPackageVersion>5.0.0-preview.6.20264.1</MicrosoftExtensionsDependencyInjectionPackageVersion>
|
||||
<MicrosoftExtensionsFileProvidersAbstractionsPackageVersion>5.0.0-preview.6.20264.1</MicrosoftExtensionsFileProvidersAbstractionsPackageVersion>
|
||||
<MicrosoftExtensionsFileProvidersCompositePackageVersion>5.0.0-preview.6.20264.1</MicrosoftExtensionsFileProvidersCompositePackageVersion>
|
||||
<MicrosoftExtensionsFileProvidersPhysicalPackageVersion>5.0.0-preview.6.20264.1</MicrosoftExtensionsFileProvidersPhysicalPackageVersion>
|
||||
<MicrosoftExtensionsFileSystemGlobbingPackageVersion>5.0.0-preview.6.20264.1</MicrosoftExtensionsFileSystemGlobbingPackageVersion>
|
||||
<MicrosoftExtensionsHostingAbstractionsPackageVersion>5.0.0-preview.6.20264.1</MicrosoftExtensionsHostingAbstractionsPackageVersion>
|
||||
<MicrosoftExtensionsHostingPackageVersion>5.0.0-preview.6.20264.1</MicrosoftExtensionsHostingPackageVersion>
|
||||
<MicrosoftExtensionsHttpPackageVersion>5.0.0-preview.6.20264.1</MicrosoftExtensionsHttpPackageVersion>
|
||||
<MicrosoftExtensionsLoggingAbstractionsPackageVersion>5.0.0-preview.6.20264.1</MicrosoftExtensionsLoggingAbstractionsPackageVersion>
|
||||
<MicrosoftExtensionsLoggingConfigurationPackageVersion>5.0.0-preview.6.20264.1</MicrosoftExtensionsLoggingConfigurationPackageVersion>
|
||||
<MicrosoftExtensionsLoggingConsolePackageVersion>5.0.0-preview.6.20264.1</MicrosoftExtensionsLoggingConsolePackageVersion>
|
||||
<MicrosoftExtensionsLoggingDebugPackageVersion>5.0.0-preview.6.20264.1</MicrosoftExtensionsLoggingDebugPackageVersion>
|
||||
<MicrosoftExtensionsLoggingEventSourcePackageVersion>5.0.0-preview.6.20264.1</MicrosoftExtensionsLoggingEventSourcePackageVersion>
|
||||
<MicrosoftExtensionsLoggingEventLogPackageVersion>5.0.0-preview.6.20264.1</MicrosoftExtensionsLoggingEventLogPackageVersion>
|
||||
<MicrosoftExtensionsLoggingPackageVersion>5.0.0-preview.6.20264.1</MicrosoftExtensionsLoggingPackageVersion>
|
||||
<MicrosoftExtensionsLoggingTraceSourcePackageVersion>5.0.0-preview.6.20264.1</MicrosoftExtensionsLoggingTraceSourcePackageVersion>
|
||||
<MicrosoftExtensionsOptionsConfigurationExtensionsPackageVersion>5.0.0-preview.6.20264.1</MicrosoftExtensionsOptionsConfigurationExtensionsPackageVersion>
|
||||
<MicrosoftExtensionsOptionsDataAnnotationsPackageVersion>5.0.0-preview.6.20264.1</MicrosoftExtensionsOptionsDataAnnotationsPackageVersion>
|
||||
<MicrosoftExtensionsOptionsPackageVersion>5.0.0-preview.6.20264.1</MicrosoftExtensionsOptionsPackageVersion>
|
||||
<MicrosoftExtensionsPrimitivesPackageVersion>5.0.0-preview.6.20264.1</MicrosoftExtensionsPrimitivesPackageVersion>
|
||||
<MicrosoftExtensionsInternalTransportPackageVersion>5.0.0-preview.6.20264.1</MicrosoftExtensionsInternalTransportPackageVersion>
|
||||
<SystemComponentModelAnnotationsPackageVersion>5.0.0-preview.6.20264.1</SystemComponentModelAnnotationsPackageVersion>
|
||||
<MicrosoftExtensionsDependencyModelPackageVersion>5.0.0-preview.6.20271.10</MicrosoftExtensionsDependencyModelPackageVersion>
|
||||
<MicrosoftNETCoreAppInternalPackageVersion>5.0.0-preview.6.20271.10</MicrosoftNETCoreAppInternalPackageVersion>
|
||||
<MicrosoftNETCoreAppRefPackageVersion>5.0.0-preview.6.20271.10</MicrosoftNETCoreAppRefPackageVersion>
|
||||
<MicrosoftNETCoreAppRuntimewinx64PackageVersion>5.0.0-preview.6.20271.10</MicrosoftNETCoreAppRuntimewinx64PackageVersion>
|
||||
<MicrosoftWin32RegistryPackageVersion>5.0.0-preview.6.20271.10</MicrosoftWin32RegistryPackageVersion>
|
||||
<MicrosoftWin32SystemEventsPackageVersion>5.0.0-preview.6.20271.10</MicrosoftWin32SystemEventsPackageVersion>
|
||||
<MicrosoftExtensionsCachingAbstractionsPackageVersion>5.0.0-preview.6.20271.10</MicrosoftExtensionsCachingAbstractionsPackageVersion>
|
||||
<MicrosoftExtensionsCachingMemoryPackageVersion>5.0.0-preview.6.20271.10</MicrosoftExtensionsCachingMemoryPackageVersion>
|
||||
<MicrosoftExtensionsConfigurationAbstractionsPackageVersion>5.0.0-preview.6.20271.10</MicrosoftExtensionsConfigurationAbstractionsPackageVersion>
|
||||
<MicrosoftExtensionsConfigurationBinderPackageVersion>5.0.0-preview.6.20271.10</MicrosoftExtensionsConfigurationBinderPackageVersion>
|
||||
<MicrosoftExtensionsConfigurationCommandLinePackageVersion>5.0.0-preview.6.20271.10</MicrosoftExtensionsConfigurationCommandLinePackageVersion>
|
||||
<MicrosoftExtensionsConfigurationEnvironmentVariablesPackageVersion>5.0.0-preview.6.20271.10</MicrosoftExtensionsConfigurationEnvironmentVariablesPackageVersion>
|
||||
<MicrosoftExtensionsConfigurationFileExtensionsPackageVersion>5.0.0-preview.6.20271.10</MicrosoftExtensionsConfigurationFileExtensionsPackageVersion>
|
||||
<MicrosoftExtensionsConfigurationIniPackageVersion>5.0.0-preview.6.20271.10</MicrosoftExtensionsConfigurationIniPackageVersion>
|
||||
<MicrosoftExtensionsConfigurationJsonPackageVersion>5.0.0-preview.6.20271.10</MicrosoftExtensionsConfigurationJsonPackageVersion>
|
||||
<MicrosoftExtensionsConfigurationPackageVersion>5.0.0-preview.6.20271.10</MicrosoftExtensionsConfigurationPackageVersion>
|
||||
<MicrosoftExtensionsConfigurationUserSecretsPackageVersion>5.0.0-preview.6.20271.10</MicrosoftExtensionsConfigurationUserSecretsPackageVersion>
|
||||
<MicrosoftExtensionsConfigurationXmlPackageVersion>5.0.0-preview.6.20271.10</MicrosoftExtensionsConfigurationXmlPackageVersion>
|
||||
<MicrosoftExtensionsDependencyInjectionAbstractionsPackageVersion>5.0.0-preview.6.20271.10</MicrosoftExtensionsDependencyInjectionAbstractionsPackageVersion>
|
||||
<MicrosoftExtensionsDependencyInjectionPackageVersion>5.0.0-preview.6.20271.10</MicrosoftExtensionsDependencyInjectionPackageVersion>
|
||||
<MicrosoftExtensionsFileProvidersAbstractionsPackageVersion>5.0.0-preview.6.20271.10</MicrosoftExtensionsFileProvidersAbstractionsPackageVersion>
|
||||
<MicrosoftExtensionsFileProvidersCompositePackageVersion>5.0.0-preview.6.20271.10</MicrosoftExtensionsFileProvidersCompositePackageVersion>
|
||||
<MicrosoftExtensionsFileProvidersPhysicalPackageVersion>5.0.0-preview.6.20271.10</MicrosoftExtensionsFileProvidersPhysicalPackageVersion>
|
||||
<MicrosoftExtensionsFileSystemGlobbingPackageVersion>5.0.0-preview.6.20271.10</MicrosoftExtensionsFileSystemGlobbingPackageVersion>
|
||||
<MicrosoftExtensionsHostingAbstractionsPackageVersion>5.0.0-preview.6.20271.10</MicrosoftExtensionsHostingAbstractionsPackageVersion>
|
||||
<MicrosoftExtensionsHostingPackageVersion>5.0.0-preview.6.20271.10</MicrosoftExtensionsHostingPackageVersion>
|
||||
<MicrosoftExtensionsHttpPackageVersion>5.0.0-preview.6.20271.10</MicrosoftExtensionsHttpPackageVersion>
|
||||
<MicrosoftExtensionsLoggingAbstractionsPackageVersion>5.0.0-preview.6.20271.10</MicrosoftExtensionsLoggingAbstractionsPackageVersion>
|
||||
<MicrosoftExtensionsLoggingConfigurationPackageVersion>5.0.0-preview.6.20271.10</MicrosoftExtensionsLoggingConfigurationPackageVersion>
|
||||
<MicrosoftExtensionsLoggingConsolePackageVersion>5.0.0-preview.6.20271.10</MicrosoftExtensionsLoggingConsolePackageVersion>
|
||||
<MicrosoftExtensionsLoggingDebugPackageVersion>5.0.0-preview.6.20271.10</MicrosoftExtensionsLoggingDebugPackageVersion>
|
||||
<MicrosoftExtensionsLoggingEventSourcePackageVersion>5.0.0-preview.6.20271.10</MicrosoftExtensionsLoggingEventSourcePackageVersion>
|
||||
<MicrosoftExtensionsLoggingEventLogPackageVersion>5.0.0-preview.6.20271.10</MicrosoftExtensionsLoggingEventLogPackageVersion>
|
||||
<MicrosoftExtensionsLoggingPackageVersion>5.0.0-preview.6.20271.10</MicrosoftExtensionsLoggingPackageVersion>
|
||||
<MicrosoftExtensionsLoggingTraceSourcePackageVersion>5.0.0-preview.6.20271.10</MicrosoftExtensionsLoggingTraceSourcePackageVersion>
|
||||
<MicrosoftExtensionsOptionsConfigurationExtensionsPackageVersion>5.0.0-preview.6.20271.10</MicrosoftExtensionsOptionsConfigurationExtensionsPackageVersion>
|
||||
<MicrosoftExtensionsOptionsDataAnnotationsPackageVersion>5.0.0-preview.6.20271.10</MicrosoftExtensionsOptionsDataAnnotationsPackageVersion>
|
||||
<MicrosoftExtensionsOptionsPackageVersion>5.0.0-preview.6.20271.10</MicrosoftExtensionsOptionsPackageVersion>
|
||||
<MicrosoftExtensionsPrimitivesPackageVersion>5.0.0-preview.6.20271.10</MicrosoftExtensionsPrimitivesPackageVersion>
|
||||
<MicrosoftExtensionsInternalTransportPackageVersion>5.0.0-preview.6.20271.10</MicrosoftExtensionsInternalTransportPackageVersion>
|
||||
<SystemComponentModelAnnotationsPackageVersion>5.0.0-preview.6.20271.10</SystemComponentModelAnnotationsPackageVersion>
|
||||
<SystemDiagnosticsDiagnosticSourcePackageVersion>5.0.0-preview.6.20264.1</SystemDiagnosticsDiagnosticSourcePackageVersion>
|
||||
<SystemDiagnosticsEventLogPackageVersion>5.0.0-preview.6.20264.1</SystemDiagnosticsEventLogPackageVersion>
|
||||
<SystemDrawingCommonPackageVersion>5.0.0-preview.6.20264.1</SystemDrawingCommonPackageVersion>
|
||||
<SystemIOPipelinesPackageVersion>5.0.0-preview.6.20264.1</SystemIOPipelinesPackageVersion>
|
||||
<SystemNetHttpWinHttpHandlerPackageVersion>5.0.0-preview.6.20264.1</SystemNetHttpWinHttpHandlerPackageVersion>
|
||||
<SystemNetWebSocketsWebSocketProtocolPackageVersion>5.0.0-preview.6.20264.1</SystemNetWebSocketsWebSocketProtocolPackageVersion>
|
||||
<SystemReflectionMetadataPackageVersion>5.0.0-preview.6.20264.1</SystemReflectionMetadataPackageVersion>
|
||||
<SystemRuntimeCompilerServicesUnsafePackageVersion>5.0.0-preview.6.20264.1</SystemRuntimeCompilerServicesUnsafePackageVersion>
|
||||
<SystemSecurityCryptographyCngPackageVersion>5.0.0-preview.6.20264.1</SystemSecurityCryptographyCngPackageVersion>
|
||||
<SystemSecurityCryptographyPkcsPackageVersion>5.0.0-preview.6.20264.1</SystemSecurityCryptographyPkcsPackageVersion>
|
||||
<SystemSecurityCryptographyXmlPackageVersion>5.0.0-preview.6.20264.1</SystemSecurityCryptographyXmlPackageVersion>
|
||||
<SystemSecurityPermissionsPackageVersion>5.0.0-preview.6.20264.1</SystemSecurityPermissionsPackageVersion>
|
||||
<SystemSecurityPrincipalWindowsPackageVersion>5.0.0-preview.6.20264.1</SystemSecurityPrincipalWindowsPackageVersion>
|
||||
<SystemServiceProcessServiceControllerPackageVersion>5.0.0-preview.6.20264.1</SystemServiceProcessServiceControllerPackageVersion>
|
||||
<SystemTextEncodingsWebPackageVersion>5.0.0-preview.6.20264.1</SystemTextEncodingsWebPackageVersion>
|
||||
<SystemTextJsonPackageVersion>5.0.0-preview.6.20264.1</SystemTextJsonPackageVersion>
|
||||
<SystemThreadingChannelsPackageVersion>5.0.0-preview.6.20264.1</SystemThreadingChannelsPackageVersion>
|
||||
<SystemWindowsExtensionsPackageVersion>5.0.0-preview.6.20264.1</SystemWindowsExtensionsPackageVersion>
|
||||
<SystemDiagnosticsEventLogPackageVersion>5.0.0-preview.6.20271.10</SystemDiagnosticsEventLogPackageVersion>
|
||||
<SystemDrawingCommonPackageVersion>5.0.0-preview.6.20271.10</SystemDrawingCommonPackageVersion>
|
||||
<SystemIOPipelinesPackageVersion>5.0.0-preview.6.20271.10</SystemIOPipelinesPackageVersion>
|
||||
<SystemNetHttpWinHttpHandlerPackageVersion>5.0.0-preview.6.20271.10</SystemNetHttpWinHttpHandlerPackageVersion>
|
||||
<SystemNetWebSocketsWebSocketProtocolPackageVersion>5.0.0-preview.6.20271.10</SystemNetWebSocketsWebSocketProtocolPackageVersion>
|
||||
<SystemReflectionMetadataPackageVersion>5.0.0-preview.6.20271.10</SystemReflectionMetadataPackageVersion>
|
||||
<SystemRuntimeCompilerServicesUnsafePackageVersion>5.0.0-preview.6.20271.10</SystemRuntimeCompilerServicesUnsafePackageVersion>
|
||||
<SystemSecurityCryptographyCngPackageVersion>5.0.0-preview.6.20271.10</SystemSecurityCryptographyCngPackageVersion>
|
||||
<SystemSecurityCryptographyPkcsPackageVersion>5.0.0-preview.6.20271.10</SystemSecurityCryptographyPkcsPackageVersion>
|
||||
<SystemSecurityCryptographyXmlPackageVersion>5.0.0-preview.6.20271.10</SystemSecurityCryptographyXmlPackageVersion>
|
||||
<SystemSecurityPermissionsPackageVersion>5.0.0-preview.6.20271.10</SystemSecurityPermissionsPackageVersion>
|
||||
<SystemSecurityPrincipalWindowsPackageVersion>5.0.0-preview.6.20271.10</SystemSecurityPrincipalWindowsPackageVersion>
|
||||
<SystemServiceProcessServiceControllerPackageVersion>5.0.0-preview.6.20271.10</SystemServiceProcessServiceControllerPackageVersion>
|
||||
<SystemTextEncodingsWebPackageVersion>5.0.0-preview.6.20271.10</SystemTextEncodingsWebPackageVersion>
|
||||
<SystemTextJsonPackageVersion>5.0.0-preview.6.20271.10</SystemTextJsonPackageVersion>
|
||||
<SystemThreadingChannelsPackageVersion>5.0.0-preview.6.20271.10</SystemThreadingChannelsPackageVersion>
|
||||
<SystemWindowsExtensionsPackageVersion>5.0.0-preview.6.20271.10</SystemWindowsExtensionsPackageVersion>
|
||||
<!-- Only listed explicitly to workaround https://github.com/dotnet/cli/issues/10528 -->
|
||||
<MicrosoftNETCorePlatformsPackageVersion>5.0.0-preview.6.20264.1</MicrosoftNETCorePlatformsPackageVersion>
|
||||
<MicrosoftNETCorePlatformsPackageVersion>5.0.0-preview.6.20271.10</MicrosoftNETCorePlatformsPackageVersion>
|
||||
<!-- Packages from dotnet/blazor -->
|
||||
<MicrosoftAspNetCoreBlazorMonoPackageVersion>3.2.0-preview1.20067.1</MicrosoftAspNetCoreBlazorMonoPackageVersion>
|
||||
<!-- Packages from dotnet/efcore -->
|
||||
<dotnetefPackageVersion>5.0.0-preview.6.20264.4</dotnetefPackageVersion>
|
||||
<MicrosoftEntityFrameworkCoreInMemoryPackageVersion>5.0.0-preview.6.20264.4</MicrosoftEntityFrameworkCoreInMemoryPackageVersion>
|
||||
<MicrosoftEntityFrameworkCoreRelationalPackageVersion>5.0.0-preview.6.20264.4</MicrosoftEntityFrameworkCoreRelationalPackageVersion>
|
||||
<MicrosoftEntityFrameworkCoreSqlitePackageVersion>5.0.0-preview.6.20264.4</MicrosoftEntityFrameworkCoreSqlitePackageVersion>
|
||||
<MicrosoftEntityFrameworkCoreSqlServerPackageVersion>5.0.0-preview.6.20264.4</MicrosoftEntityFrameworkCoreSqlServerPackageVersion>
|
||||
<MicrosoftEntityFrameworkCoreToolsPackageVersion>5.0.0-preview.6.20264.4</MicrosoftEntityFrameworkCoreToolsPackageVersion>
|
||||
<MicrosoftEntityFrameworkCorePackageVersion>5.0.0-preview.6.20264.4</MicrosoftEntityFrameworkCorePackageVersion>
|
||||
<dotnetefPackageVersion>5.0.0-preview.6.20276.1</dotnetefPackageVersion>
|
||||
<MicrosoftEntityFrameworkCoreInMemoryPackageVersion>5.0.0-preview.6.20276.1</MicrosoftEntityFrameworkCoreInMemoryPackageVersion>
|
||||
<MicrosoftEntityFrameworkCoreRelationalPackageVersion>5.0.0-preview.6.20276.1</MicrosoftEntityFrameworkCoreRelationalPackageVersion>
|
||||
<MicrosoftEntityFrameworkCoreSqlitePackageVersion>5.0.0-preview.6.20276.1</MicrosoftEntityFrameworkCoreSqlitePackageVersion>
|
||||
<MicrosoftEntityFrameworkCoreSqlServerPackageVersion>5.0.0-preview.6.20276.1</MicrosoftEntityFrameworkCoreSqlServerPackageVersion>
|
||||
<MicrosoftEntityFrameworkCoreToolsPackageVersion>5.0.0-preview.6.20276.1</MicrosoftEntityFrameworkCoreToolsPackageVersion>
|
||||
<MicrosoftEntityFrameworkCorePackageVersion>5.0.0-preview.6.20276.1</MicrosoftEntityFrameworkCorePackageVersion>
|
||||
</PropertyGroup>
|
||||
<!--
|
||||
|
||||
|
|
|
|||
|
|
@ -16,6 +16,10 @@ namespace RunTests
|
|||
|
||||
var keepGoing = runner.SetupEnvironment();
|
||||
if (keepGoing)
|
||||
{
|
||||
keepGoing = await runner.InstallDotnetDump();
|
||||
}
|
||||
if (keepGoing)
|
||||
{
|
||||
keepGoing = await runner.InstallAspNetAppIfNeededAsync();
|
||||
}
|
||||
|
|
@ -23,10 +27,6 @@ namespace RunTests
|
|||
{
|
||||
keepGoing = runner.InstallAspNetRefIfNeeded();
|
||||
}
|
||||
if (keepGoing)
|
||||
{
|
||||
keepGoing = await runner.InstallDotnetDump();
|
||||
}
|
||||
|
||||
runner.DisplayContents();
|
||||
|
||||
|
|
|
|||
|
|
@ -123,14 +123,16 @@ namespace RunTests
|
|||
environmentVariables: EnvironmentVariables,
|
||||
outputDataReceived: Console.WriteLine,
|
||||
errorDataReceived: Console.Error.WriteLine,
|
||||
throwOnError: false);
|
||||
throwOnError: false,
|
||||
cancellationToken: new CancellationTokenSource(TimeSpan.FromMinutes(2)).Token);
|
||||
|
||||
await ProcessUtil.RunAsync($"{Options.DotnetRoot}/dotnet",
|
||||
"nuget add source https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet5/nuget/v3/index.json --configfile NuGet.config",
|
||||
environmentVariables: EnvironmentVariables,
|
||||
outputDataReceived: Console.WriteLine,
|
||||
errorDataReceived: Console.Error.WriteLine,
|
||||
throwOnError: false);
|
||||
throwOnError: false,
|
||||
cancellationToken: new CancellationTokenSource(TimeSpan.FromMinutes(2)).Token);
|
||||
|
||||
// Write nuget sources to console, useful for debugging purposes
|
||||
await ProcessUtil.RunAsync($"{Options.DotnetRoot}/dotnet",
|
||||
|
|
@ -138,14 +140,16 @@ namespace RunTests
|
|||
environmentVariables: EnvironmentVariables,
|
||||
outputDataReceived: Console.WriteLine,
|
||||
errorDataReceived: Console.Error.WriteLine,
|
||||
throwOnError: false);
|
||||
throwOnError: false,
|
||||
cancellationToken: new CancellationTokenSource(TimeSpan.FromMinutes(2)).Token);
|
||||
|
||||
await ProcessUtil.RunAsync($"{Options.DotnetRoot}/dotnet",
|
||||
$"tool install dotnet-ef --version {Options.EfVersion} --tool-path {Options.HELIX_WORKITEM_ROOT}",
|
||||
environmentVariables: EnvironmentVariables,
|
||||
outputDataReceived: Console.WriteLine,
|
||||
errorDataReceived: Console.Error.WriteLine,
|
||||
throwOnError: false);
|
||||
throwOnError: false,
|
||||
cancellationToken: new CancellationTokenSource(TimeSpan.FromMinutes(2)).Token);
|
||||
|
||||
// ';' is the path separator on Windows, and ':' on Unix
|
||||
Options.Path += RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? ";" : ":";
|
||||
|
|
@ -305,6 +309,11 @@ namespace RunTests
|
|||
}
|
||||
|
||||
var HELIX_WORKITEM_UPLOAD_ROOT = Environment.GetEnvironmentVariable("HELIX_WORKITEM_UPLOAD_ROOT");
|
||||
if (string.IsNullOrEmpty(HELIX_WORKITEM_UPLOAD_ROOT))
|
||||
{
|
||||
Console.WriteLine("No HELIX_WORKITEM_UPLOAD_ROOT specified, skipping log copy");
|
||||
return;
|
||||
}
|
||||
Console.WriteLine($"Copying artifacts/log/ to {HELIX_WORKITEM_UPLOAD_ROOT}/");
|
||||
if (Directory.Exists("artifacts/log"))
|
||||
{
|
||||
|
|
|
|||
|
|
@ -30,8 +30,8 @@ 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%"
|
||||
|
||||
set exit_code=0
|
||||
echo "Restore: dotnet restore RunTests\RunTests.csproj --source https://api.nuget.org/v3/index.json --ignore-failed-sources..."
|
||||
dotnet restore RunTests\RunTests.csproj --source https://api.nuget.org/v3/index.json --ignore-failed-sources
|
||||
echo "Restore: dotnet restore RunTests\RunTests.csproj --source https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet5/nuget/v3/index.json --ignore-failed-sources..."
|
||||
dotnet restore RunTests\RunTests.csproj --source https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet5/nuget/v3/index.json --ignore-failed-sources
|
||||
|
||||
echo "Running tests: dotnet run --project RunTests\RunTests.csproj -- --target %$target% --sdk %$sdkVersion% --runtime %$runtimeVersion% --queue %$queue% --arch %$arch% --quarantined %$quarantined% --ef %$ef% --aspnetruntime %$aspnetruntime% --aspnetref %$aspnetref% --helixTimeout %$helixTimeout%..."
|
||||
dotnet run --project RunTests\RunTests.csproj -- --target %$target% --sdk %$sdkVersion% --runtime %$runtimeVersion% --queue %$queue% --arch %$arch% --quarantined %$quarantined% --ef %$ef% --aspnetruntime %$aspnetruntime% --aspnetref %$aspnetref% --helixTimeout %$helixTimeout%
|
||||
|
|
|
|||
|
|
@ -2,8 +2,12 @@
|
|||
|
||||
set -euo pipefail
|
||||
|
||||
scriptroot="$( cd -P "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
reporoot="$(dirname "$(dirname "$scriptroot")")"
|
||||
nginxinstall="$reporoot/.tools/nginx"
|
||||
|
||||
curl -sSL http://nginx.org/download/nginx-1.14.2.tar.gz | tar zxfv - -C /tmp && cd /tmp/nginx-1.14.2/
|
||||
./configure --prefix=$HOME/nginxinstall --with-http_ssl_module --without-http_rewrite_module
|
||||
./configure --prefix=$nginxinstall --with-http_ssl_module --without-http_rewrite_module
|
||||
make
|
||||
make install
|
||||
echo "##vso[task.prependpath]$HOME/nginxinstall/sbin"
|
||||
echo "##vso[task.prependpath]$nginxinstall/sbin"
|
||||
|
|
|
|||
|
|
@ -18,14 +18,14 @@
|
|||
<HelixPreCommand Include="call RunPowershell.cmd UpdateIISExpressCertificate.ps1 || exit /b 1" />
|
||||
</ItemGroup>
|
||||
|
||||
<!-- ubuntu and win10 required for green PR queues -->
|
||||
<!-- PR(ci.yaml) required queues -->
|
||||
<ItemGroup Condition="'$(IsRequiredCheck)' == 'true' AND '$(TargetArchitecture)' == 'x64'">
|
||||
<HelixAvailableTargetQueue Include="Ubuntu.1604.Amd64.Open" Platform="Linux" />
|
||||
<HelixAvailableTargetQueue Include="Windows.10.Amd64.Open" Platform="Windows" />
|
||||
<HelixAvailableTargetQueue Include="OSX.1014.Amd64.Open" Platform="Linux" />
|
||||
</ItemGroup>
|
||||
|
||||
<!-- daily scheduled only queues -->
|
||||
<!-- queues for helix-matrix.yml pipeline -->
|
||||
<ItemGroup Condition="'$(IsWindowsOnlyTest)' != 'true' AND '$(TargetArchitecture)' == 'x64' AND '$(IsHelixDaily)' == 'true'">
|
||||
<HelixAvailableTargetQueue Include="Windows.7.Amd64.Open" Platform="Windows" />
|
||||
<HelixAvailableTargetQueue Include="Windows.81.Amd64.Open" Platform="Windows" />
|
||||
|
|
@ -37,13 +37,9 @@
|
|||
<HelixAvailableTargetQueue Include="(Fedora.28.Amd64.Open)Ubuntu.1604.Amd64.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:fedora-28-helix-09ca40b-20190508143249" Platform="Linux" />
|
||||
</ItemGroup>
|
||||
|
||||
<!-- arm64 queues for helix-matrix.yml pipeline -->
|
||||
<ItemGroup Condition="'$(IsWindowsOnlyTest)' != 'true' AND '$(TargetArchitecture)' == 'arm64' AND '$(IsHelixDaily)' == 'true' AND '$(RunQuarantinedTests)' != 'true'">
|
||||
<!-- arm64 queues -->
|
||||
<HelixAvailableTargetQueue Include="Windows.10.Arm64.Open" Platform="Windows" />
|
||||
<HelixAvailableTargetQueue Include="(Debian.9.Arm64.Open)Ubuntu.1804.Armarch.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:debian-9-helix-arm64v8-a12566d-20190807161036" Platform="Linux" />
|
||||
|
||||
<!-- Need to resolve permission issues on this docker queue
|
||||
<HelixAvailableTargetQueue Include="(Alpine.38.Arm64)Ubuntu.1604.Arm64.Docker@mcr.microsoft.com/dotnet-buildtools/prereqs:alpine-3.8-helix-arm64v8-46e69dd-20190327215724" Platform="Linux" />
|
||||
<HelixAvailableTargetQueue Include="(Ubuntu-1804.Arm64.Open)Ubuntu.1604.Arm64.Docker.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-18.04-helix-arm64v8-6f28fa9-20190606004102" Platform="Linux" />
|
||||
-->
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
<HelixPreCommand Condition="'$(IsWindowsHelixQueue)' != 'true' AND '$(IsMacHelixQueue)' != 'true'" Include="./installjdk.sh 10.0.2 x64 && if [ "%24JAVA_HOME" = "" ]%3B then export JAVA_HOME=%24PWD/java%3B fi" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup Condition="'$(TestDependsOnMssql)' == 'true' AND '$(IsWindowsHelixQueue)' == 'true'">
|
||||
<ItemGroup Condition="'$(TestDependsOnMssql)' == 'true' AND '$(IsWindowsHelixQueue)' == 'true' AND '$(TargetArchitecture)' != 'arm64'">
|
||||
<HelixPreCommand Include="call RunPowershell.cmd mssql\InstallSqlServerLocalDB.ps1 || exit /b 1" />
|
||||
</ItemGroup>
|
||||
|
||||
|
|
@ -80,6 +80,7 @@ Usage: dotnet msbuild /t:Helix src/MyTestProject.csproj
|
|||
<PropertyGroup>
|
||||
<BuildHelixPayload Condition="'@(_HelixApplicableTargetQueue->Count())' == '0'">false</BuildHelixPayload>
|
||||
<BuildHelixPayload Condition="'$(TargetArchitecture)' == 'arm64' AND '$(SkipHelixArm)' == 'true'">false</BuildHelixPayload>
|
||||
<BuildHelixPayload Condition="$(SkipHelixQueues.Contains('$(HelixTargetQueue)'))">false</BuildHelixPayload>
|
||||
</PropertyGroup>
|
||||
</Target>
|
||||
|
||||
|
|
|
|||
|
|
@ -16,13 +16,14 @@
|
|||
"Git": "2.22.0",
|
||||
"jdk": "11.0.3",
|
||||
"vs": {
|
||||
"version": "16.5",
|
||||
"version": "16.6",
|
||||
"components": [
|
||||
"Microsoft.VisualStudio.Component.VC.ATL",
|
||||
"Microsoft.VisualStudio.Component.VC.Tools.x86.x64",
|
||||
"Microsoft.VisualStudio.Component.Windows10SDK.17134"
|
||||
]
|
||||
}
|
||||
},
|
||||
"xcopy-msbuild": "16.5.0-alpha"
|
||||
},
|
||||
"msbuild-sdks": {
|
||||
"Yarn.MSBuild": "1.15.2",
|
||||
|
|
|
|||
|
|
@ -15,6 +15,7 @@
|
|||
<UseLatestPackageReferences>true</UseLatestPackageReferences>
|
||||
<SuppressDependenciesWhenPacking>true</SuppressDependenciesWhenPacking>
|
||||
<IsPackable>true</IsPackable>
|
||||
<IsShippingPackage>false</IsShippingPackage>
|
||||
<!-- This project needs an older version of M.CA.CSharp.Workspaces since it targets netstandard1.3 -->
|
||||
<DisablePackageReferenceRestrictions>true</DisablePackageReferenceRestrictions>
|
||||
</PropertyGroup>
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@ using System.Collections.Generic;
|
|||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.CodeAnalysis;
|
||||
using Microsoft.AspNetCore.Testing;
|
||||
using Microsoft.AspNetCore.Analyzer.Testing;
|
||||
using Xunit;
|
||||
using Xunit.Abstractions;
|
||||
|
|
@ -127,6 +128,7 @@ namespace A
|
|||
[Theory]
|
||||
[MemberData(nameof(PrivateMemberDefinitions))]
|
||||
[MemberData(nameof(PublicMemberDefinitions))]
|
||||
[QuarantinedTest]
|
||||
public async Task DefinitionOfPubternalCrossAssemblyProducesPUB0002(string member)
|
||||
{
|
||||
var code = TestSource.Read($@"
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@
|
|||
<!-- This package is internal, so we don't generate a package baseline. Always build against the latest dependencies. -->
|
||||
<UseLatestPackageReferences>true</UseLatestPackageReferences>
|
||||
<IsPackable>true</IsPackable>
|
||||
<IsShippingPackage>false</IsShippingPackage>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@ using BasicTestApp;
|
|||
using Microsoft.AspNetCore.Components.E2ETest.Infrastructure;
|
||||
using Microsoft.AspNetCore.Components.E2ETest.Infrastructure.ServerFixtures;
|
||||
using Microsoft.AspNetCore.E2ETesting;
|
||||
using Microsoft.AspNetCore.Testing;
|
||||
using OpenQA.Selenium;
|
||||
using Xunit;
|
||||
using Xunit.Abstractions;
|
||||
|
|
@ -100,6 +101,7 @@ namespace Microsoft.AspNetCore.Components.E2ETest.Tests
|
|||
}
|
||||
|
||||
[Theory]
|
||||
[QuarantinedTest]
|
||||
[InlineData("target")]
|
||||
[InlineData("intermediate")]
|
||||
public void StopPropagation(string whereToStopPropagation)
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@ using BasicTestApp;
|
|||
using Microsoft.AspNetCore.Components.E2ETest.Infrastructure;
|
||||
using Microsoft.AspNetCore.Components.E2ETest.Infrastructure.ServerFixtures;
|
||||
using Microsoft.AspNetCore.E2ETesting;
|
||||
using Microsoft.AspNetCore.Testing;
|
||||
using OpenQA.Selenium;
|
||||
using OpenQA.Selenium.Interactions;
|
||||
using Xunit;
|
||||
|
|
@ -91,6 +92,7 @@ namespace Microsoft.AspNetCore.Components.E2ETest.Tests
|
|||
}
|
||||
|
||||
[Fact]
|
||||
[QuarantinedTest("https://github.com/dotnet/aspnetcore/issues/22034")]
|
||||
public void CanDeleteUnkeyed()
|
||||
{
|
||||
PerformTest(
|
||||
|
|
@ -217,7 +219,7 @@ namespace Microsoft.AspNetCore.Components.E2ETest.Tests
|
|||
textboxFinder().Clear();
|
||||
|
||||
// On each keystroke, the boxes will be shuffled. The text will only
|
||||
// be inserted correctly if focus is retained.
|
||||
// be inserted correctly if focus is retained.
|
||||
textboxFinder().Click();
|
||||
while (textToType.Length > 0)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@
|
|||
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.AspNetCore.Internal;
|
||||
|
|
@ -15,9 +16,13 @@ namespace InteropTests.Helpers
|
|||
private readonly Process _process;
|
||||
private readonly ProcessEx _processEx;
|
||||
private readonly TaskCompletionSource<object> _startTcs;
|
||||
private readonly StringBuilder _output;
|
||||
private readonly object _outputLock = new object();
|
||||
|
||||
public ClientProcess(ITestOutputHelper output, string path, string serverPort, string testCase)
|
||||
{
|
||||
_output = new StringBuilder();
|
||||
|
||||
_process = new Process();
|
||||
_process.StartInfo = new ProcessStartInfo
|
||||
{
|
||||
|
|
@ -28,6 +33,7 @@ namespace InteropTests.Helpers
|
|||
};
|
||||
_process.EnableRaisingEvents = true;
|
||||
_process.OutputDataReceived += Process_OutputDataReceived;
|
||||
_process.ErrorDataReceived += Process_ErrorDataReceived;
|
||||
_process.Start();
|
||||
|
||||
_processEx = new ProcessEx(output, _process, timeout: Timeout.InfiniteTimeSpan);
|
||||
|
|
@ -35,13 +41,17 @@ namespace InteropTests.Helpers
|
|||
_startTcs = new TaskCompletionSource<object>(TaskCreationOptions.RunContinuationsAsynchronously);
|
||||
}
|
||||
|
||||
public Task WaitForReady()
|
||||
{
|
||||
return _startTcs.Task;
|
||||
}
|
||||
|
||||
public Task WaitForReadyAsync() => _startTcs.Task;
|
||||
public Task WaitForExitAsync() => _processEx.Exited;
|
||||
public int ExitCode => _process.ExitCode;
|
||||
public Task Exited => _processEx.Exited;
|
||||
|
||||
public string GetOutput()
|
||||
{
|
||||
lock (_outputLock)
|
||||
{
|
||||
return _output.ToString();
|
||||
}
|
||||
}
|
||||
|
||||
private void Process_OutputDataReceived(object sender, DataReceivedEventArgs e)
|
||||
{
|
||||
|
|
@ -52,6 +62,23 @@ namespace InteropTests.Helpers
|
|||
{
|
||||
_startTcs.TrySetResult(null);
|
||||
}
|
||||
|
||||
lock (_outputLock)
|
||||
{
|
||||
_output.AppendLine(data);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void Process_ErrorDataReceived(object sender, DataReceivedEventArgs e)
|
||||
{
|
||||
var data = e.Data;
|
||||
if (data != null)
|
||||
{
|
||||
lock (_outputLock)
|
||||
{
|
||||
_output.AppendLine(data);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -2,9 +2,7 @@
|
|||
// 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.Threading.Tasks;
|
||||
using InteropTests.Helpers;
|
||||
using Microsoft.AspNetCore.Testing;
|
||||
|
|
@ -13,6 +11,8 @@ using Xunit.Abstractions;
|
|||
|
||||
namespace InteropTests
|
||||
{
|
||||
// All interop test cases, minus GCE authentication specific tests.
|
||||
// Tests are separate methods so that they can be quarantined separately.
|
||||
public class InteropTests
|
||||
{
|
||||
private static readonly TimeSpan DefaultTimeout = TimeSpan.FromSeconds(30);
|
||||
|
|
@ -25,9 +25,67 @@ namespace InteropTests
|
|||
_output = output;
|
||||
}
|
||||
|
||||
[Theory]
|
||||
[MemberData(nameof(TestCaseData))]
|
||||
public async Task InteropTestCase(string name)
|
||||
[Fact]
|
||||
public Task EmptyUnary() => InteropTestCase("empty_unary");
|
||||
|
||||
[Fact]
|
||||
[QuarantinedTest]
|
||||
public Task LargeUnary() => InteropTestCase("large_unary");
|
||||
|
||||
[Fact]
|
||||
[QuarantinedTest]
|
||||
public Task ClientStreaming() => InteropTestCase("client_streaming");
|
||||
|
||||
[Fact]
|
||||
public Task ServerStreaming() => InteropTestCase("server_streaming");
|
||||
|
||||
[Fact]
|
||||
[QuarantinedTest("https://github.com/dotnet/aspnetcore/issues/22101")]
|
||||
public Task PingPong() => InteropTestCase("ping_pong");
|
||||
|
||||
[Fact]
|
||||
public Task EmptyStream() => InteropTestCase("empty_stream");
|
||||
|
||||
[Fact]
|
||||
public Task CancelAfterBegin() => InteropTestCase("cancel_after_begin");
|
||||
|
||||
[Fact]
|
||||
public Task CancelAfterFirstResponse() => InteropTestCase("cancel_after_first_response");
|
||||
|
||||
[Fact]
|
||||
public Task TimeoutOnSleepingServer() => InteropTestCase("timeout_on_sleeping_server");
|
||||
|
||||
[Fact]
|
||||
[QuarantinedTest]
|
||||
public Task CustomMetadata() => InteropTestCase("custom_metadata");
|
||||
|
||||
[Fact]
|
||||
public Task StatusCodeAndMessage() => InteropTestCase("status_code_and_message");
|
||||
|
||||
[Fact]
|
||||
public Task SpecialStatusMessage() => InteropTestCase("special_status_message");
|
||||
|
||||
[Fact]
|
||||
public Task UnimplementedService() => InteropTestCase("unimplemented_service");
|
||||
|
||||
[Fact]
|
||||
public Task UnimplementedMethod() => InteropTestCase("unimplemented_method");
|
||||
|
||||
[Fact]
|
||||
[QuarantinedTest]
|
||||
public Task ClientCompressedUnary() => InteropTestCase("client_compressed_unary");
|
||||
|
||||
[Fact]
|
||||
public Task ClientCompressedStreaming() => InteropTestCase("client_compressed_streaming");
|
||||
|
||||
[Fact]
|
||||
[QuarantinedTest]
|
||||
public Task ServerCompressedUnary() => InteropTestCase("server_compressed_unary");
|
||||
|
||||
[Fact]
|
||||
public Task ServerCompressedStreaming() => InteropTestCase("server_compressed_streaming");
|
||||
|
||||
private async Task InteropTestCase(string name)
|
||||
{
|
||||
using (var serverProcess = new WebsiteProcess(_serverPath, _output))
|
||||
{
|
||||
|
|
@ -35,41 +93,24 @@ namespace InteropTests
|
|||
|
||||
using (var clientProcess = new ClientProcess(_output, _clientPath, serverProcess.ServerPort, name))
|
||||
{
|
||||
await clientProcess.WaitForReady().TimeoutAfter(DefaultTimeout);
|
||||
try
|
||||
{
|
||||
await clientProcess.WaitForReadyAsync().TimeoutAfter(DefaultTimeout);
|
||||
|
||||
await clientProcess.Exited.TimeoutAfter(DefaultTimeout);
|
||||
await clientProcess.WaitForExitAsync().TimeoutAfter(DefaultTimeout);
|
||||
|
||||
Assert.Equal(0, clientProcess.ExitCode);
|
||||
Assert.Equal(0, clientProcess.ExitCode);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
var clientOutput = clientProcess.GetOutput();
|
||||
var errorMessage = $@"Error while running client process. Process output:
|
||||
======================================
|
||||
{clientOutput}";
|
||||
throw new InvalidOperationException(errorMessage, ex);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#region TestData
|
||||
// All interop test cases, minus GCE authentication specific tests
|
||||
private static string[] AllTests = new string[]
|
||||
{
|
||||
"empty_unary",
|
||||
"large_unary",
|
||||
"client_streaming",
|
||||
"server_streaming",
|
||||
"ping_pong",
|
||||
"empty_stream",
|
||||
|
||||
"cancel_after_begin",
|
||||
"cancel_after_first_response",
|
||||
"timeout_on_sleeping_server",
|
||||
"custom_metadata",
|
||||
"status_code_and_message",
|
||||
"special_status_message",
|
||||
"unimplemented_service",
|
||||
"unimplemented_method",
|
||||
"client_compressed_unary",
|
||||
"client_compressed_streaming",
|
||||
"server_compressed_unary",
|
||||
"server_compressed_streaming"
|
||||
};
|
||||
|
||||
public static IEnumerable<object[]> TestCaseData => AllTests.Select(t => new object[] { t });
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -274,7 +274,6 @@ namespace Microsoft.Extensions.Diagnostics.HealthChecks
|
|||
}
|
||||
|
||||
[Fact]
|
||||
[QuarantinedTest]
|
||||
public async Task RunAsync_PublishersCanTimeout()
|
||||
{
|
||||
// Arrange
|
||||
|
|
|
|||
|
|
@ -433,7 +433,6 @@ namespace Microsoft.AspNetCore.TestHost
|
|||
}
|
||||
|
||||
[Fact]
|
||||
[QuarantinedTest("https://github.com/dotnet/aspnetcore/issues/20164")]
|
||||
public async Task ClientStreaming_ResponseCompletesWithoutResponseBodyWrite()
|
||||
{
|
||||
// Arrange
|
||||
|
|
|
|||
|
|
@ -248,6 +248,8 @@ namespace Microsoft.AspNetCore.Http
|
|||
public static readonly string Post;
|
||||
public static readonly string Put;
|
||||
public static readonly string Trace;
|
||||
public static bool Equals(string methodA, string methodB) { throw null; }
|
||||
public static string GetCanonicalizedValue(string method) { throw null; }
|
||||
public static bool IsConnect(string method) { throw null; }
|
||||
public static bool IsDelete(string method) { throw null; }
|
||||
public static bool IsGet(string method) { throw null; }
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
@ -16,7 +16,7 @@ namespace Microsoft.AspNetCore.Http
|
|||
// Using .'static readonly' means that all consumers get these exact same
|
||||
// 'string' instance, which means the 'ReferenceEquals' checks below work
|
||||
// and allow us to optimize comparisons when these constants are used.
|
||||
|
||||
|
||||
// Please do NOT change these to 'const'
|
||||
public static readonly string Connect = "CONNECT";
|
||||
public static readonly string Delete = "DELETE";
|
||||
|
|
@ -37,7 +37,7 @@ namespace Microsoft.AspNetCore.Http
|
|||
/// </returns>
|
||||
public static bool IsConnect(string method)
|
||||
{
|
||||
return object.ReferenceEquals(Connect, method) || StringComparer.OrdinalIgnoreCase.Equals(Connect, method);
|
||||
return Equals(Connect, method);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
@ -49,7 +49,7 @@ namespace Microsoft.AspNetCore.Http
|
|||
/// </returns>
|
||||
public static bool IsDelete(string method)
|
||||
{
|
||||
return object.ReferenceEquals(Delete, method) || StringComparer.OrdinalIgnoreCase.Equals(Delete, method);
|
||||
return Equals(Delete, method);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
@ -57,11 +57,11 @@ namespace Microsoft.AspNetCore.Http
|
|||
/// </summary>
|
||||
/// <param name="method">The HTTP request method.</param>
|
||||
/// <returns>
|
||||
/// <see langword="true" /> if the method is GET; otherwise, <see langword="false" />.
|
||||
/// <see langword="true" /> if the method is GET; otherwise, <see langword="false" />.
|
||||
/// </returns>
|
||||
public static bool IsGet(string method)
|
||||
{
|
||||
return object.ReferenceEquals(Get, method) || StringComparer.OrdinalIgnoreCase.Equals(Get, method);
|
||||
return Equals(Get, method);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
@ -69,11 +69,11 @@ namespace Microsoft.AspNetCore.Http
|
|||
/// </summary>
|
||||
/// <param name="method">The HTTP request method.</param>
|
||||
/// <returns>
|
||||
/// <see langword="true" /> if the method is HEAD; otherwise, <see langword="false" />.
|
||||
/// <see langword="true" /> if the method is HEAD; otherwise, <see langword="false" />.
|
||||
/// </returns>
|
||||
public static bool IsHead(string method)
|
||||
{
|
||||
return object.ReferenceEquals(Head, method) || StringComparer.OrdinalIgnoreCase.Equals(Head, method);
|
||||
return Equals(Head, method);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
@ -81,11 +81,11 @@ namespace Microsoft.AspNetCore.Http
|
|||
/// </summary>
|
||||
/// <param name="method">The HTTP request method.</param>
|
||||
/// <returns>
|
||||
/// <see langword="true" /> if the method is OPTIONS; otherwise, <see langword="false" />.
|
||||
/// <see langword="true" /> if the method is OPTIONS; otherwise, <see langword="false" />.
|
||||
/// </returns>
|
||||
public static bool IsOptions(string method)
|
||||
{
|
||||
return object.ReferenceEquals(Options, method) || StringComparer.OrdinalIgnoreCase.Equals(Options, method);
|
||||
return Equals(Options, method);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
@ -97,7 +97,7 @@ namespace Microsoft.AspNetCore.Http
|
|||
/// </returns>
|
||||
public static bool IsPatch(string method)
|
||||
{
|
||||
return object.ReferenceEquals(Patch, method) || StringComparer.OrdinalIgnoreCase.Equals(Patch, method);
|
||||
return Equals(Patch, method);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
@ -109,7 +109,7 @@ namespace Microsoft.AspNetCore.Http
|
|||
/// </returns>
|
||||
public static bool IsPost(string method)
|
||||
{
|
||||
return object.ReferenceEquals(Post, method) || StringComparer.OrdinalIgnoreCase.Equals(Post, method);
|
||||
return Equals(Post, method);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
@ -121,7 +121,7 @@ namespace Microsoft.AspNetCore.Http
|
|||
/// </returns>
|
||||
public static bool IsPut(string method)
|
||||
{
|
||||
return object.ReferenceEquals(Put, method) || StringComparer.OrdinalIgnoreCase.Equals(Put, method);
|
||||
return Equals(Put, method);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
@ -133,7 +133,39 @@ namespace Microsoft.AspNetCore.Http
|
|||
/// </returns>
|
||||
public static bool IsTrace(string method)
|
||||
{
|
||||
return object.ReferenceEquals(Trace, method) || StringComparer.OrdinalIgnoreCase.Equals(Trace, method);
|
||||
return Equals(Trace, method);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the equivalent static instance, or the original instance if none match. This conversion is optional but allows for performance optimizations when comparing method values elsewhere.
|
||||
/// </summary>
|
||||
/// <param name="method"></param>
|
||||
/// <returns></returns>
|
||||
public static string GetCanonicalizedValue(string method) => method switch
|
||||
{
|
||||
string _ when IsGet(method) => Get,
|
||||
string _ when IsPost(method) => Post,
|
||||
string _ when IsPut(method) => Put,
|
||||
string _ when IsDelete(method) => Delete,
|
||||
string _ when IsOptions(method) => Options,
|
||||
string _ when IsHead(method) => Head,
|
||||
string _ when IsPatch(method) => Patch,
|
||||
string _ when IsTrace(method) => Trace,
|
||||
string _ when IsConnect(method) => Connect,
|
||||
string _ => method
|
||||
};
|
||||
|
||||
/// <summary>
|
||||
/// Returns a value that indicates if the HTTP methods are the same.
|
||||
/// </summary>
|
||||
/// <param name="methodA">The first HTTP request method to compare.</param>
|
||||
/// <param name="methodB">The second HTTP request method to compare.</param>
|
||||
/// <returns>
|
||||
/// <see langword="true" /> if the methods are the same; otherwise, <see langword="false" />.
|
||||
/// </returns>
|
||||
public static bool Equals(string methodA, string methodB)
|
||||
{
|
||||
return object.ReferenceEquals(methodA, methodB) || StringComparer.OrdinalIgnoreCase.Equals(methodA, methodB);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,53 @@
|
|||
// 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.Text;
|
||||
using Xunit;
|
||||
|
||||
namespace Microsoft.AspNetCore.Http.Abstractions
|
||||
{
|
||||
public class HttpMethodslTests
|
||||
{
|
||||
[Fact]
|
||||
public void CanonicalizedValue_Success()
|
||||
{
|
||||
var testCases = new List<(string[] methods, string expectedMethod)>
|
||||
{
|
||||
(new string[] { "GET", "Get", "get" }, HttpMethods.Get),
|
||||
(new string[] { "POST", "Post", "post" }, HttpMethods.Post),
|
||||
(new string[] { "PUT", "Put", "put" }, HttpMethods.Put),
|
||||
(new string[] { "DELETE", "Delete", "delete" }, HttpMethods.Delete),
|
||||
(new string[] { "HEAD", "Head", "head" }, HttpMethods.Head),
|
||||
(new string[] { "CONNECT", "Connect", "connect" }, HttpMethods.Connect),
|
||||
(new string[] { "OPTIONS", "Options", "options" }, HttpMethods.Options),
|
||||
(new string[] { "PATCH", "Patch", "patch" }, HttpMethods.Patch),
|
||||
(new string[] { "TRACE", "Trace", "trace" }, HttpMethods.Trace)
|
||||
};
|
||||
|
||||
for (int i = 0; i < testCases.Count; i++)
|
||||
{
|
||||
var testCase = testCases[i];
|
||||
for (int j = 0; j < testCase.methods.Length; j++)
|
||||
{
|
||||
CanonicalizedValueTest(testCase.methods[j], testCase.expectedMethod);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private void CanonicalizedValueTest(string method, string expectedMethod)
|
||||
{
|
||||
string inputMethod = CreateStringAtRuntime(method);
|
||||
var canonicalizedValue = HttpMethods.GetCanonicalizedValue(inputMethod);
|
||||
|
||||
Assert.Same(expectedMethod, canonicalizedValue);
|
||||
}
|
||||
|
||||
private string CreateStringAtRuntime(string input)
|
||||
{
|
||||
return new StringBuilder(input).ToString();
|
||||
}
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
|
@ -5,6 +5,7 @@ using System;
|
|||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.Linq;
|
||||
using static Microsoft.AspNetCore.Http.HttpMethods;
|
||||
|
||||
namespace Microsoft.AspNetCore.Routing
|
||||
{
|
||||
|
|
@ -41,7 +42,7 @@ namespace Microsoft.AspNetCore.Routing
|
|||
throw new ArgumentNullException(nameof(httpMethods));
|
||||
}
|
||||
|
||||
HttpMethods = httpMethods.ToArray();
|
||||
HttpMethods = httpMethods.Select(GetCanonicalizedValue).ToArray();
|
||||
AcceptCorsPreflight = acceptCorsPreflight;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using Microsoft.Extensions.Internal;
|
||||
|
|
@ -21,7 +22,7 @@ namespace Microsoft.AspNetCore.Routing.Matching
|
|||
// Used in tests
|
||||
internal static readonly string OriginHeader = "Origin";
|
||||
internal static readonly string AccessControlRequestMethod = "Access-Control-Request-Method";
|
||||
internal static readonly string PreflightHttpMethod = "OPTIONS";
|
||||
internal static readonly string PreflightHttpMethod = HttpMethods.Options;
|
||||
|
||||
// Used in tests
|
||||
internal const string Http405EndpointDisplayName = "405 HTTP Method Not Supported";
|
||||
|
|
@ -133,7 +134,7 @@ namespace Microsoft.AspNetCore.Routing.Matching
|
|||
var httpMethod = httpContext.Request.Method;
|
||||
var headers = httpContext.Request.Headers;
|
||||
if (metadata.AcceptCorsPreflight &&
|
||||
string.Equals(httpMethod, PreflightHttpMethod, StringComparison.OrdinalIgnoreCase) &&
|
||||
HttpMethods.Equals(httpMethod, PreflightHttpMethod) &&
|
||||
headers.ContainsKey(HeaderNames.Origin) &&
|
||||
headers.TryGetValue(HeaderNames.AccessControlRequestMethod, out var accessControlRequestMethod) &&
|
||||
!StringValues.IsNullOrEmpty(accessControlRequestMethod))
|
||||
|
|
@ -146,7 +147,7 @@ namespace Microsoft.AspNetCore.Routing.Matching
|
|||
for (var j = 0; j < metadata.HttpMethods.Count; j++)
|
||||
{
|
||||
var candidateMethod = metadata.HttpMethods[j];
|
||||
if (!string.Equals(httpMethod, candidateMethod, StringComparison.OrdinalIgnoreCase))
|
||||
if (!HttpMethods.Equals(httpMethod, candidateMethod))
|
||||
{
|
||||
methods = methods ?? new HashSet<string>(StringComparer.OrdinalIgnoreCase);
|
||||
methods.Add(candidateMethod);
|
||||
|
|
@ -396,9 +397,19 @@ namespace Microsoft.AspNetCore.Routing.Matching
|
|||
|
||||
private static bool ContainsHttpMethod(List<string> httpMethods, string httpMethod)
|
||||
{
|
||||
for (var i = 0; i < httpMethods.Count; i++)
|
||||
var methods = CollectionsMarshal.AsSpan(httpMethods);
|
||||
for (var i = 0; i < methods.Length; i++)
|
||||
{
|
||||
if (string.Equals(httpMethods[i], httpMethod, StringComparison.OrdinalIgnoreCase))
|
||||
// This is a fast path for when everything is using static HttpMethods instances.
|
||||
if (object.ReferenceEquals(methods[i], httpMethod))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
for (var i = 0; i < methods.Length; i++)
|
||||
{
|
||||
if (HttpMethods.Equals(methods[i], httpMethod))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
|
@ -437,7 +448,7 @@ namespace Microsoft.AspNetCore.Routing.Matching
|
|||
var httpMethod = httpContext.Request.Method;
|
||||
var headers = httpContext.Request.Headers;
|
||||
if (_supportsCorsPreflight &&
|
||||
string.Equals(httpMethod, PreflightHttpMethod, StringComparison.OrdinalIgnoreCase) &&
|
||||
HttpMethods.Equals(httpMethod, PreflightHttpMethod) &&
|
||||
headers.ContainsKey(HeaderNames.Origin) &&
|
||||
headers.TryGetValue(HeaderNames.AccessControlRequestMethod, out var accessControlRequestMethod) &&
|
||||
!StringValues.IsNullOrEmpty(accessControlRequestMethod))
|
||||
|
|
@ -499,7 +510,7 @@ namespace Microsoft.AspNetCore.Routing.Matching
|
|||
{
|
||||
return
|
||||
IsCorsPreflightRequest == other.IsCorsPreflightRequest &&
|
||||
string.Equals(HttpMethod, other.HttpMethod, StringComparison.OrdinalIgnoreCase);
|
||||
HttpMethods.Equals(HttpMethod, other.HttpMethod);
|
||||
}
|
||||
|
||||
public override bool Equals(object obj)
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
@ -49,7 +49,7 @@ namespace Swaggatherer
|
|||
|
||||
if (entry.Method != null)
|
||||
{
|
||||
setupRequestsLines.Add($" Requests[{i}].Request.Method = \"{entries[i].Method.ToUpperInvariant()}\";");
|
||||
setupRequestsLines.Add($" Requests[{i}].Request.Method = HttpMethods.GetCanonicalizedValue({entries[i].Method});");
|
||||
}
|
||||
|
||||
setupRequestsLines.Add($" Requests[{i}].Request.Path = \"{entries[i].RequestUrl}\";");
|
||||
|
|
|
|||
|
|
@ -40,7 +40,6 @@ namespace Microsoft.AspNetCore.Identity.Test
|
|||
|
||||
[Theory]
|
||||
[MemberData(nameof(ScriptWithIntegrityData))]
|
||||
[QuarantinedTest]
|
||||
public async Task IdentityUI_ScriptTags_SubresourceIntegrityCheck(ScriptTag scriptTag)
|
||||
{
|
||||
var integrity = await GetShaIntegrity(scriptTag);
|
||||
|
|
@ -80,7 +79,6 @@ namespace Microsoft.AspNetCore.Identity.Test
|
|||
|
||||
[Theory]
|
||||
[MemberData(nameof(ScriptWithFallbackSrcData))]
|
||||
[QuarantinedTest("https://github.com/dotnet/aspnetcore-internal/issues/2267")]
|
||||
public async Task IdentityUI_ScriptTags_FallbackSourceContent_Matches_CDNContent(ScriptTag scriptTag)
|
||||
{
|
||||
var wwwrootDir = Path.Combine(GetProjectBasePath(), "wwwroot", scriptTag.Version);
|
||||
|
|
|
|||
|
|
@ -76,7 +76,11 @@
|
|||
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), Directory.Build.targets))\Directory.Build.targets" />
|
||||
|
||||
<PropertyGroup>
|
||||
<PackageFileName>$(RuntimeInstallerBaseName)-$(PackageVersion)-win-$(Platform)$(TargetExt)</PackageFileName>
|
||||
<!-- Everything built in this project _except_ the final package & MSI are shipping assets. -->
|
||||
<_GeneratedPackageVersion>$(PackageVersion)</_GeneratedPackageVersion>
|
||||
<_GeneratedPackageVersion
|
||||
Condition="! $(PackageVersion.Contains('$(_PreReleaseLabel)'))">$(PackageVersion)-$(_PreReleaseLabel)$(_BuildNumberLabels)</_GeneratedPackageVersion>
|
||||
<PackageFileName>$(RuntimeInstallerBaseName)-$(_GeneratedPackageVersion)-win-$(Platform)$(TargetExt)</PackageFileName>
|
||||
<ProductName>Microsoft ASP.NET Core $(PackageBrandingVersion) Shared Framework ($(Platform))</ProductName>
|
||||
<DefineConstants>$(DefineConstants);ProductName=$(ProductName)</DefineConstants>
|
||||
</PropertyGroup>
|
||||
|
|
@ -84,11 +88,6 @@
|
|||
<Target Name="CreateSharedFrameworkNugetPackage" AfterTargets="CopyToArtifactsDirectory;Build">
|
||||
<PropertyGroup>
|
||||
<MsiFullPath>$(InstallersOutputPath)$(PackageFileName)</MsiFullPath>
|
||||
|
||||
<!-- Everything built in this project _except_ the final package are shipping assets. -->
|
||||
<_GeneratedPackageVersion>$(PackageVersion)</_GeneratedPackageVersion>
|
||||
<_GeneratedPackageVersion
|
||||
Condition="! $(PackageVersion.Contains('$(_PreReleaseLabel)'))">$(PackageVersion)-$(_PreReleaseLabel)$(_BuildNumberLabels)</_GeneratedPackageVersion>
|
||||
</PropertyGroup>
|
||||
|
||||
<Exec Command="powershell -NoProfile -NoLogo $(GenerateNupkgPowershellScript) ^
|
||||
|
|
|
|||
|
|
@ -70,8 +70,12 @@
|
|||
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), Directory.Build.targets))\Directory.Build.targets" />
|
||||
|
||||
<PropertyGroup>
|
||||
<!-- Everything built in this project _except_ the final package are shipping assets. -->
|
||||
<_GeneratedPackageVersion>$(PackageVersion)</_GeneratedPackageVersion>
|
||||
<_GeneratedPackageVersion
|
||||
Condition="! $(PackageVersion.Contains('$(_PreReleaseLabel)'))">$(PackageVersion)-$(_PreReleaseLabel)$(_BuildNumberLabels)</_GeneratedPackageVersion>
|
||||
<ProductName>Microsoft ASP.NET Core $(PackageBrandingVersion) Targeting Pack ($(Platform))</ProductName>
|
||||
<PackageFileName>$(TargetingPackInstallerBaseName)-$(PackageVersion)-win-$(Platform)$(TargetExt)</PackageFileName>
|
||||
<PackageFileName>$(TargetingPackInstallerBaseName)-$(_GeneratedPackageVersion)-win-$(Platform)$(TargetExt)</PackageFileName>
|
||||
<DefineConstants>$(DefineConstants);ProductName=$(ProductName)</DefineConstants>
|
||||
|
||||
<!-- Suppresses building this project completely during servicing builds. -->
|
||||
|
|
@ -82,11 +86,6 @@
|
|||
Condition="'$(IsTargetingPackBuilding)' != 'false'">
|
||||
<PropertyGroup>
|
||||
<MsiFullPath>$(InstallersOutputPath)$(PackageFileName)</MsiFullPath>
|
||||
|
||||
<!-- Everything built in this project _except_ the final package are shipping assets. -->
|
||||
<_GeneratedPackageVersion>$(PackageVersion)</_GeneratedPackageVersion>
|
||||
<_GeneratedPackageVersion
|
||||
Condition="! $(PackageVersion.Contains('$(_PreReleaseLabel)'))">$(PackageVersion)-$(_PreReleaseLabel)$(_BuildNumberLabels)</_GeneratedPackageVersion>
|
||||
</PropertyGroup>
|
||||
|
||||
<Exec Command="powershell -NoProfile -NoLogo $(GenerateNupkgPowershellScript) ^
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@
|
|||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
<GuidInputs>$(Version);$(Platform);$(VersionSuffix)</GuidInputs>
|
||||
<GuidInputs>$(Version);$(Platform);$(VersionSuffix);$(_BuildNumberLabels)</GuidInputs>
|
||||
</PropertyGroup>
|
||||
|
||||
<Target Name="GenerateGUIDs" BeforeTargets="BeforeBuild" DependsOnTargets="_GeneratePackageGuids;_GenerateBundleGuids" Condition=" '$(DisableGuidGeneration)' != 'true' " />
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ using Microsoft.AspNetCore.Http;
|
|||
namespace Microsoft.AspNetCore.Diagnostics
|
||||
{
|
||||
/// <summary>
|
||||
/// Provides context about the error currently being handled bt the DeveloperExceptionPageMiddleware.
|
||||
/// Provides context about the error currently being handled by the DeveloperExceptionPageMiddleware.
|
||||
/// </summary>
|
||||
public class ErrorContext
|
||||
{
|
||||
|
|
|
|||
|
|
@ -15,6 +15,8 @@
|
|||
<!-- Avoid CS1705 errors due to mix of assemblies brought in transitively. -->
|
||||
<Reference Include="Microsoft.Extensions.DependencyInjection.Abstractions" />
|
||||
<Reference Include="Microsoft.Extensions.Logging.Abstractions" />
|
||||
|
||||
<Compile Include="$(SharedSourceRoot)test\SkipOnHelixAttribute.cs" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@
|
|||
<ItemGroup>
|
||||
<Reference Include="Microsoft.AspNetCore.NodeServices" />
|
||||
<Reference Include="Microsoft.AspNetCore.TestHost" />
|
||||
<Compile Include="$(SharedSourceRoot)test\SkipOnHelixAttribute.cs" />
|
||||
<Content Include="js\**\*" />
|
||||
</ItemGroup>
|
||||
|
||||
|
|
|
|||
|
|
@ -4,12 +4,14 @@
|
|||
using System;
|
||||
using System.IO;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.AspNetCore.Testing;
|
||||
using Microsoft.AspNetCore.NodeServices.HostingModels;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Xunit;
|
||||
|
||||
namespace Microsoft.AspNetCore.NodeServices
|
||||
{
|
||||
[SkipOnHelix("https://github.com/dotnet/aspnetcore/issues/22084", Queues = "Windows.10.Arm64;Windows.10.Arm64.Open")]
|
||||
[Obsolete("Use Microsoft.AspNetCore.SpaServices.Extensions")]
|
||||
public class NodeServicesTest : IDisposable
|
||||
{
|
||||
|
|
@ -26,7 +28,7 @@ namespace Microsoft.AspNetCore.NodeServices
|
|||
_nodeServices = NodeServicesFactory.CreateNodeServices(options);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
[ConditionalFact]
|
||||
public async Task CanGetSuccessResult()
|
||||
{
|
||||
// Act
|
||||
|
|
@ -38,7 +40,7 @@ namespace Microsoft.AspNetCore.NodeServices
|
|||
Assert.Equal("test result", result);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
[ConditionalFact]
|
||||
public async Task CanGetErrorResult()
|
||||
{
|
||||
// Act/Assert
|
||||
|
|
@ -49,7 +51,7 @@ namespace Microsoft.AspNetCore.NodeServices
|
|||
Assert.StartsWith("This is an error from Node", ex.Message);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
[ConditionalFact]
|
||||
public async Task CanGetResultAsynchronously()
|
||||
{
|
||||
// Act
|
||||
|
|
@ -63,7 +65,7 @@ namespace Microsoft.AspNetCore.NodeServices
|
|||
Assert.Equal("delayed test result", result);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
[ConditionalFact]
|
||||
public async Task CanPassParameters()
|
||||
{
|
||||
// Act
|
||||
|
|
@ -77,7 +79,7 @@ namespace Microsoft.AspNetCore.NodeServices
|
|||
Assert.Equal("Param0: Hey; Param1: 123", result);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
[ConditionalFact]
|
||||
public async Task CanPassParametersWithCamelCaseNameConversion()
|
||||
{
|
||||
// Act
|
||||
|
|
@ -90,7 +92,7 @@ namespace Microsoft.AspNetCore.NodeServices
|
|||
Assert.Equal("Received: [{\"stringProp\":\"Abc\",\"intProp\":123,\"boolProp\":true}]", result);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
[ConditionalFact]
|
||||
public async Task CanReceiveComplexResultWithPascalCaseNameConversion()
|
||||
{
|
||||
// Act
|
||||
|
|
@ -104,7 +106,7 @@ namespace Microsoft.AspNetCore.NodeServices
|
|||
Assert.True(result.BoolProp);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
[ConditionalFact]
|
||||
public async Task CanInvokeDefaultModuleExport()
|
||||
{
|
||||
// Act
|
||||
|
|
|
|||
|
|
@ -6,10 +6,8 @@ using System.Diagnostics;
|
|||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.AspNetCore.Internal;
|
||||
using Microsoft.AspNetCore.Testing;
|
||||
using Microsoft.Extensions.CommandLineUtils;
|
||||
using Xunit;
|
||||
using Xunit.Abstractions;
|
||||
|
|
@ -18,7 +16,6 @@ namespace Templates.Test.Helpers
|
|||
{
|
||||
internal static class TemplatePackageInstaller
|
||||
{
|
||||
private static readonly SemaphoreSlim InstallerLock = new SemaphoreSlim(1);
|
||||
private static bool _haveReinstalledTemplatePackages;
|
||||
|
||||
private static readonly string[] _templatePackages = new[]
|
||||
|
|
@ -52,7 +49,7 @@ namespace Templates.Test.Helpers
|
|||
|
||||
public static async Task EnsureTemplatingEngineInitializedAsync(ITestOutputHelper output)
|
||||
{
|
||||
Assert.True(await InstallerLock.WaitAsync(TimeSpan.FromMinutes(1)), "Unable to grab installer lock");
|
||||
await ProcessLock.DotNetNewLock.WaitAsync();
|
||||
try
|
||||
{
|
||||
if (!_haveReinstalledTemplatePackages)
|
||||
|
|
@ -67,7 +64,7 @@ namespace Templates.Test.Helpers
|
|||
}
|
||||
finally
|
||||
{
|
||||
InstallerLock.Release();
|
||||
ProcessLock.DotNetNewLock.Release();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -7,8 +7,8 @@
|
|||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Compile Include="Controllers/HomeController.fs" />
|
||||
<Compile Include="Models/ErrorViewModel.fs" />
|
||||
<Compile Include="Controllers/HomeController.fs" />
|
||||
<Compile Include="Startup.fs" />
|
||||
<Compile Include="Program.fs" />
|
||||
</ItemGroup>
|
||||
|
|
|
|||
|
|
@ -12,9 +12,7 @@ open Microsoft.Extensions.Hosting
|
|||
open Microsoft.Extensions.Logging
|
||||
|
||||
module Program =
|
||||
let exitCode = 0
|
||||
|
||||
let CreateHostBuilder args =
|
||||
let createHostBuilder args =
|
||||
Host.CreateDefaultBuilder(args)
|
||||
.ConfigureWebHostDefaults(fun webBuilder ->
|
||||
webBuilder.UseStartup<Startup>() |> ignore
|
||||
|
|
@ -22,6 +20,6 @@ module Program =
|
|||
|
||||
[<EntryPoint>]
|
||||
let main args =
|
||||
CreateHostBuilder(args).Build().Run()
|
||||
createHostBuilder(args).Build().Run()
|
||||
|
||||
exitCode
|
||||
0 // Exit code
|
||||
|
|
|
|||
|
|
@ -11,16 +11,16 @@ type Startup() =
|
|||
|
||||
// This method gets called by the runtime. Use this method to add services to the container.
|
||||
// For more information on how to configure your application, visit https://go.microsoft.com/fwlink/?LinkID=398940
|
||||
member this.ConfigureServices(services: IServiceCollection) =
|
||||
member _.ConfigureServices(services: IServiceCollection) =
|
||||
()
|
||||
|
||||
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
|
||||
member this.Configure(app: IApplicationBuilder, env: IWebHostEnvironment) =
|
||||
member _.Configure(app: IApplicationBuilder, env: IWebHostEnvironment) =
|
||||
if env.IsDevelopment() then
|
||||
app.UseDeveloperExceptionPage() |> ignore
|
||||
|
||||
app.UseRouting() |> ignore
|
||||
|
||||
app.UseEndpoints(fun endpoints ->
|
||||
endpoints.MapGet("/", fun context -> context.Response.WriteAsync("Hello World!")) |> ignore
|
||||
app.UseRouting()
|
||||
.UseEndpoints(fun endpoints ->
|
||||
endpoints.MapGet("/", fun context ->
|
||||
context.Response.WriteAsync("Hello World!")) |> ignore
|
||||
) |> ignore
|
||||
|
|
|
|||
|
|
@ -4,9 +4,13 @@ open System
|
|||
open System.Collections.Generic
|
||||
open System.Linq
|
||||
open System.Threading.Tasks
|
||||
open System.Diagnostics
|
||||
|
||||
open Microsoft.AspNetCore.Mvc
|
||||
open Microsoft.Extensions.Logging
|
||||
|
||||
open Company.WebApplication1.Models
|
||||
|
||||
type HomeController (logger : ILogger<HomeController>) =
|
||||
inherit Controller()
|
||||
|
||||
|
|
@ -16,5 +20,12 @@ type HomeController (logger : ILogger<HomeController>) =
|
|||
member this.Privacy () =
|
||||
this.View()
|
||||
|
||||
[<ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)>]
|
||||
member this.Error () =
|
||||
this.View();
|
||||
let reqId =
|
||||
if isNull Activity.Current then
|
||||
this.HttpContext.TraceIdentifier
|
||||
else
|
||||
Activity.Current.Id
|
||||
|
||||
this.View({ RequestId = reqId })
|
||||
|
|
|
|||
|
|
@ -1,8 +1,9 @@
|
|||
namespace Company.WebApplication1
|
||||
namespace Company.WebApplication1.Models
|
||||
|
||||
open System
|
||||
|
||||
type ErrorViewModel private () =
|
||||
member val RequestId : string = null with get, set
|
||||
type ErrorViewModel =
|
||||
{ RequestId: string }
|
||||
|
||||
member val ShowRequestId : bool = true with get, set
|
||||
member this.ShowRequestId =
|
||||
not (String.IsNullOrEmpty(this.RequestId))
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
@model ErrorViewModel
|
||||
@using Company.WebApplication1.Models
|
||||
@model ErrorViewModel
|
||||
@{
|
||||
ViewData["Title"] = "Error";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -13,10 +13,22 @@ open Company.WebApplication1
|
|||
type WeatherForecastController (logger : ILogger<WeatherForecastController>) =
|
||||
inherit ControllerBase()
|
||||
|
||||
let summaries = [| "Freezing"; "Bracing"; "Chilly"; "Cool"; "Mild"; "Warm"; "Balmy"; "Hot"; "Sweltering"; "Scorching" |]
|
||||
let summaries =
|
||||
[|
|
||||
"Freezing"
|
||||
"Bracing"
|
||||
"Chilly"
|
||||
"Cool"
|
||||
"Mild"
|
||||
"Warm"
|
||||
"Balmy"
|
||||
"Hot"
|
||||
"Sweltering"
|
||||
"Scorching"
|
||||
|]
|
||||
|
||||
[<HttpGet>]
|
||||
member __.Get() : WeatherForecast[] =
|
||||
member _.Get() =
|
||||
let rng = System.Random()
|
||||
[|
|
||||
for index in 0..4 ->
|
||||
|
|
|
|||
|
|
@ -14,32 +14,29 @@ open Microsoft.Extensions.Configuration
|
|||
open Microsoft.Extensions.DependencyInjection
|
||||
open Microsoft.Extensions.Hosting
|
||||
|
||||
type Startup private () =
|
||||
new (configuration: IConfiguration) as this =
|
||||
Startup() then
|
||||
this.Configuration <- configuration
|
||||
type Startup(configuration: IConfiguration) =
|
||||
member _.Configuration = configuration
|
||||
|
||||
// This method gets called by the runtime. Use this method to add services to the container.
|
||||
member this.ConfigureServices(services: IServiceCollection) =
|
||||
member _.ConfigureServices(services: IServiceCollection) =
|
||||
// Add framework services.
|
||||
services.AddControllers() |> ignore
|
||||
|
||||
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
|
||||
member this.Configure(app: IApplicationBuilder, env: IWebHostEnvironment) =
|
||||
member _.Configure(app: IApplicationBuilder, env: IWebHostEnvironment) =
|
||||
if (env.IsDevelopment()) then
|
||||
app.UseDeveloperExceptionPage() |> ignore
|
||||
#if (!NoHttps)
|
||||
|
||||
app.UseHttpsRedirection() |> ignore
|
||||
#else
|
||||
|
||||
#endif
|
||||
app.UseRouting() |> ignore
|
||||
|
||||
app.UseAuthorization() |> ignore
|
||||
|
||||
app.UseEndpoints(fun endpoints ->
|
||||
endpoints.MapControllers() |> ignore
|
||||
app.UseHttpsRedirection()
|
||||
.UseRouting()
|
||||
.UseAuthorization()
|
||||
.UseEndpoints(fun endpoints ->
|
||||
endpoints.MapControllers() |> ignore
|
||||
) |> ignore
|
||||
|
||||
member val Configuration : IConfiguration = null with get, set
|
||||
#else
|
||||
app.UseRouting()
|
||||
.UseAuthorization()
|
||||
.UseEndpoints(fun endpoints ->
|
||||
endpoints.MapControllers() |> ignore
|
||||
) |> ignore
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -8,4 +8,4 @@ type WeatherForecast =
|
|||
Summary: string }
|
||||
|
||||
member this.TemperatureF =
|
||||
32 + (int (float this.TemperatureC / 0.5556))
|
||||
32.0 + (float this.TemperatureC / 0.5556)
|
||||
|
|
|
|||
|
|
@ -6958,6 +6958,7 @@
|
|||
"integrity": "sha512-Ggd/Ktt7E7I8pxZRbGIs7vwqAPscSESMrCSkx2FtWeqmheJgCo2R74fTsZFCifr0VTPwqRpPv17+6b8Zp7th0Q==",
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"nan": "^2.12.1",
|
||||
"node-pre-gyp": "*"
|
||||
},
|
||||
"dependencies": {
|
||||
|
|
@ -8525,6 +8526,11 @@
|
|||
"resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.8.tgz",
|
||||
"integrity": "sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA=="
|
||||
},
|
||||
"nan": {
|
||||
"version": "2.14.1",
|
||||
"resolved": "https://registry.npmjs.org/nan/-/nan-2.14.1.tgz",
|
||||
"integrity": "sha512-isWHgVjnFjh2x2yuJ/tj3JbwoHu3UC2dX5G/88Cm24yB6YopVgxvBObDY7n5xW6ExmFhJpSEQqFPvq9zaXc8Jw=="
|
||||
},
|
||||
"nanomatch": {
|
||||
"version": "1.2.13",
|
||||
"resolved": "https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.13.tgz",
|
||||
|
|
@ -13310,6 +13316,7 @@
|
|||
"integrity": "sha512-Ggd/Ktt7E7I8pxZRbGIs7vwqAPscSESMrCSkx2FtWeqmheJgCo2R74fTsZFCifr0VTPwqRpPv17+6b8Zp7th0Q==",
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"nan": "^2.12.1",
|
||||
"node-pre-gyp": "*"
|
||||
},
|
||||
"dependencies": {
|
||||
|
|
@ -14097,6 +14104,7 @@
|
|||
"integrity": "sha512-Ggd/Ktt7E7I8pxZRbGIs7vwqAPscSESMrCSkx2FtWeqmheJgCo2R74fTsZFCifr0VTPwqRpPv17+6b8Zp7th0Q==",
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"nan": "^2.12.1",
|
||||
"node-pre-gyp": "*"
|
||||
},
|
||||
"dependencies": {
|
||||
|
|
|
|||
|
|
@ -24,7 +24,8 @@
|
|||
"eslint-plugin-flowtype": "^4.6.0",
|
||||
"eslint-plugin-import": "^2.20.1",
|
||||
"eslint-plugin-jsx-a11y": "^6.2.3",
|
||||
"eslint-plugin-react": "^7.18.3"
|
||||
"eslint-plugin-react": "^7.18.3",
|
||||
"nan": "^2.14.1"
|
||||
},
|
||||
"eslintConfig": {
|
||||
"extends": "react-app"
|
||||
|
|
|
|||
|
|
@ -7150,6 +7150,7 @@
|
|||
"integrity": "sha512-Ggd/Ktt7E7I8pxZRbGIs7vwqAPscSESMrCSkx2FtWeqmheJgCo2R74fTsZFCifr0VTPwqRpPv17+6b8Zp7th0Q==",
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"nan": "^2.12.1",
|
||||
"node-pre-gyp": "*"
|
||||
},
|
||||
"dependencies": {
|
||||
|
|
@ -8717,6 +8718,11 @@
|
|||
"resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.8.tgz",
|
||||
"integrity": "sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA=="
|
||||
},
|
||||
"nan": {
|
||||
"version": "2.14.1",
|
||||
"resolved": "https://registry.npmjs.org/nan/-/nan-2.14.1.tgz",
|
||||
"integrity": "sha512-isWHgVjnFjh2x2yuJ/tj3JbwoHu3UC2dX5G/88Cm24yB6YopVgxvBObDY7n5xW6ExmFhJpSEQqFPvq9zaXc8Jw=="
|
||||
},
|
||||
"nanomatch": {
|
||||
"version": "1.2.13",
|
||||
"resolved": "https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.13.tgz",
|
||||
|
|
@ -13610,6 +13616,7 @@
|
|||
"integrity": "sha512-Ggd/Ktt7E7I8pxZRbGIs7vwqAPscSESMrCSkx2FtWeqmheJgCo2R74fTsZFCifr0VTPwqRpPv17+6b8Zp7th0Q==",
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"nan": "^2.12.1",
|
||||
"node-pre-gyp": "*"
|
||||
},
|
||||
"dependencies": {
|
||||
|
|
@ -14397,6 +14404,7 @@
|
|||
"integrity": "sha512-Ggd/Ktt7E7I8pxZRbGIs7vwqAPscSESMrCSkx2FtWeqmheJgCo2R74fTsZFCifr0VTPwqRpPv17+6b8Zp7th0Q==",
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"nan": "^2.12.1",
|
||||
"node-pre-gyp": "*"
|
||||
},
|
||||
"dependencies": {
|
||||
|
|
|
|||
|
|
@ -37,6 +37,7 @@
|
|||
"eslint-plugin-import": "2.18.2",
|
||||
"eslint-plugin-jsx-a11y": "6.2.3",
|
||||
"eslint-plugin-react": "7.16.0",
|
||||
"nan": "^2.14.1",
|
||||
"typescript": "3.6.4"
|
||||
},
|
||||
"scripts": {
|
||||
|
|
|
|||
|
|
@ -28,6 +28,7 @@ namespace Templates.Test
|
|||
|
||||
[ConditionalFact]
|
||||
[SkipOnHelix("Cert failures", Queues = "OSX.1014.Amd64;OSX.1014.Amd64.Open")]
|
||||
[QuarantinedTest]
|
||||
public async Task WebApiTemplateCSharp() => await WebApiTemplateCore(languageOverride: null);
|
||||
|
||||
private async Task WebApiTemplateCore(string languageOverride)
|
||||
|
|
|
|||
|
|
@ -68,6 +68,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CustomPolicyProvider", "sam
|
|||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "StaticFilesAuth", "samples\StaticFilesAuth\StaticFilesAuth.csproj", "{E1E8A599-AB42-4551-8C24-BE4404B65283}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CustomAuthorizationFailureResponse", "samples\CustomAuthorizationFailureResponse\CustomAuthorizationFailureResponse.csproj", "{EA51BBBC-58AC-42F8-97C1-5CF3C9725513}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
|
|
@ -402,6 +404,18 @@ Global
|
|||
{E1E8A599-AB42-4551-8C24-BE4404B65283}.Release|x64.Build.0 = Release|Any CPU
|
||||
{E1E8A599-AB42-4551-8C24-BE4404B65283}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{E1E8A599-AB42-4551-8C24-BE4404B65283}.Release|x86.Build.0 = Release|Any CPU
|
||||
{EA51BBBC-58AC-42F8-97C1-5CF3C9725513}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{EA51BBBC-58AC-42F8-97C1-5CF3C9725513}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{EA51BBBC-58AC-42F8-97C1-5CF3C9725513}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||
{EA51BBBC-58AC-42F8-97C1-5CF3C9725513}.Debug|x64.Build.0 = Debug|Any CPU
|
||||
{EA51BBBC-58AC-42F8-97C1-5CF3C9725513}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{EA51BBBC-58AC-42F8-97C1-5CF3C9725513}.Debug|x86.Build.0 = Debug|Any CPU
|
||||
{EA51BBBC-58AC-42F8-97C1-5CF3C9725513}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{EA51BBBC-58AC-42F8-97C1-5CF3C9725513}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{EA51BBBC-58AC-42F8-97C1-5CF3C9725513}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
{EA51BBBC-58AC-42F8-97C1-5CF3C9725513}.Release|x64.Build.0 = Release|Any CPU
|
||||
{EA51BBBC-58AC-42F8-97C1-5CF3C9725513}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{EA51BBBC-58AC-42F8-97C1-5CF3C9725513}.Release|x86.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
|
|
@ -434,6 +448,7 @@ Global
|
|||
{82C0816D-7051-4DDB-9B9E-6777973AD7AE} = {142C8260-90B5-4D72-9564-17BFDD72F496}
|
||||
{38C0E122-64D0-497F-ABB0-C6A9C3349F02} = {CA4538F5-9DA8-4139-B891-A13279889F79}
|
||||
{E1E8A599-AB42-4551-8C24-BE4404B65283} = {CA4538F5-9DA8-4139-B891-A13279889F79}
|
||||
{EA51BBBC-58AC-42F8-97C1-5CF3C9725513} = {CA4538F5-9DA8-4139-B891-A13279889F79}
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {39E3AF62-B1FD-4156-92AA-F4FA99B5AD89}
|
||||
|
|
|
|||
|
|
@ -17,6 +17,7 @@ namespace Microsoft.Extensions.Logging
|
|||
private static Action<ILogger, Exception> _challengeNegotiate;
|
||||
private static Action<ILogger, Exception> _reauthenticating;
|
||||
private static Action<ILogger, Exception> _deferring;
|
||||
private static Action<ILogger, string, Exception> _negotiateError;
|
||||
|
||||
static NegotiateLoggingExtensions()
|
||||
{
|
||||
|
|
@ -43,7 +44,7 @@ namespace Microsoft.Extensions.Logging
|
|||
_challengeNegotiate = LoggerMessage.Define(
|
||||
eventId: new EventId(6, "ChallengeNegotiate"),
|
||||
logLevel: LogLevel.Debug,
|
||||
formatString: "Challenged 401 Negotiate");
|
||||
formatString: "Challenged 401 Negotiate.");
|
||||
_reauthenticating = LoggerMessage.Define(
|
||||
eventId: new EventId(7, "Reauthenticating"),
|
||||
logLevel: LogLevel.Debug,
|
||||
|
|
@ -60,6 +61,10 @@ namespace Microsoft.Extensions.Logging
|
|||
eventId: new EventId(10, "ClientError"),
|
||||
logLevel: LogLevel.Debug,
|
||||
formatString: "The users authentication request was invalid.");
|
||||
_negotiateError = LoggerMessage.Define<string>(
|
||||
eventId: new EventId(11, "NegotiateError"),
|
||||
logLevel: LogLevel.Debug,
|
||||
formatString: "Negotiate error code: {error}.");
|
||||
}
|
||||
|
||||
public static void IncompleteNegotiateChallenge(this ILogger logger)
|
||||
|
|
@ -91,5 +96,8 @@ namespace Microsoft.Extensions.Logging
|
|||
|
||||
public static void ClientError(this ILogger logger, Exception ex)
|
||||
=> _clientError(logger, ex);
|
||||
|
||||
public static void NegotiateError(this ILogger logger, string error)
|
||||
=> _negotiateError(logger, error, null);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ namespace Microsoft.AspNetCore.Authentication.Negotiate
|
|||
{ }
|
||||
|
||||
/// <summary>
|
||||
/// The handler calls methods on the events which give the application control at certain points where processing is occurring.
|
||||
/// The handler calls methods on the events which give the application control at certain points where processing is occurring.
|
||||
/// If it is not provided a default instance is supplied which does nothing when the methods are called.
|
||||
/// </summary>
|
||||
protected new NegotiateEvents Events
|
||||
|
|
@ -129,9 +129,9 @@ namespace Microsoft.AspNetCore.Authentication.Negotiate
|
|||
_negotiateState ??= Options.StateFactory.CreateInstance();
|
||||
|
||||
var outgoing = _negotiateState.GetOutgoingBlob(token, out var errorType, out var exception);
|
||||
Logger.LogInformation(errorType.ToString());
|
||||
if (errorType != BlobErrorType.None)
|
||||
{
|
||||
Logger.NegotiateError(errorType.ToString());
|
||||
_negotiateState.Dispose();
|
||||
_negotiateState = null;
|
||||
if (persistence?.State != null)
|
||||
|
|
|
|||
|
|
@ -49,7 +49,6 @@ namespace Microsoft.AspNetCore.Authentication.DataHandler
|
|||
}
|
||||
|
||||
[Fact]
|
||||
[QuarantinedTest]
|
||||
public void UnprotectWithDifferentPurposeFails()
|
||||
{
|
||||
var provider = ServiceProvider.GetRequiredService<IDataProtectionProvider>();
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ namespace Microsoft.AspNetCore.Authorization.Infrastructure
|
|||
|
||||
public override string ToString()
|
||||
{
|
||||
return $"{nameof(DenyAnonymousAuthorizationRequirement)}:Requires an authenticated user.";
|
||||
return $"{nameof(DenyAnonymousAuthorizationRequirement)}: Requires an authenticated user.";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ namespace Microsoft.Extensions.Logging
|
|||
_userAuthorizationFailed = LoggerMessage.Define<string>(
|
||||
eventId: new EventId(2, "UserAuthorizationFailed"),
|
||||
logLevel: LogLevel.Information,
|
||||
formatString: "Authorization failed for {0}");
|
||||
formatString: "Authorization failed. {0}");
|
||||
}
|
||||
|
||||
public static void UserAuthorizationSucceeded(this ILogger logger)
|
||||
|
|
|
|||
|
|
@ -9,9 +9,19 @@ namespace Microsoft.AspNetCore.Authorization
|
|||
[System.Diagnostics.DebuggerStepThroughAttribute]
|
||||
public System.Threading.Tasks.Task Invoke(Microsoft.AspNetCore.Http.HttpContext context) { throw null; }
|
||||
}
|
||||
public partial interface IAuthorizationMiddlewareResultHandler
|
||||
{
|
||||
System.Threading.Tasks.Task HandleAsync(Microsoft.AspNetCore.Http.RequestDelegate next, Microsoft.AspNetCore.Http.HttpContext context, Microsoft.AspNetCore.Authorization.AuthorizationPolicy policy, Microsoft.AspNetCore.Authorization.Policy.PolicyAuthorizationResult authorizeResult);
|
||||
}
|
||||
}
|
||||
namespace Microsoft.AspNetCore.Authorization.Policy
|
||||
{
|
||||
public partial class AuthorizationMiddlewareResultHandler : Microsoft.AspNetCore.Authorization.IAuthorizationMiddlewareResultHandler
|
||||
{
|
||||
public AuthorizationMiddlewareResultHandler() { }
|
||||
[System.Diagnostics.DebuggerStepThroughAttribute]
|
||||
public System.Threading.Tasks.Task HandleAsync(Microsoft.AspNetCore.Http.RequestDelegate next, Microsoft.AspNetCore.Http.HttpContext context, Microsoft.AspNetCore.Authorization.AuthorizationPolicy policy, Microsoft.AspNetCore.Authorization.Policy.PolicyAuthorizationResult authorizeResult) { throw null; }
|
||||
}
|
||||
public partial interface IPolicyEvaluator
|
||||
{
|
||||
System.Threading.Tasks.Task<Microsoft.AspNetCore.Authentication.AuthenticateResult> AuthenticateAsync(Microsoft.AspNetCore.Authorization.AuthorizationPolicy policy, Microsoft.AspNetCore.Http.HttpContext context);
|
||||
|
|
@ -20,11 +30,13 @@ namespace Microsoft.AspNetCore.Authorization.Policy
|
|||
public partial class PolicyAuthorizationResult
|
||||
{
|
||||
internal PolicyAuthorizationResult() { }
|
||||
public Microsoft.AspNetCore.Authorization.AuthorizationFailure AuthorizationFailure { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } }
|
||||
public bool Challenged { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } }
|
||||
public bool Forbidden { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } }
|
||||
public bool Succeeded { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } }
|
||||
public static Microsoft.AspNetCore.Authorization.Policy.PolicyAuthorizationResult Challenge() { throw null; }
|
||||
public static Microsoft.AspNetCore.Authorization.Policy.PolicyAuthorizationResult Forbid() { throw null; }
|
||||
public static Microsoft.AspNetCore.Authorization.Policy.PolicyAuthorizationResult Forbid(Microsoft.AspNetCore.Authorization.AuthorizationFailure authorizationFailure) { throw null; }
|
||||
public static Microsoft.AspNetCore.Authorization.Policy.PolicyAuthorizationResult Success() { throw null; }
|
||||
}
|
||||
public partial class PolicyEvaluator : Microsoft.AspNetCore.Authorization.Policy.IPolicyEvaluator
|
||||
|
|
@ -44,6 +56,7 @@ namespace Microsoft.AspNetCore.Builder
|
|||
}
|
||||
public static partial class AuthorizationEndpointConventionBuilderExtensions
|
||||
{
|
||||
public static TBuilder AllowAnonymous<TBuilder>(this TBuilder builder) where TBuilder : Microsoft.AspNetCore.Builder.IEndpointConventionBuilder { throw null; }
|
||||
public static TBuilder RequireAuthorization<TBuilder>(this TBuilder builder) where TBuilder : Microsoft.AspNetCore.Builder.IEndpointConventionBuilder { throw null; }
|
||||
public static TBuilder RequireAuthorization<TBuilder>(this TBuilder builder, params Microsoft.AspNetCore.Authorization.IAuthorizeData[] authorizeData) where TBuilder : Microsoft.AspNetCore.Builder.IEndpointConventionBuilder { throw null; }
|
||||
public static TBuilder RequireAuthorization<TBuilder>(this TBuilder builder, params string[] policyNames) where TBuilder : Microsoft.AspNetCore.Builder.IEndpointConventionBuilder { throw null; }
|
||||
|
|
|
|||
|
|
@ -13,6 +13,9 @@ namespace Microsoft.AspNetCore.Builder
|
|||
/// </summary>
|
||||
public static class AuthorizationEndpointConventionBuilderExtensions
|
||||
{
|
||||
|
||||
private static readonly IAllowAnonymous _allowAnonymousMetadata = new AllowAnonymousAttribute();
|
||||
|
||||
/// <summary>
|
||||
/// Adds the default authorization policy to the endpoint(s).
|
||||
/// </summary>
|
||||
|
|
@ -79,6 +82,22 @@ namespace Microsoft.AspNetCore.Builder
|
|||
return builder;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Allows anonymous access to the endpoint by adding <see cref="AllowAnonymousAttribute" /> to the endpoint metadata. This will bypass
|
||||
/// all authorization checks for the endpoint including the default authorization policy and fallback authorization policy.
|
||||
/// </summary>
|
||||
/// <param name="builder">The endpoint convention builder.</param>
|
||||
/// <returns>The original convention builder parameter.</returns>
|
||||
public static TBuilder AllowAnonymous<TBuilder>(this TBuilder builder) where TBuilder : IEndpointConventionBuilder
|
||||
{
|
||||
builder.Add(endpointBuilder =>
|
||||
{
|
||||
endpointBuilder.Metadata.Add(_allowAnonymousMetadata);
|
||||
});
|
||||
return builder;
|
||||
}
|
||||
|
||||
|
||||
private static void RequireAuthorizationCore<TBuilder>(TBuilder builder, IEnumerable<IAuthorizeData> authorizeData)
|
||||
where TBuilder : IEndpointConventionBuilder
|
||||
{
|
||||
|
|
|
|||
|
|
@ -2,9 +2,7 @@
|
|||
// 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.Threading.Tasks;
|
||||
using Microsoft.AspNetCore.Authentication;
|
||||
using Microsoft.AspNetCore.Authorization.Policy;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
|
|
@ -66,40 +64,8 @@ namespace Microsoft.AspNetCore.Authorization
|
|||
// Note that the resource will be null if there is no matched endpoint
|
||||
var authorizeResult = await policyEvaluator.AuthorizeAsync(policy, authenticateResult, context, resource: endpoint);
|
||||
|
||||
if (authorizeResult.Challenged)
|
||||
{
|
||||
if (policy.AuthenticationSchemes.Count > 0)
|
||||
{
|
||||
foreach (var scheme in policy.AuthenticationSchemes)
|
||||
{
|
||||
await context.ChallengeAsync(scheme);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
await context.ChallengeAsync();
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
else if (authorizeResult.Forbidden)
|
||||
{
|
||||
if (policy.AuthenticationSchemes.Count > 0)
|
||||
{
|
||||
foreach (var scheme in policy.AuthenticationSchemes)
|
||||
{
|
||||
await context.ForbidAsync(scheme);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
await context.ForbidAsync();
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
await _next(context);
|
||||
var authorizationMiddlewareResultHandler = context.RequestServices.GetRequiredService<IAuthorizationMiddlewareResultHandler>();
|
||||
await authorizationMiddlewareResultHandler.HandleAsync(_next, context, policy, authorizeResult);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,47 @@
|
|||
using System.Threading.Tasks;
|
||||
using Microsoft.AspNetCore.Authentication;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
|
||||
namespace Microsoft.AspNetCore.Authorization.Policy
|
||||
{
|
||||
public class AuthorizationMiddlewareResultHandler : IAuthorizationMiddlewareResultHandler
|
||||
{
|
||||
public async Task HandleAsync(RequestDelegate next, HttpContext context, AuthorizationPolicy policy, PolicyAuthorizationResult authorizeResult)
|
||||
{
|
||||
if (authorizeResult.Challenged)
|
||||
{
|
||||
if (policy.AuthenticationSchemes.Count > 0)
|
||||
{
|
||||
foreach (var scheme in policy.AuthenticationSchemes)
|
||||
{
|
||||
await context.ChallengeAsync(scheme);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
await context.ChallengeAsync();
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
else if (authorizeResult.Forbidden)
|
||||
{
|
||||
if (policy.AuthenticationSchemes.Count > 0)
|
||||
{
|
||||
foreach (var scheme in policy.AuthenticationSchemes)
|
||||
{
|
||||
await context.ForbidAsync(scheme);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
await context.ForbidAsync();
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
await next(context);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
using System.Threading.Tasks;
|
||||
using Microsoft.AspNetCore.Authorization.Policy;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
|
||||
namespace Microsoft.AspNetCore.Authorization
|
||||
{
|
||||
public interface IAuthorizationMiddlewareResultHandler
|
||||
{
|
||||
Task HandleAsync(RequestDelegate next, HttpContext context, AuthorizationPolicy policy, PolicyAuthorizationResult authorizeResult);
|
||||
}
|
||||
}
|
||||
|
|
@ -33,8 +33,8 @@ namespace Microsoft.AspNetCore.Authorization.Policy
|
|||
/// If a resource is not required for policy evaluation you may pass null as the value.
|
||||
/// </param>
|
||||
/// <returns>Returns <see cref="PolicyAuthorizationResult.Success"/> if authorization succeeds.
|
||||
/// Otherwise returns <see cref="PolicyAuthorizationResult.Forbid"/> if <see cref="AuthenticateResult.Succeeded"/>, otherwise
|
||||
/// Otherwise returns <see cref="PolicyAuthorizationResult.Forbid(AuthorizationFailure)"/> if <see cref="AuthenticateResult.Succeeded"/>, otherwise
|
||||
/// returns <see cref="PolicyAuthorizationResult.Challenge"/></returns>
|
||||
Task<PolicyAuthorizationResult> AuthorizeAsync(AuthorizationPolicy policy, AuthenticateResult authenticationResult, HttpContext context, object resource);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -22,14 +22,22 @@ namespace Microsoft.AspNetCore.Authorization.Policy
|
|||
/// </summary>
|
||||
public bool Succeeded { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// Contains information about why authorization failed.
|
||||
/// </summary>
|
||||
public AuthorizationFailure AuthorizationFailure { get; private set; }
|
||||
|
||||
public static PolicyAuthorizationResult Challenge()
|
||||
=> new PolicyAuthorizationResult { Challenged = true };
|
||||
|
||||
public static PolicyAuthorizationResult Forbid()
|
||||
=> new PolicyAuthorizationResult { Forbidden = true };
|
||||
=> Forbid(null);
|
||||
|
||||
public static PolicyAuthorizationResult Forbid(AuthorizationFailure authorizationFailure)
|
||||
=> new PolicyAuthorizationResult { Forbidden = true, AuthorizationFailure = authorizationFailure };
|
||||
|
||||
public static PolicyAuthorizationResult Success()
|
||||
=> new PolicyAuthorizationResult { Succeeded = true };
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@ namespace Microsoft.AspNetCore.Authorization.Policy
|
|||
}
|
||||
}
|
||||
|
||||
return (context.User?.Identity?.IsAuthenticated ?? false)
|
||||
return (context.User?.Identity?.IsAuthenticated ?? false)
|
||||
? AuthenticateResult.Success(new AuthenticationTicket(context.User, "context.User"))
|
||||
: AuthenticateResult.NoResult();
|
||||
}
|
||||
|
|
@ -72,7 +72,7 @@ namespace Microsoft.AspNetCore.Authorization.Policy
|
|||
/// If a resource is not required for policy evaluation you may pass null as the value.
|
||||
/// </param>
|
||||
/// <returns>Returns <see cref="PolicyAuthorizationResult.Success"/> if authorization succeeds.
|
||||
/// Otherwise returns <see cref="PolicyAuthorizationResult.Forbid"/> if <see cref="AuthenticateResult.Succeeded"/>, otherwise
|
||||
/// Otherwise returns <see cref="PolicyAuthorizationResult.Forbid(AuthorizationFailure)"/> if <see cref="AuthenticateResult.Succeeded"/>, otherwise
|
||||
/// returns <see cref="PolicyAuthorizationResult.Challenge"/></returns>
|
||||
public virtual async Task<PolicyAuthorizationResult> AuthorizeAsync(AuthorizationPolicy policy, AuthenticateResult authenticationResult, HttpContext context, object resource)
|
||||
{
|
||||
|
|
@ -88,9 +88,9 @@ namespace Microsoft.AspNetCore.Authorization.Policy
|
|||
}
|
||||
|
||||
// If authentication was successful, return forbidden, otherwise challenge
|
||||
return (authenticationResult.Succeeded)
|
||||
? PolicyAuthorizationResult.Forbid()
|
||||
return (authenticationResult.Succeeded)
|
||||
? PolicyAuthorizationResult.Forbid(result.Failure)
|
||||
: PolicyAuthorizationResult.Challenge();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -26,7 +26,8 @@ namespace Microsoft.Extensions.DependencyInjection
|
|||
}
|
||||
|
||||
services.TryAddSingleton<AuthorizationPolicyMarkerService>();
|
||||
services.TryAdd(ServiceDescriptor.Transient<IPolicyEvaluator, PolicyEvaluator>());
|
||||
services.TryAddTransient<IPolicyEvaluator, PolicyEvaluator>();
|
||||
services.TryAddTransient<IAuthorizationMiddlewareResultHandler, AuthorizationMiddlewareResultHandler>();
|
||||
return services;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -121,6 +121,37 @@ namespace Microsoft.AspNetCore.Authorization.Test
|
|||
Assert.True(chainedBuilder.TestProperty);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void AllowAnonymous_Default()
|
||||
{
|
||||
// Arrange
|
||||
var builder = new TestEndpointConventionBuilder();
|
||||
|
||||
// Act
|
||||
builder.AllowAnonymous();
|
||||
|
||||
// Assert
|
||||
var convention = Assert.Single(builder.Conventions);
|
||||
|
||||
var endpointModel = new RouteEndpointBuilder((context) => Task.CompletedTask, RoutePatternFactory.Parse("/"), 0);
|
||||
convention(endpointModel);
|
||||
|
||||
Assert.IsAssignableFrom<IAllowAnonymous>(Assert.Single(endpointModel.Metadata));
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void AllowAnonymous_ChainedCall()
|
||||
{
|
||||
// Arrange
|
||||
var builder = new TestEndpointConventionBuilder();
|
||||
|
||||
// Act
|
||||
var chainedBuilder = builder.AllowAnonymous();
|
||||
|
||||
// Assert
|
||||
Assert.True(chainedBuilder.TestProperty);
|
||||
}
|
||||
|
||||
private class TestEndpointConventionBuilder : IEndpointConventionBuilder
|
||||
{
|
||||
public IList<Action<EndpointBuilder>> Conventions { get; } = new List<Action<EndpointBuilder>>();
|
||||
|
|
|
|||
|
|
@ -0,0 +1,150 @@
|
|||
// 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.Threading.Tasks;
|
||||
using Microsoft.AspNetCore.Authentication;
|
||||
using Microsoft.AspNetCore.Authorization.Policy;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Moq;
|
||||
using Xunit;
|
||||
|
||||
namespace Microsoft.AspNetCore.Authorization.Test
|
||||
{
|
||||
public class AuthorizationMiddlewareResultHandlerTests
|
||||
{
|
||||
[Fact]
|
||||
public async Task CallRequestDelegate_If_PolicyAuthorizationResultSucceeded()
|
||||
{
|
||||
var requestDelegate = new Mock<RequestDelegate>();
|
||||
var httpContext = CreateHttpContext();
|
||||
var policy = new AuthorizationPolicyBuilder().RequireAuthenticatedUser().Build();
|
||||
var policyAuthorizationResult = PolicyAuthorizationResult.Success();
|
||||
var handler = CreateAuthorizationMiddlewareResultHandler();
|
||||
|
||||
await handler.HandleAsync(requestDelegate.Object, httpContext, policy, policyAuthorizationResult);
|
||||
|
||||
requestDelegate.Verify(next => next(It.IsAny<HttpContext>()), Times.Once);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public async Task NotCallRequestDelegate_If_PolicyAuthorizationResultWasChallenged()
|
||||
{
|
||||
var requestDelegate = new Mock<RequestDelegate>();
|
||||
var httpContext = CreateHttpContext();
|
||||
var policy = new AuthorizationPolicyBuilder().RequireAuthenticatedUser().Build();
|
||||
var policyAuthorizationResult = PolicyAuthorizationResult.Challenge();
|
||||
var handler = CreateAuthorizationMiddlewareResultHandler();
|
||||
|
||||
await handler.HandleAsync(requestDelegate.Object, httpContext, policy, policyAuthorizationResult);
|
||||
|
||||
requestDelegate.Verify(next => next(It.IsAny<HttpContext>()), Times.Never);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public async Task NotCallRequestDelegate_If_PolicyAuthorizationResultWasForbidden()
|
||||
{
|
||||
var requestDelegate = new Mock<RequestDelegate>();
|
||||
var httpContext = CreateHttpContext();
|
||||
var policy = new AuthorizationPolicyBuilder().RequireAuthenticatedUser().Build();
|
||||
var policyAuthorizationResult = PolicyAuthorizationResult.Forbid();
|
||||
var handler = CreateAuthorizationMiddlewareResultHandler();
|
||||
|
||||
await handler.HandleAsync(requestDelegate.Object, httpContext, policy, policyAuthorizationResult);
|
||||
|
||||
requestDelegate.Verify(next => next(It.IsAny<HttpContext>()), Times.Never);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public async Task ChallangeEachAuthenticationScheme_If_PolicyAuthorizationResultWasChallenged()
|
||||
{
|
||||
var authenticationServiceMock = new Mock<IAuthenticationService>();
|
||||
var requestDelegate = new Mock<RequestDelegate>();
|
||||
var httpContext = CreateHttpContext(authenticationServiceMock.Object);
|
||||
var firstScheme = Guid.NewGuid().ToString();
|
||||
var secondScheme = Guid.NewGuid().ToString();
|
||||
var thirdScheme = Guid.NewGuid().ToString();
|
||||
var policy = new AuthorizationPolicyBuilder()
|
||||
.RequireAuthenticatedUser()
|
||||
.AddAuthenticationSchemes(firstScheme, secondScheme, thirdScheme)
|
||||
.Build();
|
||||
var policyAuthorizationResult = PolicyAuthorizationResult.Challenge();
|
||||
var handler = CreateAuthorizationMiddlewareResultHandler();
|
||||
|
||||
await handler.HandleAsync(requestDelegate.Object, httpContext, policy, policyAuthorizationResult);
|
||||
|
||||
authenticationServiceMock.Verify(service => service.ChallengeAsync(httpContext, It.IsAny<string>(), null), Times.Exactly(3));
|
||||
authenticationServiceMock.Verify(service => service.ChallengeAsync(httpContext, firstScheme, null), Times.Once);
|
||||
authenticationServiceMock.Verify(service => service.ChallengeAsync(httpContext, secondScheme, null), Times.Once);
|
||||
authenticationServiceMock.Verify(service => service.ChallengeAsync(httpContext, thirdScheme, null), Times.Once);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public async Task ChallangeWithoutAuthenticationScheme_If_PolicyAuthorizationResultWasChallenged()
|
||||
{
|
||||
var authenticationServiceMock = new Mock<IAuthenticationService>();
|
||||
var requestDelegate = new Mock<RequestDelegate>();
|
||||
var httpContext = CreateHttpContext(authenticationServiceMock.Object);
|
||||
var policy = new AuthorizationPolicyBuilder().RequireAuthenticatedUser().Build();
|
||||
var policyAuthorizationResult = PolicyAuthorizationResult.Challenge();
|
||||
var handler = CreateAuthorizationMiddlewareResultHandler();
|
||||
|
||||
await handler.HandleAsync(requestDelegate.Object, httpContext, policy, policyAuthorizationResult);
|
||||
|
||||
authenticationServiceMock.Verify(service => service.ChallengeAsync(httpContext, null, null), Times.Once);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public async Task ForbidEachAuthenticationScheme_If_PolicyAuthorizationResultWasForbidden()
|
||||
{
|
||||
var authenticationServiceMock = new Mock<IAuthenticationService>();
|
||||
var requestDelegate = new Mock<RequestDelegate>();
|
||||
var httpContext = CreateHttpContext(authenticationServiceMock.Object);
|
||||
var firstScheme = Guid.NewGuid().ToString();
|
||||
var secondScheme = Guid.NewGuid().ToString();
|
||||
var thirdScheme = Guid.NewGuid().ToString();
|
||||
var policy = new AuthorizationPolicyBuilder()
|
||||
.RequireAuthenticatedUser()
|
||||
.AddAuthenticationSchemes(firstScheme, secondScheme, thirdScheme)
|
||||
.Build();
|
||||
var policyAuthorizationResult = PolicyAuthorizationResult.Forbid();
|
||||
var handler = CreateAuthorizationMiddlewareResultHandler();
|
||||
|
||||
await handler.HandleAsync(requestDelegate.Object, httpContext, policy, policyAuthorizationResult);
|
||||
|
||||
authenticationServiceMock.Verify(service => service.ForbidAsync(httpContext, It.IsAny<string>(), null), Times.Exactly(3));
|
||||
authenticationServiceMock.Verify(service => service.ForbidAsync(httpContext, firstScheme, null), Times.Once);
|
||||
authenticationServiceMock.Verify(service => service.ForbidAsync(httpContext, secondScheme, null), Times.Once);
|
||||
authenticationServiceMock.Verify(service => service.ForbidAsync(httpContext, thirdScheme, null), Times.Once);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public async Task ForbidWithoutAuthenticationScheme_If_PolicyAuthorizationResultWasForbidden()
|
||||
{
|
||||
var authenticationServiceMock = new Mock<IAuthenticationService>();
|
||||
var requestDelegate = new Mock<RequestDelegate>();
|
||||
var httpContext = CreateHttpContext(authenticationServiceMock.Object);
|
||||
var policy = new AuthorizationPolicyBuilder().RequireAuthenticatedUser().Build();
|
||||
var policyAuthorizationResult = PolicyAuthorizationResult.Forbid();
|
||||
var handler = CreateAuthorizationMiddlewareResultHandler();
|
||||
|
||||
await handler.HandleAsync(requestDelegate.Object, httpContext, policy, policyAuthorizationResult);
|
||||
|
||||
authenticationServiceMock.Verify(service => service.ForbidAsync(httpContext, null, null), Times.Once);
|
||||
}
|
||||
|
||||
private HttpContext CreateHttpContext(IAuthenticationService authenticationService = null)
|
||||
{
|
||||
var services = new ServiceCollection();
|
||||
|
||||
services.AddTransient(provider => authenticationService ?? new Mock<IAuthenticationService>().Object);
|
||||
|
||||
var serviceProvider = services.BuildServiceProvider();
|
||||
|
||||
return new DefaultHttpContext { RequestServices = serviceProvider };
|
||||
}
|
||||
|
||||
private AuthorizationMiddlewareResultHandler CreateAuthorizationMiddlewareResultHandler() => new AuthorizationMiddlewareResultHandler();
|
||||
}
|
||||
}
|
||||
|
|
@ -5,9 +5,9 @@ using System;
|
|||
using System.Security.Claims;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.AspNetCore.Authentication;
|
||||
using Microsoft.AspNetCore.Authorization.Policy;
|
||||
using Microsoft.AspNetCore.Authorization.Test.TestObjects;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using Microsoft.AspNetCore.Http.Features;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Moq;
|
||||
using Xunit;
|
||||
|
|
@ -449,6 +449,7 @@ namespace Microsoft.AspNetCore.Authorization.Test
|
|||
authenticationService = authenticationService ?? Mock.Of<IAuthenticationService>();
|
||||
|
||||
serviceCollection.AddSingleton(authenticationService);
|
||||
serviceCollection.AddTransient<IAuthorizationMiddlewareResultHandler, AuthorizationMiddlewareResultHandler>();
|
||||
serviceCollection.AddOptions();
|
||||
serviceCollection.AddLogging();
|
||||
serviceCollection.AddAuthorization();
|
||||
|
|
|
|||
|
|
@ -1221,7 +1221,7 @@ namespace Microsoft.AspNetCore.Authorization.Test
|
|||
Assert.Equal("UserAuthorizationFailed", eventId.Name);
|
||||
var message = formatter(state, exception);
|
||||
|
||||
Assert.Equal("Authorization failed for These requirements were not met:" + Environment.NewLine + "LogRequirement" + Environment.NewLine + "LogRequirement", message);
|
||||
Assert.Equal("Authorization failed. These requirements were not met:" + Environment.NewLine + "LogRequirement" + Environment.NewLine + "LogRequirement", message);
|
||||
}
|
||||
|
||||
var authorizationService = BuildAuthorizationService(services =>
|
||||
|
|
@ -1241,7 +1241,7 @@ namespace Microsoft.AspNetCore.Authorization.Test
|
|||
|
||||
// Assert
|
||||
}
|
||||
|
||||
|
||||
[Fact]
|
||||
public async Task Authorize_ShouldLogExplicitFailedWhenFailedCall()
|
||||
{
|
||||
|
|
@ -1254,7 +1254,7 @@ namespace Microsoft.AspNetCore.Authorization.Test
|
|||
Assert.Equal("UserAuthorizationFailed", eventId.Name);
|
||||
var message = formatter(state, exception);
|
||||
|
||||
Assert.Equal("Authorization failed for Fail() was explicitly called.", message);
|
||||
Assert.Equal("Authorization failed. Fail() was explicitly called.", message);
|
||||
}
|
||||
|
||||
var authorizationService = BuildAuthorizationService(services =>
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ namespace Microsoft.AspNetCore.Authorization.Test
|
|||
{
|
||||
return new DenyAnonymousAuthorizationRequirement();
|
||||
}
|
||||
|
||||
|
||||
[Fact]
|
||||
public void ToString_ShouldReturnFormatValue()
|
||||
{
|
||||
|
|
@ -26,7 +26,7 @@ namespace Microsoft.AspNetCore.Authorization.Test
|
|||
var formattedValue = requirement.ToString();
|
||||
|
||||
// Assert
|
||||
Assert.Equal("DenyAnonymousAuthorizationRequirement:Requires an authenticated user.", formattedValue);
|
||||
Assert.Equal("DenyAnonymousAuthorizationRequirement: Requires an authenticated user.", formattedValue);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@ using System.Threading.Tasks;
|
|||
using Microsoft.AspNetCore.Authentication;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Moq;
|
||||
using Xunit;
|
||||
|
||||
namespace Microsoft.AspNetCore.Authorization.Policy.Test
|
||||
|
|
@ -120,6 +121,28 @@ namespace Microsoft.AspNetCore.Authorization.Policy.Test
|
|||
Assert.True(result.Forbidden);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public async Task AuthorizeForbidsAndFailureIsIncludedIfAuthenticationSuceeds()
|
||||
{
|
||||
// Arrange
|
||||
var evaluator = BuildEvaluator();
|
||||
var context = new DefaultHttpContext();
|
||||
var policy = new AuthorizationPolicyBuilder()
|
||||
.AddRequirements(new DummyRequirement())
|
||||
.RequireAssertion(_ => false)
|
||||
.Build();
|
||||
|
||||
// Act
|
||||
var result = await evaluator.AuthorizeAsync(policy, AuthenticateResult.Success(new AuthenticationTicket(new ClaimsPrincipal(), "scheme")), context, resource: null);
|
||||
|
||||
// Assert
|
||||
Assert.False(result.Succeeded);
|
||||
Assert.False(result.Challenged);
|
||||
Assert.True(result.Forbidden);
|
||||
Assert.NotNull(result.AuthorizationFailure);
|
||||
Assert.Contains(result.AuthorizationFailure.FailedRequirements, requirement => requirement is DummyRequirement);
|
||||
}
|
||||
|
||||
private IPolicyEvaluator BuildEvaluator(Action<IServiceCollection> setupServices = null)
|
||||
{
|
||||
var services = new ServiceCollection()
|
||||
|
|
@ -204,5 +227,6 @@ namespace Microsoft.AspNetCore.Authorization.Policy.Test
|
|||
}
|
||||
}
|
||||
|
||||
private class DummyRequirement : IAuthorizationRequirement {}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,22 @@
|
|||
using System.Security.Claims;
|
||||
using System.Text.Encodings.Web;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.AspNetCore.Authentication;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Microsoft.Extensions.Options;
|
||||
|
||||
namespace CustomAuthorizationFailureResponse.Authentication
|
||||
{
|
||||
public class SampleAuthenticationHandler : AuthenticationHandler<AuthenticationSchemeOptions>
|
||||
{
|
||||
private readonly ClaimsPrincipal _id;
|
||||
|
||||
public SampleAuthenticationHandler(IOptionsMonitor<AuthenticationSchemeOptions> options, ILoggerFactory logger, UrlEncoder encoder, ISystemClock clock) : base(options, logger, encoder, clock)
|
||||
{
|
||||
_id = new ClaimsPrincipal(new ClaimsIdentity("Api"));
|
||||
}
|
||||
|
||||
protected override Task<AuthenticateResult> HandleAuthenticateAsync()
|
||||
=> Task.FromResult(AuthenticateResult.Success(new AuthenticationTicket(_id, "Api")));
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
namespace CustomAuthorizationFailureResponse.Authentication
|
||||
{
|
||||
public static class SampleAuthenticationSchemes
|
||||
{
|
||||
public const string CustomScheme = "CustomScheme";
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
using System.Threading.Tasks;
|
||||
using CustomAuthorizationFailureResponse.Authorization.Requirements;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
|
||||
namespace CustomAuthorizationFailureResponse.Authorization.Handlers
|
||||
{
|
||||
public class SampleRequirementHandler : AuthorizationHandler<SampleRequirement>
|
||||
{
|
||||
protected override Task HandleRequirementAsync(AuthorizationHandlerContext context, SampleRequirement requirement)
|
||||
{
|
||||
// assuming the requirement was not met
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
using System.Threading.Tasks;
|
||||
using CustomAuthorizationFailureResponse.Authorization.Requirements;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
|
||||
namespace CustomAuthorizationFailureResponse.Authorization.Handlers
|
||||
{
|
||||
public class SampleWithCustomMessageRequirementHandler : AuthorizationHandler<SampleWithCustomMessageRequirement>
|
||||
{
|
||||
protected override Task HandleRequirementAsync(AuthorizationHandlerContext context, SampleWithCustomMessageRequirement requirement)
|
||||
{
|
||||
// assuming the requirement was not met
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
using Microsoft.AspNetCore.Authorization;
|
||||
|
||||
namespace CustomAuthorizationFailureResponse.Authorization.Requirements
|
||||
{
|
||||
public class SampleRequirement : IAuthorizationRequirement
|
||||
{
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
using Microsoft.AspNetCore.Authorization;
|
||||
|
||||
namespace CustomAuthorizationFailureResponse.Authorization.Requirements
|
||||
{
|
||||
public class SampleWithCustomMessageRequirement : IAuthorizationRequirement
|
||||
{
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,54 @@
|
|||
using System;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using CustomAuthorizationFailureResponse.Authorization.Requirements;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Authorization.Policy;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
|
||||
namespace CustomAuthorizationFailureResponse.Authorization
|
||||
{
|
||||
public class SampleAuthorizationMiddlewareResultHandler : IAuthorizationMiddlewareResultHandler
|
||||
{
|
||||
private readonly IAuthorizationMiddlewareResultHandler _handler;
|
||||
|
||||
public SampleAuthorizationMiddlewareResultHandler(IAuthorizationMiddlewareResultHandler handler)
|
||||
{
|
||||
_handler = handler ?? throw new ArgumentNullException(nameof(handler));
|
||||
}
|
||||
|
||||
public async Task HandleAsync(
|
||||
RequestDelegate requestDelegate,
|
||||
HttpContext httpContext,
|
||||
AuthorizationPolicy authorizationPolicy,
|
||||
PolicyAuthorizationResult policyAuthorizationResult)
|
||||
{
|
||||
// if the authorization was forbidden, let's use custom logic to handle that.
|
||||
if (policyAuthorizationResult.Forbidden && policyAuthorizationResult.AuthorizationFailure != null)
|
||||
{
|
||||
// as an example, let's return 404 if specific requirement has failed
|
||||
if (policyAuthorizationResult.AuthorizationFailure.FailedRequirements.Any(requirement => requirement is SampleRequirement))
|
||||
{
|
||||
httpContext.Response.StatusCode = (int)HttpStatusCode.NotFound;
|
||||
await httpContext.Response.WriteAsync(Startup.CustomForbiddenMessage);
|
||||
|
||||
// return right away as the default implementation would overwrite the status code
|
||||
return;
|
||||
}
|
||||
else if (policyAuthorizationResult.AuthorizationFailure.FailedRequirements.Any(requirement => requirement is SampleWithCustomMessageRequirement))
|
||||
{
|
||||
// if other requirements failed, let's just use a custom message
|
||||
// but we have to use OnStarting callback because the default handlers will want to modify i.e. status code of the response
|
||||
// and modifications of the response are not allowed once the writing has started
|
||||
var message = Startup.CustomForbiddenMessage;
|
||||
|
||||
httpContext.Response.OnStarting(() => httpContext.Response.BodyWriter.WriteAsync(Encoding.UTF8.GetBytes(message)).AsTask());
|
||||
}
|
||||
}
|
||||
|
||||
await _handler.HandleAsync(requestDelegate, httpContext, authorizationPolicy, policyAuthorizationResult);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
namespace CustomAuthorizationFailureResponse.Authorization
|
||||
{
|
||||
public static class SamplePolicyNames
|
||||
{
|
||||
public const string CustomPolicy = "Custom";
|
||||
public const string CustomPolicyWithCustomForbiddenMessage = "CustomPolicyWithCustomForbiddenMessage";
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,25 @@
|
|||
using CustomAuthorizationFailureResponse.Authorization;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
|
||||
namespace CustomAuthorizationFailureResponse.Controllers
|
||||
{
|
||||
[ApiController]
|
||||
[Route("api/[controller]")]
|
||||
public class SampleController : ControllerBase
|
||||
{
|
||||
[HttpGet("customPolicyWithCustomForbiddenMessage")]
|
||||
[Authorize(Policy = SamplePolicyNames.CustomPolicyWithCustomForbiddenMessage)]
|
||||
public string GetWithCustomPolicyWithCustomForbiddenMessage()
|
||||
{
|
||||
return "Hello world from GetWithCustomPolicyWithCustomForbiddenMessage";
|
||||
}
|
||||
|
||||
[HttpGet("customPolicy")]
|
||||
[Authorize(Policy = SamplePolicyNames.CustomPolicy)]
|
||||
public string GetWithCustomPolicy()
|
||||
{
|
||||
return "Hello world from GetWithCustomPolicy";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>$(DefaultNetCoreTargetFramework)</TargetFramework>
|
||||
<IsTestAssetProject>true</IsTestAssetProject>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Reference Include="Microsoft.AspNetCore" />
|
||||
<Reference Include="Microsoft.AspNetCore.Authentication" />
|
||||
<Reference Include="Microsoft.AspNetCore.Authorization" />
|
||||
<Reference Include="Microsoft.AspNetCore.Mvc" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
using System;
|
||||
using System.Linq;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
|
||||
namespace CustomAuthorizationFailureResponse.Extensions
|
||||
{
|
||||
public static class ServiceCollectionExtensions
|
||||
{
|
||||
public static IServiceCollection Decorate<TServiceType, TServiceImplementation>(this IServiceCollection services)
|
||||
{
|
||||
var descriptors = services.Where(descriptor => descriptor.ServiceType == typeof(TServiceType)).ToList();
|
||||
foreach(var descriptor in descriptors)
|
||||
{
|
||||
var index = services.IndexOf(descriptor);
|
||||
services[index] = ServiceDescriptor.Describe(typeof(TServiceType), provider => ActivatorUtilities.CreateInstance(provider, typeof(TServiceImplementation), ActivatorUtilities.GetServiceOrCreateInstance(provider, descriptor.ImplementationType)), descriptor.Lifetime);
|
||||
}
|
||||
|
||||
return services;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,20 @@
|
|||
using Microsoft.AspNetCore.Hosting;
|
||||
using Microsoft.Extensions.Hosting;
|
||||
|
||||
namespace CustomAuthorizationFailureResponse
|
||||
{
|
||||
public class Program
|
||||
{
|
||||
public static void Main(string[] args)
|
||||
{
|
||||
CreateHostBuilder(args).Build().Run();
|
||||
}
|
||||
|
||||
public static IHostBuilder CreateHostBuilder(string[] args) =>
|
||||
Host.CreateDefaultBuilder(args)
|
||||
.ConfigureWebHostDefaults(webBuilder =>
|
||||
{
|
||||
webBuilder.UseStartup<Startup>();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,54 @@
|
|||
using CustomAuthorizationFailureResponse.Authentication;
|
||||
using CustomAuthorizationFailureResponse.Authorization;
|
||||
using CustomAuthorizationFailureResponse.Authorization.Handlers;
|
||||
using CustomAuthorizationFailureResponse.Authorization.Requirements;
|
||||
using CustomAuthorizationFailureResponse.Extensions;
|
||||
using Microsoft.AspNetCore.Authentication;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Builder;
|
||||
using Microsoft.AspNetCore.Hosting;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
|
||||
namespace CustomAuthorizationFailureResponse
|
||||
{
|
||||
public class Startup
|
||||
{
|
||||
public const string CustomForbiddenMessage = "Some info about the error";
|
||||
|
||||
public Startup(IConfiguration configuration)
|
||||
{
|
||||
Configuration = configuration;
|
||||
}
|
||||
|
||||
public IConfiguration Configuration { get; }
|
||||
|
||||
public void ConfigureServices(IServiceCollection services)
|
||||
{
|
||||
services.AddControllers();
|
||||
|
||||
services
|
||||
.AddAuthentication(SampleAuthenticationSchemes.CustomScheme)
|
||||
.AddScheme<AuthenticationSchemeOptions, SampleAuthenticationHandler>(SampleAuthenticationSchemes.CustomScheme, o => { });
|
||||
|
||||
services.AddAuthorization(options => options.AddPolicy(SamplePolicyNames.CustomPolicy, policy => policy.AddRequirements(new SampleRequirement())));
|
||||
services.AddAuthorization(options => options.AddPolicy(SamplePolicyNames.CustomPolicyWithCustomForbiddenMessage, policy => policy.AddRequirements(new SampleWithCustomMessageRequirement())));
|
||||
|
||||
services.AddTransient<IAuthorizationHandler, SampleRequirementHandler>();
|
||||
services.Decorate<IAuthorizationMiddlewareResultHandler, SampleAuthorizationMiddlewareResultHandler>();
|
||||
}
|
||||
|
||||
public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
|
||||
{
|
||||
app.UseRouting();
|
||||
|
||||
app.UseAuthentication();
|
||||
app.UseAuthorization();
|
||||
|
||||
app.UseEndpoints(endpoints =>
|
||||
{
|
||||
endpoints.MapDefaultControllerRoute();
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
{
|
||||
"Logging": {
|
||||
"LogLevel": {
|
||||
"Default": "Information",
|
||||
"Microsoft": "Warning",
|
||||
"Microsoft.Hosting.Lifetime": "Information"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
"Logging": {
|
||||
"LogLevel": {
|
||||
"Default": "Warning"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -14,6 +14,7 @@
|
|||
<ProjectReference Include="$(RepoRoot)src\Hosting\Server.IntegrationTesting\src\Microsoft.AspNetCore.Server.IntegrationTesting.csproj" />
|
||||
<ProjectReference Include="..\..\samples\Cookies\Cookies.csproj" />
|
||||
<ProjectReference Include="..\..\samples\ClaimsTransformation\ClaimsTransformation.csproj" />
|
||||
<ProjectReference Include="..\..\samples\CustomAuthorizationFailureResponse\CustomAuthorizationFailureResponse.csproj" />
|
||||
<ProjectReference Include="..\..\samples\CustomPolicyProvider\CustomPolicyProvider.csproj" />
|
||||
<ProjectReference Include="..\..\samples\DynamicSchemes\DynamicSchemes.csproj" />
|
||||
<ProjectReference Include="..\..\samples\Identity.ExternalClaims\Identity.ExternalClaims.csproj" />
|
||||
|
|
@ -33,6 +34,7 @@
|
|||
<ItemGroup>
|
||||
<_PublishFiles Include="$(ArtifactsBinDir)ClaimsTransformation\$(Configuration)\$(DefaultNetCoreTargetFramework)\ClaimsTransformation.deps.json" />
|
||||
<_PublishFiles Include="$(ArtifactsBinDir)Cookies\$(Configuration)\$(DefaultNetCoreTargetFramework)\Cookies.deps.json" />
|
||||
<_PublishFiles Include="$(ArtifactsBinDir)CustomAuthorizationFailureResponse\$(Configuration)\$(DefaultNetCoreTargetFramework)\CustomAuthorizationFailureResponse.deps.json" />
|
||||
<_PublishFiles Include="$(ArtifactsBinDir)CustomPolicyProvider\$(Configuration)\$(DefaultNetCoreTargetFramework)\CustomPolicyProvider.deps.json" />
|
||||
<_PublishFiles Include="$(ArtifactsBinDir)DynamicSchemes\$(Configuration)\$(DefaultNetCoreTargetFramework)\DynamicSchemes.deps.json" />
|
||||
<_PublishFiles Include="$(ArtifactsBinDir)Identity.ExternalClaims\$(Configuration)\$(DefaultNetCoreTargetFramework)\Identity.ExternalClaims.deps.json" />
|
||||
|
|
@ -40,43 +42,25 @@
|
|||
<_PublishFiles Include="$(ArtifactsBinDir)StaticFilesAuth\$(Configuration)\$(DefaultNetCoreTargetFramework)\StaticFilesAuth.deps.json" />
|
||||
<_claimsWwwrootFiles Include="$(MSBuildThisFileDirectory)..\..\samples\ClaimsTransformation\wwwroot\**\*.*" />
|
||||
<_cookiesWwwrootFiles Include="$(MSBuildThisFileDirectory)..\..\samples\Cookies\wwwroot\**\*.*" />
|
||||
<_customAuthorizationFailureResponseFiles Include="$(MSBuildThisFileDirectory)..\..\samples\CustomAuthorizationFailureResponse\**\*.*" />
|
||||
<_customProviderFiles Include="$(MSBuildThisFileDirectory)..\..\samples\CustomPolicyProvider\**\*.*" />
|
||||
<_schemesWwwrootFiles Include="$(MSBuildThisFileDirectory)..\..\samples\DynamicSchemes\wwwroot\**\*.*" />
|
||||
<_identityWwwrootFiles Include="$(MSBuildThisFileDirectory)..\..\samples\Identity.ExternalClaims\wwwroot\**\*.*" />
|
||||
<_pathWwwrootFiles Include="$(MSBuildThisFileDirectory)..\..\samples\PathSchemeSelection\wwwroot\**\*.*" />
|
||||
<_staticFiles Include="$(MSBuildThisFileDirectory)..\..\samples\StaticFilesAuth\**\*.*" />
|
||||
</ItemGroup>
|
||||
<Copy
|
||||
SourceFiles="@(_PublishFiles)"
|
||||
DestinationFolder="$(PublishDir)" />
|
||||
<Copy
|
||||
SourceFiles="@(_claimsWwwrootFiles)"
|
||||
DestinationFolder="$(PublishDir)\ClaimsTransformation\wwwroot" />
|
||||
<Copy
|
||||
SourceFiles="@(_cookiesWwwrootFiles)"
|
||||
DestinationFolder="$(PublishDir)\Cookies\wwwroot" />
|
||||
<Copy
|
||||
SourceFiles="@(_customProviderFiles)"
|
||||
DestinationFolder="$(PublishDir)\CustomPolicyProvider\\%(RecursiveDir)" />
|
||||
<Copy
|
||||
SourceFiles="@(_schemesWwwrootFiles)"
|
||||
DestinationFolder="$(PublishDir)\DynamicSchemes\wwwroot" />
|
||||
<Copy
|
||||
SourceFiles="@(_pathWwwrootFiles)"
|
||||
DestinationFolder="$(PublishDir)\Identity.ExternalClaims\wwwroot" />
|
||||
<Copy
|
||||
SourceFiles="@(_schemesWwwrootFiles)"
|
||||
DestinationFolder="$(PublishDir)\PathSchemeSelection\wwwroot" />
|
||||
<Copy
|
||||
SourceFiles="@(_staticFiles)"
|
||||
DestinationFolder="$(PublishDir)\StaticFilesAuth\\%(RecursiveDir)" />
|
||||
<Copy SourceFiles="@(_PublishFiles)" DestinationFolder="$(PublishDir)" />
|
||||
<Copy SourceFiles="@(_claimsWwwrootFiles)" DestinationFolder="$(PublishDir)\ClaimsTransformation\wwwroot" />
|
||||
<Copy SourceFiles="@(_cookiesWwwrootFiles)" DestinationFolder="$(PublishDir)\Cookies\wwwroot" />
|
||||
<Copy SourceFiles="@(_customAuthorizationFailureResponseFiles)" DestinationFolder="$(PublishDir)\CustomAuthorizationFailureResponse\\%(RecursiveDir)" />
|
||||
<Copy SourceFiles="@(_customProviderFiles)" DestinationFolder="$(PublishDir)\CustomPolicyProvider\\%(RecursiveDir)" />
|
||||
<Copy SourceFiles="@(_schemesWwwrootFiles)" DestinationFolder="$(PublishDir)\DynamicSchemes\wwwroot" />
|
||||
<Copy SourceFiles="@(_pathWwwrootFiles)" DestinationFolder="$(PublishDir)\Identity.ExternalClaims\wwwroot" />
|
||||
<Copy SourceFiles="@(_schemesWwwrootFiles)" DestinationFolder="$(PublishDir)\PathSchemeSelection\wwwroot" />
|
||||
<Copy SourceFiles="@(_staticFiles)" DestinationFolder="$(PublishDir)\StaticFilesAuth\\%(RecursiveDir)" />
|
||||
|
||||
<!-- Drop a dummy sln to specify content root location -->
|
||||
<WriteLinesToFile
|
||||
File="$(PublishDir)\contentroot.sln"
|
||||
Lines="Ignored"
|
||||
Overwrite="true"
|
||||
Encoding="Unicode" />
|
||||
<WriteLinesToFile File="$(PublishDir)\contentroot.sln" Lines="Ignored" Overwrite="true" Encoding="Unicode" />
|
||||
</Target>
|
||||
|
||||
</Project>
|
||||
|
|
|
|||
|
|
@ -0,0 +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 System.Net;
|
||||
using System.Net.Http;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.AspNetCore.Mvc.Testing;
|
||||
using Xunit;
|
||||
|
||||
namespace AuthSamples.FunctionalTests
|
||||
{
|
||||
public class CustomAuthorizationFailureResponseTests : IClassFixture<WebApplicationFactory<CustomAuthorizationFailureResponse.Startup>>
|
||||
{
|
||||
private HttpClient Client { get; }
|
||||
|
||||
public CustomAuthorizationFailureResponseTests(WebApplicationFactory<CustomAuthorizationFailureResponse.Startup> fixture)
|
||||
{
|
||||
Client = fixture.CreateClient();
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public async Task SampleGetWithCustomPolicyWithCustomForbiddenMessage_Returns403WithCustomMessage()
|
||||
{
|
||||
var response = await Client.GetAsync("api/Sample/customPolicyWithCustomForbiddenMessage");
|
||||
var content = await response.Content.ReadAsStringAsync();
|
||||
|
||||
Assert.Equal(HttpStatusCode.Forbidden, response.StatusCode);
|
||||
Assert.Equal(CustomAuthorizationFailureResponse.Startup.CustomForbiddenMessage, content);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public async Task SampleGetWithCustomPolicy_Returns404WithCustomMessage()
|
||||
{
|
||||
var response = await Client.GetAsync("api/Sample/customPolicy");
|
||||
var content = await response.Content.ReadAsStringAsync();
|
||||
|
||||
Assert.Equal(HttpStatusCode.NotFound, response.StatusCode);
|
||||
Assert.Equal(CustomAuthorizationFailureResponse.Startup.CustomForbiddenMessage, content);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -10,48 +10,23 @@ using Microsoft.AspNetCore.HttpSys.Internal;
|
|||
|
||||
namespace Microsoft.AspNetCore.Server.HttpSys
|
||||
{
|
||||
internal unsafe class AsyncAcceptContext : IAsyncResult, IDisposable
|
||||
internal unsafe class AsyncAcceptContext : TaskCompletionSource<RequestContext>, IDisposable
|
||||
{
|
||||
internal static readonly IOCompletionCallback IOCallback = new IOCompletionCallback(IOWaitCallback);
|
||||
|
||||
private TaskCompletionSource<RequestContext> _tcs;
|
||||
private HttpSysListener _server;
|
||||
private NativeRequestContext _nativeRequestContext;
|
||||
|
||||
internal AsyncAcceptContext(HttpSysListener server)
|
||||
{
|
||||
_server = server;
|
||||
_tcs = new TaskCompletionSource<RequestContext>();
|
||||
Server = server;
|
||||
AllocateNativeRequest();
|
||||
}
|
||||
|
||||
internal Task<RequestContext> Task
|
||||
{
|
||||
get
|
||||
{
|
||||
return _tcs.Task;
|
||||
}
|
||||
}
|
||||
|
||||
private TaskCompletionSource<RequestContext> Tcs
|
||||
{
|
||||
get
|
||||
{
|
||||
return _tcs;
|
||||
}
|
||||
}
|
||||
|
||||
internal HttpSysListener Server
|
||||
{
|
||||
get
|
||||
{
|
||||
return _server;
|
||||
}
|
||||
}
|
||||
internal HttpSysListener Server { get; }
|
||||
|
||||
[SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Redirecting to callback")]
|
||||
[SuppressMessage("Microsoft.Reliability", "CA2000:Dispose objects before losing scope", Justification = "Disposed by callback")]
|
||||
private static void IOCompleted(AsyncAcceptContext asyncResult, uint errorCode, uint numBytes)
|
||||
private static void IOCompleted(AsyncAcceptContext asyncContext, uint errorCode, uint numBytes)
|
||||
{
|
||||
bool complete = false;
|
||||
try
|
||||
|
|
@ -59,28 +34,28 @@ namespace Microsoft.AspNetCore.Server.HttpSys
|
|||
if (errorCode != UnsafeNclNativeMethods.ErrorCodes.ERROR_SUCCESS &&
|
||||
errorCode != UnsafeNclNativeMethods.ErrorCodes.ERROR_MORE_DATA)
|
||||
{
|
||||
asyncResult.Tcs.TrySetException(new HttpSysException((int)errorCode));
|
||||
asyncContext.TrySetException(new HttpSysException((int)errorCode));
|
||||
complete = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
HttpSysListener server = asyncResult.Server;
|
||||
HttpSysListener server = asyncContext.Server;
|
||||
if (errorCode == UnsafeNclNativeMethods.ErrorCodes.ERROR_SUCCESS)
|
||||
{
|
||||
// at this point we have received an unmanaged HTTP_REQUEST and memoryBlob
|
||||
// points to it we need to hook up our authentication handling code here.
|
||||
try
|
||||
{
|
||||
if (server.ValidateRequest(asyncResult._nativeRequestContext) && server.ValidateAuth(asyncResult._nativeRequestContext))
|
||||
if (server.ValidateRequest(asyncContext._nativeRequestContext) && server.ValidateAuth(asyncContext._nativeRequestContext))
|
||||
{
|
||||
RequestContext requestContext = new RequestContext(server, asyncResult._nativeRequestContext);
|
||||
asyncResult.Tcs.TrySetResult(requestContext);
|
||||
RequestContext requestContext = new RequestContext(server, asyncContext._nativeRequestContext);
|
||||
asyncContext.TrySetResult(requestContext);
|
||||
complete = true;
|
||||
}
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
server.SendError(asyncResult._nativeRequestContext.RequestId, StatusCodes.Status400BadRequest);
|
||||
server.SendError(asyncContext._nativeRequestContext.RequestId, StatusCodes.Status400BadRequest);
|
||||
throw;
|
||||
}
|
||||
finally
|
||||
|
|
@ -88,30 +63,30 @@ namespace Microsoft.AspNetCore.Server.HttpSys
|
|||
// The request has been handed to the user, which means this code can't reuse the blob. Reset it here.
|
||||
if (complete)
|
||||
{
|
||||
asyncResult._nativeRequestContext = null;
|
||||
asyncContext._nativeRequestContext = null;
|
||||
}
|
||||
else
|
||||
{
|
||||
asyncResult.AllocateNativeRequest(size: asyncResult._nativeRequestContext.Size);
|
||||
asyncContext.AllocateNativeRequest(size: asyncContext._nativeRequestContext.Size);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// (uint)backingBuffer.Length - AlignmentPadding
|
||||
asyncResult.AllocateNativeRequest(numBytes, asyncResult._nativeRequestContext.RequestId);
|
||||
asyncContext.AllocateNativeRequest(numBytes, asyncContext._nativeRequestContext.RequestId);
|
||||
}
|
||||
|
||||
// We need to issue a new request, either because auth failed, or because our buffer was too small the first time.
|
||||
if (!complete)
|
||||
{
|
||||
uint statusCode = asyncResult.QueueBeginGetContext();
|
||||
uint statusCode = asyncContext.QueueBeginGetContext();
|
||||
if (statusCode != UnsafeNclNativeMethods.ErrorCodes.ERROR_SUCCESS &&
|
||||
statusCode != UnsafeNclNativeMethods.ErrorCodes.ERROR_IO_PENDING)
|
||||
{
|
||||
// someother bad error, possible(?) return values are:
|
||||
// ERROR_INVALID_HANDLE, ERROR_INSUFFICIENT_BUFFER, ERROR_OPERATION_ABORTED
|
||||
asyncResult.Tcs.TrySetException(new HttpSysException((int)statusCode));
|
||||
asyncContext.TrySetException(new HttpSysException((int)statusCode));
|
||||
complete = true;
|
||||
}
|
||||
}
|
||||
|
|
@ -123,14 +98,14 @@ namespace Microsoft.AspNetCore.Server.HttpSys
|
|||
|
||||
if (complete)
|
||||
{
|
||||
asyncResult.Dispose();
|
||||
asyncContext.Dispose();
|
||||
}
|
||||
}
|
||||
catch (Exception exception)
|
||||
{
|
||||
// Logged by caller
|
||||
asyncResult.Tcs.TrySetException(exception);
|
||||
asyncResult.Dispose();
|
||||
asyncContext.TrySetException(exception);
|
||||
asyncContext.Dispose();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -199,26 +174,6 @@ namespace Microsoft.AspNetCore.Server.HttpSys
|
|||
_nativeRequestContext = new NativeRequestContext(nativeOverlapped, Server.MemoryPool, size, requestId);
|
||||
}
|
||||
|
||||
public object AsyncState
|
||||
{
|
||||
get { return _tcs.Task.AsyncState; }
|
||||
}
|
||||
|
||||
public WaitHandle AsyncWaitHandle
|
||||
{
|
||||
get { return ((IAsyncResult)_tcs.Task).AsyncWaitHandle; }
|
||||
}
|
||||
|
||||
public bool CompletedSynchronously
|
||||
{
|
||||
get { return ((IAsyncResult)_tcs.Task).CompletedSynchronously; }
|
||||
}
|
||||
|
||||
public bool IsCompleted
|
||||
{
|
||||
get { return _tcs.Task.IsCompleted; }
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
Dispose(true);
|
||||
|
|
|
|||
|
|
@ -279,7 +279,7 @@ namespace Microsoft.AspNetCore.Server.HttpSys
|
|||
/// </summary>
|
||||
public Task<RequestContext> AcceptAsync()
|
||||
{
|
||||
AsyncAcceptContext asyncResult = null;
|
||||
AsyncAcceptContext acceptContext = null;
|
||||
try
|
||||
{
|
||||
CheckDisposed();
|
||||
|
|
@ -287,14 +287,14 @@ namespace Microsoft.AspNetCore.Server.HttpSys
|
|||
// prepare the ListenerAsyncResult object (this will have it's own
|
||||
// event that the user can wait on for IO completion - which means we
|
||||
// need to signal it when IO completes)
|
||||
asyncResult = new AsyncAcceptContext(this);
|
||||
uint statusCode = asyncResult.QueueBeginGetContext();
|
||||
acceptContext = new AsyncAcceptContext(this);
|
||||
uint statusCode = acceptContext.QueueBeginGetContext();
|
||||
if (statusCode != UnsafeNclNativeMethods.ErrorCodes.ERROR_SUCCESS &&
|
||||
statusCode != UnsafeNclNativeMethods.ErrorCodes.ERROR_IO_PENDING)
|
||||
{
|
||||
// some other bad error, possible(?) return values are:
|
||||
// ERROR_INVALID_HANDLE, ERROR_INSUFFICIENT_BUFFER, ERROR_OPERATION_ABORTED
|
||||
asyncResult.Dispose();
|
||||
acceptContext.Dispose();
|
||||
throw new HttpSysException((int)statusCode);
|
||||
}
|
||||
}
|
||||
|
|
@ -304,7 +304,7 @@ namespace Microsoft.AspNetCore.Server.HttpSys
|
|||
throw;
|
||||
}
|
||||
|
||||
return asyncResult.Task;
|
||||
return acceptContext.Task;
|
||||
}
|
||||
|
||||
internal unsafe bool ValidateRequest(NativeRequestContext requestMemory)
|
||||
|
|
|
|||
|
|
@ -34,6 +34,7 @@ namespace Microsoft.AspNetCore.Server.IIS.FunctionalTests
|
|||
.WithAllHostingModels();
|
||||
|
||||
[ConditionalTheory]
|
||||
[QuarantinedTest]
|
||||
[MemberData(nameof(TestVariants))]
|
||||
[MinimumOSVersion(OperatingSystems.Windows, WindowsVersions.Win8)]
|
||||
public Task HttpsNoClientCert_NoClientCert(TestVariant variant)
|
||||
|
|
|
|||
|
|
@ -4,6 +4,8 @@
|
|||
<TargetFramework>$(DefaultNetCoreTargetFramework)</TargetFramework>
|
||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
<ServerGarbageCollection>true</ServerGarbageCollection>
|
||||
<!-- https://github.com/dotnet/aspnetcore/issues/22114 -->
|
||||
<SkipHelixQueues>Windows.10.Arm64;Windows.10.Arm64.Open</SkipHelixQueues>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
|
|
|||
|
|
@ -100,7 +100,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.FunctionalTests.Http2
|
|||
}
|
||||
|
||||
[ConditionalFact]
|
||||
[QuarantinedTest]
|
||||
[QuarantinedTest("https://github.com/dotnet/aspnetcore/issues/21521")] // Test still quarantined due to Sockets.Functional tests.
|
||||
public async Task GracefulTurnsAbortiveIfRequestsDoNotFinish()
|
||||
{
|
||||
var requestStarted = new TaskCompletionSource<object>(TaskCreationOptions.RunContinuationsAsynchronously);
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue