Skip to content
代码片段 群组 项目
未验证 提交 8ab7d809 编辑于 作者: Brennan's avatar Brennan 提交者: GitHub
浏览文件

Merge branch 'release/6.0' into merge/release/6.0-rc2-to-release/6.0

No related branches found
No related tags found
无相关合并请求
显示
637 个添加223 个删除
...@@ -27,7 +27,6 @@ variables: ...@@ -27,7 +27,6 @@ variables:
jobs: jobs:
- template: jobs/default-build.yml - template: jobs/default-build.yml
parameters: parameters:
continueOnBuildError: true
condition: ne(variables['SkipTests'], 'true') condition: ne(variables['SkipTests'], 'true')
jobName: Components_E2E_Test jobName: Components_E2E_Test
jobDisplayName: "Test: Blazor E2E tests on Linux" jobDisplayName: "Test: Blazor E2E tests on Linux"
......
...@@ -169,6 +169,13 @@ ...@@ -169,6 +169,13 @@
<BuildDependsOn>$(BuildDependsOn);_CopySymbolsToArtifacts</BuildDependsOn> <BuildDependsOn>$(BuildDependsOn);_CopySymbolsToArtifacts</BuildDependsOn>
</PropertyGroup> </PropertyGroup>
<!-- Properties for Package Validation -->
<PropertyGroup Condition="'$(ExcludeFromSourceBuild)' != 'true'">
<EnablePackageValidation>true</EnablePackageValidation>
<DisablePackageBaselineValidation Condition="'$(IsServicingBuild)' != 'true'">true</DisablePackageBaselineValidation>
<GenerateCompatibilitySuppressionFile>true</GenerateCompatibilitySuppressionFile>
</PropertyGroup>
<Target Name="_CopySymbolsToArtifacts"> <Target Name="_CopySymbolsToArtifacts">
<Copy SourceFiles="$([System.IO.Path]::ChangeExtension('$(TargetPath)', 'pdb'))" <Copy SourceFiles="$([System.IO.Path]::ChangeExtension('$(TargetPath)', 'pdb'))"
DestinationFolder="$(SymbolsOutputPath)$(TargetFramework)" DestinationFolder="$(SymbolsOutputPath)$(TargetFramework)"
......
...@@ -25,6 +25,7 @@ function deactivate ([switch]$init) { ...@@ -25,6 +25,7 @@ function deactivate ([switch]$init) {
} }
Remove-Item env:DOTNET_ROOT -ea ignore Remove-Item env:DOTNET_ROOT -ea ignore
Remove-Item 'env:DOTNET_ROOT(x86)' -ea Ignore
Remove-Item env:DOTNET_MULTILEVEL_LOOKUP -ea ignore Remove-Item env:DOTNET_MULTILEVEL_LOOKUP -ea ignore
if (-not $init) { if (-not $init) {
# Remove the deactivate function # Remove the deactivate function
......
此差异已折叠。
...@@ -9,15 +9,14 @@ ...@@ -9,15 +9,14 @@
<AspNetCoreMajorVersion>6</AspNetCoreMajorVersion> <AspNetCoreMajorVersion>6</AspNetCoreMajorVersion>
<AspNetCoreMinorVersion>0</AspNetCoreMinorVersion> <AspNetCoreMinorVersion>0</AspNetCoreMinorVersion>
<AspNetCorePatchVersion>0</AspNetCorePatchVersion> <AspNetCorePatchVersion>0</AspNetCorePatchVersion>
<PreReleaseVersionIteration>2</PreReleaseVersionIteration>
<ValidateBaseline>true</ValidateBaseline> <ValidateBaseline>true</ValidateBaseline>
<!-- <!--
When StabilizePackageVersion is set to 'true', this branch will produce stable outputs for 'Shipping' packages When StabilizePackageVersion is set to 'true', this branch will produce stable outputs for 'Shipping' packages
--> -->
<StabilizePackageVersion Condition="'$(StabilizePackageVersion)' == ''">false</StabilizePackageVersion> <StabilizePackageVersion Condition="'$(StabilizePackageVersion)' == ''">false</StabilizePackageVersion>
<DotNetFinalVersionKind Condition="'$(StabilizePackageVersion)' == 'true'">release</DotNetFinalVersionKind> <DotNetFinalVersionKind Condition="'$(StabilizePackageVersion)' == 'true'">release</DotNetFinalVersionKind>
<PreReleaseVersionLabel>rc</PreReleaseVersionLabel> <PreReleaseVersionLabel>rtm</PreReleaseVersionLabel>
<PreReleaseBrandingLabel>RC $(PreReleaseVersionIteration)</PreReleaseBrandingLabel> <PreReleaseBrandingLabel>RTM</PreReleaseBrandingLabel>
<IncludePreReleaseLabelInPackageVersion>true</IncludePreReleaseLabelInPackageVersion> <IncludePreReleaseLabelInPackageVersion>true</IncludePreReleaseLabelInPackageVersion>
<IncludePreReleaseLabelInPackageVersion Condition=" '$(DotNetFinalVersionKind)' == 'release' ">false</IncludePreReleaseLabelInPackageVersion> <IncludePreReleaseLabelInPackageVersion Condition=" '$(DotNetFinalVersionKind)' == 'release' ">false</IncludePreReleaseLabelInPackageVersion>
<AspNetCoreMajorMinorVersion>$(AspNetCoreMajorVersion).$(AspNetCoreMinorVersion)</AspNetCoreMajorMinorVersion> <AspNetCoreMajorMinorVersion>$(AspNetCoreMajorVersion).$(AspNetCoreMinorVersion)</AspNetCoreMajorMinorVersion>
...@@ -65,74 +64,74 @@ ...@@ -65,74 +64,74 @@
--> -->
<PropertyGroup Label="Automated"> <PropertyGroup Label="Automated">
<!-- Packages from dotnet/runtime --> <!-- Packages from dotnet/runtime -->
<MicrosoftExtensionsDependencyModelVersion>6.0.0-rc.2.21470.23</MicrosoftExtensionsDependencyModelVersion> <MicrosoftExtensionsDependencyModelVersion>6.0.0-rtm.21472.13</MicrosoftExtensionsDependencyModelVersion>
<MicrosoftNETCoreAppRefVersion>6.0.0-rc.2.21470.23</MicrosoftNETCoreAppRefVersion> <MicrosoftNETCoreAppRefVersion>6.0.0-rtm.21472.13</MicrosoftNETCoreAppRefVersion>
<MicrosoftNETCoreAppRuntimewinx64Version>6.0.0-rc.2.21470.23</MicrosoftNETCoreAppRuntimewinx64Version> <MicrosoftNETCoreAppRuntimewinx64Version>6.0.0-rtm.21472.13</MicrosoftNETCoreAppRuntimewinx64Version>
<MicrosoftNETRuntimeMonoAOTCompilerTaskVersion>6.0.0-rc.2.21470.23</MicrosoftNETRuntimeMonoAOTCompilerTaskVersion> <MicrosoftNETRuntimeMonoAOTCompilerTaskVersion>6.0.0-rtm.21472.13</MicrosoftNETRuntimeMonoAOTCompilerTaskVersion>
<MicrosoftNETRuntimeWebAssemblySdkVersion>6.0.0-rc.2.21470.23</MicrosoftNETRuntimeWebAssemblySdkVersion> <MicrosoftNETRuntimeWebAssemblySdkVersion>6.0.0-rtm.21472.13</MicrosoftNETRuntimeWebAssemblySdkVersion>
<MicrosoftNETCoreAppRuntimeAOTwinx64CrossbrowserwasmVersion>6.0.0-rc.2.21470.23</MicrosoftNETCoreAppRuntimeAOTwinx64CrossbrowserwasmVersion> <MicrosoftNETCoreAppRuntimeAOTwinx64CrossbrowserwasmVersion>6.0.0-rtm.21472.13</MicrosoftNETCoreAppRuntimeAOTwinx64CrossbrowserwasmVersion>
<MicrosoftNETCoreBrowserDebugHostTransportVersion>6.0.0-rc.2.21470.23</MicrosoftNETCoreBrowserDebugHostTransportVersion> <MicrosoftNETCoreBrowserDebugHostTransportVersion>6.0.0-rtm.21472.13</MicrosoftNETCoreBrowserDebugHostTransportVersion>
<MicrosoftExtensionsCachingAbstractionsVersion>6.0.0-rc.2.21470.23</MicrosoftExtensionsCachingAbstractionsVersion> <MicrosoftExtensionsCachingAbstractionsVersion>6.0.0-rtm.21472.13</MicrosoftExtensionsCachingAbstractionsVersion>
<MicrosoftExtensionsCachingMemoryVersion>6.0.0-rc.2.21470.23</MicrosoftExtensionsCachingMemoryVersion> <MicrosoftExtensionsCachingMemoryVersion>6.0.0-rtm.21472.13</MicrosoftExtensionsCachingMemoryVersion>
<MicrosoftExtensionsConfigurationAbstractionsVersion>6.0.0-rc.2.21470.23</MicrosoftExtensionsConfigurationAbstractionsVersion> <MicrosoftExtensionsConfigurationAbstractionsVersion>6.0.0-rtm.21472.13</MicrosoftExtensionsConfigurationAbstractionsVersion>
<MicrosoftExtensionsConfigurationBinderVersion>6.0.0-rc.2.21470.23</MicrosoftExtensionsConfigurationBinderVersion> <MicrosoftExtensionsConfigurationBinderVersion>6.0.0-rtm.21472.13</MicrosoftExtensionsConfigurationBinderVersion>
<MicrosoftExtensionsConfigurationCommandLineVersion>6.0.0-rc.2.21470.23</MicrosoftExtensionsConfigurationCommandLineVersion> <MicrosoftExtensionsConfigurationCommandLineVersion>6.0.0-rtm.21472.13</MicrosoftExtensionsConfigurationCommandLineVersion>
<MicrosoftExtensionsConfigurationEnvironmentVariablesVersion>6.0.0-rc.2.21470.23</MicrosoftExtensionsConfigurationEnvironmentVariablesVersion> <MicrosoftExtensionsConfigurationEnvironmentVariablesVersion>6.0.0-rtm.21472.13</MicrosoftExtensionsConfigurationEnvironmentVariablesVersion>
<MicrosoftExtensionsConfigurationFileExtensionsVersion>6.0.0-rc.2.21470.23</MicrosoftExtensionsConfigurationFileExtensionsVersion> <MicrosoftExtensionsConfigurationFileExtensionsVersion>6.0.0-rtm.21472.13</MicrosoftExtensionsConfigurationFileExtensionsVersion>
<MicrosoftExtensionsConfigurationIniVersion>6.0.0-rc.2.21470.23</MicrosoftExtensionsConfigurationIniVersion> <MicrosoftExtensionsConfigurationIniVersion>6.0.0-rtm.21472.13</MicrosoftExtensionsConfigurationIniVersion>
<MicrosoftExtensionsConfigurationJsonVersion>6.0.0-rc.2.21470.23</MicrosoftExtensionsConfigurationJsonVersion> <MicrosoftExtensionsConfigurationJsonVersion>6.0.0-rtm.21472.13</MicrosoftExtensionsConfigurationJsonVersion>
<MicrosoftExtensionsConfigurationVersion>6.0.0-rc.2.21470.23</MicrosoftExtensionsConfigurationVersion> <MicrosoftExtensionsConfigurationVersion>6.0.0-rtm.21472.13</MicrosoftExtensionsConfigurationVersion>
<MicrosoftExtensionsConfigurationUserSecretsVersion>6.0.0-rc.2.21470.23</MicrosoftExtensionsConfigurationUserSecretsVersion> <MicrosoftExtensionsConfigurationUserSecretsVersion>6.0.0-rtm.21472.13</MicrosoftExtensionsConfigurationUserSecretsVersion>
<MicrosoftExtensionsConfigurationXmlVersion>6.0.0-rc.2.21470.23</MicrosoftExtensionsConfigurationXmlVersion> <MicrosoftExtensionsConfigurationXmlVersion>6.0.0-rtm.21472.13</MicrosoftExtensionsConfigurationXmlVersion>
<MicrosoftExtensionsDependencyInjectionAbstractionsVersion>6.0.0-rc.2.21470.23</MicrosoftExtensionsDependencyInjectionAbstractionsVersion> <MicrosoftExtensionsDependencyInjectionAbstractionsVersion>6.0.0-rtm.21472.13</MicrosoftExtensionsDependencyInjectionAbstractionsVersion>
<MicrosoftExtensionsDependencyInjectionVersion>6.0.0-rc.2.21470.23</MicrosoftExtensionsDependencyInjectionVersion> <MicrosoftExtensionsDependencyInjectionVersion>6.0.0-rtm.21472.13</MicrosoftExtensionsDependencyInjectionVersion>
<MicrosoftExtensionsFileProvidersAbstractionsVersion>6.0.0-rc.2.21470.23</MicrosoftExtensionsFileProvidersAbstractionsVersion> <MicrosoftExtensionsFileProvidersAbstractionsVersion>6.0.0-rtm.21472.13</MicrosoftExtensionsFileProvidersAbstractionsVersion>
<MicrosoftExtensionsFileProvidersCompositeVersion>6.0.0-rc.2.21470.23</MicrosoftExtensionsFileProvidersCompositeVersion> <MicrosoftExtensionsFileProvidersCompositeVersion>6.0.0-rtm.21472.13</MicrosoftExtensionsFileProvidersCompositeVersion>
<MicrosoftExtensionsFileProvidersPhysicalVersion>6.0.0-rc.2.21470.23</MicrosoftExtensionsFileProvidersPhysicalVersion> <MicrosoftExtensionsFileProvidersPhysicalVersion>6.0.0-rtm.21472.13</MicrosoftExtensionsFileProvidersPhysicalVersion>
<MicrosoftExtensionsFileSystemGlobbingVersion>6.0.0-rc.2.21470.23</MicrosoftExtensionsFileSystemGlobbingVersion> <MicrosoftExtensionsFileSystemGlobbingVersion>6.0.0-rtm.21472.13</MicrosoftExtensionsFileSystemGlobbingVersion>
<MicrosoftExtensionsHostFactoryResolverSourcesVersion>6.0.0-rc.2.21470.23</MicrosoftExtensionsHostFactoryResolverSourcesVersion> <MicrosoftExtensionsHostFactoryResolverSourcesVersion>6.0.0-rtm.21472.13</MicrosoftExtensionsHostFactoryResolverSourcesVersion>
<MicrosoftExtensionsHostingAbstractionsVersion>6.0.0-rc.2.21470.23</MicrosoftExtensionsHostingAbstractionsVersion> <MicrosoftExtensionsHostingAbstractionsVersion>6.0.0-rtm.21472.13</MicrosoftExtensionsHostingAbstractionsVersion>
<MicrosoftExtensionsHostingVersion>6.0.0-rc.2.21470.23</MicrosoftExtensionsHostingVersion> <MicrosoftExtensionsHostingVersion>6.0.0-rtm.21472.13</MicrosoftExtensionsHostingVersion>
<MicrosoftExtensionsHttpVersion>6.0.0-rc.2.21470.23</MicrosoftExtensionsHttpVersion> <MicrosoftExtensionsHttpVersion>6.0.0-rtm.21472.13</MicrosoftExtensionsHttpVersion>
<MicrosoftExtensionsLoggingAbstractionsVersion>6.0.0-rc.2.21470.23</MicrosoftExtensionsLoggingAbstractionsVersion> <MicrosoftExtensionsLoggingAbstractionsVersion>6.0.0-rtm.21472.13</MicrosoftExtensionsLoggingAbstractionsVersion>
<MicrosoftExtensionsLoggingConfigurationVersion>6.0.0-rc.2.21470.23</MicrosoftExtensionsLoggingConfigurationVersion> <MicrosoftExtensionsLoggingConfigurationVersion>6.0.0-rtm.21472.13</MicrosoftExtensionsLoggingConfigurationVersion>
<MicrosoftExtensionsLoggingConsoleVersion>6.0.0-rc.2.21470.23</MicrosoftExtensionsLoggingConsoleVersion> <MicrosoftExtensionsLoggingConsoleVersion>6.0.0-rtm.21472.13</MicrosoftExtensionsLoggingConsoleVersion>
<MicrosoftExtensionsLoggingDebugVersion>6.0.0-rc.2.21470.23</MicrosoftExtensionsLoggingDebugVersion> <MicrosoftExtensionsLoggingDebugVersion>6.0.0-rtm.21472.13</MicrosoftExtensionsLoggingDebugVersion>
<MicrosoftExtensionsLoggingEventSourceVersion>6.0.0-rc.2.21470.23</MicrosoftExtensionsLoggingEventSourceVersion> <MicrosoftExtensionsLoggingEventSourceVersion>6.0.0-rtm.21472.13</MicrosoftExtensionsLoggingEventSourceVersion>
<MicrosoftExtensionsLoggingEventLogVersion>6.0.0-rc.2.21470.23</MicrosoftExtensionsLoggingEventLogVersion> <MicrosoftExtensionsLoggingEventLogVersion>6.0.0-rtm.21472.13</MicrosoftExtensionsLoggingEventLogVersion>
<MicrosoftExtensionsLoggingVersion>6.0.0-rc.2.21470.23</MicrosoftExtensionsLoggingVersion> <MicrosoftExtensionsLoggingVersion>6.0.0-rtm.21472.13</MicrosoftExtensionsLoggingVersion>
<MicrosoftExtensionsLoggingTraceSourceVersion>6.0.0-rc.2.21470.23</MicrosoftExtensionsLoggingTraceSourceVersion> <MicrosoftExtensionsLoggingTraceSourceVersion>6.0.0-rtm.21472.13</MicrosoftExtensionsLoggingTraceSourceVersion>
<MicrosoftExtensionsOptionsConfigurationExtensionsVersion>6.0.0-rc.2.21470.23</MicrosoftExtensionsOptionsConfigurationExtensionsVersion> <MicrosoftExtensionsOptionsConfigurationExtensionsVersion>6.0.0-rtm.21472.13</MicrosoftExtensionsOptionsConfigurationExtensionsVersion>
<MicrosoftExtensionsOptionsDataAnnotationsVersion>6.0.0-rc.2.21470.23</MicrosoftExtensionsOptionsDataAnnotationsVersion> <MicrosoftExtensionsOptionsDataAnnotationsVersion>6.0.0-rtm.21472.13</MicrosoftExtensionsOptionsDataAnnotationsVersion>
<MicrosoftExtensionsOptionsVersion>6.0.0-rc.2.21470.23</MicrosoftExtensionsOptionsVersion> <MicrosoftExtensionsOptionsVersion>6.0.0-rtm.21472.13</MicrosoftExtensionsOptionsVersion>
<MicrosoftExtensionsPrimitivesVersion>6.0.0-rc.2.21470.23</MicrosoftExtensionsPrimitivesVersion> <MicrosoftExtensionsPrimitivesVersion>6.0.0-rtm.21472.13</MicrosoftExtensionsPrimitivesVersion>
<MicrosoftInternalRuntimeAspNetCoreTransportVersion>6.0.0-rc.2.21470.23</MicrosoftInternalRuntimeAspNetCoreTransportVersion> <MicrosoftInternalRuntimeAspNetCoreTransportVersion>6.0.0-rtm.21472.13</MicrosoftInternalRuntimeAspNetCoreTransportVersion>
<SystemDiagnosticsDiagnosticSourceVersion>6.0.0-rc.2.21470.23</SystemDiagnosticsDiagnosticSourceVersion> <SystemDiagnosticsDiagnosticSourceVersion>6.0.0-rtm.21472.13</SystemDiagnosticsDiagnosticSourceVersion>
<SystemDiagnosticsEventLogVersion>6.0.0-rc.2.21470.23</SystemDiagnosticsEventLogVersion> <SystemDiagnosticsEventLogVersion>6.0.0-rtm.21472.13</SystemDiagnosticsEventLogVersion>
<SystemDirectoryServicesProtocolsVersion>6.0.0-rc.2.21470.23</SystemDirectoryServicesProtocolsVersion> <SystemDirectoryServicesProtocolsVersion>6.0.0-rtm.21472.13</SystemDirectoryServicesProtocolsVersion>
<SystemIOPipelinesVersion>6.0.0-rc.2.21470.23</SystemIOPipelinesVersion> <SystemIOPipelinesVersion>6.0.0-rtm.21472.13</SystemIOPipelinesVersion>
<SystemNetHttpJsonVersion>6.0.0-rc.2.21470.23</SystemNetHttpJsonVersion> <SystemNetHttpJsonVersion>6.0.0-rtm.21472.13</SystemNetHttpJsonVersion>
<SystemNetHttpWinHttpHandlerVersion>6.0.0-rc.2.21470.23</SystemNetHttpWinHttpHandlerVersion> <SystemNetHttpWinHttpHandlerVersion>6.0.0-rtm.21472.13</SystemNetHttpWinHttpHandlerVersion>
<SystemReflectionMetadataVersion>6.0.0-rc.2.21470.23</SystemReflectionMetadataVersion> <SystemReflectionMetadataVersion>6.0.0-rtm.21472.13</SystemReflectionMetadataVersion>
<SystemResourcesExtensionsVersion>6.0.0-rc.2.21470.23</SystemResourcesExtensionsVersion> <SystemResourcesExtensionsVersion>6.0.0-rtm.21472.13</SystemResourcesExtensionsVersion>
<SystemRuntimeCompilerServicesUnsafeVersion>6.0.0-rc.2.21470.23</SystemRuntimeCompilerServicesUnsafeVersion> <SystemRuntimeCompilerServicesUnsafeVersion>6.0.0-rtm.21472.13</SystemRuntimeCompilerServicesUnsafeVersion>
<SystemSecurityCryptographyPkcsVersion>6.0.0-rc.2.21470.23</SystemSecurityCryptographyPkcsVersion> <SystemSecurityCryptographyPkcsVersion>6.0.0-rtm.21472.13</SystemSecurityCryptographyPkcsVersion>
<SystemSecurityCryptographyXmlVersion>6.0.0-rc.2.21470.23</SystemSecurityCryptographyXmlVersion> <SystemSecurityCryptographyXmlVersion>6.0.0-rtm.21472.13</SystemSecurityCryptographyXmlVersion>
<SystemServiceProcessServiceControllerVersion>6.0.0-rc.2.21470.23</SystemServiceProcessServiceControllerVersion> <SystemServiceProcessServiceControllerVersion>6.0.0-rtm.21472.13</SystemServiceProcessServiceControllerVersion>
<SystemTextEncodingsWebVersion>6.0.0-rc.2.21470.23</SystemTextEncodingsWebVersion> <SystemTextEncodingsWebVersion>6.0.0-rtm.21472.13</SystemTextEncodingsWebVersion>
<SystemTextJsonVersion>6.0.0-rc.2.21470.23</SystemTextJsonVersion> <SystemTextJsonVersion>6.0.0-rtm.21472.13</SystemTextJsonVersion>
<SystemThreadingChannelsVersion>6.0.0-rc.2.21470.23</SystemThreadingChannelsVersion> <SystemThreadingChannelsVersion>6.0.0-rtm.21472.13</SystemThreadingChannelsVersion>
<!-- Only listed explicitly to workaround https://github.com/dotnet/cli/issues/10528 --> <!-- Only listed explicitly to workaround https://github.com/dotnet/cli/issues/10528 -->
<MicrosoftNETCorePlatformsVersion>6.0.0-rc.2.21470.23</MicrosoftNETCorePlatformsVersion> <MicrosoftNETCorePlatformsVersion>6.0.0-rtm.21472.13</MicrosoftNETCorePlatformsVersion>
<!-- Packages from dotnet/efcore --> <!-- Packages from dotnet/efcore -->
<dotnetefVersion>6.0.0-rc.2.21470.26</dotnetefVersion> <dotnetefVersion>6.0.0-rtm.21473.4</dotnetefVersion>
<MicrosoftEntityFrameworkCoreInMemoryVersion>6.0.0-rc.2.21470.26</MicrosoftEntityFrameworkCoreInMemoryVersion> <MicrosoftEntityFrameworkCoreInMemoryVersion>6.0.0-rtm.21473.4</MicrosoftEntityFrameworkCoreInMemoryVersion>
<MicrosoftEntityFrameworkCoreRelationalVersion>6.0.0-rc.2.21470.26</MicrosoftEntityFrameworkCoreRelationalVersion> <MicrosoftEntityFrameworkCoreRelationalVersion>6.0.0-rtm.21473.4</MicrosoftEntityFrameworkCoreRelationalVersion>
<MicrosoftEntityFrameworkCoreSqliteVersion>6.0.0-rc.2.21470.26</MicrosoftEntityFrameworkCoreSqliteVersion> <MicrosoftEntityFrameworkCoreSqliteVersion>6.0.0-rtm.21473.4</MicrosoftEntityFrameworkCoreSqliteVersion>
<MicrosoftEntityFrameworkCoreSqlServerVersion>6.0.0-rc.2.21470.26</MicrosoftEntityFrameworkCoreSqlServerVersion> <MicrosoftEntityFrameworkCoreSqlServerVersion>6.0.0-rtm.21473.4</MicrosoftEntityFrameworkCoreSqlServerVersion>
<MicrosoftEntityFrameworkCoreToolsVersion>6.0.0-rc.2.21470.26</MicrosoftEntityFrameworkCoreToolsVersion> <MicrosoftEntityFrameworkCoreToolsVersion>6.0.0-rtm.21473.4</MicrosoftEntityFrameworkCoreToolsVersion>
<MicrosoftEntityFrameworkCoreVersion>6.0.0-rc.2.21470.26</MicrosoftEntityFrameworkCoreVersion> <MicrosoftEntityFrameworkCoreVersion>6.0.0-rtm.21473.4</MicrosoftEntityFrameworkCoreVersion>
<MicrosoftEntityFrameworkCoreDesignVersion>6.0.0-rc.2.21470.26</MicrosoftEntityFrameworkCoreDesignVersion> <MicrosoftEntityFrameworkCoreDesignVersion>6.0.0-rtm.21473.4</MicrosoftEntityFrameworkCoreDesignVersion>
<!-- Packages from dotnet/arcade --> <!-- Packages from dotnet/arcade -->
<MicrosoftDotNetBuildTasksInstallersVersion>6.0.0-beta.21460.7</MicrosoftDotNetBuildTasksInstallersVersion> <MicrosoftDotNetBuildTasksInstallersVersion>6.0.0-beta.21460.7</MicrosoftDotNetBuildTasksInstallersVersion>
<MicrosoftDotNetBuildTasksTemplatingVersion>6.0.0-beta.21460.7</MicrosoftDotNetBuildTasksTemplatingVersion> <MicrosoftDotNetBuildTasksTemplatingVersion>6.0.0-beta.21460.7</MicrosoftDotNetBuildTasksTemplatingVersion>
...@@ -190,9 +189,9 @@ ...@@ -190,9 +189,9 @@
--> -->
<Analyzer_MicrosoftCodeAnalysisCSharpVersion>3.3.1</Analyzer_MicrosoftCodeAnalysisCSharpVersion> <Analyzer_MicrosoftCodeAnalysisCSharpVersion>3.3.1</Analyzer_MicrosoftCodeAnalysisCSharpVersion>
<Analyzer_MicrosoftCodeAnalysisCSharpWorkspacesVersion>3.3.1</Analyzer_MicrosoftCodeAnalysisCSharpWorkspacesVersion> <Analyzer_MicrosoftCodeAnalysisCSharpWorkspacesVersion>3.3.1</Analyzer_MicrosoftCodeAnalysisCSharpWorkspacesVersion>
<MicrosoftCodeAnalysisCommonVersion>4.0.0-3.final</MicrosoftCodeAnalysisCommonVersion> <MicrosoftCodeAnalysisCommonVersion>4.0.0-4.final</MicrosoftCodeAnalysisCommonVersion>
<MicrosoftCodeAnalysisCSharpVersion>4.0.0-3.final</MicrosoftCodeAnalysisCSharpVersion> <MicrosoftCodeAnalysisCSharpVersion>4.0.0-4.final</MicrosoftCodeAnalysisCSharpVersion>
<MicrosoftCodeAnalysisCSharpWorkspacesVersion>4.0.0-3.final</MicrosoftCodeAnalysisCSharpWorkspacesVersion> <MicrosoftCodeAnalysisCSharpWorkspacesVersion>4.0.0-4.final</MicrosoftCodeAnalysisCSharpWorkspacesVersion>
<MicrosoftCodeAnalysisPublicApiAnalyzersVersion>3.3.0</MicrosoftCodeAnalysisPublicApiAnalyzersVersion> <MicrosoftCodeAnalysisPublicApiAnalyzersVersion>3.3.0</MicrosoftCodeAnalysisPublicApiAnalyzersVersion>
<MicrosoftCodeAnalysisCSharpCodeFixTestingXUnitVersion>1.1.1-beta1.21413.1</MicrosoftCodeAnalysisCSharpCodeFixTestingXUnitVersion> <MicrosoftCodeAnalysisCSharpCodeFixTestingXUnitVersion>1.1.1-beta1.21413.1</MicrosoftCodeAnalysisCSharpCodeFixTestingXUnitVersion>
<MicrosoftCssParserVersion>1.0.0-20200708.1</MicrosoftCssParserVersion> <MicrosoftCssParserVersion>1.0.0-20200708.1</MicrosoftCssParserVersion>
...@@ -215,10 +214,10 @@ ...@@ -215,10 +214,10 @@
<!-- Packages from 2.1, 3.1, and 5.0 branches used for site extension build. --> <!-- Packages from 2.1, 3.1, and 5.0 branches used for site extension build. -->
<MicrosoftAspNetCoreAzureAppServicesSiteExtension21Version>2.1.1</MicrosoftAspNetCoreAzureAppServicesSiteExtension21Version> <MicrosoftAspNetCoreAzureAppServicesSiteExtension21Version>2.1.1</MicrosoftAspNetCoreAzureAppServicesSiteExtension21Version>
<MicrosoftAspNetCoreAzureAppServicesSiteExtension22Version>2.2.0</MicrosoftAspNetCoreAzureAppServicesSiteExtension22Version> <MicrosoftAspNetCoreAzureAppServicesSiteExtension22Version>2.2.0</MicrosoftAspNetCoreAzureAppServicesSiteExtension22Version>
<MicrosoftAspNetCoreAzureAppServicesSiteExtension31Version>3.1.18-servicing-21365-4</MicrosoftAspNetCoreAzureAppServicesSiteExtension31Version> <MicrosoftAspNetCoreAzureAppServicesSiteExtension31Version>3.1.19-servicing-21417-13</MicrosoftAspNetCoreAzureAppServicesSiteExtension31Version>
<MicrosoftAspNetCoreAzureAppServicesSiteExtension31x64Version>$(MicrosoftAspNetCoreAzureAppServicesSiteExtension31Version)</MicrosoftAspNetCoreAzureAppServicesSiteExtension31x64Version> <MicrosoftAspNetCoreAzureAppServicesSiteExtension31x64Version>$(MicrosoftAspNetCoreAzureAppServicesSiteExtension31Version)</MicrosoftAspNetCoreAzureAppServicesSiteExtension31x64Version>
<MicrosoftAspNetCoreAzureAppServicesSiteExtension31x86Version>$(MicrosoftAspNetCoreAzureAppServicesSiteExtension31Version)</MicrosoftAspNetCoreAzureAppServicesSiteExtension31x86Version> <MicrosoftAspNetCoreAzureAppServicesSiteExtension31x86Version>$(MicrosoftAspNetCoreAzureAppServicesSiteExtension31Version)</MicrosoftAspNetCoreAzureAppServicesSiteExtension31x86Version>
<MicrosoftAspNetCoreAzureAppServicesSiteExtension50Version>5.0.9-servicing-21365-3</MicrosoftAspNetCoreAzureAppServicesSiteExtension50Version> <MicrosoftAspNetCoreAzureAppServicesSiteExtension50Version>5.0.10-servicing-21410-22</MicrosoftAspNetCoreAzureAppServicesSiteExtension50Version>
<MicrosoftAspNetCoreAzureAppServicesSiteExtension50x64Version>$(MicrosoftAspNetCoreAzureAppServicesSiteExtension50Version)</MicrosoftAspNetCoreAzureAppServicesSiteExtension50x64Version> <MicrosoftAspNetCoreAzureAppServicesSiteExtension50x64Version>$(MicrosoftAspNetCoreAzureAppServicesSiteExtension50Version)</MicrosoftAspNetCoreAzureAppServicesSiteExtension50x64Version>
<MicrosoftAspNetCoreAzureAppServicesSiteExtension50x86Version>$(MicrosoftAspNetCoreAzureAppServicesSiteExtension50Version)</MicrosoftAspNetCoreAzureAppServicesSiteExtension50x86Version> <MicrosoftAspNetCoreAzureAppServicesSiteExtension50x86Version>$(MicrosoftAspNetCoreAzureAppServicesSiteExtension50Version)</MicrosoftAspNetCoreAzureAppServicesSiteExtension50x86Version>
<!-- 3rd party dependencies --> <!-- 3rd party dependencies -->
......
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
<!-- x64 Queues for public helix-matrix.yml and quarantine pipelines, except in windows-only cases --> <!-- x64 Queues for public helix-matrix.yml and quarantine pipelines, except in windows-only cases -->
<ItemGroup Condition="'$(TargetArchitecture)' == 'x64' AND '$(IsHelixDaily)' == 'true' AND '$(_UseHelixOpenQueues)' == 'true' AND '$(IsWindowsOnlyTest)' != 'true'"> <ItemGroup Condition="'$(TargetArchitecture)' == 'x64' AND '$(IsHelixDaily)' == 'true' AND '$(_UseHelixOpenQueues)' == 'true' AND '$(IsWindowsOnlyTest)' != 'true'">
<!-- Linux --> <!-- Linux -->
<HelixAvailableTargetQueue Include="Debian.9.Amd64.Open" Platform="Linux" /> <HelixAvailableTargetQueue Include="(Debian.11.Amd64.Open)ubuntu.1804.amd64.open@mcr.microsoft.com/dotnet-buildtools/prereqs:debian-11-helix-amd64-20210304164428-5a7c380" Platform="Linux" />
<HelixAvailableTargetQueue Include="Redhat.7.Amd64.Open" Platform="Linux" /> <HelixAvailableTargetQueue Include="Redhat.7.Amd64.Open" Platform="Linux" />
<HelixAvailableTargetQueue Include="Ubuntu.2004.Amd64.Open" Platform="Linux" /> <HelixAvailableTargetQueue Include="Ubuntu.2004.Amd64.Open" Platform="Linux" />
<HelixAvailableTargetQueue Include="Ubuntu.1804.Amd64.Open" Platform="Linux" /> <HelixAvailableTargetQueue Include="Ubuntu.1804.Amd64.Open" Platform="Linux" />
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
<!-- Containers --> <!-- Containers -->
<HelixAvailableTargetQueue Include="(Fedora.34.Amd64.Open)ubuntu.1804.amd64.open@mcr.microsoft.com/dotnet-buildtools/prereqs:fedora-34-helix-20210728124700-4f64125" Platform="Linux" /> <HelixAvailableTargetQueue Include="(Fedora.34.Amd64.Open)ubuntu.1804.amd64.open@mcr.microsoft.com/dotnet-buildtools/prereqs:fedora-34-helix-20210728124700-4f64125" Platform="Linux" />
<HelixAvailableTargetQueue Include="(Alpine.312.Amd64.Open)Ubuntu.1804.Amd64.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:alpine-3.12-helix-20200908125345-56c6673" Platform="Linux" /> <HelixAvailableTargetQueue Include="(Alpine.314.Amd64.Open)Ubuntu.1804.Amd64.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:alpine-3.14-20210910135833-8a6f4f3" Platform="Linux" />
<HelixAvailableTargetQueue Include="(Mariner)Ubuntu.1804.Amd64.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:cbl-mariner-1.0-helix-20210528192219-92bf620" Platform="Linux" /> <HelixAvailableTargetQueue Include="(Mariner)Ubuntu.1804.Amd64.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:cbl-mariner-1.0-helix-20210528192219-92bf620" Platform="Linux" />
</ItemGroup> </ItemGroup>
......
{ {
"sdk": { "sdk": {
"version": "6.0.100-rc.2.21470.55" "version": "6.0.100-rtm.21466.6"
}, },
"tools": { "tools": {
"dotnet": "6.0.100-rc.2.21470.55", "dotnet": "6.0.100-rtm.21466.6",
"runtimes": { "runtimes": {
"dotnet/x64": [ "dotnet/x64": [
"2.1.27", "2.1.27",
......
<?xml version="1.0" encoding="utf-8"?>
<Suppressions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<Suppression>
<DiagnosticId>CP1002</DiagnosticId>
<Target>System.ServiceModel.Internals.dll</Target>
</Suppression>
<Suppression>
<DiagnosticId>CP1002</DiagnosticId>
<Target>SMDiagnostics.dll</Target>
</Suppression>
</Suppressions>
\ No newline at end of file
文件被 .gitattributes 条目压制或文件的编码不受支持。
import { DotNet } from '@microsoft/dotnet-js-interop'; import { DotNet } from '@microsoft/dotnet-js-interop';
import { Blazor } from './GlobalExports'; import { Blazor } from './GlobalExports';
import { HubConnectionBuilder, HubConnection } from '@microsoft/signalr'; import { HubConnectionBuilder, HubConnection, HttpTransportType } from '@microsoft/signalr';
import { MessagePackHubProtocol } from '@microsoft/signalr-protocol-msgpack'; import { MessagePackHubProtocol } from '@microsoft/signalr-protocol-msgpack';
import { showErrorNotification } from './BootErrors'; import { showErrorNotification } from './BootErrors';
import { shouldAutoStart } from './BootCommon'; import { shouldAutoStart } from './BootCommon';
...@@ -147,6 +147,22 @@ async function initializeConnection(options: CircuitStartOptions, logger: Logger ...@@ -147,6 +147,22 @@ async function initializeConnection(options: CircuitStartOptions, logger: Logger
} else { } else {
showErrorNotification(); showErrorNotification();
} }
if (ex.innerErrors) {
if (ex.innerErrors.some(e => e.errorType === 'UnsupportedTransportError' && e.transport === HttpTransportType.WebSockets)) {
logger.log(LogLevel.Error, 'Unable to connect, please ensure you are using an updated browser that supports WebSockets.');
} else if (ex.innerErrors.some(e => e.errorType === 'FailedToStartTransportError' && e.transport === HttpTransportType.WebSockets)) {
logger.log(LogLevel.Error, 'Unable to connect, please ensure WebSockets are available. A VPN or proxy may be blocking the connection.');
} else if (ex.innerErrors.some(e => e.errorType === 'DisabledTransportError' && e.transport === HttpTransportType.LongPolling)) {
logger.log(LogLevel.Error, 'Unable to initiate a SignalR connection to the server. This might be because the server is not configured to support WebSockets. For additional details, visit https://aka.ms/blazor-server-websockets-error.');
}
}
}
// Check if the connection is established using the long polling transport,
// using the `features.inherentKeepAlive` property only present with long polling.
if ((connection as any).connection?.features?.inherentKeepAlive) {
logger.log(LogLevel.Warning, 'Failed to connect via WebSockets, using the Long Polling fallback transport. This may be due to a VPN or proxy blocking the connection. To troubleshoot this, visit https://aka.ms/blazor-server-using-fallback-long-polling.');
} }
DotNet.attachDispatcher({ DotNet.attachDispatcher({
......
...@@ -37,10 +37,26 @@ export class DefaultReconnectDisplay implements ReconnectDisplay { ...@@ -37,10 +37,26 @@ export class DefaultReconnectDisplay implements ReconnectDisplay {
]; ];
this.modal.style.cssText = modalStyles.join(';'); this.modal.style.cssText = modalStyles.join(';');
this.modal.innerHTML = '<h5 style="margin-top: 20px"></h5><button style="margin:5px auto 5px">Retry</button><p>Alternatively, <a href>reload</a></p>';
this.message = this.modal.querySelector('h5')!; this.message = this.document.createElement('h5') as HTMLHeadingElement;
this.button = this.modal.querySelector('button')!; this.message.style.cssText = 'margin-top: 20px';
this.reloadParagraph = this.modal.querySelector('p')!;
this.button = this.document.createElement('button') as HTMLButtonElement;
this.button.style.cssText = 'margin:5px auto 5px';
this.button.textContent = 'Retry';
const link = this.document.createElement('a');
link.addEventListener('click', () => location.reload());
link.textContent = 'reload';
this.reloadParagraph = this.document.createElement('p') as HTMLParagraphElement;
this.reloadParagraph.textContent = 'Alternatively, ';
this.reloadParagraph.appendChild(link);
this.modal.appendChild(this.message);
this.modal.appendChild(this.button);
this.modal.appendChild(this.reloadParagraph);
this.loader = this.getLoader(); this.loader = this.getLoader();
this.message.after(this.loader); this.message.after(this.loader);
...@@ -63,7 +79,6 @@ export class DefaultReconnectDisplay implements ReconnectDisplay { ...@@ -63,7 +79,6 @@ export class DefaultReconnectDisplay implements ReconnectDisplay {
this.failed(); this.failed();
} }
}); });
this.reloadParagraph.querySelector('a')!.addEventListener('click', () => location.reload());
} }
show(): void { show(): void {
...@@ -98,16 +113,34 @@ export class DefaultReconnectDisplay implements ReconnectDisplay { ...@@ -98,16 +113,34 @@ export class DefaultReconnectDisplay implements ReconnectDisplay {
this.button.style.display = 'block'; this.button.style.display = 'block';
this.reloadParagraph.style.display = 'none'; this.reloadParagraph.style.display = 'none';
this.loader.style.display = 'none'; this.loader.style.display = 'none';
this.message.innerHTML = 'Reconnection failed. Try <a href>reloading</a> the page if you\'re unable to reconnect.';
this.message.querySelector('a')!.addEventListener('click', () => location.reload()); const errorDescription = this.document.createTextNode('Reconnection failed. Try ');
const link = this.document.createElement('a');
link.textContent = 'reloading';
link.setAttribute('href', '');
link.addEventListener('click', () => location.reload());
const errorInstructions = this.document.createTextNode(' the page if you\'re unable to reconnect.');
this.message.replaceChildren(errorDescription, link, errorInstructions);
} }
rejected(): void { rejected(): void {
this.button.style.display = 'none'; this.button.style.display = 'none';
this.reloadParagraph.style.display = 'none'; this.reloadParagraph.style.display = 'none';
this.loader.style.display = 'none'; this.loader.style.display = 'none';
this.message.innerHTML = 'Could not reconnect to the server. <a href>Reload</a> the page to restore functionality.';
this.message.querySelector('a')!.addEventListener('click', () => location.reload()); const errorDescription = this.document.createTextNode('Could not reconnect to the server. ');
const link = this.document.createElement('a');
link.textContent = 'Reload';
link.setAttribute('href', '');
link.addEventListener('click', () => location.reload());
const errorInstructions = this.document.createTextNode(' the page to restore functionality.');
this.message.replaceChildren(errorDescription, link, errorInstructions);
} }
private getLoader(): HTMLDivElement { private getLoader(): HTMLDivElement {
......
...@@ -209,6 +209,8 @@ function addGlobalModuleScriptTagsToDocument(callback: () => void) { ...@@ -209,6 +209,8 @@ function addGlobalModuleScriptTagsToDocument(callback: () => void) {
// The callback is put in the global scope so that it can be run after the script is loaded. // The callback is put in the global scope so that it can be run after the script is loaded.
// onload cannot be used in this case for non-file scripts. // onload cannot be used in this case for non-file scripts.
window['__wasmmodulecallback__'] = callback; window['__wasmmodulecallback__'] = callback;
// Note: Any updates to the following script will require updating the inline script hash if using CSP
scriptElem.text = 'var Module; window.__wasmmodulecallback__(); delete window.__wasmmodulecallback__;'; scriptElem.text = 'var Module; window.__wasmmodulecallback__(); delete window.__wasmmodulecallback__;';
document.body.appendChild(scriptElem); document.body.appendChild(scriptElem);
......
...@@ -76,7 +76,7 @@ describe('DefaultReconnectDisplay', () => { ...@@ -76,7 +76,7 @@ describe('DefaultReconnectDisplay', () => {
expect(display.loader.style.display).toBe('none'); expect(display.loader.style.display).toBe('none');
}); });
it('update message with current attempt', () => { it('update message with current attempt', () => {
const maxRetires = 6; const maxRetires = 6;
const display = new DefaultReconnectDisplay('test-dialog-id', maxRetires, testDocument, NullLogger.instance); const display = new DefaultReconnectDisplay('test-dialog-id', maxRetires, testDocument, NullLogger.instance);
......
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
using System.Linq;
using System.Threading;
using BasicTestApp;
using BasicTestApp.Reconnection;
using Microsoft.AspNetCore.Components.E2ETest.Infrastructure;
using Microsoft.AspNetCore.Components.E2ETest.Infrastructure.ServerFixtures;
using Microsoft.AspNetCore.E2ETesting;
using OpenQA.Selenium;
using TestServer;
using Xunit;
using Xunit.Abstractions;
namespace Microsoft.AspNetCore.Components.E2ETest.ServerExecutionTests
{
public class ServerTransportsTest : ServerTestBase<BasicTestAppServerSiteFixture<TransportsServerStartup>>
{
public ServerTransportsTest(
BrowserFixture browserFixture,
BasicTestAppServerSiteFixture<TransportsServerStartup> serverFixture,
ITestOutputHelper output)
: base(browserFixture, serverFixture, output)
{
}
[Fact]
public void DefaultTransportsWorks_WithWebSockets()
{
Navigate("/defaultTransport/Transports");
Browser.Exists(By.Id("startBlazorServerBtn")).Click();
var javascript = (IJavaScriptExecutor)Browser;
Browser.True(() => (bool)javascript.ExecuteScript("return window['__aspnetcore__testing__blazor__start__script__executed__'] === true;"));
AssertLogContainsMessages(
"Starting up Blazor server-side application.",
"WebSocket connected to ws://",
"Received render batch with",
"The HttpConnection connected successfully.",
"Blazor server-side application started.");
AssertGlobalErrorState(hasGlobalError: false);
}
[Fact]
public void ErrorIfClientAttemptsLongPolling_WithServerOnWebSockets()
{
Navigate("/webSockets/Transports");
Browser.Exists(By.Id("startWithLongPollingBtn")).Click();
var javascript = (IJavaScriptExecutor)Browser;
Browser.True(() => (bool)javascript.ExecuteScript("return window['__aspnetcore__testing__blazor__start__script__executed__'] === true;"));
AssertLogContainsMessages(
"Information: Starting up Blazor server-side application.",
"Skipping transport 'WebSockets' because it was disabled by the client",
"Failed to start the connection: Error: Unable to connect to the server with any of the available transports.",
"Failed to start the circuit.");
AssertGlobalErrorState(hasGlobalError: true);
}
[Fact]
public void WebSocketsConnectionIsRejected_FallbackToLongPolling()
{
Navigate("/defaultTransport/Transports");
Browser.Exists(By.Id("startAndRejectWebSocketConnectionBtn")).Click();
var javascript = (IJavaScriptExecutor)Browser;
Browser.True(() => (bool)javascript.ExecuteScript("return window['__aspnetcore__testing__blazor__start__script__executed__'] === true;"));
AssertLogContainsMessages(
"Information: Starting up Blazor server-side application.",
"Selecting transport 'LongPolling'",
"Failed to connect via WebSockets, using the Long Polling fallback transport. This may be due to a VPN or proxy blocking the connection. To troubleshoot this, visit",
"Blazor server-side application started.");
AssertGlobalErrorState(hasGlobalError: false);
}
[Fact]
public void ErrorIfWebSocketsConnectionIsRejected_WithServerOnWebSockets()
{
Navigate("/webSockets/Transports");
Browser.Exists(By.Id("startAndRejectWebSocketConnectionBtn")).Click();
var javascript = (IJavaScriptExecutor)Browser;
Browser.True(() => (bool)javascript.ExecuteScript("return window['__aspnetcore__testing__blazor__start__script__executed__'] === true;"));
AssertLogContainsMessages(
"Information: Starting up Blazor server-side application.",
"Selecting transport 'WebSockets'.",
"Error: Failed to start the transport 'WebSockets': Error: Don't allow Websockets.",
"Error: Failed to start the connection: Error: Unable to connect to the server with any of the available transports. Error: WebSockets failed: Error: Don't allow Websockets.",
"Failed to start the circuit.");
AssertGlobalErrorState(hasGlobalError: true);
}
[Fact]
public void ServerOnlySupportsLongPolling_FallbackToLongPolling()
{
Navigate("/longPolling/Transports");
Browser.Exists(By.Id("startBlazorServerBtn")).Click();
var javascript = (IJavaScriptExecutor)Browser;
Browser.True(() => (bool)javascript.ExecuteScript("return window['__aspnetcore__testing__blazor__start__script__executed__'] === true;"));
AssertLogContainsMessages(
"Starting up Blazor server-side application.",
"Selecting transport 'LongPolling'.",
"Failed to connect via WebSockets, using the Long Polling fallback transport. This may be due to a VPN or proxy blocking the connection. To troubleshoot this, visit",
"Blazor server-side application started.");
AssertGlobalErrorState(hasGlobalError: false);
}
[Fact]
public void ErrorIfClientDisablesLongPolling_WithServerOnLongPolling()
{
Navigate("/longPolling/Transports");
Browser.Exists(By.Id("startWithWebSocketsBtn")).Click();
var javascript = (IJavaScriptExecutor)Browser;
Browser.True(() => (bool)javascript.ExecuteScript("return window['__aspnetcore__testing__blazor__start__script__executed__'] === true;"));
AssertLogContainsMessages(
"Starting up Blazor server-side application.",
"Unable to connect to the server with any of the available transports. LongPolling failed: Error: 'LongPolling' is disabled by the client.",
"Unable to initiate a SignalR connection to the server. This might be because the server is not configured to support WebSockets. For additional details, visit");
AssertGlobalErrorState(hasGlobalError: true);
}
void AssertLogContainsMessages(params string[] messages)
{
var log = Browser.Manage().Logs.GetLog(LogType.Browser);
foreach (var message in messages)
{
Assert.Contains(log, entry =>
{
return entry.Message.Contains(message, StringComparison.InvariantCulture);
});
}
}
void AssertGlobalErrorState(bool hasGlobalError)
{
var globalErrorUi = Browser.Exists(By.Id("blazor-error-ui"));
Browser.Equal(hasGlobalError ? "block" : "none", () => globalErrorUi.GetCssValue("display"));
}
}
}
@page
@addTagHelper "*, Microsoft.AspNetCore.Mvc.TagHelpers"
<!DOCTYPE html>
<html>
<head>
<title>Transports Tests</title>
<base href="~/" />
<link href="style.css" rel="stylesheet" />
</head>
<body>
<root><component type="typeof(BasicTestApp.Index)" render-mode="Server" /></root>
<div id="blazor-error-ui">
An unhandled exception has occurred. See browser dev tools for details.
<a href="" class="reload">Reload</a>
<a class="dismiss">🗙</a>
</div>
<button id="startBlazorServerBtn" onclick="startBlazorServer()">Start Normally</button>
<button id="startWithLongPollingBtn" onclick="startWithLongPolling()">Start with Long Polling</button>
<button id="startWithWebSocketsBtn" onclick="startWithWebSockets()">Start with Web Sockets</button>
<button id="startAndRejectWebSocketConnectionBtn" onclick="startAndRejectWebSocketConnection()">Start with WebSockets and Reject Connection</button>
<script src="_framework/blazor.server.js" autostart="false"></script>
<script src="js/jsRootComponentInitializers.js"></script>
<script>
console.log('Blazor server-side');
function startBlazorServer() {
Blazor.start({
logLevel: 1, // LogLevel.Debug
configureSignalR: builder => {
builder.configureLogging("debug") // LogLevel.Debug
}
}).then(function () {
window['__aspnetcore__testing__blazor__start__script__executed__'] = true;
});
}
function startWithLongPolling() {
Blazor.start({
logLevel: 1, // LogLevel.Debug
configureSignalR: builder => {
builder.configureLogging("debug") // LogLevel.Debug
.withUrl('_blazor', 4) // Long Polling (4)
}
}).then(function () {
window['__aspnetcore__testing__blazor__start__script__executed__'] = true;
});
}
function startWithWebSockets() {
Blazor.start({
logLevel: 1, // LogLevel.Debug
configureSignalR: builder => {
builder.configureLogging("debug") // LogLevel.Debug
.withUrl('_blazor', 1) // Web Sockets (1)
}
}).then(function () {
window['__aspnetcore__testing__blazor__start__script__executed__'] = true;
});
}
function WebSocketNotAllowed() { throw new Error("Don't allow Websockets."); }
function startAndRejectWebSocketConnection() {
Blazor.start({
logLevel: 1, // LogLevel.Debug
configureSignalR: builder => {
builder.configureLogging("debug") // LogLevel.Debug
.withUrl('_blazor', {
WebSocket: WebSocketNotAllowed
})
}
}).then(function () {
window['__aspnetcore__testing__blazor__start__script__executed__'] = true;
});
}
</script>
</body>
</html>
...@@ -42,7 +42,7 @@ namespace TestServer ...@@ -42,7 +42,7 @@ namespace TestServer
} }
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline. // This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
public void Configure(IApplicationBuilder app, IWebHostEnvironment env, ResourceRequestLog resourceRequestLog) public virtual void Configure(IApplicationBuilder app, IWebHostEnvironment env, ResourceRequestLog resourceRequestLog)
{ {
var enUs = new CultureInfo("en-US"); var enUs = new CultureInfo("en-US");
CultureInfo.DefaultThreadCurrentCulture = enUs; CultureInfo.DefaultThreadCurrentCulture = enUs;
......
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
using System;
using System.Globalization;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.DataProtection;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
namespace TestServer
{
public class TransportsServerStartup : ServerStartup
{
public TransportsServerStartup(IConfiguration configuration)
: base (configuration)
{
}
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
public override void Configure(IApplicationBuilder app, IWebHostEnvironment env, ResourceRequestLog resourceRequestLog)
{
if (env.IsDevelopment())
{
app.UseDeveloperExceptionPage();
}
app.Map("/defaultTransport", app =>
{
app.UseStaticFiles();
app.UseRouting();
app.UseEndpoints(endpoints =>
{
endpoints.MapBlazorHub();
endpoints.MapFallbackToPage("/_ServerHost");
});
});
app.Map("/longPolling", app =>
{
app.UseStaticFiles();
app.UseRouting();
app.UseEndpoints(endpoints =>
{
endpoints.MapBlazorHub(configureOptions: options =>
{
options.Transports = Microsoft.AspNetCore.Http.Connections.HttpTransportType.LongPolling;
});
endpoints.MapFallbackToPage("/_ServerHost");
});
});
app.Map("/webSockets", app =>
{
app.UseStaticFiles();
app.UseRouting();
app.UseEndpoints(endpoints =>
{
endpoints.MapBlazorHub(configureOptions: options =>
{
options.Transports = Microsoft.AspNetCore.Http.Connections.HttpTransportType.WebSockets;
});
endpoints.MapFallbackToPage("/_ServerHost");
});
});
}
}
}
<?xml version="1.0" encoding="utf-8"?>
<Suppressions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<Suppression>
<DiagnosticId>CP1002</DiagnosticId>
<Target>System.ServiceModel.Internals.dll</Target>
</Suppression>
<Suppression>
<DiagnosticId>CP1002</DiagnosticId>
<Target>SMDiagnostics.dll</Target>
</Suppression>
</Suppressions>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<Suppressions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<Suppression>
<DiagnosticId>CP1002</DiagnosticId>
<Target>System.ServiceModel.Internals.dll</Target>
</Suppression>
<Suppression>
<DiagnosticId>CP1002</DiagnosticId>
<Target>SMDiagnostics.dll</Target>
</Suppression>
</Suppressions>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<Suppressions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<Suppression>
<DiagnosticId>CP1002</DiagnosticId>
<Target>System.ServiceModel.Internals.dll</Target>
</Suppression>
<Suppression>
<DiagnosticId>CP1002</DiagnosticId>
<Target>SMDiagnostics.dll</Target>
</Suppression>
</Suppressions>
\ No newline at end of file
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册