diff --git a/.azure/pipelines/ci-public.yml b/.azure/pipelines/ci-public.yml index 9cf3966b11af..fe63e4632596 100644 --- a/.azure/pipelines/ci-public.yml +++ b/.azure/pipelines/ci-public.yml @@ -322,164 +322,169 @@ stages: inputName: Linux_x64 # Build Linux ARM - - template: jobs/default-build.yml - parameters: - jobName: Linux_arm_build - jobDisplayName: "Build: Linux ARM" - agentOs: Linux - buildArgs: - --arch arm - --pack - --all - --no-build-java - --publish - -p:OnlyPackPlatformSpecificPackages=true - -p:AssetManifestFileName=aspnetcore-Linux_arm.xml - $(_BuildArgs) - $(_PublishArgs) - $(_InternalRuntimeDownloadArgs) - artifacts: - - name: Linux_arm_Logs_Attempt_$(System.JobAttempt) - path: artifacts/log/ - publishOnError: true - includeForks: true - - name: Linux_arm_Packages - path: artifacts/packages/ - - - ${{ if ne(variables.PostBuildSign, 'true') }}: - - template: jobs/codesign-xplat.yml + - ${{ if notin(variables['Build.Reason'], 'PullRequest') }}: + - template: jobs/default-build.yml parameters: - inputName: Linux_arm + jobName: Linux_arm_build + jobDisplayName: "Build: Linux ARM" + agentOs: Linux + buildArgs: + --arch arm + --pack + --all + --no-build-java + --publish + -p:OnlyPackPlatformSpecificPackages=true + -p:AssetManifestFileName=aspnetcore-Linux_arm.xml + $(_BuildArgs) + $(_PublishArgs) + $(_InternalRuntimeDownloadArgs) + artifacts: + - name: Linux_arm_Logs_Attempt_$(System.JobAttempt) + path: artifacts/log/ + publishOnError: true + includeForks: true + - name: Linux_arm_Packages + path: artifacts/packages/ - # Build Linux ARM64 - - template: jobs/default-build.yml - parameters: - jobName: Linux_arm64_build - jobDisplayName: "Build: Linux ARM64" - agentOs: Linux - steps: - - script: ./eng/build.sh - --ci - --arch arm64 - --pack - --build-installers - --all - --no-build-java - -p:OnlyPackPlatformSpecificPackages=true - $(_BuildArgs) - $(_InternalRuntimeDownloadArgs) - displayName: Run build.sh - artifacts: - - name: Linux_arm64_Logs_Attempt_$(System.JobAttempt) - path: artifacts/log/ - publishOnError: true - includeForks: true - - name: Linux_arm64_Packages - path: artifacts/packages/ + - ${{ if ne(variables.PostBuildSign, 'true') }}: + - template: jobs/codesign-xplat.yml + parameters: + inputName: Linux_arm - - ${{ if ne(variables.PostBuildSign, 'true') }}: - - template: jobs/codesign-xplat.yml + # Build Linux ARM64 + - ${{ if notin(variables['Build.Reason'], 'PullRequest') }}: + - template: jobs/default-build.yml parameters: - inputName: Linux_arm64 + jobName: Linux_arm64_build + jobDisplayName: "Build: Linux ARM64" + agentOs: Linux + steps: + - script: ./eng/build.sh + --ci + --arch arm64 + --pack + --build-installers + --all + --no-build-java + -p:OnlyPackPlatformSpecificPackages=true + $(_BuildArgs) + $(_InternalRuntimeDownloadArgs) + displayName: Run build.sh + artifacts: + - name: Linux_arm64_Logs_Attempt_$(System.JobAttempt) + path: artifacts/log/ + publishOnError: true + includeForks: true + - name: Linux_arm64_Packages + path: artifacts/packages/ - # Build Linux Musl x64 - - template: jobs/default-build.yml - parameters: - jobName: Linux_musl_x64_build - jobDisplayName: "Build: Linux Musl x64" - agentOs: Linux - container: mcr.microsoft.com/dotnet-buildtools/prereqs:azurelinux-3.0-net10.0-build-amd64 - buildArgs: - --arch x64 - --os-name linux-musl - --pack - --all - --no-build-java - --publish - -p:OnlyPackPlatformSpecificPackages=true - -p:AssetManifestFileName=aspnetcore-Linux_musl_x64.xml - $(_BuildArgs) - $(_PublishArgs) - $(_InternalRuntimeDownloadArgs) - disableComponentGovernance: true - artifacts: - - name: Linux_musl_x64_Logs_Attempt_$(System.JobAttempt) - path: artifacts/log/ - publishOnError: true - includeForks: true - - name: Linux_musl_x64_Packages - path: artifacts/packages/ + - ${{ if ne(variables.PostBuildSign, 'true') }}: + - template: jobs/codesign-xplat.yml + parameters: + inputName: Linux_arm64 - - ${{ if ne(variables.PostBuildSign, 'true') }}: - - template: jobs/codesign-xplat.yml + # Build Linux Musl x64 + - ${{ if notin(variables['Build.Reason'], 'PullRequest') }}: + - template: jobs/default-build.yml parameters: - inputName: Linux_musl_x64 + jobName: Linux_musl_x64_build + jobDisplayName: "Build: Linux Musl x64" + agentOs: Linux + container: mcr.microsoft.com/dotnet-buildtools/prereqs:azurelinux-3.0-net10.0-build-amd64 + buildArgs: + --arch x64 + --os-name linux-musl + --pack + --all + --no-build-java + --publish + -p:OnlyPackPlatformSpecificPackages=true + -p:AssetManifestFileName=aspnetcore-Linux_musl_x64.xml + $(_BuildArgs) + $(_PublishArgs) + $(_InternalRuntimeDownloadArgs) + disableComponentGovernance: true + artifacts: + - name: Linux_musl_x64_Logs_Attempt_$(System.JobAttempt) + path: artifacts/log/ + publishOnError: true + includeForks: true + - name: Linux_musl_x64_Packages + path: artifacts/packages/ - # Build Linux Musl ARM - - template: jobs/default-build.yml - parameters: - jobName: Linux_musl_arm_build - jobDisplayName: "Build: Linux Musl ARM" - agentOs: Linux - useHostedUbuntu: false - container: mcr.microsoft.com/dotnet-buildtools/prereqs:azurelinux-3.0-net10.0-build-amd64 - buildArgs: - --arch arm - --os-name linux-musl - --pack - --all - --no-build-java - --publish - -p:OnlyPackPlatformSpecificPackages=true - -p:AssetManifestFileName=aspnetcore-Linux_musl_arm.xml - $(_BuildArgs) - $(_PublishArgs) - $(_InternalRuntimeDownloadArgs) - artifacts: - - name: Linux_musl_arm_Logs_Attempt_$(System.JobAttempt) - path: artifacts/log/ - publishOnError: true - includeForks: true - - name: Linux_musl_arm_Packages - path: artifacts/packages/ + - ${{ if ne(variables.PostBuildSign, 'true') }}: + - template: jobs/codesign-xplat.yml + parameters: + inputName: Linux_musl_x64 - - ${{ if ne(variables.PostBuildSign, 'true') }}: - - template: jobs/codesign-xplat.yml + # Build Linux Musl ARM + - ${{ if notin(variables['Build.Reason'], 'PullRequest') }}: + - template: jobs/default-build.yml parameters: - inputName: Linux_musl_arm + jobName: Linux_musl_arm_build + jobDisplayName: "Build: Linux Musl ARM" + agentOs: Linux + useHostedUbuntu: false + container: mcr.microsoft.com/dotnet-buildtools/prereqs:azurelinux-3.0-net10.0-build-amd64 + buildArgs: + --arch arm + --os-name linux-musl + --pack + --all + --no-build-java + --publish + -p:OnlyPackPlatformSpecificPackages=true + -p:AssetManifestFileName=aspnetcore-Linux_musl_arm.xml + $(_BuildArgs) + $(_PublishArgs) + $(_InternalRuntimeDownloadArgs) + artifacts: + - name: Linux_musl_arm_Logs_Attempt_$(System.JobAttempt) + path: artifacts/log/ + publishOnError: true + includeForks: true + - name: Linux_musl_arm_Packages + path: artifacts/packages/ - # Build Linux Musl ARM64 - - template: jobs/default-build.yml - parameters: - jobName: Linux_musl_arm64_build - jobDisplayName: "Build: Linux Musl ARM64" - agentOs: Linux - useHostedUbuntu: false - container: mcr.microsoft.com/dotnet-buildtools/prereqs:azurelinux-3.0-net10.0-build-amd64 - buildArgs: - --arch arm64 - --os-name linux-musl - --pack - --all - --no-build-java - --publish - -p:OnlyPackPlatformSpecificPackages=true - -p:AssetManifestFileName=aspnetcore-Linux_musl_arm64.xml - $(_BuildArgs) - $(_PublishArgs) - $(_InternalRuntimeDownloadArgs) - artifacts: - - name: Linux_musl_arm64_Logs_Attempt_$(System.JobAttempt) - path: artifacts/log/ - publishOnError: true - includeForks: true - - name: Linux_musl_arm64_Packages - path: artifacts/packages/ + - ${{ if ne(variables.PostBuildSign, 'true') }}: + - template: jobs/codesign-xplat.yml + parameters: + inputName: Linux_musl_arm - - ${{ if ne(variables.PostBuildSign, 'true') }}: - - template: jobs/codesign-xplat.yml + # Build Linux Musl ARM64 + - ${{ if notin(variables['Build.Reason'], 'PullRequest') }}: + - template: jobs/default-build.yml parameters: - inputName: Linux_musl_arm64 + jobName: Linux_musl_arm64_build + jobDisplayName: "Build: Linux Musl ARM64" + agentOs: Linux + useHostedUbuntu: false + container: mcr.microsoft.com/dotnet-buildtools/prereqs:azurelinux-3.0-net10.0-build-amd64 + buildArgs: + --arch arm64 + --os-name linux-musl + --pack + --all + --no-build-java + --publish + -p:OnlyPackPlatformSpecificPackages=true + -p:AssetManifestFileName=aspnetcore-Linux_musl_arm64.xml + $(_BuildArgs) + $(_PublishArgs) + $(_InternalRuntimeDownloadArgs) + artifacts: + - name: Linux_musl_arm64_Logs_Attempt_$(System.JobAttempt) + path: artifacts/log/ + publishOnError: true + includeForks: true + - name: Linux_musl_arm64_Packages + path: artifacts/packages/ + + - ${{ if ne(variables.PostBuildSign, 'true') }}: + - template: jobs/codesign-xplat.yml + parameters: + inputName: Linux_musl_arm64 - ${{ if ne(parameters.skipTests, 'true') }}: # Test jobs diff --git a/.azure/pipelines/ci.yml b/.azure/pipelines/ci.yml index f0bb0cbf7aff..2b16817b6f79 100644 --- a/.azure/pipelines/ci.yml +++ b/.azure/pipelines/ci.yml @@ -355,164 +355,169 @@ extends: inputName: Linux_x64 # Build Linux ARM - - template: .azure/pipelines/jobs/default-build.yml@self - parameters: - jobName: Linux_arm_build - jobDisplayName: "Build: Linux ARM" - agentOs: Linux - buildArgs: - --arch arm - --pack - --all - --no-build-java - $(_ArcadePublishNonWindowsArg) - -p:OnlyPackPlatformSpecificPackages=true - -p:AssetManifestFileName=aspnetcore-Linux_arm.xml - $(_BuildArgs) - $(_PublishArgs) - $(_InternalRuntimeDownloadArgs) - artifacts: - - name: Linux_arm_Logs_Attempt_$(System.JobAttempt) - path: artifacts/log/ - publishOnError: true - includeForks: true - - name: Linux_arm_Packages - path: artifacts/packages/ - - - ${{ if ne(variables.PostBuildSign, 'true') }}: - - template: .azure/pipelines/jobs/codesign-xplat.yml@self + - ${{ if notin(variables['Build.Reason'], 'PullRequest') }}: + - template: .azure/pipelines/jobs/default-build.yml@self parameters: - inputName: Linux_arm + jobName: Linux_arm_build + jobDisplayName: "Build: Linux ARM" + agentOs: Linux + buildArgs: + --arch arm + --pack + --all + --no-build-java + $(_ArcadePublishNonWindowsArg) + -p:OnlyPackPlatformSpecificPackages=true + -p:AssetManifestFileName=aspnetcore-Linux_arm.xml + $(_BuildArgs) + $(_PublishArgs) + $(_InternalRuntimeDownloadArgs) + artifacts: + - name: Linux_arm_Logs_Attempt_$(System.JobAttempt) + path: artifacts/log/ + publishOnError: true + includeForks: true + - name: Linux_arm_Packages + path: artifacts/packages/ - # Build Linux ARM64 - - template: .azure/pipelines/jobs/default-build.yml@self - parameters: - jobName: Linux_arm64_build - jobDisplayName: "Build: Linux ARM64" - agentOs: Linux - buildArgs: - --arch arm64 - --pack - --all - --build-installers - --no-build-java - $(_ArcadePublishNonWindowsArg) - -p:OnlyPackPlatformSpecificPackages=true - -p:AssetManifestFileName=aspnetcore-Linux_arm64.xml - $(_BuildArgs) - $(_PublishArgs) - $(_InternalRuntimeDownloadArgs) - artifacts: - - name: Linux_arm64_Logs_Attempt_$(System.JobAttempt) - path: artifacts/log/ - publishOnError: true - includeForks: true - - name: Linux_arm64_Packages - path: artifacts/packages/ + - ${{ if ne(variables.PostBuildSign, 'true') }}: + - template: .azure/pipelines/jobs/codesign-xplat.yml@self + parameters: + inputName: Linux_arm - - ${{ if ne(variables.PostBuildSign, 'true') }}: - - template: .azure/pipelines/jobs/codesign-xplat.yml@self + # Build Linux ARM64 + - ${{ if notin(variables['Build.Reason'], 'PullRequest') }}: + - template: .azure/pipelines/jobs/default-build.yml@self parameters: - inputName: Linux_arm64 + jobName: Linux_arm64_build + jobDisplayName: "Build: Linux ARM64" + agentOs: Linux + buildArgs: + --arch arm64 + --pack + --all + --build-installers + --no-build-java + $(_ArcadePublishNonWindowsArg) + -p:OnlyPackPlatformSpecificPackages=true + -p:AssetManifestFileName=aspnetcore-Linux_arm64.xml + $(_BuildArgs) + $(_PublishArgs) + $(_InternalRuntimeDownloadArgs) + artifacts: + - name: Linux_arm64_Logs_Attempt_$(System.JobAttempt) + path: artifacts/log/ + publishOnError: true + includeForks: true + - name: Linux_arm64_Packages + path: artifacts/packages/ - # Build Linux Musl x64 - - template: .azure/pipelines/jobs/default-build.yml@self - parameters: - jobName: Linux_musl_x64_build - jobDisplayName: "Build: Linux Musl x64" - agentOs: Linux - container: azureLinux30Net10BuildAmd64 - buildArgs: - --arch x64 - --os-name linux-musl - --pack - --all - --no-build-java - $(_ArcadePublishNonWindowsArg) - -p:OnlyPackPlatformSpecificPackages=true - -p:AssetManifestFileName=aspnetcore-Linux_musl_x64.xml - $(_BuildArgs) - $(_PublishArgs) - $(_InternalRuntimeDownloadArgs) - disableComponentGovernance: true - artifacts: - - name: Linux_musl_x64_Logs_Attempt_$(System.JobAttempt) - path: artifacts/log/ - publishOnError: true - includeForks: true - - name: Linux_musl_x64_Packages - path: artifacts/packages/ + - ${{ if ne(variables.PostBuildSign, 'true') }}: + - template: .azure/pipelines/jobs/codesign-xplat.yml@self + parameters: + inputName: Linux_arm64 - - ${{ if ne(variables.PostBuildSign, 'true') }}: - - template: .azure/pipelines/jobs/codesign-xplat.yml@self + # Build Linux Musl x64 + - ${{ if notin(variables['Build.Reason'], 'PullRequest') }}: + - template: .azure/pipelines/jobs/default-build.yml@self parameters: - inputName: Linux_musl_x64 + jobName: Linux_musl_x64_build + jobDisplayName: "Build: Linux Musl x64" + agentOs: Linux + container: azureLinux30Net10BuildAmd64 + buildArgs: + --arch x64 + --os-name linux-musl + --pack + --all + --no-build-java + $(_ArcadePublishNonWindowsArg) + -p:OnlyPackPlatformSpecificPackages=true + -p:AssetManifestFileName=aspnetcore-Linux_musl_x64.xml + $(_BuildArgs) + $(_PublishArgs) + $(_InternalRuntimeDownloadArgs) + disableComponentGovernance: true + artifacts: + - name: Linux_musl_x64_Logs_Attempt_$(System.JobAttempt) + path: artifacts/log/ + publishOnError: true + includeForks: true + - name: Linux_musl_x64_Packages + path: artifacts/packages/ - # Build Linux Musl ARM - - template: .azure/pipelines/jobs/default-build.yml@self - parameters: - jobName: Linux_musl_arm_build - jobDisplayName: "Build: Linux Musl ARM" - agentOs: Linux - useHostedUbuntu: false - container: azureLinux30Net10BuildAmd64 - buildArgs: - --arch arm - --os-name linux-musl - --pack - --all - --no-build-java - $(_ArcadePublishNonWindowsArg) - -p:OnlyPackPlatformSpecificPackages=true - -p:AssetManifestFileName=aspnetcore-Linux_musl_arm.xml - $(_BuildArgs) - $(_PublishArgs) - $(_InternalRuntimeDownloadArgs) - artifacts: - - name: Linux_musl_arm_Logs_Attempt_$(System.JobAttempt) - path: artifacts/log/ - publishOnError: true - includeForks: true - - name: Linux_musl_arm_Packages - path: artifacts/packages/ + - ${{ if ne(variables.PostBuildSign, 'true') }}: + - template: .azure/pipelines/jobs/codesign-xplat.yml@self + parameters: + inputName: Linux_musl_x64 - - ${{ if ne(variables.PostBuildSign, 'true') }}: - - template: .azure/pipelines/jobs/codesign-xplat.yml@self + # Build Linux Musl ARM + - ${{ if notin(variables['Build.Reason'], 'PullRequest') }}: + - template: .azure/pipelines/jobs/default-build.yml@self parameters: - inputName: Linux_musl_arm + jobName: Linux_musl_arm_build + jobDisplayName: "Build: Linux Musl ARM" + agentOs: Linux + useHostedUbuntu: false + container: azureLinux30Net10BuildAmd64 + buildArgs: + --arch arm + --os-name linux-musl + --pack + --all + --no-build-java + $(_ArcadePublishNonWindowsArg) + -p:OnlyPackPlatformSpecificPackages=true + -p:AssetManifestFileName=aspnetcore-Linux_musl_arm.xml + $(_BuildArgs) + $(_PublishArgs) + $(_InternalRuntimeDownloadArgs) + artifacts: + - name: Linux_musl_arm_Logs_Attempt_$(System.JobAttempt) + path: artifacts/log/ + publishOnError: true + includeForks: true + - name: Linux_musl_arm_Packages + path: artifacts/packages/ - # Build Linux Musl ARM64 - - template: .azure/pipelines/jobs/default-build.yml@self - parameters: - jobName: Linux_musl_arm64_build - jobDisplayName: "Build: Linux Musl ARM64" - agentOs: Linux - useHostedUbuntu: false - container: azureLinux30Net10BuildAmd64 - buildArgs: - --arch arm64 - --os-name linux-musl - --pack - --all - --no-build-java - $(_ArcadePublishNonWindowsArg) - -p:OnlyPackPlatformSpecificPackages=true - -p:AssetManifestFileName=aspnetcore-Linux_musl_arm64.xml - $(_BuildArgs) - $(_PublishArgs) - $(_InternalRuntimeDownloadArgs) - artifacts: - - name: Linux_musl_arm64_Logs_Attempt_$(System.JobAttempt) - path: artifacts/log/ - publishOnError: true - includeForks: true - - name: Linux_musl_arm64_Packages - path: artifacts/packages/ + - ${{ if ne(variables.PostBuildSign, 'true') }}: + - template: .azure/pipelines/jobs/codesign-xplat.yml@self + parameters: + inputName: Linux_musl_arm - - ${{ if ne(variables.PostBuildSign, 'true') }}: - - template: .azure/pipelines/jobs/codesign-xplat.yml@self + # Build Linux Musl ARM64 + - ${{ if notin(variables['Build.Reason'], 'PullRequest') }}: + - template: .azure/pipelines/jobs/default-build.yml@self parameters: - inputName: Linux_musl_arm64 + jobName: Linux_musl_arm64_build + jobDisplayName: "Build: Linux Musl ARM64" + agentOs: Linux + useHostedUbuntu: false + container: azureLinux30Net10BuildAmd64 + buildArgs: + --arch arm64 + --os-name linux-musl + --pack + --all + --no-build-java + $(_ArcadePublishNonWindowsArg) + -p:OnlyPackPlatformSpecificPackages=true + -p:AssetManifestFileName=aspnetcore-Linux_musl_arm64.xml + $(_BuildArgs) + $(_PublishArgs) + $(_InternalRuntimeDownloadArgs) + artifacts: + - name: Linux_musl_arm64_Logs_Attempt_$(System.JobAttempt) + path: artifacts/log/ + publishOnError: true + includeForks: true + - name: Linux_musl_arm64_Packages + path: artifacts/packages/ + + - ${{ if ne(variables.PostBuildSign, 'true') }}: + - template: .azure/pipelines/jobs/codesign-xplat.yml@self + parameters: + inputName: Linux_musl_arm64 - template: .azure/pipelines/jobs/default-build.yml@self parameters: diff --git a/.github/workflows/backport.yml b/.github/workflows/backport.yml index ef4a57b80496..bc5f0575bccd 100644 --- a/.github/workflows/backport.yml +++ b/.github/workflows/backport.yml @@ -14,7 +14,7 @@ permissions: jobs: backport: - uses: dotnet/arcade/.github/workflows/backport-base.yml@1c09acb26525da819530dd2678a0b7f62c35cbfd # 2025-01-13 + uses: dotnet/arcade/.github/workflows/backport-base.yml@dd6311861abf91f883a5f6aa3b13ff095ed44179 # 2025-01-13 with: pr_description_template: | Backport of #%source_pr_number% to %target_branch% diff --git a/.github/workflows/copilot-setup-steps.yml b/.github/workflows/copilot-setup-steps.yml index 344f0e888262..3e8e567ec592 100644 --- a/.github/workflows/copilot-setup-steps.yml +++ b/.github/workflows/copilot-setup-steps.yml @@ -15,6 +15,8 @@ jobs: # If you do not check out your code, Copilot will do this for you. steps: - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v4.2.2 + with: + submodules: 'true' # Include PrepareForHelix to maximise what is downloaded here - name: Build solution diff --git a/.github/workflows/inter-branch-merge-flow.yml b/.github/workflows/inter-branch-merge-flow.yml index 078313f3113a..062499012a62 100644 --- a/.github/workflows/inter-branch-merge-flow.yml +++ b/.github/workflows/inter-branch-merge-flow.yml @@ -11,4 +11,4 @@ permissions: jobs: Merge: - uses: dotnet/arcade/.github/workflows/inter-branch-merge-base.yml@1c09acb26525da819530dd2678a0b7f62c35cbfd # 2024-06-24 + uses: dotnet/arcade/.github/workflows/inter-branch-merge-base.yml@dd6311861abf91f883a5f6aa3b13ff095ed44179 # 2024-06-24 diff --git a/README.md b/README.md index 1dbbd3a41207..6e918232f153 100644 --- a/README.md +++ b/README.md @@ -48,7 +48,7 @@ See [CODE-OF-CONDUCT](./CODE-OF-CONDUCT.md) ## Nightly builds -This table includes links to download the latest builds of the ASP.NET Core Shared Framework. Also included are links to download the Windows Hosting Bundle, which includes the ASP.NET Core Shared Framework, the .NET Runtime Shared Framework, and the IIS plugin (ASP.NET Core Module). You can download the latest .NET Runtime builds [here](https://github.com/dotnet/runtime/blob/main/docs/project/dogfooding.md#nightly-builds-table), and the latest .NET SDK builds [here](https://github.com/dotnet/installer#table). **If you're unsure what you need, then install the SDK; it has everything except the IIS plugin.** +This table includes links to download the latest builds of the ASP.NET Core Shared Framework. Also included are links to download the Windows Hosting Bundle, which includes the ASP.NET Core Shared Framework, the .NET Runtime Shared Framework, and the IIS plugin (ASP.NET Core Module). You can download the latest .NET Runtime builds [here](https://github.com/dotnet/runtime/blob/main/docs/project/dogfooding.md#nightly-builds-table), and the latest .NET SDK builds [here](https://github.com/dotnet/dotnet/blob/main/docs/builds-table.md). **If you're unsure what you need, then install the SDK; it has everything except the IIS plugin.** | Platform | Shared Framework (Installer) | Shared Framework (Binaries) | Hosting Bundle (Installer) | | :--------- | :----------: | :----------: | :----------: | diff --git a/eng/targets/ResolveReferences.targets b/eng/targets/ResolveReferences.targets index 5c7a68f44cc0..34f784ebae24 100644 --- a/eng/targets/ResolveReferences.targets +++ b/eng/targets/ResolveReferences.targets @@ -101,10 +101,12 @@ - - + + + '$(TargetFramework)' == '$(DefaultNetCoreTargetFramework)' and + '$(IsTestProject)' != 'true' and '$(IsTestAssetProject)' != 'true' and + '$(IsBenchmarkProject)' != 'true' and '$(IsSampleProject)' != 'true' and '$(IsMicrobenchmarksProject)' != 'true'" > <_ProjectReferenceWithOriginalIdentity Include="@(ProjectReference)" OriginalIdentity="%(Identity)" /> <_ProjectReferenceWithFilename Include="@(_ProjectReferenceWithOriginalIdentity->Metadata('Filename'))" /> diff --git a/eng/test-configuration.json b/eng/test-configuration.json index 9430296a7ed1..bb564eda340e 100644 --- a/eng/test-configuration.json +++ b/eng/test-configuration.json @@ -10,8 +10,6 @@ {"testName": {"contains": "CanLaunchPhotinoWebViewAndClickButton"}}, {"testName": {"contains": "CheckInvalidHostingModelParameter"}}, {"testName": {"contains": "CheckNewShimIsUsed"}}, // Issue: https://github.com/dotnet/aspnetcore/issues/57538 - {"testName": {"contains": "ComponentLifecycleMethodThrowsExceptionTerminatesTheCircuit"}}, // Issue: https://github.com/dotnet/aspnetcore/issues/57551 - {"testName": {"contains": "ComponentDisposeMethodThrowsExceptionTerminatesTheCircuit"}}, // Issue: https://github.com/dotnet/aspnetcore/issues/57551 {"testName": {"contains": "PhoneFactorFailsAfterSecurityStampChangeTest"}}, // Issue: https://github.com/dotnet/aspnetcore/issues/58231 {"testName": {"contains": "AbortSendsFinalGOAWAY"}}, // Issue: https://github.com/dotnet/aspnetcore/issues/59358 {"testName": {"contains": "Http2_RequestWithDataAndContentLength_Success"}}, // Issue: https://github.com/dotnet/aspnetcore/issues/63266 diff --git a/src/Analyzers/Analyzers/test/Microsoft.AspNetCore.Analyzers.Test.csproj b/src/Analyzers/Analyzers/test/Microsoft.AspNetCore.Analyzers.Test.csproj index 9290cc9741f5..4eed582778ee 100644 --- a/src/Analyzers/Analyzers/test/Microsoft.AspNetCore.Analyzers.Test.csproj +++ b/src/Analyzers/Analyzers/test/Microsoft.AspNetCore.Analyzers.Test.csproj @@ -17,6 +17,9 @@ --> + + + diff --git a/src/Antiforgery/test/Microsoft.AspNetCore.Antiforgery.Test.csproj b/src/Antiforgery/test/Microsoft.AspNetCore.Antiforgery.Test.csproj index a099c7a07ba8..c7996351c229 100644 --- a/src/Antiforgery/test/Microsoft.AspNetCore.Antiforgery.Test.csproj +++ b/src/Antiforgery/test/Microsoft.AspNetCore.Antiforgery.Test.csproj @@ -7,7 +7,10 @@ + + + diff --git a/src/Azure/AzureAppServices.HostingStartup/src/Microsoft.AspNetCore.AzureAppServices.HostingStartup.csproj b/src/Azure/AzureAppServices.HostingStartup/src/Microsoft.AspNetCore.AzureAppServices.HostingStartup.csproj index dbc464028962..6aa6057c14a4 100644 --- a/src/Azure/AzureAppServices.HostingStartup/src/Microsoft.AspNetCore.AzureAppServices.HostingStartup.csproj +++ b/src/Azure/AzureAppServices.HostingStartup/src/Microsoft.AspNetCore.AzureAppServices.HostingStartup.csproj @@ -12,6 +12,7 @@ + diff --git a/src/Azure/AzureAppServicesIntegration/src/Microsoft.AspNetCore.AzureAppServicesIntegration.csproj b/src/Azure/AzureAppServicesIntegration/src/Microsoft.AspNetCore.AzureAppServicesIntegration.csproj index a644cec712c6..41fe6ff58c88 100644 --- a/src/Azure/AzureAppServicesIntegration/src/Microsoft.AspNetCore.AzureAppServicesIntegration.csproj +++ b/src/Azure/AzureAppServicesIntegration/src/Microsoft.AspNetCore.AzureAppServicesIntegration.csproj @@ -11,6 +11,7 @@ + diff --git a/src/Azure/AzureAppServicesIntegration/test/Microsoft.AspNetCore.AzureAppServicesIntegration.Tests.csproj b/src/Azure/AzureAppServicesIntegration/test/Microsoft.AspNetCore.AzureAppServicesIntegration.Tests.csproj index 4307d4726052..74b67ab40614 100644 --- a/src/Azure/AzureAppServicesIntegration/test/Microsoft.AspNetCore.AzureAppServicesIntegration.Tests.csproj +++ b/src/Azure/AzureAppServicesIntegration/test/Microsoft.AspNetCore.AzureAppServicesIntegration.Tests.csproj @@ -5,8 +5,14 @@ + + + + + + diff --git a/src/Azure/samples/AzureAppServicesHostingStartupSample/AzureAppServicesHostingStartupSample.csproj b/src/Azure/samples/AzureAppServicesHostingStartupSample/AzureAppServicesHostingStartupSample.csproj index 81d6f1f4b572..6972c143f5de 100644 --- a/src/Azure/samples/AzureAppServicesHostingStartupSample/AzureAppServicesHostingStartupSample.csproj +++ b/src/Azure/samples/AzureAppServicesHostingStartupSample/AzureAppServicesHostingStartupSample.csproj @@ -7,6 +7,10 @@ + + + + diff --git a/src/Azure/samples/AzureAppServicesSample/AzureAppServicesSample.csproj b/src/Azure/samples/AzureAppServicesSample/AzureAppServicesSample.csproj index f83608da7977..088785d470a0 100644 --- a/src/Azure/samples/AzureAppServicesSample/AzureAppServicesSample.csproj +++ b/src/Azure/samples/AzureAppServicesSample/AzureAppServicesSample.csproj @@ -7,6 +7,11 @@ + + + + + diff --git a/src/Components/Authorization/test/Microsoft.AspNetCore.Components.Authorization.Tests.csproj b/src/Components/Authorization/test/Microsoft.AspNetCore.Components.Authorization.Tests.csproj index 6852bbf3dec0..ec06302c9604 100644 --- a/src/Components/Authorization/test/Microsoft.AspNetCore.Components.Authorization.Tests.csproj +++ b/src/Components/Authorization/test/Microsoft.AspNetCore.Components.Authorization.Tests.csproj @@ -6,6 +6,8 @@ + + diff --git a/src/Components/Components/src/PublicAPI.Unshipped.txt b/src/Components/Components/src/PublicAPI.Unshipped.txt index 7dc5c58110bf..9e7c166fbaaa 100644 --- a/src/Components/Components/src/PublicAPI.Unshipped.txt +++ b/src/Components/Components/src/PublicAPI.Unshipped.txt @@ -1 +1,4 @@ #nullable enable +*REMOVED*Microsoft.AspNetCore.Components.ResourceAsset.ResourceAsset(string! url, System.Collections.Generic.IReadOnlyList? properties) -> void +*REMOVED*Microsoft.AspNetCore.Components.Routing.Router.PreferExactMatches.get -> bool +*REMOVED*Microsoft.AspNetCore.Components.Routing.Router.PreferExactMatches.set -> void diff --git a/src/Components/Components/src/Routing/Router.cs b/src/Components/Components/src/Routing/Router.cs index ecb69fe2cf63..54fc0c87aa46 100644 --- a/src/Components/Components/src/Routing/Router.cs +++ b/src/Components/Components/src/Routing/Router.cs @@ -98,14 +98,6 @@ static readonly IReadOnlyDictionary _emptyParametersDictionary /// [Parameter] public EventCallback OnNavigateAsync { get; set; } - /// - /// Gets or sets a flag to indicate whether route matching should prefer exact matches - /// over wildcards. - /// This property is obsolete and configuring it does nothing. - /// - [Obsolete("This property is obsolete and configuring it has no effect.")] - [Parameter] public bool PreferExactMatches { get; set; } - private RouteTable Routes { get; set; } /// diff --git a/src/Components/Components/test/Microsoft.AspNetCore.Components.Tests.csproj b/src/Components/Components/test/Microsoft.AspNetCore.Components.Tests.csproj index 732ebbb65892..2f6be322105c 100644 --- a/src/Components/Components/test/Microsoft.AspNetCore.Components.Tests.csproj +++ b/src/Components/Components/test/Microsoft.AspNetCore.Components.Tests.csproj @@ -6,6 +6,8 @@ + + diff --git a/src/Components/Endpoints/src/Microsoft.AspNetCore.Components.Endpoints.csproj b/src/Components/Endpoints/src/Microsoft.AspNetCore.Components.Endpoints.csproj index de0329c94e63..ab17f88d4940 100644 --- a/src/Components/Endpoints/src/Microsoft.AspNetCore.Components.Endpoints.csproj +++ b/src/Components/Endpoints/src/Microsoft.AspNetCore.Components.Endpoints.csproj @@ -51,7 +51,10 @@ + + + diff --git a/src/Components/Endpoints/test/Microsoft.AspNetCore.Components.Endpoints.Tests.csproj b/src/Components/Endpoints/test/Microsoft.AspNetCore.Components.Endpoints.Tests.csproj index 3d7bced6b251..57919dd25e01 100644 --- a/src/Components/Endpoints/test/Microsoft.AspNetCore.Components.Endpoints.Tests.csproj +++ b/src/Components/Endpoints/test/Microsoft.AspNetCore.Components.Endpoints.Tests.csproj @@ -12,7 +12,16 @@ + + + + + + + + + diff --git a/src/Components/Forms/src/EditContextDataAnnotationsExtensions.cs b/src/Components/Forms/src/EditContextDataAnnotationsExtensions.cs index 559c2881127d..955e74b84d38 100644 --- a/src/Components/Forms/src/EditContextDataAnnotationsExtensions.cs +++ b/src/Components/Forms/src/EditContextDataAnnotationsExtensions.cs @@ -20,27 +20,6 @@ namespace Microsoft.AspNetCore.Components.Forms; /// public static partial class EditContextDataAnnotationsExtensions { - /// - /// Adds DataAnnotations validation support to the . - /// - /// The . - [Obsolete("Use " + nameof(EnableDataAnnotationsValidation) + " instead.")] - public static EditContext AddDataAnnotationsValidation(this EditContext editContext) - { - EnableDataAnnotationsValidation(editContext); - return editContext; - } - - /// - /// Enables DataAnnotations validation support for the . - /// - /// The . - /// A disposable object whose disposal will remove DataAnnotations validation support from the . - [Obsolete("This API is obsolete and may be removed in future versions. Use the overload that accepts an IServiceProvider instead.")] - public static IDisposable EnableDataAnnotationsValidation(this EditContext editContext) - { - return new DataAnnotationsEventSubscriptions(editContext, null!); - } /// /// Enables DataAnnotations validation support for the . /// diff --git a/src/Components/Forms/src/PublicAPI.Unshipped.txt b/src/Components/Forms/src/PublicAPI.Unshipped.txt index 7dc5c58110bf..8e50b300e33d 100644 --- a/src/Components/Forms/src/PublicAPI.Unshipped.txt +++ b/src/Components/Forms/src/PublicAPI.Unshipped.txt @@ -1 +1,3 @@ #nullable enable +*REMOVED*static Microsoft.AspNetCore.Components.Forms.EditContextDataAnnotationsExtensions.AddDataAnnotationsValidation(this Microsoft.AspNetCore.Components.Forms.EditContext! editContext) -> Microsoft.AspNetCore.Components.Forms.EditContext! +*REMOVED*static Microsoft.AspNetCore.Components.Forms.EditContextDataAnnotationsExtensions.EnableDataAnnotationsValidation(this Microsoft.AspNetCore.Components.Forms.EditContext! editContext) -> System.IDisposable! diff --git a/src/Components/Forms/test/EditContextDataAnnotationsExtensionsTest.cs b/src/Components/Forms/test/EditContextDataAnnotationsExtensionsTest.cs index 3ebd566d4f65..e58b5a736d6c 100644 --- a/src/Components/Forms/test/EditContextDataAnnotationsExtensionsTest.cs +++ b/src/Components/Forms/test/EditContextDataAnnotationsExtensionsTest.cs @@ -18,16 +18,6 @@ public void CannotUseNullEditContext() Assert.Equal("editContext", ex.ParamName); } - [Fact] - public void ObsoleteApiReturnsEditContextForChaining() - { - var editContext = new EditContext(new object()); -#pragma warning disable 0618 - var returnValue = editContext.AddDataAnnotationsValidation(); -#pragma warning restore 0618 - Assert.Same(editContext, returnValue); - } - [Fact] public void GetsValidationMessagesFromDataAnnotations() { diff --git a/src/Components/Forms/test/Microsoft.AspNetCore.Components.Forms.Tests.csproj b/src/Components/Forms/test/Microsoft.AspNetCore.Components.Forms.Tests.csproj index c6a022be0923..92498c29485f 100644 --- a/src/Components/Forms/test/Microsoft.AspNetCore.Components.Forms.Tests.csproj +++ b/src/Components/Forms/test/Microsoft.AspNetCore.Components.Forms.Tests.csproj @@ -6,6 +6,8 @@ + + diff --git a/src/Components/QuickGrid/Microsoft.AspNetCore.Components.QuickGrid/test/Microsoft.AspNetCore.Components.QuickGrid.Tests.csproj b/src/Components/QuickGrid/Microsoft.AspNetCore.Components.QuickGrid/test/Microsoft.AspNetCore.Components.QuickGrid.Tests.csproj index 21eb671ff544..e6af048ce8d2 100644 --- a/src/Components/QuickGrid/Microsoft.AspNetCore.Components.QuickGrid/test/Microsoft.AspNetCore.Components.QuickGrid.Tests.csproj +++ b/src/Components/QuickGrid/Microsoft.AspNetCore.Components.QuickGrid/test/Microsoft.AspNetCore.Components.QuickGrid.Tests.csproj @@ -6,6 +6,8 @@ + + diff --git a/src/Components/Samples/BlazorServerApp/BlazorServerApp.csproj b/src/Components/Samples/BlazorServerApp/BlazorServerApp.csproj index 02f0243552d8..10cc052a6656 100644 --- a/src/Components/Samples/BlazorServerApp/BlazorServerApp.csproj +++ b/src/Components/Samples/BlazorServerApp/BlazorServerApp.csproj @@ -11,6 +11,11 @@ + + + + + diff --git a/src/Components/Samples/BlazorUnitedApp/BlazorUnitedApp.csproj b/src/Components/Samples/BlazorUnitedApp/BlazorUnitedApp.csproj index 62460261002b..e93658384322 100644 --- a/src/Components/Samples/BlazorUnitedApp/BlazorUnitedApp.csproj +++ b/src/Components/Samples/BlazorUnitedApp/BlazorUnitedApp.csproj @@ -16,9 +16,14 @@ + + + + + diff --git a/src/Components/Server/src/ComponentHub.cs b/src/Components/Server/src/ComponentHub.cs index 7455ef8c6f85..c8a698071c7a 100644 --- a/src/Components/Server/src/ComponentHub.cs +++ b/src/Components/Server/src/ComponentHub.cs @@ -316,9 +316,10 @@ public async ValueTask ResumeCircuit( persistedCircuitState = await _circuitPersistenceManager.ResumeCircuitAsync(circuitId, Context.ConnectionAborted); if (persistedCircuitState == null) { + // The circuit state cannot be retrieved. It might have been deleted or expired. + // We do not send an error to the client as this is a valid scenario + // that will be handled by the client reconnection logic. Log.InvalidInputData(_logger); - await NotifyClientError(Clients.Caller, "The circuit state could not be retrieved. It may have been deleted or expired."); - Context.Abort(); return null; } } diff --git a/src/Components/Server/src/Microsoft.AspNetCore.Components.Server.csproj b/src/Components/Server/src/Microsoft.AspNetCore.Components.Server.csproj index 216f05e54134..3efe5346b208 100644 --- a/src/Components/Server/src/Microsoft.AspNetCore.Components.Server.csproj +++ b/src/Components/Server/src/Microsoft.AspNetCore.Components.Server.csproj @@ -17,10 +17,26 @@ + + + + + + + + + + + + + + + + diff --git a/src/Components/Server/test/Circuits/ComponentHubTest.cs b/src/Components/Server/test/Circuits/ComponentHubTest.cs index 6582f7d40a7d..e970cdd2f4d2 100644 --- a/src/Components/Server/test/Circuits/ComponentHubTest.cs +++ b/src/Components/Server/test/Circuits/ComponentHubTest.cs @@ -246,8 +246,6 @@ public async Task CannotResumeAppWhenPersistedComponentStateIsNotAvailable() var circuitSecret = await hub.StartCircuit("https://localhost:5000", "https://localhost:5000/subdir", "{}", null); var result = await hub.ResumeCircuit(circuitSecret, "https://localhost:5000", "https://localhost:5000/subdir", "[]", ""); Assert.Null(result); - var errorMessage = "The circuit state could not be retrieved. It may have been deleted or expired."; - mockClientProxy.Verify(m => m.SendCoreAsync("JS.Error", new[] { errorMessage }, It.IsAny()), Times.Once()); } [Fact] diff --git a/src/Components/Server/test/Microsoft.AspNetCore.Components.Server.Tests.csproj b/src/Components/Server/test/Microsoft.AspNetCore.Components.Server.Tests.csproj index 2ed7219f993f..5c7fdd549c40 100644 --- a/src/Components/Server/test/Microsoft.AspNetCore.Components.Server.Tests.csproj +++ b/src/Components/Server/test/Microsoft.AspNetCore.Components.Server.Tests.csproj @@ -5,6 +5,8 @@ + + diff --git a/src/Components/Web.JS/src/Boot.Server.ts b/src/Components/Web.JS/src/Boot.Server.ts index 824c12546963..307e8e9eed4c 100644 --- a/src/Components/Web.JS/src/Boot.Server.ts +++ b/src/Components/Web.JS/src/Boot.Server.ts @@ -10,15 +10,19 @@ import { DotNet } from '@microsoft/dotnet-js-interop'; import { InitialRootComponentsList } from './Services/InitialRootComponentsList'; import { JSEventRegistry } from './Services/JSEventRegistry'; +type BlazorServerStartOptions = Partial & { circuit?: Partial }; + let started = false; -function boot(userOptions?: Partial): Promise { +function boot(userOptions?: BlazorServerStartOptions): Promise { if (started) { throw new Error('Blazor has already started.'); } started = true; - const configuredOptions = resolveOptions(userOptions); + // Accept the `circuit` property from the blazor.web.js options format + const normalizedOptions = userOptions?.circuit ?? userOptions; + const configuredOptions = resolveOptions(normalizedOptions); setCircuitOptions(Promise.resolve(configuredOptions || {})); JSEventRegistry.create(Blazor); diff --git a/src/Components/Web.JS/src/Boot.WebAssembly.ts b/src/Components/Web.JS/src/Boot.WebAssembly.ts index a1b106b924c2..df014548cf08 100644 --- a/src/Components/Web.JS/src/Boot.WebAssembly.ts +++ b/src/Components/Web.JS/src/Boot.WebAssembly.ts @@ -12,15 +12,19 @@ import { InitialRootComponentsList } from './Services/InitialRootComponentsList' import { JSEventRegistry } from './Services/JSEventRegistry'; import { printErr } from './Platform/Mono/MonoPlatform'; +type BlazorWebAssemblyStartOptions = Partial & { webAssembly?: Partial }; + let started = false; -async function boot(options?: Partial): Promise { +async function boot(options?: BlazorWebAssemblyStartOptions): Promise { if (started) { throw new Error('Blazor has already started.'); } started = true; - setWebAssemblyOptions(Promise.resolve(options || {})); + // Accept the `webAssembly` property from the blazor.web.js options format + const normalizedOptions = options?.webAssembly ?? options ?? {}; + setWebAssemblyOptions(Promise.resolve(normalizedOptions)); JSEventRegistry.create(Blazor); const webAssemblyComponents = discoverComponents(document, 'webassembly') as WebAssemblyComponentDescriptor[]; diff --git a/src/Components/Web.JS/src/Platform/Circuits/DefaultReconnectDisplay.ts b/src/Components/Web.JS/src/Platform/Circuits/DefaultReconnectDisplay.ts index a14aa03363c7..4d424447ce90 100644 --- a/src/Components/Web.JS/src/Platform/Circuits/DefaultReconnectDisplay.ts +++ b/src/Components/Web.JS/src/Platform/Circuits/DefaultReconnectDisplay.ts @@ -96,6 +96,7 @@ export class DefaultReconnectDisplay implements ReconnectDisplay { this.reconnect = options?.type === 'reconnect'; + this.resumeButton.style.display = 'none'; this.reloadButton.style.display = 'none'; this.rejoiningAnimation.style.display = 'block'; this.status.innerHTML = 'Rejoining the server...'; @@ -106,6 +107,8 @@ export class DefaultReconnectDisplay implements ReconnectDisplay { update(options: ReconnectDisplayUpdateOptions): void { this.reconnect = options.type === 'reconnect'; if (this.reconnect) { + this.reloadButton.style.display = 'none'; + this.resumeButton.style.display = 'none'; const { currentAttempt, secondsToNextAttempt } = options as ReconnectOptions; if (currentAttempt === 1 || secondsToNextAttempt === 0) { this.status.innerHTML = 'Rejoining the server...'; @@ -129,12 +132,13 @@ export class DefaultReconnectDisplay implements ReconnectDisplay { failed(): void { this.rejoiningAnimation.style.display = 'none'; if (this.reconnect) { + this.resumeButton.style.display = 'none'; this.reloadButton.style.display = 'block'; this.status.innerHTML = 'Failed to rejoin.
Please retry or reload the page.'; this.document.addEventListener('visibilitychange', this.retryWhenDocumentBecomesVisible); } else { - this.status.innerHTML = 'Failed to resume the session.
Please reload the page.'; - this.resumeButton.style.display = 'none'; + this.status.innerHTML = 'Failed to resume the session.
Please retry or reload the page.'; + this.resumeButton.style.display = 'block'; this.reloadButton.style.display = 'none'; } } @@ -157,7 +161,6 @@ export class DefaultReconnectDisplay implements ReconnectDisplay { const successful = await Blazor.reconnect!(); if (!successful) { // Try to resume the circuit if the reconnect failed - this.update({ type: 'pause', remote: this.remote }); const resumeSuccessful = await Blazor.resumeCircuit!(); if (!resumeSuccessful) { this.rejected(); @@ -178,7 +181,7 @@ export class DefaultReconnectDisplay implements ReconnectDisplay { // - exception to mean we didn't reach the server (this can be sync or async) const successful = await Blazor.resumeCircuit!(); if (!successful) { - this.failed(); + this.rejected(); } } catch (err: unknown) { // We got an exception, server is currently unavailable diff --git a/src/Components/Web.JS/src/Platform/Circuits/DefaultReconnectionHandler.ts b/src/Components/Web.JS/src/Platform/Circuits/DefaultReconnectionHandler.ts index 31528e850a41..a1db061fcd62 100644 --- a/src/Components/Web.JS/src/Platform/Circuits/DefaultReconnectionHandler.ts +++ b/src/Components/Web.JS/src/Platform/Circuits/DefaultReconnectionHandler.ts @@ -126,13 +126,12 @@ class ReconnectionProcess { if (!result) { // Try to resume the circuit if the reconnect failed // If the server responded and refused to reconnect, stop auto-retrying. - this.reconnectDisplay.update({ type: 'pause', remote: true }); const resumeResult = await this.resumeCallback(); if (resumeResult) { return; } - this.reconnectDisplay.failed(); + this.reconnectDisplay.rejected(); return; } return; diff --git a/src/Components/Web.JS/src/Platform/Circuits/UserSpecifiedDisplay.ts b/src/Components/Web.JS/src/Platform/Circuits/UserSpecifiedDisplay.ts index 01106b9a6665..6438168fac6e 100644 --- a/src/Components/Web.JS/src/Platform/Circuits/UserSpecifiedDisplay.ts +++ b/src/Components/Web.JS/src/Platform/Circuits/UserSpecifiedDisplay.ts @@ -27,7 +27,9 @@ export class UserSpecifiedDisplay implements ReconnectDisplay { static readonly ReconnectStateChangedEventName = 'components-reconnect-state-changed'; - private reconnect = false; + reconnect = true; + + remote = false; constructor(private dialog: HTMLElement, private readonly document: Document, maxRetries?: number) { this.document = document; @@ -70,10 +72,10 @@ export class UserSpecifiedDisplay implements ReconnectDisplay { this.dispatchReconnectStateChangedEvent({ state: 'retrying', currentAttempt, secondsToNextAttempt }); } if (options.type === 'pause') { - const remote = options.remote; + this.remote = options.remote; this.dialog.classList.remove(UserSpecifiedDisplay.ShowClassName, UserSpecifiedDisplay.RetryingClassName); this.dialog.classList.add(UserSpecifiedDisplay.PausedClassName); - this.dispatchReconnectStateChangedEvent({ state: 'paused', remote: remote }); + this.dispatchReconnectStateChangedEvent({ state: 'paused', remote: this.remote }); } } @@ -90,7 +92,7 @@ export class UserSpecifiedDisplay implements ReconnectDisplay { this.dispatchReconnectStateChangedEvent({ state: 'failed' }); } else { this.dialog.classList.add(UserSpecifiedDisplay.ResumeFailedClassName); - this.dispatchReconnectStateChangedEvent({ state: 'resume-failed' }); + this.dispatchReconnectStateChangedEvent({ state: 'resume-failed', remote: this.remote }); } } diff --git a/src/Components/Web/src/Forms/InputFile/RemoteBrowserFileStreamOptions.cs b/src/Components/Web/src/Forms/InputFile/RemoteBrowserFileStreamOptions.cs deleted file mode 100644 index 4de7bab18c17..000000000000 --- a/src/Components/Web/src/Forms/InputFile/RemoteBrowserFileStreamOptions.cs +++ /dev/null @@ -1,39 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. - -using System.Runtime.Versioning; - -namespace Microsoft.AspNetCore.Components.Forms; - -/// -/// Repesents configurable options for with Blazor Server. -/// -[UnsupportedOSPlatform("browser")] -[Obsolete("RemoteJSDataStream defaults are utilized instead of the options here.")] -public class RemoteBrowserFileStreamOptions -{ - /// - /// Gets or sets the maximum segment size for file data sent over a SignalR circuit. - /// The default value is 20K. - /// - /// This only has an effect when using Blazor Server. - /// - /// - public int MaxSegmentSize { get; set; } = 20 * 1024; // SignalR limit is 32K. - - /// - /// Gets or sets the maximum internal buffer size for unread data sent over a SignalR circuit. - /// - /// This only has an effect when using Blazor Server. - /// - /// - public int MaxBufferSize { get; set; } = 1024 * 1024; - - /// - /// Gets or sets the time limit for fetching a segment of file data. - /// - /// This only has an effect when using Blazor Server. - /// - /// - public TimeSpan SegmentFetchTimeout { get; set; } = TimeSpan.FromMinutes(1); -} diff --git a/src/Components/Web/src/PublicAPI.Unshipped.txt b/src/Components/Web/src/PublicAPI.Unshipped.txt index 369f33715778..eefd46d3c0a7 100644 --- a/src/Components/Web/src/PublicAPI.Unshipped.txt +++ b/src/Components/Web/src/PublicAPI.Unshipped.txt @@ -1,4 +1,34 @@ #nullable enable +*REMOVED*Microsoft.AspNetCore.Components.Forms.RemoteBrowserFileStreamOptions +*REMOVED*Microsoft.AspNetCore.Components.Forms.RemoteBrowserFileStreamOptions.MaxBufferSize.get -> int +*REMOVED*Microsoft.AspNetCore.Components.Forms.RemoteBrowserFileStreamOptions.MaxBufferSize.set -> void +*REMOVED*Microsoft.AspNetCore.Components.Forms.RemoteBrowserFileStreamOptions.MaxSegmentSize.get -> int +*REMOVED*Microsoft.AspNetCore.Components.Forms.RemoteBrowserFileStreamOptions.MaxSegmentSize.set -> void +*REMOVED*Microsoft.AspNetCore.Components.Forms.RemoteBrowserFileStreamOptions.RemoteBrowserFileStreamOptions() -> void +*REMOVED*Microsoft.AspNetCore.Components.Forms.RemoteBrowserFileStreamOptions.SegmentFetchTimeout.get -> System.TimeSpan +*REMOVED*Microsoft.AspNetCore.Components.Forms.RemoteBrowserFileStreamOptions.SegmentFetchTimeout.set -> void +*REMOVED*Microsoft.AspNetCore.Components.RenderTree.WebRenderer.RendererId.init -> void +*REMOVED*Microsoft.AspNetCore.Components.Web.WebEventCallbackFactoryEventArgsExtensions +*REMOVED*static Microsoft.AspNetCore.Components.Web.WebEventCallbackFactoryEventArgsExtensions.Create(this Microsoft.AspNetCore.Components.EventCallbackFactory! factory, object! receiver, System.Action! callback) -> Microsoft.AspNetCore.Components.EventCallback +*REMOVED*static Microsoft.AspNetCore.Components.Web.WebEventCallbackFactoryEventArgsExtensions.Create(this Microsoft.AspNetCore.Components.EventCallbackFactory! factory, object! receiver, System.Action! callback) -> Microsoft.AspNetCore.Components.EventCallback +*REMOVED*static Microsoft.AspNetCore.Components.Web.WebEventCallbackFactoryEventArgsExtensions.Create(this Microsoft.AspNetCore.Components.EventCallbackFactory! factory, object! receiver, System.Action! callback) -> Microsoft.AspNetCore.Components.EventCallback +*REMOVED*static Microsoft.AspNetCore.Components.Web.WebEventCallbackFactoryEventArgsExtensions.Create(this Microsoft.AspNetCore.Components.EventCallbackFactory! factory, object! receiver, System.Action! callback) -> Microsoft.AspNetCore.Components.EventCallback +*REMOVED*static Microsoft.AspNetCore.Components.Web.WebEventCallbackFactoryEventArgsExtensions.Create(this Microsoft.AspNetCore.Components.EventCallbackFactory! factory, object! receiver, System.Action! callback) -> Microsoft.AspNetCore.Components.EventCallback +*REMOVED*static Microsoft.AspNetCore.Components.Web.WebEventCallbackFactoryEventArgsExtensions.Create(this Microsoft.AspNetCore.Components.EventCallbackFactory! factory, object! receiver, System.Action! callback) -> Microsoft.AspNetCore.Components.EventCallback +*REMOVED*static Microsoft.AspNetCore.Components.Web.WebEventCallbackFactoryEventArgsExtensions.Create(this Microsoft.AspNetCore.Components.EventCallbackFactory! factory, object! receiver, System.Action! callback) -> Microsoft.AspNetCore.Components.EventCallback +*REMOVED*static Microsoft.AspNetCore.Components.Web.WebEventCallbackFactoryEventArgsExtensions.Create(this Microsoft.AspNetCore.Components.EventCallbackFactory! factory, object! receiver, System.Action! callback) -> Microsoft.AspNetCore.Components.EventCallback +*REMOVED*static Microsoft.AspNetCore.Components.Web.WebEventCallbackFactoryEventArgsExtensions.Create(this Microsoft.AspNetCore.Components.EventCallbackFactory! factory, object! receiver, System.Action! callback) -> Microsoft.AspNetCore.Components.EventCallback +*REMOVED*static Microsoft.AspNetCore.Components.Web.WebEventCallbackFactoryEventArgsExtensions.Create(this Microsoft.AspNetCore.Components.EventCallbackFactory! factory, object! receiver, System.Action! callback) -> Microsoft.AspNetCore.Components.EventCallback +*REMOVED*static Microsoft.AspNetCore.Components.Web.WebEventCallbackFactoryEventArgsExtensions.Create(this Microsoft.AspNetCore.Components.EventCallbackFactory! factory, object! receiver, System.Func! callback) -> Microsoft.AspNetCore.Components.EventCallback +*REMOVED*static Microsoft.AspNetCore.Components.Web.WebEventCallbackFactoryEventArgsExtensions.Create(this Microsoft.AspNetCore.Components.EventCallbackFactory! factory, object! receiver, System.Func! callback) -> Microsoft.AspNetCore.Components.EventCallback +*REMOVED*static Microsoft.AspNetCore.Components.Web.WebEventCallbackFactoryEventArgsExtensions.Create(this Microsoft.AspNetCore.Components.EventCallbackFactory! factory, object! receiver, System.Func! callback) -> Microsoft.AspNetCore.Components.EventCallback +*REMOVED*static Microsoft.AspNetCore.Components.Web.WebEventCallbackFactoryEventArgsExtensions.Create(this Microsoft.AspNetCore.Components.EventCallbackFactory! factory, object! receiver, System.Func! callback) -> Microsoft.AspNetCore.Components.EventCallback +*REMOVED*static Microsoft.AspNetCore.Components.Web.WebEventCallbackFactoryEventArgsExtensions.Create(this Microsoft.AspNetCore.Components.EventCallbackFactory! factory, object! receiver, System.Func! callback) -> Microsoft.AspNetCore.Components.EventCallback +*REMOVED*static Microsoft.AspNetCore.Components.Web.WebEventCallbackFactoryEventArgsExtensions.Create(this Microsoft.AspNetCore.Components.EventCallbackFactory! factory, object! receiver, System.Func! callback) -> Microsoft.AspNetCore.Components.EventCallback +*REMOVED*static Microsoft.AspNetCore.Components.Web.WebEventCallbackFactoryEventArgsExtensions.Create(this Microsoft.AspNetCore.Components.EventCallbackFactory! factory, object! receiver, System.Func! callback) -> Microsoft.AspNetCore.Components.EventCallback +*REMOVED*static Microsoft.AspNetCore.Components.Web.WebEventCallbackFactoryEventArgsExtensions.Create(this Microsoft.AspNetCore.Components.EventCallbackFactory! factory, object! receiver, System.Func! callback) -> Microsoft.AspNetCore.Components.EventCallback +*REMOVED*static Microsoft.AspNetCore.Components.Web.WebEventCallbackFactoryEventArgsExtensions.Create(this Microsoft.AspNetCore.Components.EventCallbackFactory! factory, object! receiver, System.Func! callback) -> Microsoft.AspNetCore.Components.EventCallback +*REMOVED*static Microsoft.AspNetCore.Components.Web.WebEventCallbackFactoryEventArgsExtensions.Create(this Microsoft.AspNetCore.Components.EventCallbackFactory! factory, object! receiver, System.Func! callback) -> Microsoft.AspNetCore.Components.EventCallback Microsoft.AspNetCore.Components.Web.Media.FileDownload Microsoft.AspNetCore.Components.Web.Media.FileDownload.ChildContent.get -> Microsoft.AspNetCore.Components.RenderFragment? Microsoft.AspNetCore.Components.Web.Media.FileDownload.ChildContent.set -> void diff --git a/src/Components/Web/src/Web/WebEventCallbackFactoryEventArgsExtensions.cs b/src/Components/Web/src/Web/WebEventCallbackFactoryEventArgsExtensions.cs deleted file mode 100644 index 4c34865354ea..000000000000 --- a/src/Components/Web/src/Web/WebEventCallbackFactoryEventArgsExtensions.cs +++ /dev/null @@ -1,329 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. - -namespace Microsoft.AspNetCore.Components.Web; - -/// -/// Provides extension methods for and types. -/// -public static class WebEventCallbackFactoryEventArgsExtensions -{ - /// - /// Creates an for the provided and - /// . - /// - /// The . - /// The event receiver. - /// The event callback. - /// The . - [Obsolete("This extension method is obsolete and will be removed in a future version. Use the generic overload instead.")] - public static EventCallback Create(this EventCallbackFactory factory, object receiver, Action callback) - { - ArgumentNullException.ThrowIfNull(factory); - - return factory.Create(receiver, callback); - } - - /// - /// Creates an for the provided and - /// . - /// - /// The . - /// The event receiver. - /// The event callback. - /// The . - [Obsolete("This extension method is obsolete and will be removed in a future version. Use the generic overload instead.")] - public static EventCallback Create(this EventCallbackFactory factory, object receiver, Func callback) - { - ArgumentNullException.ThrowIfNull(factory); - - return factory.Create(receiver, callback); - } - - /// - /// Creates an for the provided and - /// . - /// - /// The . - /// The event receiver. - /// The event callback. - /// The . - [Obsolete("This extension method is obsolete and will be removed in a future version. Use the generic overload instead.")] - public static EventCallback Create(this EventCallbackFactory factory, object receiver, Action callback) - { - ArgumentNullException.ThrowIfNull(factory); - - return factory.Create(receiver, callback); - } - - /// - /// Creates an for the provided and - /// . - /// - /// The . - /// The event receiver. - /// The event callback. - /// The . - [Obsolete("This extension method is obsolete and will be removed in a future version. Use the generic overload instead.")] - public static EventCallback Create(this EventCallbackFactory factory, object receiver, Func callback) - { - ArgumentNullException.ThrowIfNull(factory); - - return factory.Create(receiver, callback); - } - - /// - /// Creates an for the provided and - /// . - /// - /// The . - /// The event receiver. - /// The event callback. - /// The . - [Obsolete("This extension method is obsolete and will be removed in a future version. Use the generic overload instead.")] - public static EventCallback Create(this EventCallbackFactory factory, object receiver, Action callback) - { - ArgumentNullException.ThrowIfNull(factory); - - return factory.Create(receiver, callback); - } - - /// - /// Creates an for the provided and - /// . - /// - /// The . - /// The event receiver. - /// The event callback. - /// The . - [Obsolete("This extension method is obsolete and will be removed in a future version. Use the generic overload instead.")] - public static EventCallback Create(this EventCallbackFactory factory, object receiver, Func callback) - { - ArgumentNullException.ThrowIfNull(factory); - - return factory.Create(receiver, callback); - } - - /// - /// Creates an for the provided and - /// . - /// - /// The . - /// The event receiver. - /// The event callback. - /// The . - [Obsolete("This extension method is obsolete and will be removed in a future version. Use the generic overload instead.")] - public static EventCallback Create(this EventCallbackFactory factory, object receiver, Action callback) - { - ArgumentNullException.ThrowIfNull(factory); - - return factory.Create(receiver, callback); - } - - /// - /// Creates an for the provided and - /// . - /// - /// The . - /// The event receiver. - /// The event callback. - /// The . - [Obsolete("This extension method is obsolete and will be removed in a future version. Use the generic overload instead.")] - public static EventCallback Create(this EventCallbackFactory factory, object receiver, Func callback) - { - ArgumentNullException.ThrowIfNull(factory); - - return factory.Create(receiver, callback); - } - - /// - /// Creates an for the provided and - /// . - /// - /// The . - /// The event receiver. - /// The event callback. - /// The . - [Obsolete("This extension method is obsolete and will be removed in a future version. Use the generic overload instead.")] - public static EventCallback Create(this EventCallbackFactory factory, object receiver, Action callback) - { - ArgumentNullException.ThrowIfNull(factory); - - return factory.Create(receiver, callback); - } - - /// - /// Creates an for the provided and - /// . - /// - /// The . - /// The event receiver. - /// The event callback. - /// The . - [Obsolete("This extension method is obsolete and will be removed in a future version. Use the generic overload instead.")] - public static EventCallback Create(this EventCallbackFactory factory, object receiver, Func callback) - { - ArgumentNullException.ThrowIfNull(factory); - - return factory.Create(receiver, callback); - } - - /// - /// Creates an for the provided and - /// . - /// - /// The . - /// The event receiver. - /// The event callback. - /// The . - [Obsolete("This extension method is obsolete and will be removed in a future version. Use the generic overload instead.")] - public static EventCallback Create(this EventCallbackFactory factory, object receiver, Action callback) - { - ArgumentNullException.ThrowIfNull(factory); - - return factory.Create(receiver, callback); - } - - /// - /// Creates an for the provided and - /// . - /// - /// The . - /// The event receiver. - /// The event callback. - /// The . - [Obsolete("This extension method is obsolete and will be removed in a future version. Use the generic overload instead.")] - public static EventCallback Create(this EventCallbackFactory factory, object receiver, Func callback) - { - ArgumentNullException.ThrowIfNull(factory); - - return factory.Create(receiver, callback); - } - /// - /// Creates an for the provided and - /// . - /// - /// The . - /// The event receiver. - /// The event callback. - /// The . - [Obsolete("This extension method is obsolete and will be removed in a future version. Use the generic overload instead.")] - public static EventCallback Create(this EventCallbackFactory factory, object receiver, Action callback) - { - ArgumentNullException.ThrowIfNull(factory); - - return factory.Create(receiver, callback); - } - - /// - /// Creates an for the provided and - /// . - /// - /// The . - /// The event receiver. - /// The event callback. - /// The . - [Obsolete("This extension method is obsolete and will be removed in a future version. Use the generic overload instead.")] - public static EventCallback Create(this EventCallbackFactory factory, object receiver, Func callback) - { - ArgumentNullException.ThrowIfNull(factory); - - return factory.Create(receiver, callback); - } - - /// - /// Creates an for the provided and - /// . - /// - /// The . - /// The event receiver. - /// The event callback. - /// The . - [Obsolete("This extension method is obsolete and will be removed in a future version. Use the generic overload instead.")] - public static EventCallback Create(this EventCallbackFactory factory, object receiver, Action callback) - { - ArgumentNullException.ThrowIfNull(factory); - - return factory.Create(receiver, callback); - } - - /// - /// Creates an for the provided and - /// . - /// - /// The . - /// The event receiver. - /// The event callback. - /// The . - [Obsolete("This extension method is obsolete and will be removed in a future version. Use the generic overload instead.")] - public static EventCallback Create(this EventCallbackFactory factory, object receiver, Func callback) - { - ArgumentNullException.ThrowIfNull(factory); - - return factory.Create(receiver, callback); - } - - /// - /// Creates an for the provided and - /// . - /// - /// The . - /// The event receiver. - /// The event callback. - /// The . - [Obsolete("This extension method is obsolete and will be removed in a future version. Use the generic overload instead.")] - public static EventCallback Create(this EventCallbackFactory factory, object receiver, Action callback) - { - ArgumentNullException.ThrowIfNull(factory); - - return factory.Create(receiver, callback); - } - - /// - /// Creates an for the provided and - /// . - /// - /// The . - /// The event receiver. - /// The event callback. - /// The . - [Obsolete("This extension method is obsolete and will be removed in a future version. Use the generic overload instead.")] - public static EventCallback Create(this EventCallbackFactory factory, object receiver, Func callback) - { - ArgumentNullException.ThrowIfNull(factory); - - return factory.Create(receiver, callback); - } - - /// - /// Creates an for the provided and - /// . - /// - /// The . - /// The event receiver. - /// The event callback. - /// The . - [Obsolete("This extension method is obsolete and will be removed in a future version. Use the generic overload instead.")] - public static EventCallback Create(this EventCallbackFactory factory, object receiver, Action callback) - { - ArgumentNullException.ThrowIfNull(factory); - - return factory.Create(receiver, callback); - } - - /// - /// Creates an for the provided and - /// . - /// - /// The . - /// The event receiver. - /// The event callback. - /// The . - [Obsolete("This extension method is obsolete and will be removed in a future version. Use the generic overload instead.")] - public static EventCallback Create(this EventCallbackFactory factory, object receiver, Func callback) - { - ArgumentNullException.ThrowIfNull(factory); - - return factory.Create(receiver, callback); - } -} diff --git a/src/Components/Web/src/WebRenderer.cs b/src/Components/Web/src/WebRenderer.cs index becd887453d0..fc83c3c360f6 100644 --- a/src/Components/Web/src/WebRenderer.cs +++ b/src/Components/Web/src/WebRenderer.cs @@ -52,9 +52,6 @@ public WebRenderer( protected int RendererId { get => _rendererId; - - [Obsolete($"The renderer ID can be assigned by overriding '{nameof(GetWebRendererId)}'.")] - init { /* No-op */ } } /// diff --git a/src/Components/Web/test/Microsoft.AspNetCore.Components.Web.Tests.csproj b/src/Components/Web/test/Microsoft.AspNetCore.Components.Web.Tests.csproj index d4fe6205d0ad..8f45ac00bcd7 100644 --- a/src/Components/Web/test/Microsoft.AspNetCore.Components.Web.Tests.csproj +++ b/src/Components/Web/test/Microsoft.AspNetCore.Components.Web.Tests.csproj @@ -6,6 +6,8 @@ + + diff --git a/src/Components/WebAssembly/DevServer/src/Microsoft.AspNetCore.Components.WebAssembly.DevServer.csproj b/src/Components/WebAssembly/DevServer/src/Microsoft.AspNetCore.Components.WebAssembly.DevServer.csproj index a320af38fa9c..11b352cbe4af 100644 --- a/src/Components/WebAssembly/DevServer/src/Microsoft.AspNetCore.Components.WebAssembly.DevServer.csproj +++ b/src/Components/WebAssembly/DevServer/src/Microsoft.AspNetCore.Components.WebAssembly.DevServer.csproj @@ -19,8 +19,20 @@ + + + + + + + + + + + + diff --git a/src/Components/WebAssembly/JSInterop/src/InternalCalls.cs b/src/Components/WebAssembly/JSInterop/src/InternalCalls.cs index 4ad543a146ce..680a1c67b087 100644 --- a/src/Components/WebAssembly/JSInterop/src/InternalCalls.cs +++ b/src/Components/WebAssembly/JSInterop/src/InternalCalls.cs @@ -1,22 +1,12 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Diagnostics.CodeAnalysis; -using System.Runtime.CompilerServices; using System.Runtime.InteropServices.JavaScript; namespace WebAssembly.JSInterop; internal static partial class InternalCalls { - // This method only exists for backwards compatibility and will be removed in the future. - // The exact namespace, type, and method name must match the corresponding entries - // in driver.c in the Mono distribution. - // See: https://github.com/mono/mono/blob/90574987940959fe386008a850982ea18236a533/sdks/wasm/src/driver.c#L318-L319 - [MethodImpl(MethodImplOptions.InternalCall)] - [Obsolete] - public static extern TRes InvokeJS(out string exception, ref JSCallInfo callInfo, [AllowNull] T0 arg0, [AllowNull] T1 arg1, [AllowNull] T2 arg2); - [JSImport("Blazor._internal.invokeJSJson", "blazor-internal")] public static partial string InvokeJSJson( string identifier, diff --git a/src/Components/WebAssembly/Samples/HostedBlazorWebassemblyApp/Server/HostedBlazorWebassemblyApp.Server.csproj b/src/Components/WebAssembly/Samples/HostedBlazorWebassemblyApp/Server/HostedBlazorWebassemblyApp.Server.csproj index 339fea3989f3..0a6612027b43 100644 --- a/src/Components/WebAssembly/Samples/HostedBlazorWebassemblyApp/Server/HostedBlazorWebassemblyApp.Server.csproj +++ b/src/Components/WebAssembly/Samples/HostedBlazorWebassemblyApp/Server/HostedBlazorWebassemblyApp.Server.csproj @@ -11,6 +11,11 @@ + + + + + diff --git a/src/Components/WebAssembly/Server/src/Microsoft.AspNetCore.Components.WebAssembly.Server.csproj b/src/Components/WebAssembly/Server/src/Microsoft.AspNetCore.Components.WebAssembly.Server.csproj index b3f42e28fe8a..e81cc430ff20 100644 --- a/src/Components/WebAssembly/Server/src/Microsoft.AspNetCore.Components.WebAssembly.Server.csproj +++ b/src/Components/WebAssembly/Server/src/Microsoft.AspNetCore.Components.WebAssembly.Server.csproj @@ -14,6 +14,13 @@ + + + + + + + diff --git a/src/Components/WebAssembly/Server/test/Microsoft.AspNetCore.Components.WebAssembly.Server.Tests.csproj b/src/Components/WebAssembly/Server/test/Microsoft.AspNetCore.Components.WebAssembly.Server.Tests.csproj index 292ec82b5d4a..2476cd29a579 100644 --- a/src/Components/WebAssembly/Server/test/Microsoft.AspNetCore.Components.WebAssembly.Server.Tests.csproj +++ b/src/Components/WebAssembly/Server/test/Microsoft.AspNetCore.Components.WebAssembly.Server.Tests.csproj @@ -5,8 +5,16 @@ + + + + + + + + diff --git a/src/Components/WebAssembly/WebAssembly.Authentication/src/PublicAPI.Unshipped.txt b/src/Components/WebAssembly/WebAssembly.Authentication/src/PublicAPI.Unshipped.txt index 7dc5c58110bf..dbe9cee9e3c9 100644 --- a/src/Components/WebAssembly/WebAssembly.Authentication/src/PublicAPI.Unshipped.txt +++ b/src/Components/WebAssembly/WebAssembly.Authentication/src/PublicAPI.Unshipped.txt @@ -1 +1,8 @@ #nullable enable +*REMOVED*Microsoft.AspNetCore.Components.WebAssembly.Authentication.AccessTokenResult.AccessTokenResult(Microsoft.AspNetCore.Components.WebAssembly.Authentication.AccessTokenResultStatus status, Microsoft.AspNetCore.Components.WebAssembly.Authentication.AccessToken! token, string! redirectUrl) -> void +*REMOVED*Microsoft.AspNetCore.Components.WebAssembly.Authentication.AccessTokenResult.RedirectUrl.get -> string? +*REMOVED*Microsoft.AspNetCore.Components.WebAssembly.Authentication.RemoteAuthenticationService.RemoteAuthenticationService(Microsoft.JSInterop.IJSRuntime! jsRuntime, Microsoft.Extensions.Options.IOptionsSnapshot!>! options, Microsoft.AspNetCore.Components.NavigationManager! navigation, Microsoft.AspNetCore.Components.WebAssembly.Authentication.AccountClaimsPrincipalFactory! accountClaimsPrincipalFactory) -> void +*REMOVED*Microsoft.AspNetCore.Components.WebAssembly.Authentication.SignOutSessionStateManager +*REMOVED*Microsoft.AspNetCore.Components.WebAssembly.Authentication.SignOutSessionStateManager.SignOutSessionStateManager(Microsoft.JSInterop.IJSRuntime! jsRuntime) -> void +*REMOVED*virtual Microsoft.AspNetCore.Components.WebAssembly.Authentication.SignOutSessionStateManager.SetSignOutState() -> System.Threading.Tasks.ValueTask +*REMOVED*virtual Microsoft.AspNetCore.Components.WebAssembly.Authentication.SignOutSessionStateManager.ValidateSignOutState() -> System.Threading.Tasks.Task! diff --git a/src/Components/WebAssembly/WebAssembly.Authentication/src/RemoteAuthenticatorViewCore.cs b/src/Components/WebAssembly/WebAssembly.Authentication/src/RemoteAuthenticatorViewCore.cs index 69c9b1e70c86..37f6c0ad3b70 100644 --- a/src/Components/WebAssembly/WebAssembly.Authentication/src/RemoteAuthenticatorViewCore.cs +++ b/src/Components/WebAssembly/WebAssembly.Authentication/src/RemoteAuthenticatorViewCore.cs @@ -106,10 +106,6 @@ public RemoteAuthenticationApplicationPathsOptions ApplicationPaths [Inject] internal AuthenticationStateProvider AuthenticationProvider { get; set; } = default!; -#pragma warning disable CS0618 // Type or member is obsolete, we keep it for now for backwards compatibility - [Inject] internal SignOutSessionStateManager SignOutManager { get; set; } = default!; -#pragma warning restore CS0618 // Type or member is obsolete, we keep it for now for backwards compatibility - [Inject] internal ILogger> Logger { get; set; } = default!; /// @@ -282,9 +278,7 @@ private async Task ProcessLogInCallback() private async Task ProcessLogOut(string returnUrl) { - if ((Navigation.HistoryEntryState != null && !ValidateSignOutRequestState()) || - // For backcompat purposes, keep SignOutManager working, even though we now use the history.state for this. - (Navigation.HistoryEntryState == null && !await SignOutManager.ValidateSignOutState())) + if (Navigation.HistoryEntryState != null && !ValidateSignOutRequestState()) { Log.LogoutOperationInitiatedExternally(Logger); Navigation.NavigateTo(ApplicationPaths.LogOutFailedPath, AuthenticationNavigationOptions with { HistoryEntryState = "The logout was not initiated from within the page." }); diff --git a/src/Components/WebAssembly/WebAssembly.Authentication/src/Services/AccessTokenNotAvailableException.cs b/src/Components/WebAssembly/WebAssembly.Authentication/src/Services/AccessTokenNotAvailableException.cs index d1ce1b61e484..1c42d3d79423 100644 --- a/src/Components/WebAssembly/WebAssembly.Authentication/src/Services/AccessTokenNotAvailableException.cs +++ b/src/Components/WebAssembly/WebAssembly.Authentication/src/Services/AccessTokenNotAvailableException.cs @@ -41,9 +41,7 @@ public void Redirect() } else { -#pragma warning disable CS0618 // Type or member is obsolete - _navigation.NavigateTo(_tokenResult.RedirectUrl!); -#pragma warning restore CS0618 // Type or member is obsolete + _navigation.NavigateTo(_tokenResult.InteractiveRequestUrl!); } } diff --git a/src/Components/WebAssembly/WebAssembly.Authentication/src/Services/AccessTokenResult.cs b/src/Components/WebAssembly/WebAssembly.Authentication/src/Services/AccessTokenResult.cs index 576b323509d9..3971b66eda16 100644 --- a/src/Components/WebAssembly/WebAssembly.Authentication/src/Services/AccessTokenResult.cs +++ b/src/Components/WebAssembly/WebAssembly.Authentication/src/Services/AccessTokenResult.cs @@ -12,20 +12,6 @@ public class AccessTokenResult { private readonly AccessToken _token; - /// - /// Initializes a new instance of . - /// - /// The status of the result. - /// The in case it was successful. - /// The redirect uri to go to for provisioning the token. - [Obsolete("Use the AccessTokenResult(AccessTokenResultStatus, AccessToken, string, InteractiveRequestOptions)")] - public AccessTokenResult(AccessTokenResultStatus status, AccessToken token, [StringSyntax(StringSyntaxAttribute.Uri)] string redirectUrl) - { - Status = status; - _token = token; - RedirectUrl = redirectUrl; - } - /// /// Initializes a new instance of . /// @@ -46,12 +32,6 @@ public AccessTokenResult(AccessTokenResultStatus status, AccessToken token, [Str /// public AccessTokenResultStatus Status { get; } - /// - /// Gets the URL to redirect to if is . - /// - [Obsolete("Use 'InteractiveRequestUrl' and 'InteractiveRequest' instead.")] - public string? RedirectUrl { get; } - /// /// Gets the URL to call if is /// . diff --git a/src/Components/WebAssembly/WebAssembly.Authentication/src/Services/RemoteAuthenticationService.cs b/src/Components/WebAssembly/WebAssembly.Authentication/src/Services/RemoteAuthenticationService.cs index 12d315bdaf60..61e5d080e492 100644 --- a/src/Components/WebAssembly/WebAssembly.Authentication/src/Services/RemoteAuthenticationService.cs +++ b/src/Components/WebAssembly/WebAssembly.Authentication/src/Services/RemoteAuthenticationService.cs @@ -57,23 +57,6 @@ public class RemoteAuthenticationService< /// protected RemoteAuthenticationOptions Options { get; } - /// - /// Initializes a new instance. - /// - /// The to use for performing JavaScript interop operations. - /// The options to be passed down to the underlying JavaScript library handling the authentication operations. - /// The used to generate URLs. - /// The used to generate the for the user. - [Obsolete("Use the constructor RemoteAuthenticationService(IJSRuntime,IOptionsSnapshot>,NavigationManager,AccountClaimsPrincipalFactory,ILogger>) instead.")] - public RemoteAuthenticationService( - IJSRuntime jsRuntime, - IOptionsSnapshot> options, - NavigationManager navigation, - AccountClaimsPrincipalFactory accountClaimsPrincipalFactory) - : this(jsRuntime, options, navigation, accountClaimsPrincipalFactory, null) - { - } - /// /// Initializes a new instance. /// diff --git a/src/Components/WebAssembly/WebAssembly.Authentication/src/Services/SignOutSessionStateManager.cs b/src/Components/WebAssembly/WebAssembly.Authentication/src/Services/SignOutSessionStateManager.cs deleted file mode 100644 index 74b61cb7aca2..000000000000 --- a/src/Components/WebAssembly/WebAssembly.Authentication/src/Services/SignOutSessionStateManager.cs +++ /dev/null @@ -1,88 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. - -using System.Diagnostics.CodeAnalysis; -using System.Text.Json; -using Microsoft.JSInterop; -using static Microsoft.AspNetCore.Internal.LinkerFlags; - -namespace Microsoft.AspNetCore.Components.WebAssembly.Authentication; - -/// -/// Handles CSRF protection for the logout endpoint. -/// -[Obsolete("Use 'Microsoft.AspNetCore.Components.Webassembly.Authentication.NavigationManagerExtensions.NavigateToLogout' instead.")] -public class SignOutSessionStateManager -{ - private readonly IJSRuntime _jsRuntime; - - /// - /// Initialize a new instance of . - /// - /// The . - public SignOutSessionStateManager(IJSRuntime jsRuntime) => _jsRuntime = jsRuntime; - - /// - /// Sets up some state in session storage to allow for logouts from within the page. - /// - /// A that completes when the state has been saved to session storage. - [DynamicDependency(JsonSerialized, typeof(SignOutState))] - [UnconditionalSuppressMessage("ReflectionAnalysis", "IL2026:RequiresUnreferencedCode", Justification = "The correct members will be preserved by the above DynamicDependency.")] - // This should use JSON source generation - public virtual ValueTask SetSignOutState() - { - return _jsRuntime.InvokeVoidAsync( - "sessionStorage.setItem", - "Microsoft.AspNetCore.Components.WebAssembly.Authentication.SignOutState", - JsonSerializer.Serialize(SignOutState.Instance, JsonSerializerOptions.Web)); - } - - /// - /// Validates the existence of some state previously setup by in session storage to allow - /// logouts from within the page. - /// - /// A that completes when the state has been validated and indicates the validity of the state. - public virtual async Task ValidateSignOutState() - { - var state = await GetSignOutState(); - if (state.Local) - { - await ClearSignOutState(); - return true; - } - - return false; - } - - private async ValueTask GetSignOutState() - { - var result = await _jsRuntime.InvokeAsync( - "sessionStorage.getItem", - "Microsoft.AspNetCore.Components.WebAssembly.Authentication.SignOutState"); - if (result == null) - { - return default; - } - - return DeserializeSignOutState(result); - } - - [DynamicDependency(JsonSerialized, typeof(SignOutState))] - [UnconditionalSuppressMessage("ReflectionAnalysis", "IL2026:RequiresUnreferencedCode", Justification = "The correct members will be preserved by the above DynamicDependency.")] - // This should use JSON source generation - private static SignOutState DeserializeSignOutState(string result) => JsonSerializer.Deserialize(result, JsonSerializerOptions.Web); - - private ValueTask ClearSignOutState() - { - return _jsRuntime.InvokeVoidAsync( - "sessionStorage.removeItem", - "Microsoft.AspNetCore.Components.WebAssembly.Authentication.SignOutState"); - } - - private struct SignOutState - { - public static readonly SignOutState Instance = new SignOutState { Local = true }; - - public bool Local { get; set; } - } -} diff --git a/src/Components/WebAssembly/WebAssembly.Authentication/src/WebAssemblyAuthenticationServiceCollectionExtensions.cs b/src/Components/WebAssembly/WebAssembly.Authentication/src/WebAssemblyAuthenticationServiceCollectionExtensions.cs index 20cf1e0867f7..ee43cde4379f 100644 --- a/src/Components/WebAssembly/WebAssembly.Authentication/src/WebAssemblyAuthenticationServiceCollectionExtensions.cs +++ b/src/Components/WebAssembly/WebAssembly.Authentication/src/WebAssemblyAuthenticationServiceCollectionExtensions.cs @@ -71,9 +71,6 @@ public static IRemoteAuthenticationBuilder services.TryAddScoped>(); services.TryAddScoped(); -#pragma warning disable CS0618 // Type or member is obsolete, we keep it for now for backwards compatibility - services.TryAddScoped(); -#pragma warning restore CS0618 // Type or member is obsolete, we keep it for now for backwards compatibility services.TryAddScoped>(); diff --git a/src/Components/WebAssembly/WebAssembly.Authentication/test/Microsoft.AspNetCore.Components.WebAssembly.Authentication.Tests.csproj b/src/Components/WebAssembly/WebAssembly.Authentication/test/Microsoft.AspNetCore.Components.WebAssembly.Authentication.Tests.csproj index 01092f99d71d..4180f2e54394 100644 --- a/src/Components/WebAssembly/WebAssembly.Authentication/test/Microsoft.AspNetCore.Components.WebAssembly.Authentication.Tests.csproj +++ b/src/Components/WebAssembly/WebAssembly.Authentication/test/Microsoft.AspNetCore.Components.WebAssembly.Authentication.Tests.csproj @@ -6,6 +6,8 @@ + + diff --git a/src/Components/WebAssembly/WebAssembly.Authentication/test/RemoteAuthenticatorCoreTests.cs b/src/Components/WebAssembly/WebAssembly.Authentication/test/RemoteAuthenticatorCoreTests.cs index edf7b0e79160..c624fcfc9178 100644 --- a/src/Components/WebAssembly/WebAssembly.Authentication/test/RemoteAuthenticatorCoreTests.cs +++ b/src/Components/WebAssembly/WebAssembly.Authentication/test/RemoteAuthenticatorCoreTests.cs @@ -370,37 +370,6 @@ public async Task AuthenticationManager_Logout_DoesNothingOnRedirect() } - [Fact] - public async Task AuthenticationManager_Logout_RedirectsToFailureOnInvalidSignOutState() - { - // Arrange - var (remoteAuthenticator, renderer, authServiceMock) = CreateAuthenticationManager( - "https://www.example.com/base/authentication/logout", - new InteractiveRequestOptions { Interaction = InteractionType.SignIn, ReturnUrl = "https://www.example.com/base/fetchData" }.ToState()); - - if (remoteAuthenticator.SignOutManager is TestSignOutSessionStateManager testManager) - { - testManager.SignOutState = false; - } - - var parameters = ParameterView.FromDictionary(new Dictionary - { - [_action] = RemoteAuthenticationActions.LogOut - }); - - // Act - await renderer.Dispatcher.InvokeAsync(() => remoteAuthenticator.SetParametersAsync(parameters)); - - // Assert - Assert.Equal( - "https://www.example.com/base/authentication/logout-failed", - remoteAuthenticator.Navigation.Uri); - - Assert.Equal( - "The logout was not initiated from within the page.", - ((TestNavigationManager)remoteAuthenticator.Navigation).HistoryEntryState); - } - [Fact] public async Task AuthenticationManager_Logout_NavigatesToLogoutFailureOnError() { @@ -731,8 +700,6 @@ private static Mock.Of>>(), navigationManager); - remoteAuthenticator.SignOutManager = new TestSignOutSessionStateManager(); - remoteAuthenticator.AuthenticationService = authenticationServiceMock; remoteAuthenticator.AuthenticationProvider = authenticationServiceMock; return (remoteAuthenticator, renderer, authenticationServiceMock); @@ -756,24 +723,6 @@ protected override void NavigateToCore(string uri, NavigationOptions options) } } -#pragma warning disable CS0618 // Type or member is obsolete, we keep it for now for backwards compatibility - private class TestSignOutSessionStateManager : SignOutSessionStateManager -#pragma warning restore CS0618 // Type or member is obsolete, we keep it for now for backwards compatibility - { - public TestSignOutSessionStateManager() : base(null) - { - } - public bool SignOutState { get; set; } = true; - - public override ValueTask SetSignOutState() - { - SignOutState = true; - return default; - } - - public override Task ValidateSignOutState() => Task.FromResult(SignOutState); - } - private class TestJsRuntime : IJSRuntime { public (string identifier, object[] args) LastInvocation { get; set; } diff --git a/src/Components/WebAssembly/WebAssembly/src/Infrastructure/JSInteropMethods.cs b/src/Components/WebAssembly/WebAssembly/src/Infrastructure/JSInteropMethods.cs index 12849698a874..fffc8dd15a18 100644 --- a/src/Components/WebAssembly/WebAssembly/src/Infrastructure/JSInteropMethods.cs +++ b/src/Components/WebAssembly/WebAssembly/src/Infrastructure/JSInteropMethods.cs @@ -14,13 +14,6 @@ namespace Microsoft.AspNetCore.Components.WebAssembly.Infrastructure; [EditorBrowsable(EditorBrowsableState.Never)] public static class JSInteropMethods { - /// - /// For framework use only. - /// - [Obsolete("This API is for framework use only and is no longer used in the current version")] - public static void NotifyLocationChanged(string uri, bool isInterceptedLink) - => WebAssemblyNavigationManager.Instance.SetLocation(uri, null, isInterceptedLink); - /// /// For framework use only. /// diff --git a/src/Components/WebAssembly/WebAssembly/src/PublicAPI.Unshipped.txt b/src/Components/WebAssembly/WebAssembly/src/PublicAPI.Unshipped.txt index 7dc5c58110bf..c65885b63ac7 100644 --- a/src/Components/WebAssembly/WebAssembly/src/PublicAPI.Unshipped.txt +++ b/src/Components/WebAssembly/WebAssembly/src/PublicAPI.Unshipped.txt @@ -1 +1,3 @@ #nullable enable +*REMOVED*~static Microsoft.AspNetCore.Components.WebAssembly.Infrastructure.JSInteropMethods.NotifyLocationChanged(string uri, bool isInterceptedLink) -> void +*REMOVED*static Microsoft.AspNetCore.Components.WebAssembly.Infrastructure.JSInteropMethods.NotifyLocationChanged(string! uri, bool isInterceptedLink) -> void diff --git a/src/Components/WebAssembly/WebAssembly/test/Microsoft.AspNetCore.Components.WebAssembly.Tests.csproj b/src/Components/WebAssembly/WebAssembly/test/Microsoft.AspNetCore.Components.WebAssembly.Tests.csproj index 2f9ac20c7c09..06e1685e6710 100644 --- a/src/Components/WebAssembly/WebAssembly/test/Microsoft.AspNetCore.Components.WebAssembly.Tests.csproj +++ b/src/Components/WebAssembly/WebAssembly/test/Microsoft.AspNetCore.Components.WebAssembly.Tests.csproj @@ -5,6 +5,8 @@ + + diff --git a/src/Components/WebAssembly/testassets/HostedInAspNet.Server/HostedInAspNet.Server.csproj b/src/Components/WebAssembly/testassets/HostedInAspNet.Server/HostedInAspNet.Server.csproj index 3b727d71c2b8..bd5f42014231 100644 --- a/src/Components/WebAssembly/testassets/HostedInAspNet.Server/HostedInAspNet.Server.csproj +++ b/src/Components/WebAssembly/testassets/HostedInAspNet.Server/HostedInAspNet.Server.csproj @@ -13,7 +13,18 @@ + + + + + + + + + + + diff --git a/src/Components/WebAssembly/testassets/ThreadingApp.Server/ThreadingApp.Server.csproj b/src/Components/WebAssembly/testassets/ThreadingApp.Server/ThreadingApp.Server.csproj index 860fc351bae6..a72618488154 100644 --- a/src/Components/WebAssembly/testassets/ThreadingApp.Server/ThreadingApp.Server.csproj +++ b/src/Components/WebAssembly/testassets/ThreadingApp.Server/ThreadingApp.Server.csproj @@ -11,12 +11,23 @@ + + + + + + + + + + + diff --git a/src/Components/WebAssembly/testassets/Wasm.Prerendered.Server/Wasm.Prerendered.Server.csproj b/src/Components/WebAssembly/testassets/Wasm.Prerendered.Server/Wasm.Prerendered.Server.csproj index 793e251088b9..1a7b5471d119 100644 --- a/src/Components/WebAssembly/testassets/Wasm.Prerendered.Server/Wasm.Prerendered.Server.csproj +++ b/src/Components/WebAssembly/testassets/Wasm.Prerendered.Server/Wasm.Prerendered.Server.csproj @@ -14,6 +14,9 @@ + + + diff --git a/src/Components/benchmarkapps/BlazingPizza.Server/BlazingPizza.Server.csproj b/src/Components/benchmarkapps/BlazingPizza.Server/BlazingPizza.Server.csproj index 0a92ed6f8863..9aaa57213a6a 100644 --- a/src/Components/benchmarkapps/BlazingPizza.Server/BlazingPizza.Server.csproj +++ b/src/Components/benchmarkapps/BlazingPizza.Server/BlazingPizza.Server.csproj @@ -11,6 +11,9 @@ + + + diff --git a/src/Components/benchmarkapps/Wasm.Performance/Driver/Wasm.Performance.Driver.csproj b/src/Components/benchmarkapps/Wasm.Performance/Driver/Wasm.Performance.Driver.csproj index 99555fccda38..aba20eee83cb 100644 --- a/src/Components/benchmarkapps/Wasm.Performance/Driver/Wasm.Performance.Driver.csproj +++ b/src/Components/benchmarkapps/Wasm.Performance/Driver/Wasm.Performance.Driver.csproj @@ -13,8 +13,13 @@ - + + + + + + diff --git a/src/Components/test/E2ETest/Microsoft.AspNetCore.Components.E2ETests.csproj b/src/Components/test/E2ETest/Microsoft.AspNetCore.Components.E2ETests.csproj index b147f6bc4877..b6d71e8ccdb0 100644 --- a/src/Components/test/E2ETest/Microsoft.AspNetCore.Components.E2ETests.csproj +++ b/src/Components/test/E2ETest/Microsoft.AspNetCore.Components.E2ETests.csproj @@ -43,6 +43,8 @@ + + diff --git a/src/Components/test/E2ETest/ServerExecutionTests/ServerNestedOptionsTest.cs b/src/Components/test/E2ETest/ServerExecutionTests/ServerNestedOptionsTest.cs new file mode 100644 index 000000000000..05d9416fdac1 --- /dev/null +++ b/src/Components/test/E2ETest/ServerExecutionTests/ServerNestedOptionsTest.cs @@ -0,0 +1,39 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +using BasicTestApp; +using Microsoft.AspNetCore.Components.E2ETest.Infrastructure; +using Microsoft.AspNetCore.Components.E2ETest.Infrastructure.ServerFixtures; +using Microsoft.AspNetCore.E2ETesting; +using OpenQA.Selenium; +using TestServer; +using Xunit.Abstractions; + +namespace Microsoft.AspNetCore.Components.E2ETest.ServerExecutionTests; + +public class ServerNestedOptionsTest : ServerTestBase> +{ + public ServerNestedOptionsTest( + BrowserFixture browserFixture, + BasicTestAppServerSiteFixture serverFixture, + ITestOutputHelper output) + : base(browserFixture, serverFixture, output) + { + } + + protected override void InitializeAsyncCore() + { + Navigate($"{ServerPathBase}/nestedCircuitOptions"); + } + + [Fact] + public void NestedCircuitOptionsAreAccepted() + { + var appElement = Browser.MountTestComponent(); + var countDisplayElement = appElement.FindElement(By.TagName("p")); + Browser.Equal("Current count: 0", () => countDisplayElement.Text); + + appElement.FindElement(By.TagName("button")).Click(); + Browser.Equal("Current count: 1", () => countDisplayElement.Text); + } +} diff --git a/src/Components/test/E2ETest/ServerExecutionTests/ServerReconnectionWithoutStateTest.cs b/src/Components/test/E2ETest/ServerExecutionTests/ServerReconnectionWithoutStateTest.cs new file mode 100644 index 000000000000..d6892741e7c6 --- /dev/null +++ b/src/Components/test/E2ETest/ServerExecutionTests/ServerReconnectionWithoutStateTest.cs @@ -0,0 +1,168 @@ +// 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.Collections.Generic; +using System.Text; +using Components.TestServer.RazorComponents; +using Microsoft.AspNetCore.Components.E2ETest; +using Microsoft.AspNetCore.Components.E2ETest.Infrastructure; +using Microsoft.AspNetCore.Components.E2ETest.Infrastructure.ServerFixtures; +using Microsoft.AspNetCore.Components.E2ETest.ServerExecutionTests; +using Microsoft.AspNetCore.E2ETesting; +using OpenQA.Selenium; +using OpenQA.Selenium.BiDi.Communication; +using OpenQA.Selenium.DevTools; +using TestServer; +using Xunit.Abstractions; + +namespace Microsoft.AspNetCore.Components.E2ETests.ServerExecutionTests; + +public class ServerReconnectionWithoutStateTest : ServerTestBase>> +{ + public ServerReconnectionWithoutStateTest( + BrowserFixture browserFixture, + BasicTestAppServerSiteFixture> serverFixture, + ITestOutputHelper output) + : base(browserFixture, serverFixture, output) + { + serverFixture.AdditionalArguments.AddRange("--DisableReconnectionCache", "true"); + serverFixture.AdditionalArguments.AddRange("--DisableCircuitPersistence", "true"); + } + + protected override void InitializeAsyncCore() + { + Navigate(TestUrl); + Browser.Exists(By.Id("render-mode-interactive")); + } + + public string TestUrl { get; set; } = "/subdir/persistent-state/disconnection"; + + public bool UseShadowRoot { get; set; } = true; + + [Fact] + public void ReloadsPage_AfterDisconnection_WithoutServerState() + { + // Check interactivity + Browser.Equal("5", () => Browser.Exists(By.Id("non-persisted-counter")).Text); + Browser.Exists(By.Id("increment-non-persisted-counter")).Click(); + Browser.Equal("6", () => Browser.Exists(By.Id("non-persisted-counter")).Text); + + // Store a reference to an element to detect page reload + // When the page reloads, this element reference will become stale + var initialElement = Browser.Exists(By.Id("non-persisted-counter")); + var initialConnectedLogCount = GetConnectedLogCount(); + + // Force close the connection + // The client should get rejected on both reconnection and circuit resume because the server has no state + var javascript = (IJavaScriptExecutor)Browser; + javascript.ExecuteScript("Blazor._internal.forceCloseConnection()"); + + // Check for page reload using multiple conditions: + // 1. Previously captured element is stale + Browser.True(initialElement.IsStale); + // 2. Counter state is reset + Browser.Equal("5", () => Browser.Exists(By.Id("non-persisted-counter")).Text); + // 3. WebSocket connection has been re-established + Browser.True(() => GetConnectedLogCount() == initialConnectedLogCount + 1); + + int GetConnectedLogCount() => Browser.Manage().Logs.GetLog(LogType.Browser) + .Where(l => l.Level == LogLevel.Info && l.Message.Contains("Information: WebSocket connected")).Count(); + } + + [Fact] + public void CanResume_AfterClientPause_WithoutServerState() + { + // Initial state: NonPersistedCounter should be 5 + Browser.Equal("5", () => Browser.Exists(By.Id("non-persisted-counter")).Text); + + // Increment both counters + Browser.Exists(By.Id("increment-persistent-counter-count")).Click(); + Browser.Exists(By.Id("increment-non-persisted-counter")).Click(); + + Browser.Equal("1", () => Browser.Exists(By.Id("persistent-counter-count")).Text); + Browser.Equal("6", () => Browser.Exists(By.Id("non-persisted-counter")).Text); + + var javascript = (IJavaScriptExecutor)Browser; + TriggerClientPauseAndInteract(javascript); + + // After first reconnection: + Browser.Equal("2", () => Browser.Exists(By.Id("persistent-counter-count")).Text); + Browser.Equal("0", () => Browser.Exists(By.Id("non-persisted-counter")).Text); + + // Increment non-persisted counter again + Browser.Exists(By.Id("increment-non-persisted-counter")).Click(); + Browser.Equal("1", () => Browser.Exists(By.Id("non-persisted-counter")).Text); + + TriggerClientPauseAndInteract(javascript); + + // After second reconnection: + Browser.Equal("3", () => Browser.Exists(By.Id("persistent-counter-count")).Text); + Browser.Equal("0", () => Browser.Exists(By.Id("non-persisted-counter")).Text); + } + + private void TriggerClientPauseAndInteract(IJavaScriptExecutor javascript) + { + var previousText = Browser.Exists(By.Id("persistent-counter-render")).Text; + javascript.ExecuteScript("Blazor.pauseCircuit()"); + Browser.Equal("block", () => Browser.Exists(By.Id("components-reconnect-modal")).GetCssValue("display")); + + // Retry button should be hidden + Browser.Equal( + (false, true), + () => Browser.Exists( + () => + { + var buttons = UseShadowRoot ? + Browser.Exists(By.Id("components-reconnect-modal")) + .GetShadowRoot() + .FindElements(By.CssSelector(".components-reconnect-dialog button")) : + Browser.Exists(By.Id("components-reconnect-modal")) + .FindElements(By.CssSelector(".components-reconnect-container button")); + + Assert.Equal(2, buttons.Count); + return (buttons[0].Displayed, buttons[1].Displayed); + }, + TimeSpan.FromSeconds(1))); + + Browser.Exists( + () => + { + var buttons = UseShadowRoot ? + Browser.Exists(By.Id("components-reconnect-modal")) + .GetShadowRoot() + .FindElements(By.CssSelector(".components-reconnect-dialog button")) : + Browser.Exists(By.Id("components-reconnect-modal")) + .FindElements(By.CssSelector(".components-reconnect-container button")); + return buttons[1]; + }, + TimeSpan.FromSeconds(1)).Click(); + + // Then it should disappear + Browser.Equal("none", () => Browser.Exists(By.Id("components-reconnect-modal")).GetCssValue("display")); + + var newText = Browser.Exists(By.Id("persistent-counter-render")).Text; + Assert.NotEqual(previousText, newText); + + Browser.Exists(By.Id("increment-persistent-counter-count")).Click(); + } +} + +public class ServerReconnectionWithoutStateCustomUITest : ServerReconnectionWithoutStateTest +{ + public ServerReconnectionWithoutStateCustomUITest( + BrowserFixture browserFixture, + BasicTestAppServerSiteFixture> serverFixture, + ITestOutputHelper output) + : base(browserFixture, serverFixture, output) + { + TestUrl = "/subdir/persistent-state/disconnection?custom-reconnect-ui=true"; + UseShadowRoot = false; // Custom UI does not use shadow DOM + } + + protected override void InitializeAsyncCore() + { + base.InitializeAsyncCore(); + Browser.Exists(By.CssSelector("#components-reconnect-modal[data-nosnippet]")); + } +} diff --git a/src/Components/test/E2ETest/Tests/WebAssemblyNestedOptionsTest.cs b/src/Components/test/E2ETest/Tests/WebAssemblyNestedOptionsTest.cs new file mode 100644 index 000000000000..a94df61cf823 --- /dev/null +++ b/src/Components/test/E2ETest/Tests/WebAssemblyNestedOptionsTest.cs @@ -0,0 +1,39 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +using BasicTestApp; +using Microsoft.AspNetCore.Components.E2ETest.Infrastructure; +using Microsoft.AspNetCore.Components.E2ETest.Infrastructure.ServerFixtures; +using Microsoft.AspNetCore.E2ETesting; +using OpenQA.Selenium; +using Xunit.Abstractions; + +namespace Microsoft.AspNetCore.Components.E2ETest.Tests; + +public class WebAssemblyNestedOptionsTest : ServerTestBase> +{ + public WebAssemblyNestedOptionsTest( + BrowserFixture browserFixture, + BlazorWasmTestAppFixture serverFixture, + ITestOutputHelper output) + : base(browserFixture, serverFixture, output) + { + _serverFixture.PathBase = "/subdir"; + } + + protected override void InitializeAsyncCore() + { + base.InitializeAsyncCore(); + + // Navigate with query parameter to trigger nested options format + Navigate($"{ServerPathBase}?nested-options=true"); + Browser.MountTestComponent(); + } + + [Fact] + public void NestedWebAssemblyOptionsAreAccepted() + { + var element = Browser.Exists(By.Id("environment")); + Browser.Equal("true", () => element.Text); + } +} diff --git a/src/Components/test/testassets/BasicTestApp/wwwroot/index.html b/src/Components/test/testassets/BasicTestApp/wwwroot/index.html index 9506d48c434e..3b5f3f8021f0 100644 --- a/src/Components/test/testassets/BasicTestApp/wwwroot/index.html +++ b/src/Components/test/testassets/BasicTestApp/wwwroot/index.html @@ -63,11 +63,25 @@ document.body.append(element); } - Blazor.start({ - configureRuntime: dotnet => { - dotnet.withEnvironmentVariable("CONFIGURE_RUNTIME", "true"); - } - }); + // Support both top-level and nested options format + // The nested format matches what blazor.web.js uses + const useNestedFormat = location.search.indexOf('nested-options=true') !== -1; + + if (useNestedFormat) { + Blazor.start({ + webAssembly: { + configureRuntime: dotnet => { + dotnet.withEnvironmentVariable("CONFIGURE_RUNTIME", "true"); + } + } + }); + } else { + Blazor.start({ + configureRuntime: dotnet => { + dotnet.withEnvironmentVariable("CONFIGURE_RUNTIME", "true"); + } + }); + } })(); diff --git a/src/Components/test/testassets/Components.TestServer/Components.TestServer.csproj b/src/Components/test/testassets/Components.TestServer/Components.TestServer.csproj index 17ff57531d67..cfe944111212 100644 --- a/src/Components/test/testassets/Components.TestServer/Components.TestServer.csproj +++ b/src/Components/test/testassets/Components.TestServer/Components.TestServer.csproj @@ -19,19 +19,43 @@ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/Components/test/testassets/Components.TestServer/Pages/NestedCircuitOptions.cshtml b/src/Components/test/testassets/Components.TestServer/Pages/NestedCircuitOptions.cshtml new file mode 100644 index 000000000000..e05c2d7f889d --- /dev/null +++ b/src/Components/test/testassets/Components.TestServer/Pages/NestedCircuitOptions.cshtml @@ -0,0 +1,33 @@ +@page "/nestedCircuitOptions" +@addTagHelper "*, Microsoft.AspNetCore.Mvc.TagHelpers" + + + + + Basic test app - Nested Circuit Options + + + + + + + + +
+ An unhandled error has occurred. + Reload + 🗙 +
+ + + + + diff --git a/src/Components/test/testassets/Components.TestServer/RazorComponentEndpointsStartup.cs b/src/Components/test/testassets/Components.TestServer/RazorComponentEndpointsStartup.cs index 13e457f49995..fae4794269b8 100644 --- a/src/Components/test/testassets/Components.TestServer/RazorComponentEndpointsStartup.cs +++ b/src/Components/test/testassets/Components.TestServer/RazorComponentEndpointsStartup.cs @@ -51,6 +51,14 @@ public void ConfigureServices(IServiceCollection services) options.DisconnectedCircuitMaxRetained = 0; options.DetailedErrors = true; } + if (Configuration.GetValue("DisableCircuitPersistence")) + { + // This disables the circuit persistence. + // In combination with DisableReconnectionCache this means that a disconnected client will always + // be rejected on reconnection/resume attempts. + options.PersistedCircuitInMemoryMaxRetained = 0; + options.DetailedErrors = true; + } options.RootComponents.RegisterForJavaScript("dynamic-js-root-counter"); }) .AddAuthenticationStateSerialization(options => diff --git a/src/Components/test/testassets/ComponentsApp.Server/ComponentsApp.Server.csproj b/src/Components/test/testassets/ComponentsApp.Server/ComponentsApp.Server.csproj index d960dfa01d4f..6a52484fe8d9 100644 --- a/src/Components/test/testassets/ComponentsApp.Server/ComponentsApp.Server.csproj +++ b/src/Components/test/testassets/ComponentsApp.Server/ComponentsApp.Server.csproj @@ -8,6 +8,9 @@ + + +
diff --git a/src/DataProtection/DataProtection/test/Microsoft.AspNetCore.DataProtection.Tests/Microsoft.AspNetCore.DataProtection.Tests.csproj b/src/DataProtection/DataProtection/test/Microsoft.AspNetCore.DataProtection.Tests/Microsoft.AspNetCore.DataProtection.Tests.csproj index c504ee3c4eb4..6d007ce40251 100644 --- a/src/DataProtection/DataProtection/test/Microsoft.AspNetCore.DataProtection.Tests/Microsoft.AspNetCore.DataProtection.Tests.csproj +++ b/src/DataProtection/DataProtection/test/Microsoft.AspNetCore.DataProtection.Tests/Microsoft.AspNetCore.DataProtection.Tests.csproj @@ -11,7 +11,13 @@
+ + + + + + @@ -21,5 +27,5 @@ - + diff --git a/src/DataProtection/samples/CustomEncryptorSample/CustomEncryptorSample.csproj b/src/DataProtection/samples/CustomEncryptorSample/CustomEncryptorSample.csproj index a7d510077287..c5d7301fcd4d 100644 --- a/src/DataProtection/samples/CustomEncryptorSample/CustomEncryptorSample.csproj +++ b/src/DataProtection/samples/CustomEncryptorSample/CustomEncryptorSample.csproj @@ -8,6 +8,8 @@ + + diff --git a/src/DataProtection/samples/EntityFrameworkCoreSample/EntityFrameworkCoreSample.csproj b/src/DataProtection/samples/EntityFrameworkCoreSample/EntityFrameworkCoreSample.csproj index 62db1a411520..ba69ef1e8a17 100644 --- a/src/DataProtection/samples/EntityFrameworkCoreSample/EntityFrameworkCoreSample.csproj +++ b/src/DataProtection/samples/EntityFrameworkCoreSample/EntityFrameworkCoreSample.csproj @@ -7,6 +7,8 @@ + + diff --git a/src/DataProtection/samples/KeyManagementSample/KeyManagementSample.csproj b/src/DataProtection/samples/KeyManagementSample/KeyManagementSample.csproj index 4539a6111eb6..7ebd7f8726e7 100644 --- a/src/DataProtection/samples/KeyManagementSample/KeyManagementSample.csproj +++ b/src/DataProtection/samples/KeyManagementSample/KeyManagementSample.csproj @@ -8,6 +8,8 @@ + + diff --git a/src/DataProtection/samples/KeyManagementSimulator/KeyManagementSimulator.csproj b/src/DataProtection/samples/KeyManagementSimulator/KeyManagementSimulator.csproj index 4539a6111eb6..7ebd7f8726e7 100644 --- a/src/DataProtection/samples/KeyManagementSimulator/KeyManagementSimulator.csproj +++ b/src/DataProtection/samples/KeyManagementSimulator/KeyManagementSimulator.csproj @@ -8,6 +8,8 @@ + + diff --git a/src/DefaultBuilder/samples/SampleApp/DefaultBuilder.SampleApp.csproj b/src/DefaultBuilder/samples/SampleApp/DefaultBuilder.SampleApp.csproj index e616256aea7d..0e739d81a6cb 100644 --- a/src/DefaultBuilder/samples/SampleApp/DefaultBuilder.SampleApp.csproj +++ b/src/DefaultBuilder/samples/SampleApp/DefaultBuilder.SampleApp.csproj @@ -6,6 +6,13 @@ OutOfProcess + + + + + + + @@ -13,6 +20,5 @@ - diff --git a/src/DefaultBuilder/src/Microsoft.AspNetCore.csproj b/src/DefaultBuilder/src/Microsoft.AspNetCore.csproj index b7b1e259a1e3..242e3156525e 100644 --- a/src/DefaultBuilder/src/Microsoft.AspNetCore.csproj +++ b/src/DefaultBuilder/src/Microsoft.AspNetCore.csproj @@ -12,15 +12,24 @@ + + + + + + + + + diff --git a/src/DefaultBuilder/test/Microsoft.AspNetCore.Tests/Microsoft.AspNetCore.Tests.csproj b/src/DefaultBuilder/test/Microsoft.AspNetCore.Tests/Microsoft.AspNetCore.Tests.csproj index 2bb59ab8befe..568222983430 100644 --- a/src/DefaultBuilder/test/Microsoft.AspNetCore.Tests/Microsoft.AspNetCore.Tests.csproj +++ b/src/DefaultBuilder/test/Microsoft.AspNetCore.Tests/Microsoft.AspNetCore.Tests.csproj @@ -5,9 +5,20 @@ + + + + + + + + + + + - + diff --git a/src/DefaultBuilder/testassets/CreateDefaultBuilderApp/CreateDefaultBuilderApp.csproj b/src/DefaultBuilder/testassets/CreateDefaultBuilderApp/CreateDefaultBuilderApp.csproj index 230dfe2f2ddb..8940c0f71656 100644 --- a/src/DefaultBuilder/testassets/CreateDefaultBuilderApp/CreateDefaultBuilderApp.csproj +++ b/src/DefaultBuilder/testassets/CreateDefaultBuilderApp/CreateDefaultBuilderApp.csproj @@ -11,6 +11,10 @@ + + + + diff --git a/src/DefaultBuilder/testassets/CreateDefaultBuilderOfTApp/CreateDefaultBuilderOfTApp.csproj b/src/DefaultBuilder/testassets/CreateDefaultBuilderOfTApp/CreateDefaultBuilderOfTApp.csproj index 61671a8b2145..147408324575 100644 --- a/src/DefaultBuilder/testassets/CreateDefaultBuilderOfTApp/CreateDefaultBuilderOfTApp.csproj +++ b/src/DefaultBuilder/testassets/CreateDefaultBuilderOfTApp/CreateDefaultBuilderOfTApp.csproj @@ -8,6 +8,9 @@ + + + diff --git a/src/DefaultBuilder/testassets/DependencyInjectionApp/DependencyInjectionApp.csproj b/src/DefaultBuilder/testassets/DependencyInjectionApp/DependencyInjectionApp.csproj index 81fb60ddab30..935cad377198 100644 --- a/src/DefaultBuilder/testassets/DependencyInjectionApp/DependencyInjectionApp.csproj +++ b/src/DefaultBuilder/testassets/DependencyInjectionApp/DependencyInjectionApp.csproj @@ -7,6 +7,10 @@ + + + + diff --git a/src/DefaultBuilder/testassets/StartRequestDelegateUrlApp/StartRequestDelegateUrlApp.csproj b/src/DefaultBuilder/testassets/StartRequestDelegateUrlApp/StartRequestDelegateUrlApp.csproj index 81fb60ddab30..3fea59f8c12c 100644 --- a/src/DefaultBuilder/testassets/StartRequestDelegateUrlApp/StartRequestDelegateUrlApp.csproj +++ b/src/DefaultBuilder/testassets/StartRequestDelegateUrlApp/StartRequestDelegateUrlApp.csproj @@ -7,6 +7,10 @@ + + + + diff --git a/src/DefaultBuilder/testassets/StartRouteBuilderUrlApp/StartRouteBuilderUrlApp.csproj b/src/DefaultBuilder/testassets/StartRouteBuilderUrlApp/StartRouteBuilderUrlApp.csproj index 81fb60ddab30..ed6b90535e3e 100644 --- a/src/DefaultBuilder/testassets/StartRouteBuilderUrlApp/StartRouteBuilderUrlApp.csproj +++ b/src/DefaultBuilder/testassets/StartRouteBuilderUrlApp/StartRouteBuilderUrlApp.csproj @@ -7,6 +7,12 @@ + + + + + + diff --git a/src/DefaultBuilder/testassets/StartWithIApplicationBuilderUrlApp/StartWithIApplicationBuilderUrlApp.csproj b/src/DefaultBuilder/testassets/StartWithIApplicationBuilderUrlApp/StartWithIApplicationBuilderUrlApp.csproj index 81fb60ddab30..a3548d2ca09d 100644 --- a/src/DefaultBuilder/testassets/StartWithIApplicationBuilderUrlApp/StartWithIApplicationBuilderUrlApp.csproj +++ b/src/DefaultBuilder/testassets/StartWithIApplicationBuilderUrlApp/StartWithIApplicationBuilderUrlApp.csproj @@ -7,6 +7,9 @@ + + + diff --git a/src/Features/JsonPatch.SystemTextJson/test/Microsoft.AspNetCore.JsonPatch.SystemTextJson.Tests.csproj b/src/Features/JsonPatch.SystemTextJson/test/Microsoft.AspNetCore.JsonPatch.SystemTextJson.Tests.csproj index 3addcd38dec1..0ef8a64a1819 100644 --- a/src/Features/JsonPatch.SystemTextJson/test/Microsoft.AspNetCore.JsonPatch.SystemTextJson.Tests.csproj +++ b/src/Features/JsonPatch.SystemTextJson/test/Microsoft.AspNetCore.JsonPatch.SystemTextJson.Tests.csproj @@ -5,6 +5,8 @@ + + diff --git a/src/FileProviders/Manifest.MSBuildTask/test/Microsoft.Extensions.FileProviders.Embedded.Manifest.Task.Tests.csproj b/src/FileProviders/Manifest.MSBuildTask/test/Microsoft.Extensions.FileProviders.Embedded.Manifest.Task.Tests.csproj index 06afd574e83a..2ee457ffb504 100644 --- a/src/FileProviders/Manifest.MSBuildTask/test/Microsoft.Extensions.FileProviders.Embedded.Manifest.Task.Tests.csproj +++ b/src/FileProviders/Manifest.MSBuildTask/test/Microsoft.Extensions.FileProviders.Embedded.Manifest.Task.Tests.csproj @@ -9,6 +9,8 @@ + + diff --git a/src/Framework/AspNetCoreAnalyzers/samples/WebAppSample/WebAppSample.csproj b/src/Framework/AspNetCoreAnalyzers/samples/WebAppSample/WebAppSample.csproj index 764634e30066..8004dbc21f18 100644 --- a/src/Framework/AspNetCoreAnalyzers/samples/WebAppSample/WebAppSample.csproj +++ b/src/Framework/AspNetCoreAnalyzers/samples/WebAppSample/WebAppSample.csproj @@ -20,6 +20,11 @@ + + + + + diff --git a/src/Framework/AspNetCoreAnalyzers/test/Microsoft.AspNetCore.App.Analyzers.Test.csproj b/src/Framework/AspNetCoreAnalyzers/test/Microsoft.AspNetCore.App.Analyzers.Test.csproj index 7c95e4dab135..0c7166c9426a 100644 --- a/src/Framework/AspNetCoreAnalyzers/test/Microsoft.AspNetCore.App.Analyzers.Test.csproj +++ b/src/Framework/AspNetCoreAnalyzers/test/Microsoft.AspNetCore.App.Analyzers.Test.csproj @@ -21,6 +21,9 @@ + + + diff --git a/src/HealthChecks/HealthChecks/test/HealthCheckPublisherHostedServiceTest.cs b/src/HealthChecks/HealthChecks/test/HealthCheckPublisherHostedServiceTest.cs index bfdea1968900..8e8252317afc 100644 --- a/src/HealthChecks/HealthChecks/test/HealthCheckPublisherHostedServiceTest.cs +++ b/src/HealthChecks/HealthChecks/test/HealthCheckPublisherHostedServiceTest.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; +using System.Collections.Concurrent; using System.Collections.Generic; using System.Linq; using System.Threading; @@ -799,9 +800,17 @@ private class TestPublisher : IHealthCheckPublisher public TestPublisher() { _started = new TaskCompletionSource(TaskCreationOptions.RunContinuationsAsynchronously); + _entries = new ConcurrentQueue<(HealthReport report, CancellationToken cancellationToken)>(); } - public List<(HealthReport report, CancellationToken cancellationToken)> Entries { get; } = new List<(HealthReport report, CancellationToken cancellationToken)>(); + private readonly ConcurrentQueue<(HealthReport report, CancellationToken cancellationToken)> _entries; + public IReadOnlyList<(HealthReport report, CancellationToken cancellationToken)> Entries + { + get + { + return _entries.ToList(); + } + } public Exception? Exception { get; set; } @@ -811,7 +820,7 @@ public TestPublisher() public async Task PublishAsync(HealthReport report, CancellationToken cancellationToken) { - Entries.Add((report, cancellationToken)); + _entries.Enqueue((report, cancellationToken)); // Signal that we've started _started.SetResult(null); diff --git a/src/Hosting/Abstractions/src/Microsoft.AspNetCore.Hosting.Abstractions.csproj b/src/Hosting/Abstractions/src/Microsoft.AspNetCore.Hosting.Abstractions.csproj index ed3426d65288..9f0bf4a2730d 100644 --- a/src/Hosting/Abstractions/src/Microsoft.AspNetCore.Hosting.Abstractions.csproj +++ b/src/Hosting/Abstractions/src/Microsoft.AspNetCore.Hosting.Abstractions.csproj @@ -14,6 +14,7 @@ + diff --git a/src/Hosting/Hosting/src/Microsoft.AspNetCore.Hosting.csproj b/src/Hosting/Hosting/src/Microsoft.AspNetCore.Hosting.csproj index eb2052e0b5e7..6b4a9a2fa1ac 100644 --- a/src/Hosting/Hosting/src/Microsoft.AspNetCore.Hosting.csproj +++ b/src/Hosting/Hosting/src/Microsoft.AspNetCore.Hosting.csproj @@ -25,8 +25,11 @@ - + + + + diff --git a/src/Hosting/Hosting/test/Microsoft.AspNetCore.Hosting.Tests.csproj b/src/Hosting/Hosting/test/Microsoft.AspNetCore.Hosting.Tests.csproj index 866a08e32b43..28517af1933d 100644 --- a/src/Hosting/Hosting/test/Microsoft.AspNetCore.Hosting.Tests.csproj +++ b/src/Hosting/Hosting/test/Microsoft.AspNetCore.Hosting.Tests.csproj @@ -21,11 +21,19 @@ - + + + + + + + + + + - diff --git a/src/Hosting/TestHost/src/Microsoft.AspNetCore.TestHost.csproj b/src/Hosting/TestHost/src/Microsoft.AspNetCore.TestHost.csproj index 3dc6a0dbecb3..aaf6c13767b1 100644 --- a/src/Hosting/TestHost/src/Microsoft.AspNetCore.TestHost.csproj +++ b/src/Hosting/TestHost/src/Microsoft.AspNetCore.TestHost.csproj @@ -10,6 +10,11 @@ + + + + + diff --git a/src/Hosting/TestHost/test/Microsoft.AspNetCore.TestHost.Tests.csproj b/src/Hosting/TestHost/test/Microsoft.AspNetCore.TestHost.Tests.csproj index 820cf3800f65..674007e19b94 100644 --- a/src/Hosting/TestHost/test/Microsoft.AspNetCore.TestHost.Tests.csproj +++ b/src/Hosting/TestHost/test/Microsoft.AspNetCore.TestHost.Tests.csproj @@ -9,10 +9,20 @@ - + + + + - + + + + + + + + diff --git a/src/Hosting/WindowsServices/src/Microsoft.AspNetCore.Hosting.WindowsServices.csproj b/src/Hosting/WindowsServices/src/Microsoft.AspNetCore.Hosting.WindowsServices.csproj index 1ab9352c8357..b1242bc59941 100644 --- a/src/Hosting/WindowsServices/src/Microsoft.AspNetCore.Hosting.WindowsServices.csproj +++ b/src/Hosting/WindowsServices/src/Microsoft.AspNetCore.Hosting.WindowsServices.csproj @@ -10,6 +10,7 @@ + diff --git a/src/Hosting/WindowsServices/test/Microsoft.AspNetCore.Hosting.WindowsServices.Tests.csproj b/src/Hosting/WindowsServices/test/Microsoft.AspNetCore.Hosting.WindowsServices.Tests.csproj index 431869c11222..6d65a0123323 100644 --- a/src/Hosting/WindowsServices/test/Microsoft.AspNetCore.Hosting.WindowsServices.Tests.csproj +++ b/src/Hosting/WindowsServices/test/Microsoft.AspNetCore.Hosting.WindowsServices.Tests.csproj @@ -5,8 +5,15 @@ + + + + + + + diff --git a/src/Hosting/samples/GenericWebHost/GenericWebHost.csproj b/src/Hosting/samples/GenericWebHost/GenericWebHost.csproj index 2f6975e33ce5..1bdc178a7dec 100644 --- a/src/Hosting/samples/GenericWebHost/GenericWebHost.csproj +++ b/src/Hosting/samples/GenericWebHost/GenericWebHost.csproj @@ -8,6 +8,10 @@ + + + + diff --git a/src/Hosting/samples/SampleStartups/SampleStartups.csproj b/src/Hosting/samples/SampleStartups/SampleStartups.csproj index 02ed170423c3..f0518343fd6e 100644 --- a/src/Hosting/samples/SampleStartups/SampleStartups.csproj +++ b/src/Hosting/samples/SampleStartups/SampleStartups.csproj @@ -8,6 +8,10 @@ + + + + diff --git a/src/Hosting/test/testassets/BasicLinkedApp/BasicLinkedApp.csproj b/src/Hosting/test/testassets/BasicLinkedApp/BasicLinkedApp.csproj index 716ea487419e..8324cdf15fe2 100644 --- a/src/Hosting/test/testassets/BasicLinkedApp/BasicLinkedApp.csproj +++ b/src/Hosting/test/testassets/BasicLinkedApp/BasicLinkedApp.csproj @@ -12,8 +12,12 @@ - + + + + + diff --git a/src/Hosting/test/testassets/IStartupInjectionAssemblyName/IStartupInjectionAssemblyName.csproj b/src/Hosting/test/testassets/IStartupInjectionAssemblyName/IStartupInjectionAssemblyName.csproj index 71d8a7873ca5..098c158da507 100644 --- a/src/Hosting/test/testassets/IStartupInjectionAssemblyName/IStartupInjectionAssemblyName.csproj +++ b/src/Hosting/test/testassets/IStartupInjectionAssemblyName/IStartupInjectionAssemblyName.csproj @@ -7,6 +7,8 @@ + + diff --git a/src/Hosting/test/testassets/Microsoft.AspNetCore.Hosting.TestSites/Microsoft.AspNetCore.Hosting.TestSites.csproj b/src/Hosting/test/testassets/Microsoft.AspNetCore.Hosting.TestSites/Microsoft.AspNetCore.Hosting.TestSites.csproj index 64124387250e..df6290d9f569 100644 --- a/src/Hosting/test/testassets/Microsoft.AspNetCore.Hosting.TestSites/Microsoft.AspNetCore.Hosting.TestSites.csproj +++ b/src/Hosting/test/testassets/Microsoft.AspNetCore.Hosting.TestSites/Microsoft.AspNetCore.Hosting.TestSites.csproj @@ -7,9 +7,14 @@ + + + + + diff --git a/src/Html.Abstractions/test/Microsoft.AspNetCore.Html.Abstractions.Tests.csproj b/src/Html.Abstractions/test/Microsoft.AspNetCore.Html.Abstractions.Tests.csproj index 0c9196c21f87..11d08b0da03b 100644 --- a/src/Html.Abstractions/test/Microsoft.AspNetCore.Html.Abstractions.Tests.csproj +++ b/src/Html.Abstractions/test/Microsoft.AspNetCore.Html.Abstractions.Tests.csproj @@ -6,6 +6,8 @@ + + diff --git a/src/Http/Authentication.Core/src/Microsoft.AspNetCore.Authentication.Core.csproj b/src/Http/Authentication.Core/src/Microsoft.AspNetCore.Authentication.Core.csproj index 61b6d3a8f71e..4ea6605c7a90 100644 --- a/src/Http/Authentication.Core/src/Microsoft.AspNetCore.Authentication.Core.csproj +++ b/src/Http/Authentication.Core/src/Microsoft.AspNetCore.Authentication.Core.csproj @@ -17,6 +17,7 @@ + diff --git a/src/Http/Authentication.Core/test/Microsoft.AspNetCore.Authentication.Core.Test.csproj b/src/Http/Authentication.Core/test/Microsoft.AspNetCore.Authentication.Core.Test.csproj index 528810eaaacd..925eae100040 100644 --- a/src/Http/Authentication.Core/test/Microsoft.AspNetCore.Authentication.Core.Test.csproj +++ b/src/Http/Authentication.Core/test/Microsoft.AspNetCore.Authentication.Core.Test.csproj @@ -6,7 +6,11 @@ + + + + diff --git a/src/Http/Headers/test/Microsoft.Net.Http.Headers.Tests.csproj b/src/Http/Headers/test/Microsoft.Net.Http.Headers.Tests.csproj index 083c177f737d..91439bc28213 100644 --- a/src/Http/Headers/test/Microsoft.Net.Http.Headers.Tests.csproj +++ b/src/Http/Headers/test/Microsoft.Net.Http.Headers.Tests.csproj @@ -6,6 +6,8 @@ + + diff --git a/src/Http/Http.Abstractions/perf/Microbenchmarks/Microsoft.AspNetCore.Http.Abstractions.Microbenchmarks.csproj b/src/Http/Http.Abstractions/perf/Microbenchmarks/Microsoft.AspNetCore.Http.Abstractions.Microbenchmarks.csproj index f4f35eea0067..cf563c21098c 100644 --- a/src/Http/Http.Abstractions/perf/Microbenchmarks/Microsoft.AspNetCore.Http.Abstractions.Microbenchmarks.csproj +++ b/src/Http/Http.Abstractions/perf/Microbenchmarks/Microsoft.AspNetCore.Http.Abstractions.Microbenchmarks.csproj @@ -7,8 +7,10 @@ - + + + diff --git a/src/Http/Http.Abstractions/test/Microsoft.AspNetCore.Http.Abstractions.Tests.csproj b/src/Http/Http.Abstractions/test/Microsoft.AspNetCore.Http.Abstractions.Tests.csproj index 640ec134d744..aabb03bd8159 100644 --- a/src/Http/Http.Abstractions/test/Microsoft.AspNetCore.Http.Abstractions.Tests.csproj +++ b/src/Http/Http.Abstractions/test/Microsoft.AspNetCore.Http.Abstractions.Tests.csproj @@ -12,10 +12,16 @@ + + + + + - + + diff --git a/src/Http/Http.Extensions/test/Microsoft.AspNetCore.Http.Extensions.Tests.csproj b/src/Http/Http.Extensions/test/Microsoft.AspNetCore.Http.Extensions.Tests.csproj index 1900e5ea3ebb..3e93dffb9d44 100644 --- a/src/Http/Http.Extensions/test/Microsoft.AspNetCore.Http.Extensions.Tests.csproj +++ b/src/Http/Http.Extensions/test/Microsoft.AspNetCore.Http.Extensions.Tests.csproj @@ -12,17 +12,22 @@ + + - + + + - + + diff --git a/src/Http/Http.Results/src/Microsoft.AspNetCore.Http.Results.csproj b/src/Http/Http.Results/src/Microsoft.AspNetCore.Http.Results.csproj index ea792b089048..d8606a371a2e 100644 --- a/src/Http/Http.Results/src/Microsoft.AspNetCore.Http.Results.csproj +++ b/src/Http/Http.Results/src/Microsoft.AspNetCore.Http.Results.csproj @@ -26,8 +26,11 @@ + + + diff --git a/src/Http/Http.Results/test/Microsoft.AspNetCore.Http.Results.Tests.csproj b/src/Http/Http.Results/test/Microsoft.AspNetCore.Http.Results.Tests.csproj index c9d39f858d43..471421c417d8 100644 --- a/src/Http/Http.Results/test/Microsoft.AspNetCore.Http.Results.Tests.csproj +++ b/src/Http/Http.Results/test/Microsoft.AspNetCore.Http.Results.Tests.csproj @@ -5,9 +5,19 @@ + + + + + + + + + + diff --git a/src/Http/Http/perf/Microbenchmarks/Microsoft.AspNetCore.Http.Microbenchmarks.csproj b/src/Http/Http/perf/Microbenchmarks/Microsoft.AspNetCore.Http.Microbenchmarks.csproj index 663745c85991..d653edc8ed31 100644 --- a/src/Http/Http/perf/Microbenchmarks/Microsoft.AspNetCore.Http.Microbenchmarks.csproj +++ b/src/Http/Http/perf/Microbenchmarks/Microsoft.AspNetCore.Http.Microbenchmarks.csproj @@ -12,13 +12,17 @@ - + - + + + + + diff --git a/src/Http/Http/src/Microsoft.AspNetCore.Http.csproj b/src/Http/Http/src/Microsoft.AspNetCore.Http.csproj index 4e7148141a51..a28c02a2be02 100644 --- a/src/Http/Http/src/Microsoft.AspNetCore.Http.csproj +++ b/src/Http/Http/src/Microsoft.AspNetCore.Http.csproj @@ -31,6 +31,7 @@ + diff --git a/src/Http/Http/test/Microsoft.AspNetCore.Http.Tests.csproj b/src/Http/Http/test/Microsoft.AspNetCore.Http.Tests.csproj index f85700528b1e..c6f4b3d8e157 100644 --- a/src/Http/Http/test/Microsoft.AspNetCore.Http.Tests.csproj +++ b/src/Http/Http/test/Microsoft.AspNetCore.Http.Tests.csproj @@ -6,7 +6,13 @@ + + + + + + diff --git a/src/Http/Owin/benchmarks/Microsoft.AspNetCore.Owin.Microbenchmarks/Microsoft.AspNetCore.Owin.Microbenchmarks.csproj b/src/Http/Owin/benchmarks/Microsoft.AspNetCore.Owin.Microbenchmarks/Microsoft.AspNetCore.Owin.Microbenchmarks.csproj index 5ca0b8f6e5da..5753cd388c5d 100644 --- a/src/Http/Owin/benchmarks/Microsoft.AspNetCore.Owin.Microbenchmarks/Microsoft.AspNetCore.Owin.Microbenchmarks.csproj +++ b/src/Http/Owin/benchmarks/Microsoft.AspNetCore.Owin.Microbenchmarks/Microsoft.AspNetCore.Owin.Microbenchmarks.csproj @@ -7,7 +7,10 @@ + + + diff --git a/src/Http/Owin/src/Microsoft.AspNetCore.Owin.csproj b/src/Http/Owin/src/Microsoft.AspNetCore.Owin.csproj index bf57086595bb..a5c5f2e6eb2d 100644 --- a/src/Http/Owin/src/Microsoft.AspNetCore.Owin.csproj +++ b/src/Http/Owin/src/Microsoft.AspNetCore.Owin.csproj @@ -11,6 +11,8 @@ + + diff --git a/src/Http/Owin/test/Microsoft.AspNetCore.Owin.Tests.csproj b/src/Http/Owin/test/Microsoft.AspNetCore.Owin.Tests.csproj index f281b8319572..c64c5af06965 100644 --- a/src/Http/Owin/test/Microsoft.AspNetCore.Owin.Tests.csproj +++ b/src/Http/Owin/test/Microsoft.AspNetCore.Owin.Tests.csproj @@ -5,7 +5,13 @@ + + + + + + diff --git a/src/Http/Routing.Abstractions/test/Microsoft.AspNetCore.Mvc.Routing.Abstractions.Tests.csproj b/src/Http/Routing.Abstractions/test/Microsoft.AspNetCore.Mvc.Routing.Abstractions.Tests.csproj index ecaf259d84e1..c7df9610fe73 100644 --- a/src/Http/Routing.Abstractions/test/Microsoft.AspNetCore.Mvc.Routing.Abstractions.Tests.csproj +++ b/src/Http/Routing.Abstractions/test/Microsoft.AspNetCore.Mvc.Routing.Abstractions.Tests.csproj @@ -5,7 +5,12 @@ + + + + + diff --git a/src/Http/Routing/perf/Microbenchmarks/Microsoft.AspNetCore.Routing.Microbenchmarks.csproj b/src/Http/Routing/perf/Microbenchmarks/Microsoft.AspNetCore.Routing.Microbenchmarks.csproj index 200dc147c051..2de9372a9052 100644 --- a/src/Http/Routing/perf/Microbenchmarks/Microsoft.AspNetCore.Routing.Microbenchmarks.csproj +++ b/src/Http/Routing/perf/Microbenchmarks/Microsoft.AspNetCore.Routing.Microbenchmarks.csproj @@ -41,7 +41,11 @@ + + + + diff --git a/src/Http/Routing/src/Builder/RoutingEndpointConventionBuilderExtensions.cs b/src/Http/Routing/src/Builder/RoutingEndpointConventionBuilderExtensions.cs index fbb25d95130f..3820785250ab 100644 --- a/src/Http/Routing/src/Builder/RoutingEndpointConventionBuilderExtensions.cs +++ b/src/Http/Routing/src/Builder/RoutingEndpointConventionBuilderExtensions.cs @@ -1,6 +1,7 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. +using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Http.Metadata; using Microsoft.AspNetCore.Routing; using Microsoft.AspNetCore.WebUtilities; @@ -22,6 +23,20 @@ public static class RoutingEndpointConventionBuilderExtensions /// An empty collection means any host will be accepted. /// /// A reference to this instance after the operation has completed. + /// + /// APIs that depend on the Host header, including + /// and , are vulnerable to client spoofing. + /// + /// To safeguard against host and port spoofing: + /// + /// + /// Verify the server name used during the TLS handshake using ITlsHandshakeFeature.HostName. + /// + /// + /// Verify the local port where the connection was accepted using (specifically ). + /// + /// + /// public static TBuilder RequireHost(this TBuilder builder, params string[] hosts) where TBuilder : IEndpointConventionBuilder { ArgumentNullException.ThrowIfNull(builder); diff --git a/src/Http/Routing/test/FunctionalTests/Microsoft.AspNetCore.Routing.FunctionalTests.csproj b/src/Http/Routing/test/FunctionalTests/Microsoft.AspNetCore.Routing.FunctionalTests.csproj index 25d6e9fb4bcd..2c704db7879b 100644 --- a/src/Http/Routing/test/FunctionalTests/Microsoft.AspNetCore.Routing.FunctionalTests.csproj +++ b/src/Http/Routing/test/FunctionalTests/Microsoft.AspNetCore.Routing.FunctionalTests.csproj @@ -14,6 +14,7 @@ + diff --git a/src/Http/Routing/test/UnitTests/Microsoft.AspNetCore.Routing.Tests.csproj b/src/Http/Routing/test/UnitTests/Microsoft.AspNetCore.Routing.Tests.csproj index b4daa70a2f5f..58f994e45f22 100644 --- a/src/Http/Routing/test/UnitTests/Microsoft.AspNetCore.Routing.Tests.csproj +++ b/src/Http/Routing/test/UnitTests/Microsoft.AspNetCore.Routing.Tests.csproj @@ -9,12 +9,17 @@ - + + + + - + + + diff --git a/src/Http/Routing/test/testassets/Benchmarks/Benchmarks.csproj b/src/Http/Routing/test/testassets/Benchmarks/Benchmarks.csproj index b9de65bc9930..c65760b5f4b8 100644 --- a/src/Http/Routing/test/testassets/Benchmarks/Benchmarks.csproj +++ b/src/Http/Routing/test/testassets/Benchmarks/Benchmarks.csproj @@ -6,10 +6,16 @@ - + + + + + + + diff --git a/src/Http/Routing/test/testassets/RoutingSandbox/RoutingSandbox.csproj b/src/Http/Routing/test/testassets/RoutingSandbox/RoutingSandbox.csproj index 554514e46f57..356b96498f72 100644 --- a/src/Http/Routing/test/testassets/RoutingSandbox/RoutingSandbox.csproj +++ b/src/Http/Routing/test/testassets/RoutingSandbox/RoutingSandbox.csproj @@ -5,11 +5,17 @@ - + + + + + + + diff --git a/src/Http/Routing/test/testassets/RoutingWebSite/RoutingWebSite.csproj b/src/Http/Routing/test/testassets/RoutingWebSite/RoutingWebSite.csproj index 554514e46f57..356b96498f72 100644 --- a/src/Http/Routing/test/testassets/RoutingWebSite/RoutingWebSite.csproj +++ b/src/Http/Routing/test/testassets/RoutingWebSite/RoutingWebSite.csproj @@ -5,11 +5,17 @@ - + + + + + + + diff --git a/src/Http/Routing/tools/Swaggatherer/Swaggatherer.csproj b/src/Http/Routing/tools/Swaggatherer/Swaggatherer.csproj index 1d083a55e469..7fc9f443e8af 100644 --- a/src/Http/Routing/tools/Swaggatherer/Swaggatherer.csproj +++ b/src/Http/Routing/tools/Swaggatherer/Swaggatherer.csproj @@ -9,6 +9,7 @@ + diff --git a/src/Http/WebUtilities/test/Microsoft.AspNetCore.WebUtilities.Tests.csproj b/src/Http/WebUtilities/test/Microsoft.AspNetCore.WebUtilities.Tests.csproj index 60224678882a..da9e7b2a5845 100644 --- a/src/Http/WebUtilities/test/Microsoft.AspNetCore.WebUtilities.Tests.csproj +++ b/src/Http/WebUtilities/test/Microsoft.AspNetCore.WebUtilities.Tests.csproj @@ -6,6 +6,8 @@ + + diff --git a/src/Http/samples/MinimalSample/MinimalSample.csproj b/src/Http/samples/MinimalSample/MinimalSample.csproj index f4a02094cafb..bf2d52e702fb 100644 --- a/src/Http/samples/MinimalSample/MinimalSample.csproj +++ b/src/Http/samples/MinimalSample/MinimalSample.csproj @@ -10,12 +10,17 @@ + + + + + diff --git a/src/Http/samples/MinimalSampleOwin/MinimalSampleOwin.csproj b/src/Http/samples/MinimalSampleOwin/MinimalSampleOwin.csproj index b9b4ede801fe..af88b8cd188e 100644 --- a/src/Http/samples/MinimalSampleOwin/MinimalSampleOwin.csproj +++ b/src/Http/samples/MinimalSampleOwin/MinimalSampleOwin.csproj @@ -10,11 +10,18 @@ + + + + + + + diff --git a/src/Http/samples/MinimalValidationSample/MinimalValidationSample.csproj b/src/Http/samples/MinimalValidationSample/MinimalValidationSample.csproj index e01722e04559..41a5d366021d 100644 --- a/src/Http/samples/MinimalValidationSample/MinimalValidationSample.csproj +++ b/src/Http/samples/MinimalValidationSample/MinimalValidationSample.csproj @@ -9,14 +9,19 @@ + + - + + + + diff --git a/src/Http/samples/SampleApp/HttpAbstractions.SampleApp.csproj b/src/Http/samples/SampleApp/HttpAbstractions.SampleApp.csproj index b28850cf2f0d..0f2fd43aa9aa 100644 --- a/src/Http/samples/SampleApp/HttpAbstractions.SampleApp.csproj +++ b/src/Http/samples/SampleApp/HttpAbstractions.SampleApp.csproj @@ -6,8 +6,13 @@ + + + + + diff --git a/src/Identity/Core/src/Microsoft.AspNetCore.Identity.csproj b/src/Identity/Core/src/Microsoft.AspNetCore.Identity.csproj index 82a750e1393c..5c87a88985de 100644 --- a/src/Identity/Core/src/Microsoft.AspNetCore.Identity.csproj +++ b/src/Identity/Core/src/Microsoft.AspNetCore.Identity.csproj @@ -19,11 +19,26 @@ - + + + + + + + + + + + + + + + + diff --git a/src/Identity/Specification.Tests/src/Microsoft.AspNetCore.Identity.Specification.Tests.csproj b/src/Identity/Specification.Tests/src/Microsoft.AspNetCore.Identity.Specification.Tests.csproj index 371cea46f153..c83a09ad0613 100644 --- a/src/Identity/Specification.Tests/src/Microsoft.AspNetCore.Identity.Specification.Tests.csproj +++ b/src/Identity/Specification.Tests/src/Microsoft.AspNetCore.Identity.Specification.Tests.csproj @@ -9,6 +9,8 @@ + + diff --git a/src/Identity/UI/src/Microsoft.AspNetCore.Identity.UI.csproj b/src/Identity/UI/src/Microsoft.AspNetCore.Identity.UI.csproj index d36fe09d60c4..6e673123a1f3 100644 --- a/src/Identity/UI/src/Microsoft.AspNetCore.Identity.UI.csproj +++ b/src/Identity/UI/src/Microsoft.AspNetCore.Identity.UI.csproj @@ -34,8 +34,30 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/Identity/samples/IdentitySample.ApiEndpoints/IdentitySample.ApiEndpoints.csproj b/src/Identity/samples/IdentitySample.ApiEndpoints/IdentitySample.ApiEndpoints.csproj index 940addf2a293..291989ac6562 100644 --- a/src/Identity/samples/IdentitySample.ApiEndpoints/IdentitySample.ApiEndpoints.csproj +++ b/src/Identity/samples/IdentitySample.ApiEndpoints/IdentitySample.ApiEndpoints.csproj @@ -9,6 +9,8 @@ + + diff --git a/src/Identity/samples/IdentitySample.DefaultUI/IdentitySample.DefaultUI.csproj b/src/Identity/samples/IdentitySample.DefaultUI/IdentitySample.DefaultUI.csproj index eedbdf551b5d..ef8b4cc9c0e7 100644 --- a/src/Identity/samples/IdentitySample.DefaultUI/IdentitySample.DefaultUI.csproj +++ b/src/Identity/samples/IdentitySample.DefaultUI/IdentitySample.DefaultUI.csproj @@ -20,7 +20,13 @@ + + + + + + diff --git a/src/Identity/samples/IdentitySample.Mvc/IdentitySample.Mvc.csproj b/src/Identity/samples/IdentitySample.Mvc/IdentitySample.Mvc.csproj index cfd9be2a039d..57f6d4fac16c 100644 --- a/src/Identity/samples/IdentitySample.Mvc/IdentitySample.Mvc.csproj +++ b/src/Identity/samples/IdentitySample.Mvc/IdentitySample.Mvc.csproj @@ -18,6 +18,11 @@ + + + + + diff --git a/src/Identity/samples/IdentitySample.PasskeyConformance/IdentitySample.PasskeyConformance.csproj b/src/Identity/samples/IdentitySample.PasskeyConformance/IdentitySample.PasskeyConformance.csproj index 3e50af823bc5..9ade7dd4aebe 100644 --- a/src/Identity/samples/IdentitySample.PasskeyConformance/IdentitySample.PasskeyConformance.csproj +++ b/src/Identity/samples/IdentitySample.PasskeyConformance/IdentitySample.PasskeyConformance.csproj @@ -13,6 +13,11 @@ + + + + + diff --git a/src/Identity/samples/IdentitySample.PasskeyUI/IdentitySample.PasskeyUI.csproj b/src/Identity/samples/IdentitySample.PasskeyUI/IdentitySample.PasskeyUI.csproj index 92a0db3006a0..61699a55d908 100644 --- a/src/Identity/samples/IdentitySample.PasskeyUI/IdentitySample.PasskeyUI.csproj +++ b/src/Identity/samples/IdentitySample.PasskeyUI/IdentitySample.PasskeyUI.csproj @@ -15,6 +15,11 @@ + + + + + diff --git a/src/Identity/test/Identity.FunctionalTests/Microsoft.AspNetCore.Identity.FunctionalTests.csproj b/src/Identity/test/Identity.FunctionalTests/Microsoft.AspNetCore.Identity.FunctionalTests.csproj index e8ec634bb07d..fd6e2e1be338 100644 --- a/src/Identity/test/Identity.FunctionalTests/Microsoft.AspNetCore.Identity.FunctionalTests.csproj +++ b/src/Identity/test/Identity.FunctionalTests/Microsoft.AspNetCore.Identity.FunctionalTests.csproj @@ -21,6 +21,16 @@ + + + + + + + + + + diff --git a/src/Identity/testassets/Identity.DefaultUI.WebSite/Identity.DefaultUI.WebSite.csproj b/src/Identity/testassets/Identity.DefaultUI.WebSite/Identity.DefaultUI.WebSite.csproj index adad8ea30587..d1fa3ff1cd32 100644 --- a/src/Identity/testassets/Identity.DefaultUI.WebSite/Identity.DefaultUI.WebSite.csproj +++ b/src/Identity/testassets/Identity.DefaultUI.WebSite/Identity.DefaultUI.WebSite.csproj @@ -27,7 +27,13 @@ + + + + + + diff --git a/src/JSInterop/Microsoft.JSInterop/test/Microsoft.JSInterop.Tests.csproj b/src/JSInterop/Microsoft.JSInterop/test/Microsoft.JSInterop.Tests.csproj index fd443615fea8..f39eeb69180a 100644 --- a/src/JSInterop/Microsoft.JSInterop/test/Microsoft.JSInterop.Tests.csproj +++ b/src/JSInterop/Microsoft.JSInterop/test/Microsoft.JSInterop.Tests.csproj @@ -6,6 +6,8 @@ + + diff --git a/src/Middleware/CORS/src/Microsoft.AspNetCore.Cors.csproj b/src/Middleware/CORS/src/Microsoft.AspNetCore.Cors.csproj index 492d68637faa..99fdcf0dc22d 100644 --- a/src/Middleware/CORS/src/Microsoft.AspNetCore.Cors.csproj +++ b/src/Middleware/CORS/src/Microsoft.AspNetCore.Cors.csproj @@ -14,8 +14,11 @@ Microsoft.AspNetCore.Cors.EnableCorsAttribute + + + diff --git a/src/Middleware/CORS/test/testassets/CorsMiddlewareWebSite/CorsMiddlewareWebSite.csproj b/src/Middleware/CORS/test/testassets/CorsMiddlewareWebSite/CorsMiddlewareWebSite.csproj index 802ceb3d0bc9..f0d139035086 100644 --- a/src/Middleware/CORS/test/testassets/CorsMiddlewareWebSite/CorsMiddlewareWebSite.csproj +++ b/src/Middleware/CORS/test/testassets/CorsMiddlewareWebSite/CorsMiddlewareWebSite.csproj @@ -5,9 +5,14 @@ + + + + + diff --git a/src/Middleware/Diagnostics.EntityFrameworkCore/src/Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore.csproj b/src/Middleware/Diagnostics.EntityFrameworkCore/src/Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore.csproj index b4d919d7901a..cdff75422277 100644 --- a/src/Middleware/Diagnostics.EntityFrameworkCore/src/Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore.csproj +++ b/src/Middleware/Diagnostics.EntityFrameworkCore/src/Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore.csproj @@ -17,6 +17,7 @@ + diff --git a/src/Middleware/Diagnostics.EntityFrameworkCore/test/FunctionalTests/Diagnostics.EFCore.FunctionalTests.csproj b/src/Middleware/Diagnostics.EntityFrameworkCore/test/FunctionalTests/Diagnostics.EFCore.FunctionalTests.csproj index 11fec3c8b8ba..ff6607149c86 100644 --- a/src/Middleware/Diagnostics.EntityFrameworkCore/test/FunctionalTests/Diagnostics.EFCore.FunctionalTests.csproj +++ b/src/Middleware/Diagnostics.EntityFrameworkCore/test/FunctionalTests/Diagnostics.EFCore.FunctionalTests.csproj @@ -7,9 +7,17 @@ + + + + + + + + diff --git a/src/Middleware/Diagnostics.EntityFrameworkCore/test/UnitTests/Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore.Tests.csproj b/src/Middleware/Diagnostics.EntityFrameworkCore/test/UnitTests/Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore.Tests.csproj index ba711f0d3912..d2c2c054f3ef 100644 --- a/src/Middleware/Diagnostics.EntityFrameworkCore/test/UnitTests/Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore.Tests.csproj +++ b/src/Middleware/Diagnostics.EntityFrameworkCore/test/UnitTests/Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore.Tests.csproj @@ -5,8 +5,14 @@ + + + + + + diff --git a/src/Middleware/Diagnostics/src/DeveloperExceptionPage/DeveloperExceptionPageMiddlewareImpl.cs b/src/Middleware/Diagnostics/src/DeveloperExceptionPage/DeveloperExceptionPageMiddlewareImpl.cs index 5d2589052eed..000fef3c278d 100644 --- a/src/Middleware/Diagnostics/src/DeveloperExceptionPage/DeveloperExceptionPageMiddlewareImpl.cs +++ b/src/Middleware/Diagnostics/src/DeveloperExceptionPage/DeveloperExceptionPageMiddlewareImpl.cs @@ -160,7 +160,10 @@ public async Task Invoke(HttpContext context) context.Response.StatusCode = 500; } - await _exceptionHandler(new ErrorContext(context, ex)); + var errorContext = new ErrorContext(context, ex); + + SetExceptionHandlerFeatures(errorContext); + await _exceptionHandler(errorContext); const string eventName = "Microsoft.AspNetCore.Diagnostics.UnhandledException"; if (_diagnosticSource.IsEnabled(eventName)) @@ -220,11 +223,6 @@ private async Task DisplayExceptionContent(ErrorContext errorContext) { var httpContext = errorContext.HttpContext; - if (_problemDetailsService is not null) - { - SetExceptionHandlerFeatures(errorContext); - } - if (_problemDetailsService == null || !await _problemDetailsService.TryWriteAsync(new() { HttpContext = httpContext, diff --git a/src/Middleware/Diagnostics/src/Microsoft.AspNetCore.Diagnostics.csproj b/src/Middleware/Diagnostics/src/Microsoft.AspNetCore.Diagnostics.csproj index 8671a3b03fb4..49c973fd10bc 100644 --- a/src/Middleware/Diagnostics/src/Microsoft.AspNetCore.Diagnostics.csproj +++ b/src/Middleware/Diagnostics/src/Microsoft.AspNetCore.Diagnostics.csproj @@ -21,10 +21,14 @@ + + + + diff --git a/src/Middleware/Diagnostics/test/FunctionalTests/Diagnostics.FunctionalTests.csproj b/src/Middleware/Diagnostics/test/FunctionalTests/Diagnostics.FunctionalTests.csproj index 7ad4c58c860d..349baef6c4a0 100644 --- a/src/Middleware/Diagnostics/test/FunctionalTests/Diagnostics.FunctionalTests.csproj +++ b/src/Middleware/Diagnostics/test/FunctionalTests/Diagnostics.FunctionalTests.csproj @@ -17,6 +17,8 @@ + + diff --git a/src/Middleware/Diagnostics/test/UnitTests/ExceptionHandlerMiddlewareTest.cs b/src/Middleware/Diagnostics/test/UnitTests/ExceptionHandlerMiddlewareTest.cs index eaf419889b72..0fb82da9b733 100644 --- a/src/Middleware/Diagnostics/test/UnitTests/ExceptionHandlerMiddlewareTest.cs +++ b/src/Middleware/Diagnostics/test/UnitTests/ExceptionHandlerMiddlewareTest.cs @@ -547,6 +547,51 @@ public async Task Metrics_ExceptionThrown_Unhandled_Reported() m => AssertRequestException(m, "System.InvalidOperationException", "unhandled")); } + [Fact] + public async Task ExceptionFeatureSetOnDeveloperExceptionPage() + { + // Arrange + var tcs = new TaskCompletionSource(TaskCreationOptions.RunContinuationsAsynchronously); + + using var host = new HostBuilder() + .ConfigureWebHost(webHostBuilder => + { + webHostBuilder + .UseTestServer() + .Configure(app => + { + app.Use(async (context, next) => + { + await next(); + + var exceptionHandlerFeature = context.Features.GetRequiredFeature(); + tcs.SetResult(exceptionHandlerFeature); + }); + app.UseExceptionHandler(exceptionApp => + { + exceptionApp.Run(context => Task.CompletedTask); + }); + app.Run(context => + { + throw new Exception("Test exception"); + }); + + }); + }).Build(); + + await host.StartAsync(); + + var server = host.GetTestServer(); + var request = new HttpRequestMessage(HttpMethod.Get, "/path"); + + var response = await server.CreateClient().SendAsync(request); + + var feature = await tcs.Task; + Assert.NotNull(feature); + Assert.Equal("Test exception", feature.Error.Message); + Assert.Equal("/path", feature.Path); + } + [Fact] public async Task Metrics_ExceptionThrown_ErrorPathHandled_Reported() { diff --git a/src/Middleware/Diagnostics/test/UnitTests/Microsoft.AspNetCore.Diagnostics.Tests.csproj b/src/Middleware/Diagnostics/test/UnitTests/Microsoft.AspNetCore.Diagnostics.Tests.csproj index 8c937402d4e2..4d28016a4c92 100644 --- a/src/Middleware/Diagnostics/test/UnitTests/Microsoft.AspNetCore.Diagnostics.Tests.csproj +++ b/src/Middleware/Diagnostics/test/UnitTests/Microsoft.AspNetCore.Diagnostics.Tests.csproj @@ -18,6 +18,11 @@ + + + + + diff --git a/src/Middleware/Diagnostics/test/testassets/DatabaseErrorPageSample/DatabaseErrorPageSample.csproj b/src/Middleware/Diagnostics/test/testassets/DatabaseErrorPageSample/DatabaseErrorPageSample.csproj index f110f1152d02..3bd81b9aa40a 100644 --- a/src/Middleware/Diagnostics/test/testassets/DatabaseErrorPageSample/DatabaseErrorPageSample.csproj +++ b/src/Middleware/Diagnostics/test/testassets/DatabaseErrorPageSample/DatabaseErrorPageSample.csproj @@ -5,14 +5,18 @@ + - - - + + + + + + diff --git a/src/Middleware/Diagnostics/test/testassets/DeveloperExceptionPageSample/DeveloperExceptionPageSample.csproj b/src/Middleware/Diagnostics/test/testassets/DeveloperExceptionPageSample/DeveloperExceptionPageSample.csproj index 39fb247b9283..c329b24aff8c 100644 --- a/src/Middleware/Diagnostics/test/testassets/DeveloperExceptionPageSample/DeveloperExceptionPageSample.csproj +++ b/src/Middleware/Diagnostics/test/testassets/DeveloperExceptionPageSample/DeveloperExceptionPageSample.csproj @@ -5,13 +5,16 @@ + - - - + + + + + diff --git a/src/Middleware/Diagnostics/test/testassets/ExceptionHandlerSample/ExceptionHandlerSample.csproj b/src/Middleware/Diagnostics/test/testassets/ExceptionHandlerSample/ExceptionHandlerSample.csproj index e2eaca2faeda..ffc44cf358bc 100644 --- a/src/Middleware/Diagnostics/test/testassets/ExceptionHandlerSample/ExceptionHandlerSample.csproj +++ b/src/Middleware/Diagnostics/test/testassets/ExceptionHandlerSample/ExceptionHandlerSample.csproj @@ -5,11 +5,17 @@ + - + + + + + + diff --git a/src/Middleware/Diagnostics/test/testassets/StatusCodePagesSample/StatusCodePagesSample.csproj b/src/Middleware/Diagnostics/test/testassets/StatusCodePagesSample/StatusCodePagesSample.csproj index 9c24fc8c3f64..c329b24aff8c 100644 --- a/src/Middleware/Diagnostics/test/testassets/StatusCodePagesSample/StatusCodePagesSample.csproj +++ b/src/Middleware/Diagnostics/test/testassets/StatusCodePagesSample/StatusCodePagesSample.csproj @@ -5,9 +5,16 @@ + + + + + + + diff --git a/src/Middleware/Diagnostics/test/testassets/WelcomePageSample/WelcomePageSample.csproj b/src/Middleware/Diagnostics/test/testassets/WelcomePageSample/WelcomePageSample.csproj index 755410745d90..12437ea6f9ab 100644 --- a/src/Middleware/Diagnostics/test/testassets/WelcomePageSample/WelcomePageSample.csproj +++ b/src/Middleware/Diagnostics/test/testassets/WelcomePageSample/WelcomePageSample.csproj @@ -5,9 +5,16 @@ + + + + + + + diff --git a/src/Middleware/HeaderPropagation/samples/HeaderPropagationSample/HeaderPropagationSample.csproj b/src/Middleware/HeaderPropagation/samples/HeaderPropagationSample/HeaderPropagationSample.csproj index a142440c718f..df45859e59e1 100644 --- a/src/Middleware/HeaderPropagation/samples/HeaderPropagationSample/HeaderPropagationSample.csproj +++ b/src/Middleware/HeaderPropagation/samples/HeaderPropagationSample/HeaderPropagationSample.csproj @@ -5,9 +5,15 @@ + + + + + + diff --git a/src/Middleware/HeaderPropagation/src/Microsoft.AspNetCore.HeaderPropagation.csproj b/src/Middleware/HeaderPropagation/src/Microsoft.AspNetCore.HeaderPropagation.csproj index 10e0fc033379..97561b72b311 100644 --- a/src/Middleware/HeaderPropagation/src/Microsoft.AspNetCore.HeaderPropagation.csproj +++ b/src/Middleware/HeaderPropagation/src/Microsoft.AspNetCore.HeaderPropagation.csproj @@ -14,6 +14,8 @@ + + diff --git a/src/Middleware/HeaderPropagation/test/Microsoft.AspNetCore.HeaderPropagation.Tests.csproj b/src/Middleware/HeaderPropagation/test/Microsoft.AspNetCore.HeaderPropagation.Tests.csproj index ccf0fc72694f..aa5d92a227fe 100644 --- a/src/Middleware/HeaderPropagation/test/Microsoft.AspNetCore.HeaderPropagation.Tests.csproj +++ b/src/Middleware/HeaderPropagation/test/Microsoft.AspNetCore.HeaderPropagation.Tests.csproj @@ -5,9 +5,17 @@ - - + + + + + + + + + + diff --git a/src/Middleware/HealthChecks.EntityFrameworkCore/test/Microsoft.Extensions.Diagnostics.HealthChecks.EntityFrameworkCore.Tests.csproj b/src/Middleware/HealthChecks.EntityFrameworkCore/test/Microsoft.Extensions.Diagnostics.HealthChecks.EntityFrameworkCore.Tests.csproj index d8cd26d6429e..ccb4bea064ef 100644 --- a/src/Middleware/HealthChecks.EntityFrameworkCore/test/Microsoft.Extensions.Diagnostics.HealthChecks.EntityFrameworkCore.Tests.csproj +++ b/src/Middleware/HealthChecks.EntityFrameworkCore/test/Microsoft.Extensions.Diagnostics.HealthChecks.EntityFrameworkCore.Tests.csproj @@ -6,6 +6,8 @@ + + diff --git a/src/Middleware/HealthChecks/src/Microsoft.AspNetCore.Diagnostics.HealthChecks.csproj b/src/Middleware/HealthChecks/src/Microsoft.AspNetCore.Diagnostics.HealthChecks.csproj index 8a6aebd55d40..de41a5d9dbe6 100644 --- a/src/Middleware/HealthChecks/src/Microsoft.AspNetCore.Diagnostics.HealthChecks.csproj +++ b/src/Middleware/HealthChecks/src/Microsoft.AspNetCore.Diagnostics.HealthChecks.csproj @@ -12,7 +12,9 @@ + + diff --git a/src/Middleware/HealthChecks/test/UnitTests/Microsoft.AspNetCore.Diagnostics.HealthChecks.Tests.csproj b/src/Middleware/HealthChecks/test/UnitTests/Microsoft.AspNetCore.Diagnostics.HealthChecks.Tests.csproj index e98a97a4f84d..8290879fd172 100644 --- a/src/Middleware/HealthChecks/test/UnitTests/Microsoft.AspNetCore.Diagnostics.HealthChecks.Tests.csproj +++ b/src/Middleware/HealthChecks/test/UnitTests/Microsoft.AspNetCore.Diagnostics.HealthChecks.Tests.csproj @@ -10,6 +10,8 @@ + + diff --git a/src/Middleware/HealthChecks/test/testassets/HealthChecksSample/HealthChecksSample.csproj b/src/Middleware/HealthChecks/test/testassets/HealthChecksSample/HealthChecksSample.csproj index 6547dc723254..abad5ba44a2a 100644 --- a/src/Middleware/HealthChecks/test/testassets/HealthChecksSample/HealthChecksSample.csproj +++ b/src/Middleware/HealthChecks/test/testassets/HealthChecksSample/HealthChecksSample.csproj @@ -5,14 +5,22 @@ + + + + + + + + diff --git a/src/Middleware/HostFiltering/sample/HostFilteringSample.csproj b/src/Middleware/HostFiltering/sample/HostFilteringSample.csproj index c963c9edc8b7..c5e534f763cf 100644 --- a/src/Middleware/HostFiltering/sample/HostFilteringSample.csproj +++ b/src/Middleware/HostFiltering/sample/HostFilteringSample.csproj @@ -5,9 +5,16 @@ + + + + + + + diff --git a/src/Middleware/HostFiltering/src/Microsoft.AspNetCore.HostFiltering.csproj b/src/Middleware/HostFiltering/src/Microsoft.AspNetCore.HostFiltering.csproj index e7d7e4cd8e9c..5e829e3aa2a4 100644 --- a/src/Middleware/HostFiltering/src/Microsoft.AspNetCore.HostFiltering.csproj +++ b/src/Middleware/HostFiltering/src/Microsoft.AspNetCore.HostFiltering.csproj @@ -13,10 +13,12 @@ + + + - diff --git a/src/Middleware/HostFiltering/test/Microsoft.AspNetCore.HostFiltering.Tests.csproj b/src/Middleware/HostFiltering/test/Microsoft.AspNetCore.HostFiltering.Tests.csproj index b8974a9955c6..b0993aa452fb 100644 --- a/src/Middleware/HostFiltering/test/Microsoft.AspNetCore.HostFiltering.Tests.csproj +++ b/src/Middleware/HostFiltering/test/Microsoft.AspNetCore.HostFiltering.Tests.csproj @@ -5,8 +5,16 @@ + + + + + + + + diff --git a/src/Middleware/HttpLogging/samples/HttpLogging.Sample/HttpLogging.Sample.csproj b/src/Middleware/HttpLogging/samples/HttpLogging.Sample/HttpLogging.Sample.csproj index 21b5a022f5a1..99ea50801bba 100644 --- a/src/Middleware/HttpLogging/samples/HttpLogging.Sample/HttpLogging.Sample.csproj +++ b/src/Middleware/HttpLogging/samples/HttpLogging.Sample/HttpLogging.Sample.csproj @@ -5,12 +5,17 @@ - - - + + + + + + + + diff --git a/src/Middleware/HttpLogging/samples/Logging.W3C.Sample/Logging.W3C.Sample.csproj b/src/Middleware/HttpLogging/samples/Logging.W3C.Sample/Logging.W3C.Sample.csproj index 82ff6be53ad7..11b974a8bd0e 100644 --- a/src/Middleware/HttpLogging/samples/Logging.W3C.Sample/Logging.W3C.Sample.csproj +++ b/src/Middleware/HttpLogging/samples/Logging.W3C.Sample/Logging.W3C.Sample.csproj @@ -5,10 +5,15 @@ - - + + + + + + + diff --git a/src/Middleware/HttpLogging/src/Microsoft.AspNetCore.HttpLogging.csproj b/src/Middleware/HttpLogging/src/Microsoft.AspNetCore.HttpLogging.csproj index a95de17528b3..2bfaf4114d9b 100644 --- a/src/Middleware/HttpLogging/src/Microsoft.AspNetCore.HttpLogging.csproj +++ b/src/Middleware/HttpLogging/src/Microsoft.AspNetCore.HttpLogging.csproj @@ -15,6 +15,7 @@ + diff --git a/src/Middleware/HttpLogging/test/Microsoft.AspNetCore.HttpLogging.Tests.csproj b/src/Middleware/HttpLogging/test/Microsoft.AspNetCore.HttpLogging.Tests.csproj index 6204ea459146..851913ebfa27 100644 --- a/src/Middleware/HttpLogging/test/Microsoft.AspNetCore.HttpLogging.Tests.csproj +++ b/src/Middleware/HttpLogging/test/Microsoft.AspNetCore.HttpLogging.Tests.csproj @@ -5,9 +5,18 @@ + + + + + + - + + + + diff --git a/src/Middleware/HttpOverrides/sample/HttpOverridesSample.csproj b/src/Middleware/HttpOverrides/sample/HttpOverridesSample.csproj index 12815fc592bf..d937d4b6095d 100644 --- a/src/Middleware/HttpOverrides/sample/HttpOverridesSample.csproj +++ b/src/Middleware/HttpOverrides/sample/HttpOverridesSample.csproj @@ -5,8 +5,15 @@ + + + + + + + diff --git a/src/Middleware/HttpOverrides/src/Microsoft.AspNetCore.HttpOverrides.csproj b/src/Middleware/HttpOverrides/src/Microsoft.AspNetCore.HttpOverrides.csproj index 15e0c1a903cb..8e4bc6830273 100644 --- a/src/Middleware/HttpOverrides/src/Microsoft.AspNetCore.HttpOverrides.csproj +++ b/src/Middleware/HttpOverrides/src/Microsoft.AspNetCore.HttpOverrides.csproj @@ -13,7 +13,9 @@ + + diff --git a/src/Middleware/HttpOverrides/test/Microsoft.AspNetCore.HttpOverrides.Tests.csproj b/src/Middleware/HttpOverrides/test/Microsoft.AspNetCore.HttpOverrides.Tests.csproj index c34f7f8600c2..290690f5a9cf 100644 --- a/src/Middleware/HttpOverrides/test/Microsoft.AspNetCore.HttpOverrides.Tests.csproj +++ b/src/Middleware/HttpOverrides/test/Microsoft.AspNetCore.HttpOverrides.Tests.csproj @@ -6,8 +6,14 @@ + + + + + + diff --git a/src/Middleware/HttpsPolicy/sample/HttpsPolicySample.csproj b/src/Middleware/HttpsPolicy/sample/HttpsPolicySample.csproj index fd534c9f58f8..340e8c9bd107 100644 --- a/src/Middleware/HttpsPolicy/sample/HttpsPolicySample.csproj +++ b/src/Middleware/HttpsPolicy/sample/HttpsPolicySample.csproj @@ -5,9 +5,16 @@ + + + + + + + + - diff --git a/src/Middleware/HttpsPolicy/src/Microsoft.AspNetCore.HttpsPolicy.csproj b/src/Middleware/HttpsPolicy/src/Microsoft.AspNetCore.HttpsPolicy.csproj index 2722a69c9d5b..c54cf7d87c3d 100644 --- a/src/Middleware/HttpsPolicy/src/Microsoft.AspNetCore.HttpsPolicy.csproj +++ b/src/Middleware/HttpsPolicy/src/Microsoft.AspNetCore.HttpsPolicy.csproj @@ -13,10 +13,13 @@ + + + + - diff --git a/src/Middleware/HttpsPolicy/test/Microsoft.AspNetCore.HttpsPolicy.Tests.csproj b/src/Middleware/HttpsPolicy/test/Microsoft.AspNetCore.HttpsPolicy.Tests.csproj index 7691bf5733f1..a854b159c59a 100644 --- a/src/Middleware/HttpsPolicy/test/Microsoft.AspNetCore.HttpsPolicy.Tests.csproj +++ b/src/Middleware/HttpsPolicy/test/Microsoft.AspNetCore.HttpsPolicy.Tests.csproj @@ -5,8 +5,16 @@ + + + + + + + + diff --git a/src/Middleware/Localization.Routing/src/Microsoft.AspNetCore.Localization.Routing.csproj b/src/Middleware/Localization.Routing/src/Microsoft.AspNetCore.Localization.Routing.csproj index 0177a1bbaa68..c4b8f371ce52 100644 --- a/src/Middleware/Localization.Routing/src/Microsoft.AspNetCore.Localization.Routing.csproj +++ b/src/Middleware/Localization.Routing/src/Microsoft.AspNetCore.Localization.Routing.csproj @@ -12,6 +12,7 @@ + diff --git a/src/Middleware/Localization.Routing/test/Microsoft.AspNetCore.Localization.Routing.Tests.csproj b/src/Middleware/Localization.Routing/test/Microsoft.AspNetCore.Localization.Routing.Tests.csproj index d0654674bf0d..b139bec796ed 100644 --- a/src/Middleware/Localization.Routing/test/Microsoft.AspNetCore.Localization.Routing.Tests.csproj +++ b/src/Middleware/Localization.Routing/test/Microsoft.AspNetCore.Localization.Routing.Tests.csproj @@ -5,9 +5,20 @@ + + + + + + + + + + + diff --git a/src/Middleware/Localization/sample/LocalizationSample.csproj b/src/Middleware/Localization/sample/LocalizationSample.csproj index 07e8a83753b2..6685b8193d53 100644 --- a/src/Middleware/Localization/sample/LocalizationSample.csproj +++ b/src/Middleware/Localization/sample/LocalizationSample.csproj @@ -8,10 +8,17 @@ + + + + + + + diff --git a/src/Middleware/Localization/src/Microsoft.AspNetCore.Localization.csproj b/src/Middleware/Localization/src/Microsoft.AspNetCore.Localization.csproj index d66c2ed3e540..6a0d0d94fca9 100644 --- a/src/Middleware/Localization/src/Microsoft.AspNetCore.Localization.csproj +++ b/src/Middleware/Localization/src/Microsoft.AspNetCore.Localization.csproj @@ -12,7 +12,10 @@ + + + diff --git a/src/Middleware/Localization/test/FunctionalTests/Microsoft.AspNetCore.Localization.FunctionalTests.csproj b/src/Middleware/Localization/test/FunctionalTests/Microsoft.AspNetCore.Localization.FunctionalTests.csproj index 97c05ed0c8ee..2ae20dcd9cc1 100644 --- a/src/Middleware/Localization/test/FunctionalTests/Microsoft.AspNetCore.Localization.FunctionalTests.csproj +++ b/src/Middleware/Localization/test/FunctionalTests/Microsoft.AspNetCore.Localization.FunctionalTests.csproj @@ -10,6 +10,8 @@ + + diff --git a/src/Middleware/Localization/test/UnitTests/Microsoft.AspNetCore.Localization.Tests.csproj b/src/Middleware/Localization/test/UnitTests/Microsoft.AspNetCore.Localization.Tests.csproj index 1b561739a0f5..ad402951ca1d 100644 --- a/src/Middleware/Localization/test/UnitTests/Microsoft.AspNetCore.Localization.Tests.csproj +++ b/src/Middleware/Localization/test/UnitTests/Microsoft.AspNetCore.Localization.Tests.csproj @@ -5,9 +5,17 @@ + + + + + + + + diff --git a/src/Middleware/Localization/testassets/LocalizationWebsite/LocalizationWebsite.csproj b/src/Middleware/Localization/testassets/LocalizationWebsite/LocalizationWebsite.csproj index d5d3901162b2..737e0d82ab77 100644 --- a/src/Middleware/Localization/testassets/LocalizationWebsite/LocalizationWebsite.csproj +++ b/src/Middleware/Localization/testassets/LocalizationWebsite/LocalizationWebsite.csproj @@ -10,10 +10,15 @@ + + + + + - + diff --git a/src/Middleware/Microsoft.AspNetCore.OutputCaching.StackExchangeRedis/test/Microsoft.AspNetCore.OutputCaching.StackExchangeRedis.Tests.csproj b/src/Middleware/Microsoft.AspNetCore.OutputCaching.StackExchangeRedis/test/Microsoft.AspNetCore.OutputCaching.StackExchangeRedis.Tests.csproj index 1cd965d14c0e..eb424abaed17 100644 --- a/src/Middleware/Microsoft.AspNetCore.OutputCaching.StackExchangeRedis/test/Microsoft.AspNetCore.OutputCaching.StackExchangeRedis.Tests.csproj +++ b/src/Middleware/Microsoft.AspNetCore.OutputCaching.StackExchangeRedis/test/Microsoft.AspNetCore.OutputCaching.StackExchangeRedis.Tests.csproj @@ -4,8 +4,19 @@ + + + + + + + + + + + diff --git a/src/Middleware/MiddlewareAnalysis/samples/MiddlewareAnalysisSample/MiddlewareAnalysisSample.csproj b/src/Middleware/MiddlewareAnalysis/samples/MiddlewareAnalysisSample/MiddlewareAnalysisSample.csproj index 5f4a29484288..c1eac76a2bac 100644 --- a/src/Middleware/MiddlewareAnalysis/samples/MiddlewareAnalysisSample/MiddlewareAnalysisSample.csproj +++ b/src/Middleware/MiddlewareAnalysis/samples/MiddlewareAnalysisSample/MiddlewareAnalysisSample.csproj @@ -5,11 +5,18 @@ + + + + + + + diff --git a/src/Middleware/MiddlewareAnalysis/src/Microsoft.AspNetCore.MiddlewareAnalysis.csproj b/src/Middleware/MiddlewareAnalysis/src/Microsoft.AspNetCore.MiddlewareAnalysis.csproj index fcf5b17bf429..8717fca3c1b6 100644 --- a/src/Middleware/MiddlewareAnalysis/src/Microsoft.AspNetCore.MiddlewareAnalysis.csproj +++ b/src/Middleware/MiddlewareAnalysis/src/Microsoft.AspNetCore.MiddlewareAnalysis.csproj @@ -10,6 +10,7 @@ + diff --git a/src/Middleware/MiddlewareAnalysis/test/Microsoft.AspNetCore.MiddlewareAnalysis.Tests.csproj b/src/Middleware/MiddlewareAnalysis/test/Microsoft.AspNetCore.MiddlewareAnalysis.Tests.csproj index cd69a2fb1394..aa70e609e6fb 100644 --- a/src/Middleware/MiddlewareAnalysis/test/Microsoft.AspNetCore.MiddlewareAnalysis.Tests.csproj +++ b/src/Middleware/MiddlewareAnalysis/test/Microsoft.AspNetCore.MiddlewareAnalysis.Tests.csproj @@ -5,11 +5,21 @@ + + + + + + + + + + diff --git a/src/Middleware/OutputCaching/perf/Microbenchmarks/Microsoft.AspNetCore.OutputCaching.Microbenchmarks.csproj b/src/Middleware/OutputCaching/perf/Microbenchmarks/Microsoft.AspNetCore.OutputCaching.Microbenchmarks.csproj index 4e4a6e747acd..056c275abd25 100644 --- a/src/Middleware/OutputCaching/perf/Microbenchmarks/Microsoft.AspNetCore.OutputCaching.Microbenchmarks.csproj +++ b/src/Middleware/OutputCaching/perf/Microbenchmarks/Microsoft.AspNetCore.OutputCaching.Microbenchmarks.csproj @@ -9,7 +9,10 @@ + + + diff --git a/src/Middleware/OutputCaching/samples/OutputCachingSample/OutputCachingSample.csproj b/src/Middleware/OutputCaching/samples/OutputCachingSample/OutputCachingSample.csproj index 8e76982e4dfc..f14038863bdf 100644 --- a/src/Middleware/OutputCaching/samples/OutputCachingSample/OutputCachingSample.csproj +++ b/src/Middleware/OutputCaching/samples/OutputCachingSample/OutputCachingSample.csproj @@ -7,8 +7,14 @@ + + + + + + \ No newline at end of file diff --git a/src/Middleware/OutputCaching/src/Microsoft.AspNetCore.OutputCaching.csproj b/src/Middleware/OutputCaching/src/Microsoft.AspNetCore.OutputCaching.csproj index 55cc936fec7b..ae669dfabc86 100644 --- a/src/Middleware/OutputCaching/src/Microsoft.AspNetCore.OutputCaching.csproj +++ b/src/Middleware/OutputCaching/src/Microsoft.AspNetCore.OutputCaching.csproj @@ -15,8 +15,10 @@ - + + + diff --git a/src/Middleware/OutputCaching/test/Microsoft.AspNetCore.OutputCaching.Tests.csproj b/src/Middleware/OutputCaching/test/Microsoft.AspNetCore.OutputCaching.Tests.csproj index 4aba46bf5c87..b1f9c130f813 100644 --- a/src/Middleware/OutputCaching/test/Microsoft.AspNetCore.OutputCaching.Tests.csproj +++ b/src/Middleware/OutputCaching/test/Microsoft.AspNetCore.OutputCaching.Tests.csproj @@ -11,8 +11,16 @@ + + + + + + + + diff --git a/src/Middleware/RateLimiting/samples/RateLimitingSample/RateLimitingSample.csproj b/src/Middleware/RateLimiting/samples/RateLimitingSample/RateLimitingSample.csproj index ccaaeb89b723..0e830e020855 100644 --- a/src/Middleware/RateLimiting/samples/RateLimitingSample/RateLimitingSample.csproj +++ b/src/Middleware/RateLimiting/samples/RateLimitingSample/RateLimitingSample.csproj @@ -7,11 +7,17 @@ + - + + + + + + diff --git a/src/Middleware/RateLimiting/test/Microsoft.AspNetCore.RateLimiting.Tests.csproj b/src/Middleware/RateLimiting/test/Microsoft.AspNetCore.RateLimiting.Tests.csproj index a9dbb64cab99..a96904fe9c0c 100644 --- a/src/Middleware/RateLimiting/test/Microsoft.AspNetCore.RateLimiting.Tests.csproj +++ b/src/Middleware/RateLimiting/test/Microsoft.AspNetCore.RateLimiting.Tests.csproj @@ -8,8 +8,12 @@ + + + + diff --git a/src/Middleware/RequestDecompression/perf/Microbenchmarks/Microsoft.AspNetCore.RequestDecompression.Microbenchmarks.csproj b/src/Middleware/RequestDecompression/perf/Microbenchmarks/Microsoft.AspNetCore.RequestDecompression.Microbenchmarks.csproj index f40a5187122e..c7725e79eb37 100644 --- a/src/Middleware/RequestDecompression/perf/Microbenchmarks/Microsoft.AspNetCore.RequestDecompression.Microbenchmarks.csproj +++ b/src/Middleware/RequestDecompression/perf/Microbenchmarks/Microsoft.AspNetCore.RequestDecompression.Microbenchmarks.csproj @@ -8,6 +8,8 @@ + + diff --git a/src/Middleware/RequestDecompression/sample/RequestDecompressionSample.csproj b/src/Middleware/RequestDecompression/sample/RequestDecompressionSample.csproj index fec9ada30879..86b4377263e1 100644 --- a/src/Middleware/RequestDecompression/sample/RequestDecompressionSample.csproj +++ b/src/Middleware/RequestDecompression/sample/RequestDecompressionSample.csproj @@ -5,9 +5,16 @@ + + + + + + + - \ No newline at end of file + diff --git a/src/Middleware/RequestDecompression/src/Microsoft.AspNetCore.RequestDecompression.csproj b/src/Middleware/RequestDecompression/src/Microsoft.AspNetCore.RequestDecompression.csproj index 7197542caaf1..257fe959bf59 100644 --- a/src/Middleware/RequestDecompression/src/Microsoft.AspNetCore.RequestDecompression.csproj +++ b/src/Middleware/RequestDecompression/src/Microsoft.AspNetCore.RequestDecompression.csproj @@ -12,7 +12,9 @@ + + diff --git a/src/Middleware/RequestDecompression/test/Microsoft.AspNetCore.RequestDecompression.Tests.csproj b/src/Middleware/RequestDecompression/test/Microsoft.AspNetCore.RequestDecompression.Tests.csproj index 21eb7830cc38..4d3d4b43bc9a 100644 --- a/src/Middleware/RequestDecompression/test/Microsoft.AspNetCore.RequestDecompression.Tests.csproj +++ b/src/Middleware/RequestDecompression/test/Microsoft.AspNetCore.RequestDecompression.Tests.csproj @@ -5,10 +5,17 @@ + + + + + + + - \ No newline at end of file + diff --git a/src/Middleware/ResponseCaching/samples/ResponseCachingSample/ResponseCachingSample.csproj b/src/Middleware/ResponseCaching/samples/ResponseCachingSample/ResponseCachingSample.csproj index 6522e4a12b51..21ce36c87bb3 100644 --- a/src/Middleware/ResponseCaching/samples/ResponseCachingSample/ResponseCachingSample.csproj +++ b/src/Middleware/ResponseCaching/samples/ResponseCachingSample/ResponseCachingSample.csproj @@ -5,9 +5,16 @@ + + + + + + + diff --git a/src/Middleware/ResponseCaching/src/Microsoft.AspNetCore.ResponseCaching.csproj b/src/Middleware/ResponseCaching/src/Microsoft.AspNetCore.ResponseCaching.csproj index 98db7efc6f58..8c2b8374eb1c 100644 --- a/src/Middleware/ResponseCaching/src/Microsoft.AspNetCore.ResponseCaching.csproj +++ b/src/Middleware/ResponseCaching/src/Microsoft.AspNetCore.ResponseCaching.csproj @@ -12,9 +12,11 @@ - - + + + + diff --git a/src/Middleware/ResponseCaching/test/Microsoft.AspNetCore.ResponseCaching.Tests.csproj b/src/Middleware/ResponseCaching/test/Microsoft.AspNetCore.ResponseCaching.Tests.csproj index 9e25eb42230a..a2c8cd7d98e0 100644 --- a/src/Middleware/ResponseCaching/test/Microsoft.AspNetCore.ResponseCaching.Tests.csproj +++ b/src/Middleware/ResponseCaching/test/Microsoft.AspNetCore.ResponseCaching.Tests.csproj @@ -11,8 +11,17 @@ + + + + + + + + + diff --git a/src/Middleware/ResponseCompression/perf/Microbenchmarks/Microsoft.AspNetCore.ResponseCompression.Microbenchmarks.csproj b/src/Middleware/ResponseCompression/perf/Microbenchmarks/Microsoft.AspNetCore.ResponseCompression.Microbenchmarks.csproj index fc3755689b03..3aca191238a3 100644 --- a/src/Middleware/ResponseCompression/perf/Microbenchmarks/Microsoft.AspNetCore.ResponseCompression.Microbenchmarks.csproj +++ b/src/Middleware/ResponseCompression/perf/Microbenchmarks/Microsoft.AspNetCore.ResponseCompression.Microbenchmarks.csproj @@ -8,6 +8,8 @@ + + diff --git a/src/Middleware/ResponseCompression/sample/ResponseCompressionSample.csproj b/src/Middleware/ResponseCompression/sample/ResponseCompressionSample.csproj index d5d099263ad6..759a48b49dcc 100644 --- a/src/Middleware/ResponseCompression/sample/ResponseCompressionSample.csproj +++ b/src/Middleware/ResponseCompression/sample/ResponseCompressionSample.csproj @@ -9,8 +9,15 @@ + + + + + + + diff --git a/src/Middleware/ResponseCompression/src/Microsoft.AspNetCore.ResponseCompression.csproj b/src/Middleware/ResponseCompression/src/Microsoft.AspNetCore.ResponseCompression.csproj index 2df32fa07f2e..3f1304cd1678 100644 --- a/src/Middleware/ResponseCompression/src/Microsoft.AspNetCore.ResponseCompression.csproj +++ b/src/Middleware/ResponseCompression/src/Microsoft.AspNetCore.ResponseCompression.csproj @@ -12,7 +12,9 @@ + + diff --git a/src/Middleware/ResponseCompression/test/Microsoft.AspNetCore.ResponseCompression.Tests.csproj b/src/Middleware/ResponseCompression/test/Microsoft.AspNetCore.ResponseCompression.Tests.csproj index bf2649c251b9..72507247dff4 100644 --- a/src/Middleware/ResponseCompression/test/Microsoft.AspNetCore.ResponseCompression.Tests.csproj +++ b/src/Middleware/ResponseCompression/test/Microsoft.AspNetCore.ResponseCompression.Tests.csproj @@ -9,9 +9,16 @@ + + + + + + + diff --git a/src/Middleware/Rewrite/sample/RewriteSample.csproj b/src/Middleware/Rewrite/sample/RewriteSample.csproj index d89f3f138fca..f997f5b81beb 100644 --- a/src/Middleware/Rewrite/sample/RewriteSample.csproj +++ b/src/Middleware/Rewrite/sample/RewriteSample.csproj @@ -5,8 +5,15 @@ + + + + + + + diff --git a/src/Middleware/Rewrite/src/Microsoft.AspNetCore.Rewrite.csproj b/src/Middleware/Rewrite/src/Microsoft.AspNetCore.Rewrite.csproj index b309cf77a057..5362fd8d6a63 100644 --- a/src/Middleware/Rewrite/src/Microsoft.AspNetCore.Rewrite.csproj +++ b/src/Middleware/Rewrite/src/Microsoft.AspNetCore.Rewrite.csproj @@ -15,12 +15,15 @@ + + + + - diff --git a/src/Middleware/Rewrite/test/Microsoft.AspNetCore.Rewrite.Tests.csproj b/src/Middleware/Rewrite/test/Microsoft.AspNetCore.Rewrite.Tests.csproj index f62c4140b7f1..e3c161f0e21e 100644 --- a/src/Middleware/Rewrite/test/Microsoft.AspNetCore.Rewrite.Tests.csproj +++ b/src/Middleware/Rewrite/test/Microsoft.AspNetCore.Rewrite.Tests.csproj @@ -5,9 +5,15 @@ + + + + + + - + diff --git a/src/Middleware/Session/samples/SessionSample.csproj b/src/Middleware/Session/samples/SessionSample.csproj index 3beef6fa7b71..7976957a2cbd 100644 --- a/src/Middleware/Session/samples/SessionSample.csproj +++ b/src/Middleware/Session/samples/SessionSample.csproj @@ -5,11 +5,18 @@ - + + + + + + + + diff --git a/src/Middleware/Session/test/Microsoft.AspNetCore.Session.Tests.csproj b/src/Middleware/Session/test/Microsoft.AspNetCore.Session.Tests.csproj index c10e8e8565fc..abac453c4c6b 100644 --- a/src/Middleware/Session/test/Microsoft.AspNetCore.Session.Tests.csproj +++ b/src/Middleware/Session/test/Microsoft.AspNetCore.Session.Tests.csproj @@ -5,9 +5,18 @@ + + + + + + + + + diff --git a/src/Middleware/Spa/SpaProxy/src/Microsoft.AspNetCore.SpaProxy.csproj b/src/Middleware/Spa/SpaProxy/src/Microsoft.AspNetCore.SpaProxy.csproj index b2ebc472c1fa..a759df0175ef 100644 --- a/src/Middleware/Spa/SpaProxy/src/Microsoft.AspNetCore.SpaProxy.csproj +++ b/src/Middleware/Spa/SpaProxy/src/Microsoft.AspNetCore.SpaProxy.csproj @@ -11,6 +11,9 @@ + + + diff --git a/src/Middleware/Spa/SpaServices.Extensions/src/Microsoft.AspNetCore.SpaServices.Extensions.csproj b/src/Middleware/Spa/SpaServices.Extensions/src/Microsoft.AspNetCore.SpaServices.Extensions.csproj index f7d843037fe0..3d7cf488579e 100644 --- a/src/Middleware/Spa/SpaServices.Extensions/src/Microsoft.AspNetCore.SpaServices.Extensions.csproj +++ b/src/Middleware/Spa/SpaServices.Extensions/src/Microsoft.AspNetCore.SpaServices.Extensions.csproj @@ -7,11 +7,14 @@ + + + - + diff --git a/src/Middleware/Spa/SpaServices.Extensions/test/Microsoft.AspNetCore.SpaServices.Extensions.Tests.csproj b/src/Middleware/Spa/SpaServices.Extensions/test/Microsoft.AspNetCore.SpaServices.Extensions.Tests.csproj index 56847fc93bde..50cae9a6aa94 100644 --- a/src/Middleware/Spa/SpaServices.Extensions/test/Microsoft.AspNetCore.SpaServices.Extensions.Tests.csproj +++ b/src/Middleware/Spa/SpaServices.Extensions/test/Microsoft.AspNetCore.SpaServices.Extensions.Tests.csproj @@ -7,12 +7,17 @@ - + + + + + + + - diff --git a/src/Middleware/StaticFiles/samples/StaticFileSample/StaticFileSample.csproj b/src/Middleware/StaticFiles/samples/StaticFileSample/StaticFileSample.csproj index a953d61577ac..d91716d457c0 100644 --- a/src/Middleware/StaticFiles/samples/StaticFileSample/StaticFileSample.csproj +++ b/src/Middleware/StaticFiles/samples/StaticFileSample/StaticFileSample.csproj @@ -5,11 +5,18 @@ + + + + - - + + + + + diff --git a/src/Middleware/StaticFiles/src/Microsoft.AspNetCore.StaticFiles.csproj b/src/Middleware/StaticFiles/src/Microsoft.AspNetCore.StaticFiles.csproj index 2166cc8ef709..a1e7a2c279aa 100644 --- a/src/Middleware/StaticFiles/src/Microsoft.AspNetCore.StaticFiles.csproj +++ b/src/Middleware/StaticFiles/src/Microsoft.AspNetCore.StaticFiles.csproj @@ -16,8 +16,11 @@ + + + diff --git a/src/Middleware/StaticFiles/test/FunctionalTests/Microsoft.AspNetCore.StaticFiles.FunctionalTests.csproj b/src/Middleware/StaticFiles/test/FunctionalTests/Microsoft.AspNetCore.StaticFiles.FunctionalTests.csproj index f3537f09b5f7..987dc34747b5 100644 --- a/src/Middleware/StaticFiles/test/FunctionalTests/Microsoft.AspNetCore.StaticFiles.FunctionalTests.csproj +++ b/src/Middleware/StaticFiles/test/FunctionalTests/Microsoft.AspNetCore.StaticFiles.FunctionalTests.csproj @@ -26,7 +26,15 @@ + + + + + + + + diff --git a/src/Middleware/StaticFiles/test/UnitTests/Microsoft.AspNetCore.StaticFiles.Tests.csproj b/src/Middleware/StaticFiles/test/UnitTests/Microsoft.AspNetCore.StaticFiles.Tests.csproj index 17aa617dfb3a..40f6d1c5d2e6 100644 --- a/src/Middleware/StaticFiles/test/UnitTests/Microsoft.AspNetCore.StaticFiles.Tests.csproj +++ b/src/Middleware/StaticFiles/test/UnitTests/Microsoft.AspNetCore.StaticFiles.Tests.csproj @@ -12,8 +12,18 @@ + + + + + + + + + + diff --git a/src/Middleware/WebSockets/samples/EchoApp/EchoApp.csproj b/src/Middleware/WebSockets/samples/EchoApp/EchoApp.csproj index 203f749b8cb8..fa5efb918d17 100644 --- a/src/Middleware/WebSockets/samples/EchoApp/EchoApp.csproj +++ b/src/Middleware/WebSockets/samples/EchoApp/EchoApp.csproj @@ -8,6 +8,8 @@ + + diff --git a/src/Middleware/WebSockets/src/Microsoft.AspNetCore.WebSockets.csproj b/src/Middleware/WebSockets/src/Microsoft.AspNetCore.WebSockets.csproj index d27fdfb88622..25b52527a08f 100644 --- a/src/Middleware/WebSockets/src/Microsoft.AspNetCore.WebSockets.csproj +++ b/src/Middleware/WebSockets/src/Microsoft.AspNetCore.WebSockets.csproj @@ -13,6 +13,8 @@ + + diff --git a/src/Middleware/WebSockets/test/ConformanceTests/AutobahnTestApp/AutobahnTestApp.csproj b/src/Middleware/WebSockets/test/ConformanceTests/AutobahnTestApp/AutobahnTestApp.csproj index dff1565f7f13..50c1a1a00305 100644 --- a/src/Middleware/WebSockets/test/ConformanceTests/AutobahnTestApp/AutobahnTestApp.csproj +++ b/src/Middleware/WebSockets/test/ConformanceTests/AutobahnTestApp/AutobahnTestApp.csproj @@ -10,12 +10,17 @@ + + + + + diff --git a/src/Middleware/WebSockets/test/UnitTests/Microsoft.AspNetCore.WebSockets.Tests.csproj b/src/Middleware/WebSockets/test/UnitTests/Microsoft.AspNetCore.WebSockets.Tests.csproj index d242011a0c0d..aff803c21282 100644 --- a/src/Middleware/WebSockets/test/UnitTests/Microsoft.AspNetCore.WebSockets.Tests.csproj +++ b/src/Middleware/WebSockets/test/UnitTests/Microsoft.AspNetCore.WebSockets.Tests.csproj @@ -7,9 +7,15 @@ + + + + + + diff --git a/src/Middleware/perf/ResponseCaching.Microbenchmarks/Microsoft.AspNetCore.ResponseCaching.Microbenchmarks.csproj b/src/Middleware/perf/ResponseCaching.Microbenchmarks/Microsoft.AspNetCore.ResponseCaching.Microbenchmarks.csproj index 15f456fd2f41..b102f3472d6f 100644 --- a/src/Middleware/perf/ResponseCaching.Microbenchmarks/Microsoft.AspNetCore.ResponseCaching.Microbenchmarks.csproj +++ b/src/Middleware/perf/ResponseCaching.Microbenchmarks/Microsoft.AspNetCore.ResponseCaching.Microbenchmarks.csproj @@ -8,6 +8,8 @@ + + diff --git a/src/Mvc/Mvc.Abstractions/src/Microsoft.AspNetCore.Mvc.Abstractions.csproj b/src/Mvc/Mvc.Abstractions/src/Microsoft.AspNetCore.Mvc.Abstractions.csproj index 16a5411f1caf..54853509562a 100644 --- a/src/Mvc/Mvc.Abstractions/src/Microsoft.AspNetCore.Mvc.Abstractions.csproj +++ b/src/Mvc/Mvc.Abstractions/src/Microsoft.AspNetCore.Mvc.Abstractions.csproj @@ -28,6 +28,8 @@ Microsoft.AspNetCore.Mvc.IActionResult + + diff --git a/src/Mvc/Mvc.Analyzers/test/Mvc.Analyzers.Test.csproj b/src/Mvc/Mvc.Analyzers/test/Mvc.Analyzers.Test.csproj index eb6895f3e4db..15c0cb2a43cf 100644 --- a/src/Mvc/Mvc.Analyzers/test/Mvc.Analyzers.Test.csproj +++ b/src/Mvc/Mvc.Analyzers/test/Mvc.Analyzers.Test.csproj @@ -15,6 +15,9 @@ + + + diff --git a/src/Mvc/Mvc.Api.Analyzers/test/Mvc.Api.Analyzers.Test.csproj b/src/Mvc/Mvc.Api.Analyzers/test/Mvc.Api.Analyzers.Test.csproj index 6475ab79bc16..04c99e96a1a2 100644 --- a/src/Mvc/Mvc.Api.Analyzers/test/Mvc.Api.Analyzers.Test.csproj +++ b/src/Mvc/Mvc.Api.Analyzers/test/Mvc.Api.Analyzers.Test.csproj @@ -15,6 +15,9 @@ + + + diff --git a/src/Mvc/Mvc.ApiExplorer/src/Microsoft.AspNetCore.Mvc.ApiExplorer.csproj b/src/Mvc/Mvc.ApiExplorer/src/Microsoft.AspNetCore.Mvc.ApiExplorer.csproj index c5991d82ea44..908e2bac0648 100644 --- a/src/Mvc/Mvc.ApiExplorer/src/Microsoft.AspNetCore.Mvc.ApiExplorer.csproj +++ b/src/Mvc/Mvc.ApiExplorer/src/Microsoft.AspNetCore.Mvc.ApiExplorer.csproj @@ -16,7 +16,13 @@ + + + + + + diff --git a/src/Mvc/Mvc.Core/src/Microsoft.AspNetCore.Mvc.Core.csproj b/src/Mvc/Mvc.Core/src/Microsoft.AspNetCore.Mvc.Core.csproj index fa00f51a8fe1..467923182b89 100644 --- a/src/Mvc/Mvc.Core/src/Microsoft.AspNetCore.Mvc.Core.csproj +++ b/src/Mvc/Mvc.Core/src/Microsoft.AspNetCore.Mvc.Core.csproj @@ -49,15 +49,19 @@ Microsoft.AspNetCore.Mvc.RouteAttribute + + + + diff --git a/src/Mvc/Mvc.Cors/src/Microsoft.AspNetCore.Mvc.Cors.csproj b/src/Mvc/Mvc.Cors/src/Microsoft.AspNetCore.Mvc.Cors.csproj index 482c06bca540..d6f30e58a009 100644 --- a/src/Mvc/Mvc.Cors/src/Microsoft.AspNetCore.Mvc.Cors.csproj +++ b/src/Mvc/Mvc.Cors/src/Microsoft.AspNetCore.Mvc.Cors.csproj @@ -11,9 +11,13 @@ - - + + + + + + diff --git a/src/Mvc/Mvc.DataAnnotations/src/Microsoft.AspNetCore.Mvc.DataAnnotations.csproj b/src/Mvc/Mvc.DataAnnotations/src/Microsoft.AspNetCore.Mvc.DataAnnotations.csproj index 7d88586a1211..59053269ace5 100644 --- a/src/Mvc/Mvc.DataAnnotations/src/Microsoft.AspNetCore.Mvc.DataAnnotations.csproj +++ b/src/Mvc/Mvc.DataAnnotations/src/Microsoft.AspNetCore.Mvc.DataAnnotations.csproj @@ -12,6 +12,8 @@ + + diff --git a/src/Mvc/Mvc.Formatters.Xml/src/Microsoft.AspNetCore.Mvc.Formatters.Xml.csproj b/src/Mvc/Mvc.Formatters.Xml/src/Microsoft.AspNetCore.Mvc.Formatters.Xml.csproj index 4f981100ff88..9592b2dfaef7 100644 --- a/src/Mvc/Mvc.Formatters.Xml/src/Microsoft.AspNetCore.Mvc.Formatters.Xml.csproj +++ b/src/Mvc/Mvc.Formatters.Xml/src/Microsoft.AspNetCore.Mvc.Formatters.Xml.csproj @@ -10,7 +10,11 @@ + + + + diff --git a/src/Mvc/Mvc.Localization/src/Microsoft.AspNetCore.Mvc.Localization.csproj b/src/Mvc/Mvc.Localization/src/Microsoft.AspNetCore.Mvc.Localization.csproj index e0b692363b0c..06500cfb06ca 100644 --- a/src/Mvc/Mvc.Localization/src/Microsoft.AspNetCore.Mvc.Localization.csproj +++ b/src/Mvc/Mvc.Localization/src/Microsoft.AspNetCore.Mvc.Localization.csproj @@ -13,8 +13,16 @@ Microsoft.AspNetCore.Mvc.Localization.IViewLocalizer + + + + + + + - + + diff --git a/src/Mvc/Mvc.NewtonsoftJson/src/Microsoft.AspNetCore.Mvc.NewtonsoftJson.csproj b/src/Mvc/Mvc.NewtonsoftJson/src/Microsoft.AspNetCore.Mvc.NewtonsoftJson.csproj index 71271939fa15..36491ee73607 100644 --- a/src/Mvc/Mvc.NewtonsoftJson/src/Microsoft.AspNetCore.Mvc.NewtonsoftJson.csproj +++ b/src/Mvc/Mvc.NewtonsoftJson/src/Microsoft.AspNetCore.Mvc.NewtonsoftJson.csproj @@ -15,8 +15,14 @@ - + + + + + + + diff --git a/src/Mvc/Mvc.NewtonsoftJson/test/Microsoft.AspNetCore.Mvc.NewtonsoftJson.Test.csproj b/src/Mvc/Mvc.NewtonsoftJson/test/Microsoft.AspNetCore.Mvc.NewtonsoftJson.Test.csproj index 1d395a2733b5..6138381ca97f 100644 --- a/src/Mvc/Mvc.NewtonsoftJson/test/Microsoft.AspNetCore.Mvc.NewtonsoftJson.Test.csproj +++ b/src/Mvc/Mvc.NewtonsoftJson/test/Microsoft.AspNetCore.Mvc.NewtonsoftJson.Test.csproj @@ -6,6 +6,9 @@ + + + diff --git a/src/Mvc/Mvc.Razor.RuntimeCompilation/src/Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation.csproj b/src/Mvc/Mvc.Razor.RuntimeCompilation/src/Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation.csproj index 661eeae9fb01..b2ba9ad6e519 100644 --- a/src/Mvc/Mvc.Razor.RuntimeCompilation/src/Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation.csproj +++ b/src/Mvc/Mvc.Razor.RuntimeCompilation/src/Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation.csproj @@ -9,10 +9,19 @@ + + + + + + + + + diff --git a/src/Mvc/Mvc.Razor/src/Microsoft.AspNetCore.Mvc.Razor.csproj b/src/Mvc/Mvc.Razor/src/Microsoft.AspNetCore.Mvc.Razor.csproj index a6ce0daaffdb..801ff199a30c 100644 --- a/src/Mvc/Mvc.Razor/src/Microsoft.AspNetCore.Mvc.Razor.csproj +++ b/src/Mvc/Mvc.Razor/src/Microsoft.AspNetCore.Mvc.Razor.csproj @@ -11,7 +11,16 @@ + + + + + + + + + diff --git a/src/Mvc/Mvc.Razor/test/Microsoft.AspNetCore.Mvc.Razor.Test.csproj b/src/Mvc/Mvc.Razor/test/Microsoft.AspNetCore.Mvc.Razor.Test.csproj index 663ad485f3bc..7978d04c4780 100644 --- a/src/Mvc/Mvc.Razor/test/Microsoft.AspNetCore.Mvc.Razor.Test.csproj +++ b/src/Mvc/Mvc.Razor/test/Microsoft.AspNetCore.Mvc.Razor.Test.csproj @@ -13,6 +13,9 @@ + + + diff --git a/src/Mvc/Mvc.RazorPages/src/Microsoft.AspNetCore.Mvc.RazorPages.csproj b/src/Mvc/Mvc.RazorPages/src/Microsoft.AspNetCore.Mvc.RazorPages.csproj index a3b701ce5b4b..24a3cd845d4b 100644 --- a/src/Mvc/Mvc.RazorPages/src/Microsoft.AspNetCore.Mvc.RazorPages.csproj +++ b/src/Mvc/Mvc.RazorPages/src/Microsoft.AspNetCore.Mvc.RazorPages.csproj @@ -10,7 +10,23 @@ + + + + + + + + + + + + + + + + diff --git a/src/Mvc/Mvc.RazorPages/test/Microsoft.AspNetCore.Mvc.RazorPages.Test.csproj b/src/Mvc/Mvc.RazorPages/test/Microsoft.AspNetCore.Mvc.RazorPages.Test.csproj index c9e51798bea6..e91a1e12de8d 100644 --- a/src/Mvc/Mvc.RazorPages/test/Microsoft.AspNetCore.Mvc.RazorPages.Test.csproj +++ b/src/Mvc/Mvc.RazorPages/test/Microsoft.AspNetCore.Mvc.RazorPages.Test.csproj @@ -16,6 +16,9 @@ + + + diff --git a/src/Mvc/Mvc.TagHelpers/src/Microsoft.AspNetCore.Mvc.TagHelpers.csproj b/src/Mvc/Mvc.TagHelpers/src/Microsoft.AspNetCore.Mvc.TagHelpers.csproj index 1266ae56dbb0..14e4207cebc9 100644 --- a/src/Mvc/Mvc.TagHelpers/src/Microsoft.AspNetCore.Mvc.TagHelpers.csproj +++ b/src/Mvc/Mvc.TagHelpers/src/Microsoft.AspNetCore.Mvc.TagHelpers.csproj @@ -15,8 +15,16 @@ + + + + + + + - + + diff --git a/src/Mvc/Mvc.Testing/src/Microsoft.AspNetCore.Mvc.Testing.csproj b/src/Mvc/Mvc.Testing/src/Microsoft.AspNetCore.Mvc.Testing.csproj index 76118e0bb154..1b5a38b77f03 100644 --- a/src/Mvc/Mvc.Testing/src/Microsoft.AspNetCore.Mvc.Testing.csproj +++ b/src/Mvc/Mvc.Testing/src/Microsoft.AspNetCore.Mvc.Testing.csproj @@ -11,9 +11,13 @@ + + + + diff --git a/src/Mvc/Mvc.ViewFeatures/src/Microsoft.AspNetCore.Mvc.ViewFeatures.csproj b/src/Mvc/Mvc.ViewFeatures/src/Microsoft.AspNetCore.Mvc.ViewFeatures.csproj index 24dd476f1022..90bf2b0f91f8 100644 --- a/src/Mvc/Mvc.ViewFeatures/src/Microsoft.AspNetCore.Mvc.ViewFeatures.csproj +++ b/src/Mvc/Mvc.ViewFeatures/src/Microsoft.AspNetCore.Mvc.ViewFeatures.csproj @@ -24,10 +24,21 @@ + + + + + + + + + + + diff --git a/src/Mvc/Mvc/src/Microsoft.AspNetCore.Mvc.csproj b/src/Mvc/Mvc/src/Microsoft.AspNetCore.Mvc.csproj index 9adb461734df..39294e33044e 100644 --- a/src/Mvc/Mvc/src/Microsoft.AspNetCore.Mvc.csproj +++ b/src/Mvc/Mvc/src/Microsoft.AspNetCore.Mvc.csproj @@ -10,12 +10,16 @@ + + + + diff --git a/src/Mvc/Mvc/test/Microsoft.AspNetCore.Mvc.Test.csproj b/src/Mvc/Mvc/test/Microsoft.AspNetCore.Mvc.Test.csproj index fbd6966f85f2..db9e5b62a341 100644 --- a/src/Mvc/Mvc/test/Microsoft.AspNetCore.Mvc.Test.csproj +++ b/src/Mvc/Mvc/test/Microsoft.AspNetCore.Mvc.Test.csproj @@ -11,6 +11,9 @@ + + + diff --git a/src/Mvc/perf/Microbenchmarks/Microsoft.AspNetCore.Mvc.Views/Microsoft.AspNetCore.Mvc.Views.Microbenchmarks.csproj b/src/Mvc/perf/Microbenchmarks/Microsoft.AspNetCore.Mvc.Views/Microsoft.AspNetCore.Mvc.Views.Microbenchmarks.csproj index ec384adc4616..d737a89f8cfc 100644 --- a/src/Mvc/perf/Microbenchmarks/Microsoft.AspNetCore.Mvc.Views/Microsoft.AspNetCore.Mvc.Views.Microbenchmarks.csproj +++ b/src/Mvc/perf/Microbenchmarks/Microsoft.AspNetCore.Mvc.Views/Microsoft.AspNetCore.Mvc.Views.Microbenchmarks.csproj @@ -10,6 +10,9 @@ + + + diff --git a/src/Mvc/perf/Microbenchmarks/Microsoft.AspNetCore.Mvc/Microsoft.AspNetCore.Mvc.Microbenchmarks.csproj b/src/Mvc/perf/Microbenchmarks/Microsoft.AspNetCore.Mvc/Microsoft.AspNetCore.Mvc.Microbenchmarks.csproj index 385603662e59..938167654c31 100644 --- a/src/Mvc/perf/Microbenchmarks/Microsoft.AspNetCore.Mvc/Microsoft.AspNetCore.Mvc.Microbenchmarks.csproj +++ b/src/Mvc/perf/Microbenchmarks/Microsoft.AspNetCore.Mvc/Microsoft.AspNetCore.Mvc.Microbenchmarks.csproj @@ -9,6 +9,9 @@ + + + diff --git a/src/Mvc/perf/benchmarkapps/BasicApi/BasicApi.csproj b/src/Mvc/perf/benchmarkapps/BasicApi/BasicApi.csproj index bc66454704e8..d93ff6d3587c 100644 --- a/src/Mvc/perf/benchmarkapps/BasicApi/BasicApi.csproj +++ b/src/Mvc/perf/benchmarkapps/BasicApi/BasicApi.csproj @@ -24,6 +24,7 @@ + diff --git a/src/Mvc/perf/benchmarkapps/BasicViews/BasicViews.csproj b/src/Mvc/perf/benchmarkapps/BasicViews/BasicViews.csproj index c9b383962212..4724d0a134bc 100644 --- a/src/Mvc/perf/benchmarkapps/BasicViews/BasicViews.csproj +++ b/src/Mvc/perf/benchmarkapps/BasicViews/BasicViews.csproj @@ -28,5 +28,8 @@ + + + diff --git a/src/Mvc/perf/benchmarkapps/RazorRendering/RazorRendering.csproj b/src/Mvc/perf/benchmarkapps/RazorRendering/RazorRendering.csproj index 2a406ff38e2b..31c2b5e7213b 100644 --- a/src/Mvc/perf/benchmarkapps/RazorRendering/RazorRendering.csproj +++ b/src/Mvc/perf/benchmarkapps/RazorRendering/RazorRendering.csproj @@ -9,6 +9,9 @@ + + + diff --git a/src/Mvc/samples/MvcFormSample/MvcFormSample.csproj b/src/Mvc/samples/MvcFormSample/MvcFormSample.csproj index c88d38eeaadc..28dda70843d2 100644 --- a/src/Mvc/samples/MvcFormSample/MvcFormSample.csproj +++ b/src/Mvc/samples/MvcFormSample/MvcFormSample.csproj @@ -10,8 +10,11 @@ + + + diff --git a/src/Mvc/shared/Mvc.Core.TestCommon/Microsoft.AspNetCore.Mvc.Core.TestCommon.csproj b/src/Mvc/shared/Mvc.Core.TestCommon/Microsoft.AspNetCore.Mvc.Core.TestCommon.csproj index 932fff081b16..d5b8d86dd6f5 100644 --- a/src/Mvc/shared/Mvc.Core.TestCommon/Microsoft.AspNetCore.Mvc.Core.TestCommon.csproj +++ b/src/Mvc/shared/Mvc.Core.TestCommon/Microsoft.AspNetCore.Mvc.Core.TestCommon.csproj @@ -6,11 +6,17 @@ + + + + + - - + + + diff --git a/src/Mvc/test/Mvc.FunctionalTests/Microsoft.AspNetCore.Mvc.FunctionalTests.csproj b/src/Mvc/test/Mvc.FunctionalTests/Microsoft.AspNetCore.Mvc.FunctionalTests.csproj index c33d71b8927c..6d1c1cb7c45c 100644 --- a/src/Mvc/test/Mvc.FunctionalTests/Microsoft.AspNetCore.Mvc.FunctionalTests.csproj +++ b/src/Mvc/test/Mvc.FunctionalTests/Microsoft.AspNetCore.Mvc.FunctionalTests.csproj @@ -15,6 +15,16 @@ + + + + + + + + + + @@ -28,6 +38,7 @@ + diff --git a/src/Mvc/test/Mvc.IntegrationTests/Microsoft.AspNetCore.Mvc.IntegrationTests.csproj b/src/Mvc/test/Mvc.IntegrationTests/Microsoft.AspNetCore.Mvc.IntegrationTests.csproj index 93e20c9dba02..b065de32a43f 100644 --- a/src/Mvc/test/Mvc.IntegrationTests/Microsoft.AspNetCore.Mvc.IntegrationTests.csproj +++ b/src/Mvc/test/Mvc.IntegrationTests/Microsoft.AspNetCore.Mvc.IntegrationTests.csproj @@ -7,7 +7,12 @@ + + + + + diff --git a/src/Mvc/test/WebSites/ApiExplorerWebSite/ApiExplorerWebSite.csproj b/src/Mvc/test/WebSites/ApiExplorerWebSite/ApiExplorerWebSite.csproj index 539f0477a1fd..f5cce0cf4d4c 100644 --- a/src/Mvc/test/WebSites/ApiExplorerWebSite/ApiExplorerWebSite.csproj +++ b/src/Mvc/test/WebSites/ApiExplorerWebSite/ApiExplorerWebSite.csproj @@ -6,7 +6,11 @@ + + + + diff --git a/src/Mvc/test/WebSites/ApplicationModelWebSite/ApplicationModelWebSite.csproj b/src/Mvc/test/WebSites/ApplicationModelWebSite/ApplicationModelWebSite.csproj index 245cae9fb6cb..942ca7418fe6 100644 --- a/src/Mvc/test/WebSites/ApplicationModelWebSite/ApplicationModelWebSite.csproj +++ b/src/Mvc/test/WebSites/ApplicationModelWebSite/ApplicationModelWebSite.csproj @@ -6,6 +6,9 @@ + + + diff --git a/src/Mvc/test/WebSites/BasicWebSite/BasicWebSite.csproj b/src/Mvc/test/WebSites/BasicWebSite/BasicWebSite.csproj index fcd96bbb5f1f..7d99f2470ca2 100644 --- a/src/Mvc/test/WebSites/BasicWebSite/BasicWebSite.csproj +++ b/src/Mvc/test/WebSites/BasicWebSite/BasicWebSite.csproj @@ -11,10 +11,14 @@ + + + + diff --git a/src/Mvc/test/WebSites/ControllersFromServicesClassLibrary/ControllersFromServicesClassLibrary.csproj b/src/Mvc/test/WebSites/ControllersFromServicesClassLibrary/ControllersFromServicesClassLibrary.csproj index 0551d9bf1d56..4d56d5187cb9 100644 --- a/src/Mvc/test/WebSites/ControllersFromServicesClassLibrary/ControllersFromServicesClassLibrary.csproj +++ b/src/Mvc/test/WebSites/ControllersFromServicesClassLibrary/ControllersFromServicesClassLibrary.csproj @@ -7,5 +7,8 @@ + + + diff --git a/src/Mvc/test/WebSites/ControllersFromServicesWebSite/ControllersFromServicesWebSite.csproj b/src/Mvc/test/WebSites/ControllersFromServicesWebSite/ControllersFromServicesWebSite.csproj index 53aa4bf8259c..3becfc317da7 100644 --- a/src/Mvc/test/WebSites/ControllersFromServicesWebSite/ControllersFromServicesWebSite.csproj +++ b/src/Mvc/test/WebSites/ControllersFromServicesWebSite/ControllersFromServicesWebSite.csproj @@ -8,6 +8,9 @@ + + + diff --git a/src/Mvc/test/WebSites/CorsWebSite/CorsWebSite.csproj b/src/Mvc/test/WebSites/CorsWebSite/CorsWebSite.csproj index a7b866ceeb84..431d054645c1 100644 --- a/src/Mvc/test/WebSites/CorsWebSite/CorsWebSite.csproj +++ b/src/Mvc/test/WebSites/CorsWebSite/CorsWebSite.csproj @@ -6,6 +6,9 @@ + + + diff --git a/src/Mvc/test/WebSites/ErrorPageMiddlewareWebSite/ErrorPageMiddlewareWebSite.csproj b/src/Mvc/test/WebSites/ErrorPageMiddlewareWebSite/ErrorPageMiddlewareWebSite.csproj index b17d85506d44..234584d52526 100644 --- a/src/Mvc/test/WebSites/ErrorPageMiddlewareWebSite/ErrorPageMiddlewareWebSite.csproj +++ b/src/Mvc/test/WebSites/ErrorPageMiddlewareWebSite/ErrorPageMiddlewareWebSite.csproj @@ -9,6 +9,9 @@ + + + diff --git a/src/Mvc/test/WebSites/FilesWebSite/FilesWebSite.csproj b/src/Mvc/test/WebSites/FilesWebSite/FilesWebSite.csproj index b184d086d5ec..d6a296876232 100644 --- a/src/Mvc/test/WebSites/FilesWebSite/FilesWebSite.csproj +++ b/src/Mvc/test/WebSites/FilesWebSite/FilesWebSite.csproj @@ -11,6 +11,9 @@ + + + diff --git a/src/Mvc/test/WebSites/FormatterWebSite/FormatterWebSite.csproj b/src/Mvc/test/WebSites/FormatterWebSite/FormatterWebSite.csproj index 8e6ad389aeeb..d5faebada390 100644 --- a/src/Mvc/test/WebSites/FormatterWebSite/FormatterWebSite.csproj +++ b/src/Mvc/test/WebSites/FormatterWebSite/FormatterWebSite.csproj @@ -6,8 +6,12 @@ + + + + diff --git a/src/Mvc/test/WebSites/GenericHostWebSite/GenericHostWebSite.csproj b/src/Mvc/test/WebSites/GenericHostWebSite/GenericHostWebSite.csproj index 0dedd41518c2..d125861d5c6f 100644 --- a/src/Mvc/test/WebSites/GenericHostWebSite/GenericHostWebSite.csproj +++ b/src/Mvc/test/WebSites/GenericHostWebSite/GenericHostWebSite.csproj @@ -10,6 +10,9 @@ + + + diff --git a/src/Mvc/test/WebSites/HtmlGenerationWebSite/HtmlGenerationWebSite.csproj b/src/Mvc/test/WebSites/HtmlGenerationWebSite/HtmlGenerationWebSite.csproj index f62cdd2b0e3e..8cf91b16609e 100644 --- a/src/Mvc/test/WebSites/HtmlGenerationWebSite/HtmlGenerationWebSite.csproj +++ b/src/Mvc/test/WebSites/HtmlGenerationWebSite/HtmlGenerationWebSite.csproj @@ -6,6 +6,9 @@ + + + diff --git a/src/Mvc/test/WebSites/RazorBuildWebSite.PrecompiledViews/RazorBuildWebSite.PrecompiledViews.csproj b/src/Mvc/test/WebSites/RazorBuildWebSite.PrecompiledViews/RazorBuildWebSite.PrecompiledViews.csproj index 2a65e27d3785..09555003e99d 100644 --- a/src/Mvc/test/WebSites/RazorBuildWebSite.PrecompiledViews/RazorBuildWebSite.PrecompiledViews.csproj +++ b/src/Mvc/test/WebSites/RazorBuildWebSite.PrecompiledViews/RazorBuildWebSite.PrecompiledViews.csproj @@ -7,6 +7,9 @@ + + + diff --git a/src/Mvc/test/WebSites/RazorBuildWebSite.Views/RazorBuildWebSite.Views.csproj b/src/Mvc/test/WebSites/RazorBuildWebSite.Views/RazorBuildWebSite.Views.csproj index 2a65e27d3785..09555003e99d 100644 --- a/src/Mvc/test/WebSites/RazorBuildWebSite.Views/RazorBuildWebSite.Views.csproj +++ b/src/Mvc/test/WebSites/RazorBuildWebSite.Views/RazorBuildWebSite.Views.csproj @@ -7,6 +7,9 @@ + + + diff --git a/src/Mvc/test/WebSites/RazorBuildWebSite/RazorBuildWebSite.csproj b/src/Mvc/test/WebSites/RazorBuildWebSite/RazorBuildWebSite.csproj index b999659df2d3..a67e802bbb9b 100644 --- a/src/Mvc/test/WebSites/RazorBuildWebSite/RazorBuildWebSite.csproj +++ b/src/Mvc/test/WebSites/RazorBuildWebSite/RazorBuildWebSite.csproj @@ -9,6 +9,9 @@ + + + diff --git a/src/Mvc/test/WebSites/RazorPagesClassLibrary/RazorPagesClassLibrary.csproj b/src/Mvc/test/WebSites/RazorPagesClassLibrary/RazorPagesClassLibrary.csproj index 680c22116067..879830e6c4e5 100644 --- a/src/Mvc/test/WebSites/RazorPagesClassLibrary/RazorPagesClassLibrary.csproj +++ b/src/Mvc/test/WebSites/RazorPagesClassLibrary/RazorPagesClassLibrary.csproj @@ -7,6 +7,9 @@ + + + diff --git a/src/Mvc/test/WebSites/RazorPagesWebSite/RazorPagesWebSite.csproj b/src/Mvc/test/WebSites/RazorPagesWebSite/RazorPagesWebSite.csproj index f25623775bcc..43dc743f51b7 100644 --- a/src/Mvc/test/WebSites/RazorPagesWebSite/RazorPagesWebSite.csproj +++ b/src/Mvc/test/WebSites/RazorPagesWebSite/RazorPagesWebSite.csproj @@ -10,6 +10,9 @@ + + + diff --git a/src/Mvc/test/WebSites/RazorWebSite/RazorWebSite.csproj b/src/Mvc/test/WebSites/RazorWebSite/RazorWebSite.csproj index 17de7b68d55a..a1710dfda9d9 100644 --- a/src/Mvc/test/WebSites/RazorWebSite/RazorWebSite.csproj +++ b/src/Mvc/test/WebSites/RazorWebSite/RazorWebSite.csproj @@ -7,6 +7,9 @@ + + + diff --git a/src/Mvc/test/WebSites/RoutingWebSite/Mvc.RoutingWebSite.csproj b/src/Mvc/test/WebSites/RoutingWebSite/Mvc.RoutingWebSite.csproj index d5612d205afb..bb6b11898240 100644 --- a/src/Mvc/test/WebSites/RoutingWebSite/Mvc.RoutingWebSite.csproj +++ b/src/Mvc/test/WebSites/RoutingWebSite/Mvc.RoutingWebSite.csproj @@ -11,6 +11,9 @@ + + + diff --git a/src/Mvc/test/WebSites/SecurityWebSite/SecurityWebSite.csproj b/src/Mvc/test/WebSites/SecurityWebSite/SecurityWebSite.csproj index f58751997df0..8c51e84037a1 100644 --- a/src/Mvc/test/WebSites/SecurityWebSite/SecurityWebSite.csproj +++ b/src/Mvc/test/WebSites/SecurityWebSite/SecurityWebSite.csproj @@ -6,6 +6,9 @@ + + + diff --git a/src/Mvc/test/WebSites/SimpleWebSite/SimpleWebSite.csproj b/src/Mvc/test/WebSites/SimpleWebSite/SimpleWebSite.csproj index ef489e7bd22c..737e426f6b2d 100644 --- a/src/Mvc/test/WebSites/SimpleWebSite/SimpleWebSite.csproj +++ b/src/Mvc/test/WebSites/SimpleWebSite/SimpleWebSite.csproj @@ -6,6 +6,9 @@ + + + diff --git a/src/Mvc/test/WebSites/SimpleWebSiteWithWebApplicationBuilder/SimpleWebSiteWithWebApplicationBuilder.csproj b/src/Mvc/test/WebSites/SimpleWebSiteWithWebApplicationBuilder/SimpleWebSiteWithWebApplicationBuilder.csproj index 2b6e3cba5344..5f2cf08a54a2 100644 --- a/src/Mvc/test/WebSites/SimpleWebSiteWithWebApplicationBuilder/SimpleWebSiteWithWebApplicationBuilder.csproj +++ b/src/Mvc/test/WebSites/SimpleWebSiteWithWebApplicationBuilder/SimpleWebSiteWithWebApplicationBuilder.csproj @@ -8,6 +8,9 @@ + + + diff --git a/src/Mvc/test/WebSites/SimpleWebSiteWithWebApplicationBuilderException/SimpleWebSiteWithWebApplicationBuilderException.csproj b/src/Mvc/test/WebSites/SimpleWebSiteWithWebApplicationBuilderException/SimpleWebSiteWithWebApplicationBuilderException.csproj index b98dad5ccb6f..8bb762f4c8c1 100644 --- a/src/Mvc/test/WebSites/SimpleWebSiteWithWebApplicationBuilderException/SimpleWebSiteWithWebApplicationBuilderException.csproj +++ b/src/Mvc/test/WebSites/SimpleWebSiteWithWebApplicationBuilderException/SimpleWebSiteWithWebApplicationBuilderException.csproj @@ -7,5 +7,12 @@ + + + + + + + diff --git a/src/Mvc/test/WebSites/TagHelpersWebSite/TagHelpersWebSite.csproj b/src/Mvc/test/WebSites/TagHelpersWebSite/TagHelpersWebSite.csproj index b61ee5fe88dc..1171e54e5bf0 100644 --- a/src/Mvc/test/WebSites/TagHelpersWebSite/TagHelpersWebSite.csproj +++ b/src/Mvc/test/WebSites/TagHelpersWebSite/TagHelpersWebSite.csproj @@ -11,6 +11,9 @@ + + + diff --git a/src/Mvc/test/WebSites/VersioningWebSite/VersioningWebSite.csproj b/src/Mvc/test/WebSites/VersioningWebSite/VersioningWebSite.csproj index f80af0bb8fcf..ca00f16dea2f 100644 --- a/src/Mvc/test/WebSites/VersioningWebSite/VersioningWebSite.csproj +++ b/src/Mvc/test/WebSites/VersioningWebSite/VersioningWebSite.csproj @@ -10,6 +10,9 @@ + + + diff --git a/src/Mvc/test/WebSites/XmlFormattersWebSite/XmlFormattersWebSite.csproj b/src/Mvc/test/WebSites/XmlFormattersWebSite/XmlFormattersWebSite.csproj index fa3b13eaacad..84c6d9de2800 100644 --- a/src/Mvc/test/WebSites/XmlFormattersWebSite/XmlFormattersWebSite.csproj +++ b/src/Mvc/test/WebSites/XmlFormattersWebSite/XmlFormattersWebSite.csproj @@ -5,6 +5,9 @@ + + + diff --git a/src/OpenApi/sample/Sample.csproj b/src/OpenApi/sample/Sample.csproj index cb2dc20c05a5..49ea7f52189b 100644 --- a/src/OpenApi/sample/Sample.csproj +++ b/src/OpenApi/sample/Sample.csproj @@ -20,7 +20,12 @@ + + + + + diff --git a/src/OpenApi/src/Extensions/JsonNodeSchemaExtensions.cs b/src/OpenApi/src/Extensions/JsonNodeSchemaExtensions.cs index 945326b1d5b1..969cc614a421 100644 --- a/src/OpenApi/src/Extensions/JsonNodeSchemaExtensions.cs +++ b/src/OpenApi/src/Extensions/JsonNodeSchemaExtensions.cs @@ -3,6 +3,7 @@ using System.ComponentModel; using System.ComponentModel.DataAnnotations; +using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; using System.Reflection; @@ -175,13 +176,17 @@ internal static void ApplyDefaultValue(this JsonNode schema, object? defaultValu return; } + var schemaAttribute = schema.WillBeComponentized() + ? OpenApiConstants.RefDefaultAnnotation + : OpenApiSchemaKeywords.DefaultKeyword; + if (defaultValue is null) { - schema[OpenApiSchemaKeywords.DefaultKeyword] = null; + schema[schemaAttribute] = null; } else { - schema[OpenApiSchemaKeywords.DefaultKeyword] = JsonSerializer.SerializeToNode(defaultValue, jsonTypeInfo); + schema[schemaAttribute] = JsonSerializer.SerializeToNode(defaultValue, jsonTypeInfo); } } @@ -429,6 +434,36 @@ internal static void ApplySchemaReferenceId(this JsonNode schema, JsonSchemaExpo } } + /// + /// Determines whether the specified JSON schema will be moved into the components section. + /// + /// The produced by the underlying schema generator. + /// if the schema will be componentized; otherwise, . + internal static bool WillBeComponentized(this JsonNode schema) + => schema.WillBeComponentized(out _); + + /// + /// Determines whether the specified JSON schema node contains a componentized schema identifier. + /// + /// The JSON schema node to inspect for a componentized schema identifier. + /// When this method returns , contains the schema identifier found in the node; otherwise, + /// . + /// if the schema will be componentized; otherwise, . + internal static bool WillBeComponentized(this JsonNode schema, [NotNullWhen(true)] out string? schemaId) + { + if (schema[OpenApiConstants.SchemaId] is JsonNode schemaIdNode + && schemaIdNode.GetValueKind() == JsonValueKind.String) + { + schemaId = schemaIdNode.GetValue(); + if (!string.IsNullOrEmpty(schemaId)) + { + return true; + } + } + schemaId = null; + return false; + } + /// /// Returns if the current type is a non-abstract base class that is not defined as its /// own derived type. @@ -458,7 +493,7 @@ internal static void ApplyNullabilityContextInfo(this JsonNode schema, JsonPrope schema[OpenApiSchemaKeywords.TypeKeyword] = (schemaTypes | JsonSchemaType.Null).ToString(); } } - if (schema[OpenApiConstants.SchemaId] is not null && + if (schema.WillBeComponentized() && propertyInfo.PropertyType != typeof(object) && propertyInfo.ShouldApplyNullablePropertySchema()) { schema[OpenApiConstants.NullableProperty] = true; @@ -472,7 +507,7 @@ internal static void ApplyNullabilityContextInfo(this JsonNode schema, JsonPrope /// The produced by the underlying schema generator. internal static void PruneNullTypeForComponentizedTypes(this JsonNode schema) { - if (schema[OpenApiConstants.SchemaId] is not null && + if (schema.WillBeComponentized() && schema[OpenApiSchemaKeywords.TypeKeyword] is JsonArray typeArray) { for (var i = typeArray.Count - 1; i >= 0; i--) diff --git a/src/OpenApi/src/Extensions/OpenApiDocumentExtensions.cs b/src/OpenApi/src/Extensions/OpenApiDocumentExtensions.cs index c09bd50dc67b..b3a6e314fb9c 100644 --- a/src/OpenApi/src/Extensions/OpenApiDocumentExtensions.cs +++ b/src/OpenApi/src/Extensions/OpenApiDocumentExtensions.cs @@ -14,28 +14,33 @@ internal static class OpenApiDocumentExtensions /// The to register the schema onto. /// The ID that serves as the key for the schema in the schema store. /// The to register into the document. - /// An with a reference to the stored schema. - public static IOpenApiSchema AddOpenApiSchemaByReference(this OpenApiDocument document, string schemaId, IOpenApiSchema schema) + /// An with a reference to the stored schema. + /// Whether the schema was added or already existed. + public static bool AddOpenApiSchemaByReference(this OpenApiDocument document, string schemaId, IOpenApiSchema schema, out OpenApiSchemaReference schemaReference) { - document.Components ??= new(); - document.Components.Schemas ??= new Dictionary(); - document.Components.Schemas[schemaId] = schema; + // Make sure the document has a workspace, + // AddComponent will add it to the workspace when adding the component. document.Workspace ??= new(); - var location = document.BaseUri + "/components/schemas/" + schemaId; - document.Workspace.RegisterComponentForDocument(document, schema, location); + // AddComponent will only add the schema if it doesn't already exist. + var schemaAdded = document.AddComponent(schemaId, schema); object? description = null; object? example = null; - if (schema is OpenApiSchema actualSchema) + object? defaultAnnotation = null; + if (schema is OpenApiSchema { Metadata: not null } actualSchema) { - actualSchema.Metadata?.TryGetValue(OpenApiConstants.RefDescriptionAnnotation, out description); - actualSchema.Metadata?.TryGetValue(OpenApiConstants.RefExampleAnnotation, out example); + actualSchema.Metadata.TryGetValue(OpenApiConstants.RefDescriptionAnnotation, out description); + actualSchema.Metadata.TryGetValue(OpenApiConstants.RefExampleAnnotation, out example); + actualSchema.Metadata.TryGetValue(OpenApiConstants.RefDefaultAnnotation, out defaultAnnotation); } - return new OpenApiSchemaReference(schemaId, document) + schemaReference = new OpenApiSchemaReference(schemaId, document) { Description = description as string, Examples = example is JsonNode exampleJson ? [exampleJson] : null, + Default = defaultAnnotation as JsonNode, }; + + return schemaAdded; } } diff --git a/src/OpenApi/src/Extensions/OpenApiSchemaExtensions.cs b/src/OpenApi/src/Extensions/OpenApiSchemaExtensions.cs index f394445850fe..f9b0098a2ac9 100644 --- a/src/OpenApi/src/Extensions/OpenApiSchemaExtensions.cs +++ b/src/OpenApi/src/Extensions/OpenApiSchemaExtensions.cs @@ -1,6 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. +using System.Diagnostics.CodeAnalysis; + namespace Microsoft.AspNetCore.OpenApi; internal static class OpenApiSchemaExtensions @@ -18,4 +20,21 @@ public static IOpenApiSchema CreateOneOfNullableWrapper(this IOpenApiSchema orig ] }; } + + public static bool IsComponentizedSchema(this OpenApiSchema schema) + => schema.IsComponentizedSchema(out _); + + public static bool IsComponentizedSchema(this OpenApiSchema schema, [NotNullWhen(true)] out string? schemaId) + { + if(schema.Metadata is not null + && schema.Metadata.TryGetValue(OpenApiConstants.SchemaId, out var schemaIdAsObject) + && schemaIdAsObject is string schemaIdString + && !string.IsNullOrEmpty(schemaIdString)) + { + schemaId = schemaIdString; + return true; + } + schemaId = null; + return false; + } } diff --git a/src/OpenApi/src/Microsoft.AspNetCore.OpenApi.csproj b/src/OpenApi/src/Microsoft.AspNetCore.OpenApi.csproj index 686bdcaf6329..243e7d1ffafd 100644 --- a/src/OpenApi/src/Microsoft.AspNetCore.OpenApi.csproj +++ b/src/OpenApi/src/Microsoft.AspNetCore.OpenApi.csproj @@ -15,11 +15,19 @@ + + + + + + + + diff --git a/src/OpenApi/src/Schemas/OpenApiJsonSchema.Helpers.cs b/src/OpenApi/src/Schemas/OpenApiJsonSchema.Helpers.cs index 877ac70010db..638d7f32f912 100644 --- a/src/OpenApi/src/Schemas/OpenApiJsonSchema.Helpers.cs +++ b/src/OpenApi/src/Schemas/OpenApiJsonSchema.Helpers.cs @@ -345,17 +345,16 @@ public static void ReadProperty(ref Utf8JsonReader reader, string propertyName, schema.Enum = ReadJsonNode(ref reader, out var constType) is { } jsonNode ? [jsonNode] : []; schema.Type = constType; break; - case OpenApiSchemaKeywords.RefKeyword: + case OpenApiConstants.RefDescriptionAnnotation: reader.Read(); schema.Metadata ??= new Dictionary(); - schema.Metadata[OpenApiConstants.RefId] = reader.GetString() ?? string.Empty; + schema.Metadata[OpenApiConstants.RefDescriptionAnnotation] = reader.GetString() ?? string.Empty; break; - case OpenApiConstants.RefDescriptionAnnotation: + case OpenApiConstants.RefDefaultAnnotation: reader.Read(); schema.Metadata ??= new Dictionary(); - schema.Metadata[OpenApiConstants.RefDescriptionAnnotation] = reader.GetString() ?? string.Empty; + schema.Metadata[OpenApiConstants.RefDefaultAnnotation] = ReadJsonNode(ref reader)!; break; - default: reader.Skip(); break; diff --git a/src/OpenApi/src/Services/OpenApiConstants.cs b/src/OpenApi/src/Services/OpenApiConstants.cs index df4228633556..d000587e81f1 100644 --- a/src/OpenApi/src/Services/OpenApiConstants.cs +++ b/src/OpenApi/src/Services/OpenApiConstants.cs @@ -12,7 +12,7 @@ internal static class OpenApiConstants internal const string DefaultOpenApiRoute = "/openapi/{documentName}.json"; internal const string DescriptionId = "x-aspnetcore-id"; internal const string SchemaId = "x-schema-id"; - internal const string RefId = "x-ref-id"; + internal const string RefDefaultAnnotation = "x-ref-default"; internal const string RefDescriptionAnnotation = "x-ref-description"; internal const string RefExampleAnnotation = "x-ref-example"; internal const string RefKeyword = "$ref"; diff --git a/src/OpenApi/src/Services/Schemas/OpenApiSchemaKey.cs b/src/OpenApi/src/Services/Schemas/OpenApiSchemaKey.cs deleted file mode 100644 index 7286ce119d0a..000000000000 --- a/src/OpenApi/src/Services/Schemas/OpenApiSchemaKey.cs +++ /dev/null @@ -1,12 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. - -using System.Reflection; - -namespace Microsoft.AspNetCore.OpenApi; - -/// -/// Represents a unique identifier that is used to store and retrieve -/// JSON schemas associated with a given property. -/// -internal record struct OpenApiSchemaKey(Type Type, ParameterInfo? ParameterInfo); diff --git a/src/OpenApi/src/Services/Schemas/OpenApiSchemaService.cs b/src/OpenApi/src/Services/Schemas/OpenApiSchemaService.cs index 44bf7dbd3da5..eec394066f9d 100644 --- a/src/OpenApi/src/Services/Schemas/OpenApiSchemaService.cs +++ b/src/OpenApi/src/Services/Schemas/OpenApiSchemaService.cs @@ -14,7 +14,6 @@ using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Http.Json; using Microsoft.AspNetCore.Mvc.ApiExplorer; -using Microsoft.AspNetCore.Mvc.Infrastructure; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Options; @@ -116,7 +115,7 @@ internal sealed class OpenApiSchemaService( { schema.ApplyDefaultValue(defaultValueAttribute.Value, context.TypeInfo); } - var isInlinedSchema = schema[OpenApiConstants.SchemaId] is null; + var isInlinedSchema = !schema.WillBeComponentized(); if (isInlinedSchema) { if (propertyAttributes.OfType().LastOrDefault() is { } descriptionAttribute) @@ -229,10 +228,7 @@ static JsonArray JsonArray(ReadOnlySpan values) internal async Task GetOrCreateUnresolvedSchemaAsync(OpenApiDocument? document, Type type, IServiceProvider scopedServiceProvider, IOpenApiSchemaTransformer[] schemaTransformers, ApiParameterDescription? parameterDescription = null, CancellationToken cancellationToken = default) { - var key = parameterDescription?.ParameterDescriptor is IParameterInfoParameterDescriptor parameterInfoDescription - && parameterDescription.ModelMetadata.PropertyName is null - ? new OpenApiSchemaKey(type, parameterInfoDescription.ParameterInfo) : new OpenApiSchemaKey(type, null); - var schemaAsJsonObject = CreateSchema(key); + var schemaAsJsonObject = CreateSchema(type); if (parameterDescription is not null) { schemaAsJsonObject.ApplyParameterInfo(parameterDescription, _jsonSerializerOptions.GetTypeInfo(type)); @@ -265,18 +261,33 @@ internal static IOpenApiSchema ResolveReferenceForSchema(OpenApiDocument documen { var schema = UnwrapOpenApiSchema(inputSchema); - if (schema.Metadata is not null && - schema.Metadata.TryGetValue(OpenApiConstants.SchemaId, out var resolvedBaseSchemaId)) + var isComponentizedSchema = schema.IsComponentizedSchema(out var schemaId); + + // When we register it, this will be the resulting reference + OpenApiSchemaReference? resultSchemaReference = null; + if (inputSchema is OpenApiSchema && isComponentizedSchema) { - if (schema.AnyOf is { Count: > 0 }) + var targetReferenceId = baseSchemaId is not null + ? $"{baseSchemaId}{schemaId}" + : schemaId; + if (!string.IsNullOrEmpty(targetReferenceId)) { - for (var i = 0; i < schema.AnyOf.Count; i++) + if (!document.AddOpenApiSchemaByReference(targetReferenceId, schema, out resultSchemaReference)) { - schema.AnyOf[i] = ResolveReferenceForSchema(document, schema.AnyOf[i], rootSchemaId, resolvedBaseSchemaId?.ToString()); + // We already added this schema, so it has already been resolved. + return resultSchemaReference; } } } + if (schema.AnyOf is { Count: > 0 }) + { + for (var i = 0; i < schema.AnyOf.Count; i++) + { + schema.AnyOf[i] = ResolveReferenceForSchema(document, schema.AnyOf[i], rootSchemaId, schemaId); + } + } + if (schema.Properties is not null) { foreach (var property in schema.Properties) @@ -326,39 +337,9 @@ internal static IOpenApiSchema ResolveReferenceForSchema(OpenApiDocument documen schema.Not = ResolveReferenceForSchema(document, schema.Not, rootSchemaId); } - // Handle schemas where the references have been inlined by the JsonSchemaExporter. In this case, - // the `#` ID is generated by the exporter since it has no base document to baseline against. In this - // case we we want to replace the reference ID with the schema ID that was generated by the - // `CreateSchemaReferenceId` method in the OpenApiSchemaService. - if (schema.Metadata is not null && - schema.Metadata.TryGetValue(OpenApiConstants.RefId, out var refId) && - refId is string refIdString) + if (resultSchemaReference is not null) { - if (schema.Metadata.TryGetValue(OpenApiConstants.SchemaId, out var schemaId) && - schemaId is string schemaIdString) - { - return new OpenApiSchemaReference(schemaIdString, document); - } - var relativeSchemaId = $"#/components/schemas/{rootSchemaId}{refIdString.Replace("#", string.Empty)}"; - return new OpenApiSchemaReference(relativeSchemaId, document); - } - - // If we're resolving schemas for a top-level schema being referenced in the `components.schema` property - // we don't want to replace the top-level inline schema with a reference to itself. We want to replace - // inline schemas to reference schemas for all schemas referenced in the top-level schema though (such as - // `allOf`, `oneOf`, `anyOf`, `items`, `properties`, etc.) which is why `isTopLevel` is only set once. - if (schema is OpenApiSchema && schema.Metadata is not null && - !schema.Metadata.ContainsKey(OpenApiConstants.RefId) && - schema.Metadata.TryGetValue(OpenApiConstants.SchemaId, out var referenceId) && - referenceId is string referenceIdString) - { - var targetReferenceId = baseSchemaId is not null - ? $"{baseSchemaId}{referenceIdString}" - : referenceIdString; - if (!string.IsNullOrEmpty(targetReferenceId)) - { - return document.AddOpenApiSchemaByReference(targetReferenceId, schema); - } + return resultSchemaReference; } return schema; @@ -466,9 +447,9 @@ private async Task InnerApplySchemaTransformersAsync(IOpenApiSchema inputSchema, } } - private JsonNode CreateSchema(OpenApiSchemaKey key) + private JsonNode CreateSchema(Type type) { - var schema = JsonSchemaExporter.GetJsonSchemaAsNode(_jsonSerializerOptions, key.Type, _configuration); + var schema = JsonSchemaExporter.GetJsonSchemaAsNode(_jsonSerializerOptions, type, _configuration); return ResolveReferences(schema, schema); } diff --git a/src/OpenApi/test/Microsoft.AspNetCore.OpenApi.SourceGenerators.Tests/Microsoft.AspNetCore.OpenApi.SourceGenerators.Tests.csproj b/src/OpenApi/test/Microsoft.AspNetCore.OpenApi.SourceGenerators.Tests/Microsoft.AspNetCore.OpenApi.SourceGenerators.Tests.csproj index 61a22595ac54..aa8b2eab1dc8 100644 --- a/src/OpenApi/test/Microsoft.AspNetCore.OpenApi.SourceGenerators.Tests/Microsoft.AspNetCore.OpenApi.SourceGenerators.Tests.csproj +++ b/src/OpenApi/test/Microsoft.AspNetCore.OpenApi.SourceGenerators.Tests/Microsoft.AspNetCore.OpenApi.SourceGenerators.Tests.csproj @@ -9,10 +9,15 @@ + + + + + diff --git a/src/OpenApi/test/Microsoft.AspNetCore.OpenApi.Tests/Microsoft.AspNetCore.OpenApi.Tests.csproj b/src/OpenApi/test/Microsoft.AspNetCore.OpenApi.Tests/Microsoft.AspNetCore.OpenApi.Tests.csproj index 96a5342b6407..8f13d86cbd5e 100644 --- a/src/OpenApi/test/Microsoft.AspNetCore.OpenApi.Tests/Microsoft.AspNetCore.OpenApi.Tests.csproj +++ b/src/OpenApi/test/Microsoft.AspNetCore.OpenApi.Tests/Microsoft.AspNetCore.OpenApi.Tests.csproj @@ -11,11 +11,21 @@ + + + + + + + + + + - + diff --git a/src/OpenApi/test/Microsoft.AspNetCore.OpenApi.Tests/Services/OpenApiSchemaService/OpenApiSchemaService.RequestBodySchemas.cs b/src/OpenApi/test/Microsoft.AspNetCore.OpenApi.Tests/Services/OpenApiSchemaService/OpenApiSchemaService.RequestBodySchemas.cs index 2c368e559c49..99ffe0ca3ddd 100644 --- a/src/OpenApi/test/Microsoft.AspNetCore.OpenApi.Tests/Services/OpenApiSchemaService/OpenApiSchemaService.RequestBodySchemas.cs +++ b/src/OpenApi/test/Microsoft.AspNetCore.OpenApi.Tests/Services/OpenApiSchemaService/OpenApiSchemaService.RequestBodySchemas.cs @@ -984,8 +984,9 @@ private void VerifyOptionalEnum(OpenApiDocument document) var property = properties["status"]; Assert.NotNull(property); - Assert.Equal(3, property.Enum.Count); - Assert.Equal("Approved", property.Default.GetValue()); + var statusReference = Assert.IsType(property); + Assert.Equal(3, statusReference.RecursiveTarget.Enum.Count); + Assert.Equal("Approved", statusReference.Default.GetValue()); } [ApiController] diff --git a/src/OpenApi/test/Microsoft.AspNetCore.OpenApi.Tests/Transformers/Implementations/OpenApiSchemaReferenceTransformerTests.cs b/src/OpenApi/test/Microsoft.AspNetCore.OpenApi.Tests/Transformers/Implementations/OpenApiSchemaReferenceTransformerTests.cs index 2979e5198444..55118b879f66 100644 --- a/src/OpenApi/test/Microsoft.AspNetCore.OpenApi.Tests/Transformers/Implementations/OpenApiSchemaReferenceTransformerTests.cs +++ b/src/OpenApi/test/Microsoft.AspNetCore.OpenApi.Tests/Transformers/Implementations/OpenApiSchemaReferenceTransformerTests.cs @@ -1122,6 +1122,38 @@ await VerifyOpenApiDocument(builder, document => }); } + // Test for: https://github.com/dotnet/aspnetcore/issues/64048 + public static object[][] CircularReferencesWithArraysHandlers => + [ + [(CircularReferenceWithArrayRootOrderArrayFirst dto) => { }], + [(CircularReferenceWithArrayRootOrderArrayLast dto) => { }], + ]; + + [Theory] + [MemberData(nameof(CircularReferencesWithArraysHandlers))] + public async Task HandlesCircularReferencesWithArraysRegardlessOfPropertyOrder(Delegate requestHandler) + { + var builder = CreateBuilder(); + builder.MapPost("/", requestHandler); + + await VerifyOpenApiDocument(builder, (OpenApiDocument document) => + { + Assert.NotNull(document.Components?.Schemas); + var schema = document.Components.Schemas["CircularReferenceWithArrayModel"]; + Assert.Equal(JsonSchemaType.Object, schema.Type); + Assert.NotNull(schema.Properties); + Assert.Collection(schema.Properties, + property => + { + Assert.Equal("selfArray", property.Key); + var arraySchema = Assert.IsType(property.Value); + Assert.Equal(JsonSchemaType.Array, arraySchema.Type); + var itemReference = Assert.IsType(arraySchema.Items); + Assert.Equal("#/components/schemas/CircularReferenceWithArrayModel", itemReference.Reference.ReferenceV3); + }); + }); + } + // Test models for issue 61194 private class Config { @@ -1203,5 +1235,23 @@ private class ReferencedModel { public int Id { get; set; } } + + // Test models for issue 64048 + public class CircularReferenceWithArrayRootOrderArrayLast + { + public CircularReferenceWithArrayModel Item { get; set; } = null!; + public ICollection ItemArray { get; set; } = []; + } + + public class CircularReferenceWithArrayRootOrderArrayFirst + { + public ICollection ItemArray { get; set; } = []; + public CircularReferenceWithArrayModel Item { get; set; } = null!; + } + + public class CircularReferenceWithArrayModel + { + public ICollection SelfArray { get; set; } = []; + } } #nullable restore diff --git a/src/ProjectTemplates/Web.ProjectTemplates/content/BlazorWeb-CSharp/BlazorWebCSharp.1/Components/Layout/ReconnectModal.razor b/src/ProjectTemplates/Web.ProjectTemplates/content/BlazorWeb-CSharp/BlazorWebCSharp.1/Components/Layout/ReconnectModal.razor index a85217a1132b..44f63561f43a 100644 --- a/src/ProjectTemplates/Web.ProjectTemplates/content/BlazorWeb-CSharp/BlazorWebCSharp.1/Components/Layout/ReconnectModal.razor +++ b/src/ProjectTemplates/Web.ProjectTemplates/content/BlazorWeb-CSharp/BlazorWebCSharp.1/Components/Layout/ReconnectModal.razor @@ -25,11 +25,11 @@

The session has been paused by the server.

-

- Failed to resume the session.
Please reload the page. + Failed to resume the session.
Please retry or reload the page.

+ diff --git a/src/ProjectTemplates/Web.ProjectTemplates/content/BlazorWeb-CSharp/BlazorWebCSharp.1/Components/Layout/ReconnectModal.razor.js b/src/ProjectTemplates/Web.ProjectTemplates/content/BlazorWeb-CSharp/BlazorWebCSharp.1/Components/Layout/ReconnectModal.razor.js index e52a190bacbb..a44de78d836d 100644 --- a/src/ProjectTemplates/Web.ProjectTemplates/content/BlazorWeb-CSharp/BlazorWebCSharp.1/Components/Layout/ReconnectModal.razor.js +++ b/src/ProjectTemplates/Web.ProjectTemplates/content/BlazorWeb-CSharp/BlazorWebCSharp.1/Components/Layout/ReconnectModal.razor.js @@ -52,7 +52,7 @@ async function resume() { location.reload(); } } catch { - location.reload(); + reconnectModal.classList.replace("components-reconnect-paused", "components-reconnect-resume-failed"); } } diff --git a/src/ProjectTemplates/Web.ProjectTemplates/content/RazorClassLibrary-CSharp/.template.config/template.json b/src/ProjectTemplates/Web.ProjectTemplates/content/RazorClassLibrary-CSharp/.template.config/template.json index f6494f592fc4..5200f94c468c 100644 --- a/src/ProjectTemplates/Web.ProjectTemplates/content/RazorClassLibrary-CSharp/.template.config/template.json +++ b/src/ProjectTemplates/Web.ProjectTemplates/content/RazorClassLibrary-CSharp/.template.config/template.json @@ -77,8 +77,12 @@ "path": "Company.RazorClassLibrary1.csproj" }, { - "condition": "(HostIdentifier != \"dotnetcli\" && HostIdentifier != \"dotnetcli-preview\")", + "condition": "(SupportPagesAndViews && HostIdentifier != \"dotnetcli\" && HostIdentifier != \"dotnetcli-preview\")", "path": "Areas/MyFeature/Pages/Page1.cshtml" + }, + { + "condition": "(!SupportPagesAndViews && HostIdentifier != \"dotnetcli\" && HostIdentifier != \"dotnetcli-preview\")", + "path": "Component1.razor" } ], "defaultName": "RazorClassLibrary", @@ -96,8 +100,8 @@ "continueOnError": true }, { - "id": "openInEditor", - "condition": "(HostIdentifier != \"dotnetcli\" && HostIdentifier != \"dotnetcli-preview\")", + "id": "openPageInEditor", + "condition": "(SupportPagesAndViews && HostIdentifier != \"dotnetcli\" && HostIdentifier != \"dotnetcli-preview\")", "description": "Opens Areas/MyFeature/Pages/Page1.cshtml in the editor", "manualInstructions": [], "actionId": "84C0DA21-51C8-4541-9940-6CA19AF04EE6", @@ -105,6 +109,17 @@ "files": "1" }, "continueOnError": true + }, + { + "id": "openComponentInEditor", + "condition": "(!SupportPagesAndViews && HostIdentifier != \"dotnetcli\" && HostIdentifier != \"dotnetcli-preview\")", + "description": "Opens Component1.razor in the editor", + "manualInstructions": [], + "actionId": "84C0DA21-51C8-4541-9940-6CA19AF04EE6", + "args": { + "files": "1" + }, + "continueOnError": true } ] } diff --git a/src/ProjectTemplates/test/Templates.Blazor.Tests/Templates.Blazor.Tests.csproj b/src/ProjectTemplates/test/Templates.Blazor.Tests/Templates.Blazor.Tests.csproj index 64c4a8639c41..c83139c69a34 100644 --- a/src/ProjectTemplates/test/Templates.Blazor.Tests/Templates.Blazor.Tests.csproj +++ b/src/ProjectTemplates/test/Templates.Blazor.Tests/Templates.Blazor.Tests.csproj @@ -48,6 +48,8 @@ + + diff --git a/src/ProjectTemplates/test/Templates.Blazor.WebAssembly.Auth.Tests/Templates.Blazor.WebAssembly.Auth.Tests.csproj b/src/ProjectTemplates/test/Templates.Blazor.WebAssembly.Auth.Tests/Templates.Blazor.WebAssembly.Auth.Tests.csproj index 25491823a21d..1017e6cf1d54 100644 --- a/src/ProjectTemplates/test/Templates.Blazor.WebAssembly.Auth.Tests/Templates.Blazor.WebAssembly.Auth.Tests.csproj +++ b/src/ProjectTemplates/test/Templates.Blazor.WebAssembly.Auth.Tests/Templates.Blazor.WebAssembly.Auth.Tests.csproj @@ -45,6 +45,8 @@ + + + + + + + + + + + + diff --git a/src/Razor/Razor/test/Microsoft.AspNetCore.Razor.Test.csproj b/src/Razor/Razor/test/Microsoft.AspNetCore.Razor.Test.csproj index af803f1ef07b..125db6f22f01 100644 --- a/src/Razor/Razor/test/Microsoft.AspNetCore.Razor.Test.csproj +++ b/src/Razor/Razor/test/Microsoft.AspNetCore.Razor.Test.csproj @@ -14,7 +14,12 @@ + + + + + diff --git a/src/Security/Authentication/BearerToken/src/Microsoft.AspNetCore.Authentication.BearerToken.csproj b/src/Security/Authentication/BearerToken/src/Microsoft.AspNetCore.Authentication.BearerToken.csproj index 9dde1188cb03..e41239b63535 100644 --- a/src/Security/Authentication/BearerToken/src/Microsoft.AspNetCore.Authentication.BearerToken.csproj +++ b/src/Security/Authentication/BearerToken/src/Microsoft.AspNetCore.Authentication.BearerToken.csproj @@ -12,6 +12,13 @@ + + + + + + + diff --git a/src/Security/Authentication/Certificate/samples/Certificate.Optional.Sample/Certificate.Optional.Sample.csproj b/src/Security/Authentication/Certificate/samples/Certificate.Optional.Sample/Certificate.Optional.Sample.csproj index c89c416ab8d6..ddabb3949b6f 100644 --- a/src/Security/Authentication/Certificate/samples/Certificate.Optional.Sample/Certificate.Optional.Sample.csproj +++ b/src/Security/Authentication/Certificate/samples/Certificate.Optional.Sample/Certificate.Optional.Sample.csproj @@ -9,8 +9,14 @@ + + + + + + diff --git a/src/Security/Authentication/Certificate/samples/Certificate.Sample/Certificate.Sample.csproj b/src/Security/Authentication/Certificate/samples/Certificate.Sample/Certificate.Sample.csproj index 86d4f1fb5126..65fa68023549 100644 --- a/src/Security/Authentication/Certificate/samples/Certificate.Sample/Certificate.Sample.csproj +++ b/src/Security/Authentication/Certificate/samples/Certificate.Sample/Certificate.Sample.csproj @@ -11,7 +11,13 @@ + + + + + + diff --git a/src/Security/Authentication/Certificate/src/Microsoft.AspNetCore.Authentication.Certificate.csproj b/src/Security/Authentication/Certificate/src/Microsoft.AspNetCore.Authentication.Certificate.csproj index f0ba2310f751..e993b55f552e 100644 --- a/src/Security/Authentication/Certificate/src/Microsoft.AspNetCore.Authentication.Certificate.csproj +++ b/src/Security/Authentication/Certificate/src/Microsoft.AspNetCore.Authentication.Certificate.csproj @@ -11,6 +11,9 @@ + + + diff --git a/src/Security/Authentication/Cookies/samples/CookieSample/CookieSample.csproj b/src/Security/Authentication/Cookies/samples/CookieSample/CookieSample.csproj index 412e23ab7103..0d4dc262391e 100644 --- a/src/Security/Authentication/Cookies/samples/CookieSample/CookieSample.csproj +++ b/src/Security/Authentication/Cookies/samples/CookieSample/CookieSample.csproj @@ -8,6 +8,13 @@ + + + + + + + diff --git a/src/Security/Authentication/Cookies/samples/CookieSessionSample/CookieSessionSample.csproj b/src/Security/Authentication/Cookies/samples/CookieSessionSample/CookieSessionSample.csproj index 518454d9a1d1..53e5ed05a831 100644 --- a/src/Security/Authentication/Cookies/samples/CookieSessionSample/CookieSessionSample.csproj +++ b/src/Security/Authentication/Cookies/samples/CookieSessionSample/CookieSessionSample.csproj @@ -7,11 +7,18 @@ + + + + + + + diff --git a/src/Security/Authentication/Cookies/src/Microsoft.AspNetCore.Authentication.Cookies.csproj b/src/Security/Authentication/Cookies/src/Microsoft.AspNetCore.Authentication.Cookies.csproj index 6a3843e97683..1c2b15b9b134 100644 --- a/src/Security/Authentication/Cookies/src/Microsoft.AspNetCore.Authentication.Cookies.csproj +++ b/src/Security/Authentication/Cookies/src/Microsoft.AspNetCore.Authentication.Cookies.csproj @@ -17,6 +17,11 @@ + + + + + diff --git a/src/Security/Authentication/Core/src/Microsoft.AspNetCore.Authentication.csproj b/src/Security/Authentication/Core/src/Microsoft.AspNetCore.Authentication.csproj index 32546d575cb1..033969615f1b 100644 --- a/src/Security/Authentication/Core/src/Microsoft.AspNetCore.Authentication.csproj +++ b/src/Security/Authentication/Core/src/Microsoft.AspNetCore.Authentication.csproj @@ -15,10 +15,13 @@ + + + diff --git a/src/Security/Authentication/Facebook/src/Microsoft.AspNetCore.Authentication.Facebook.csproj b/src/Security/Authentication/Facebook/src/Microsoft.AspNetCore.Authentication.Facebook.csproj index 729c381798a1..564f323f42d4 100644 --- a/src/Security/Authentication/Facebook/src/Microsoft.AspNetCore.Authentication.Facebook.csproj +++ b/src/Security/Authentication/Facebook/src/Microsoft.AspNetCore.Authentication.Facebook.csproj @@ -9,7 +9,11 @@ + + + + diff --git a/src/Security/Authentication/Google/src/Microsoft.AspNetCore.Authentication.Google.csproj b/src/Security/Authentication/Google/src/Microsoft.AspNetCore.Authentication.Google.csproj index 37895a9e912d..ebd854d0155a 100644 --- a/src/Security/Authentication/Google/src/Microsoft.AspNetCore.Authentication.Google.csproj +++ b/src/Security/Authentication/Google/src/Microsoft.AspNetCore.Authentication.Google.csproj @@ -9,7 +9,11 @@ + + + + diff --git a/src/Security/Authentication/JwtBearer/samples/JwtBearerSample/JwtBearerSample.csproj b/src/Security/Authentication/JwtBearer/samples/JwtBearerSample/JwtBearerSample.csproj index 798b2f54d0ef..d335f674c4ed 100644 --- a/src/Security/Authentication/JwtBearer/samples/JwtBearerSample/JwtBearerSample.csproj +++ b/src/Security/Authentication/JwtBearer/samples/JwtBearerSample/JwtBearerSample.csproj @@ -9,7 +9,14 @@ + + + + + + + diff --git a/src/Security/Authentication/JwtBearer/samples/MinimalJwtBearerSample/MinimalJwtBearerSample.csproj b/src/Security/Authentication/JwtBearer/samples/MinimalJwtBearerSample/MinimalJwtBearerSample.csproj index e0ab758b6a83..ead614c4ddf4 100644 --- a/src/Security/Authentication/JwtBearer/samples/MinimalJwtBearerSample/MinimalJwtBearerSample.csproj +++ b/src/Security/Authentication/JwtBearer/samples/MinimalJwtBearerSample/MinimalJwtBearerSample.csproj @@ -10,8 +10,16 @@ + + + + + + + + diff --git a/src/Security/Authentication/JwtBearer/src/Microsoft.AspNetCore.Authentication.JwtBearer.csproj b/src/Security/Authentication/JwtBearer/src/Microsoft.AspNetCore.Authentication.JwtBearer.csproj index 45c7f87f58d9..029ac6b850ed 100644 --- a/src/Security/Authentication/JwtBearer/src/Microsoft.AspNetCore.Authentication.JwtBearer.csproj +++ b/src/Security/Authentication/JwtBearer/src/Microsoft.AspNetCore.Authentication.JwtBearer.csproj @@ -10,6 +10,10 @@ + + + + diff --git a/src/Security/Authentication/MicrosoftAccount/src/Microsoft.AspNetCore.Authentication.MicrosoftAccount.csproj b/src/Security/Authentication/MicrosoftAccount/src/Microsoft.AspNetCore.Authentication.MicrosoftAccount.csproj index b86749748334..ec3611dbca0a 100644 --- a/src/Security/Authentication/MicrosoftAccount/src/Microsoft.AspNetCore.Authentication.MicrosoftAccount.csproj +++ b/src/Security/Authentication/MicrosoftAccount/src/Microsoft.AspNetCore.Authentication.MicrosoftAccount.csproj @@ -9,7 +9,11 @@ + + + + diff --git a/src/Security/Authentication/Negotiate/samples/NegotiateAuthSample/NegotiateAuthSample.csproj b/src/Security/Authentication/Negotiate/samples/NegotiateAuthSample/NegotiateAuthSample.csproj index aee2213438f2..3cf974e60ad2 100644 --- a/src/Security/Authentication/Negotiate/samples/NegotiateAuthSample/NegotiateAuthSample.csproj +++ b/src/Security/Authentication/Negotiate/samples/NegotiateAuthSample/NegotiateAuthSample.csproj @@ -9,6 +9,12 @@ + + + + + + diff --git a/src/Security/Authentication/Negotiate/src/Microsoft.AspNetCore.Authentication.Negotiate.csproj b/src/Security/Authentication/Negotiate/src/Microsoft.AspNetCore.Authentication.Negotiate.csproj index fdc8a4c3f908..f50cf6962c95 100644 --- a/src/Security/Authentication/Negotiate/src/Microsoft.AspNetCore.Authentication.Negotiate.csproj +++ b/src/Security/Authentication/Negotiate/src/Microsoft.AspNetCore.Authentication.Negotiate.csproj @@ -10,9 +10,13 @@ + + + + diff --git a/src/Security/Authentication/Negotiate/test/Negotiate.FunctionalTest/Microsoft.AspNetCore.Authentication.Negotiate.FunctionalTest.csproj b/src/Security/Authentication/Negotiate/test/Negotiate.FunctionalTest/Microsoft.AspNetCore.Authentication.Negotiate.FunctionalTest.csproj index bb84ed1c8de6..3fcf30efbed9 100644 --- a/src/Security/Authentication/Negotiate/test/Negotiate.FunctionalTest/Microsoft.AspNetCore.Authentication.Negotiate.FunctionalTest.csproj +++ b/src/Security/Authentication/Negotiate/test/Negotiate.FunctionalTest/Microsoft.AspNetCore.Authentication.Negotiate.FunctionalTest.csproj @@ -7,7 +7,12 @@ + + + + + diff --git a/src/Security/Authentication/Negotiate/test/Negotiate.Test/Microsoft.AspNetCore.Authentication.Negotiate.Test.csproj b/src/Security/Authentication/Negotiate/test/Negotiate.Test/Microsoft.AspNetCore.Authentication.Negotiate.Test.csproj index 663006135bfa..d75fe347cac6 100644 --- a/src/Security/Authentication/Negotiate/test/Negotiate.Test/Microsoft.AspNetCore.Authentication.Negotiate.Test.csproj +++ b/src/Security/Authentication/Negotiate/test/Negotiate.Test/Microsoft.AspNetCore.Authentication.Negotiate.Test.csproj @@ -7,8 +7,12 @@ - + + + + + diff --git a/src/Security/Authentication/Negotiate/test/testassets/Negotiate.Client/Negotiate.Client.csproj b/src/Security/Authentication/Negotiate/test/testassets/Negotiate.Client/Negotiate.Client.csproj index 2e68725650ae..e4fdf2aa5433 100644 --- a/src/Security/Authentication/Negotiate/test/testassets/Negotiate.Client/Negotiate.Client.csproj +++ b/src/Security/Authentication/Negotiate/test/testassets/Negotiate.Client/Negotiate.Client.csproj @@ -8,8 +8,11 @@ + + + diff --git a/src/Security/Authentication/Negotiate/test/testassets/Negotiate.Server/Negotiate.Server.csproj b/src/Security/Authentication/Negotiate/test/testassets/Negotiate.Server/Negotiate.Server.csproj index 5cec84f52fb7..e0d155c296f3 100644 --- a/src/Security/Authentication/Negotiate/test/testassets/Negotiate.Server/Negotiate.Server.csproj +++ b/src/Security/Authentication/Negotiate/test/testassets/Negotiate.Server/Negotiate.Server.csproj @@ -9,8 +9,11 @@ + + + diff --git a/src/Security/Authentication/OAuth/src/Microsoft.AspNetCore.Authentication.OAuth.csproj b/src/Security/Authentication/OAuth/src/Microsoft.AspNetCore.Authentication.OAuth.csproj index 204e60ed0db3..1adf2d662da3 100644 --- a/src/Security/Authentication/OAuth/src/Microsoft.AspNetCore.Authentication.OAuth.csproj +++ b/src/Security/Authentication/OAuth/src/Microsoft.AspNetCore.Authentication.OAuth.csproj @@ -12,6 +12,12 @@ + + + + + + diff --git a/src/Security/Authentication/OpenIdConnect/samples/MinimalOpenIdConnectSample/MinimalOpenIdConnectSample.csproj b/src/Security/Authentication/OpenIdConnect/samples/MinimalOpenIdConnectSample/MinimalOpenIdConnectSample.csproj index f1b23925c4d1..2fb357cd897c 100644 --- a/src/Security/Authentication/OpenIdConnect/samples/MinimalOpenIdConnectSample/MinimalOpenIdConnectSample.csproj +++ b/src/Security/Authentication/OpenIdConnect/samples/MinimalOpenIdConnectSample/MinimalOpenIdConnectSample.csproj @@ -10,6 +10,13 @@ + + + + + + + diff --git a/src/Security/Authentication/OpenIdConnect/samples/OpenIdConnectSample/OpenIdConnectSample.csproj b/src/Security/Authentication/OpenIdConnect/samples/OpenIdConnectSample/OpenIdConnectSample.csproj index bab8fec2acb2..b8bffb4c5ba0 100644 --- a/src/Security/Authentication/OpenIdConnect/samples/OpenIdConnectSample/OpenIdConnectSample.csproj +++ b/src/Security/Authentication/OpenIdConnect/samples/OpenIdConnectSample/OpenIdConnectSample.csproj @@ -2,7 +2,7 @@ $(DefaultNetCoreTargetFramework) - aspnet5-OpenIdConnectSample-20151210110318 + aspnet5-OpenIdConnectSample-20151210110318 OutOfProcess @@ -14,8 +14,15 @@ + + + + + + + diff --git a/src/Security/Authentication/OpenIdConnect/src/Microsoft.AspNetCore.Authentication.OpenIdConnect.csproj b/src/Security/Authentication/OpenIdConnect/src/Microsoft.AspNetCore.Authentication.OpenIdConnect.csproj index 68b81587a9a0..7fdcd8d6c152 100644 --- a/src/Security/Authentication/OpenIdConnect/src/Microsoft.AspNetCore.Authentication.OpenIdConnect.csproj +++ b/src/Security/Authentication/OpenIdConnect/src/Microsoft.AspNetCore.Authentication.OpenIdConnect.csproj @@ -9,7 +9,12 @@ + + + + + diff --git a/src/Security/Authentication/Twitter/src/Microsoft.AspNetCore.Authentication.Twitter.csproj b/src/Security/Authentication/Twitter/src/Microsoft.AspNetCore.Authentication.Twitter.csproj index c868859675fe..abfd6c53f1f8 100644 --- a/src/Security/Authentication/Twitter/src/Microsoft.AspNetCore.Authentication.Twitter.csproj +++ b/src/Security/Authentication/Twitter/src/Microsoft.AspNetCore.Authentication.Twitter.csproj @@ -9,7 +9,13 @@ + + + + + + diff --git a/src/Security/Authentication/WsFederation/samples/WsFedSample/WsFedSample.csproj b/src/Security/Authentication/WsFederation/samples/WsFedSample/WsFedSample.csproj index da15b377db33..d5aba65aa0fc 100644 --- a/src/Security/Authentication/WsFederation/samples/WsFedSample/WsFedSample.csproj +++ b/src/Security/Authentication/WsFederation/samples/WsFedSample/WsFedSample.csproj @@ -8,11 +8,18 @@ + + + + + + + - + diff --git a/src/Security/Authentication/WsFederation/src/Microsoft.AspNetCore.Authentication.WsFederation.csproj b/src/Security/Authentication/WsFederation/src/Microsoft.AspNetCore.Authentication.WsFederation.csproj index b68b19f727b7..ebe2ac92b8b3 100644 --- a/src/Security/Authentication/WsFederation/src/Microsoft.AspNetCore.Authentication.WsFederation.csproj +++ b/src/Security/Authentication/WsFederation/src/Microsoft.AspNetCore.Authentication.WsFederation.csproj @@ -10,6 +10,10 @@ + + + + diff --git a/src/Security/Authentication/samples/SocialSample/SocialSample.csproj b/src/Security/Authentication/samples/SocialSample/SocialSample.csproj index 4027f168ad95..d5ecf8130afb 100644 --- a/src/Security/Authentication/samples/SocialSample/SocialSample.csproj +++ b/src/Security/Authentication/samples/SocialSample/SocialSample.csproj @@ -20,8 +20,17 @@ + + + + + + + + + diff --git a/src/Security/Authentication/test/Microsoft.AspNetCore.Authentication.Test.csproj b/src/Security/Authentication/test/Microsoft.AspNetCore.Authentication.Test.csproj index 64bcf143aa82..dea424710ac9 100644 --- a/src/Security/Authentication/test/Microsoft.AspNetCore.Authentication.Test.csproj +++ b/src/Security/Authentication/test/Microsoft.AspNetCore.Authentication.Test.csproj @@ -43,6 +43,10 @@ + + + + diff --git a/src/Security/Authorization/Policy/src/Microsoft.AspNetCore.Authorization.Policy.csproj b/src/Security/Authorization/Policy/src/Microsoft.AspNetCore.Authorization.Policy.csproj index 14912c54a988..b723d41c9912 100644 --- a/src/Security/Authorization/Policy/src/Microsoft.AspNetCore.Authorization.Policy.csproj +++ b/src/Security/Authorization/Policy/src/Microsoft.AspNetCore.Authorization.Policy.csproj @@ -19,7 +19,9 @@ + + diff --git a/src/Security/Authorization/test/Microsoft.AspNetCore.Authorization.Test.csproj b/src/Security/Authorization/test/Microsoft.AspNetCore.Authorization.Test.csproj index 8eeed805c2c9..c62a8a9ebdd3 100644 --- a/src/Security/Authorization/test/Microsoft.AspNetCore.Authorization.Test.csproj +++ b/src/Security/Authorization/test/Microsoft.AspNetCore.Authorization.Test.csproj @@ -8,9 +8,13 @@ + + + + diff --git a/src/Security/CookiePolicy/samples/CookiePolicySample/CookiePolicySample.csproj b/src/Security/CookiePolicy/samples/CookiePolicySample/CookiePolicySample.csproj index 836518fbbd32..f8654d0f1397 100644 --- a/src/Security/CookiePolicy/samples/CookiePolicySample/CookiePolicySample.csproj +++ b/src/Security/CookiePolicy/samples/CookiePolicySample/CookiePolicySample.csproj @@ -5,10 +5,17 @@ - + + + + + + + + diff --git a/src/Security/CookiePolicy/src/Microsoft.AspNetCore.CookiePolicy.csproj b/src/Security/CookiePolicy/src/Microsoft.AspNetCore.CookiePolicy.csproj index aab3dc37f5f2..c293738b2de0 100644 --- a/src/Security/CookiePolicy/src/Microsoft.AspNetCore.CookiePolicy.csproj +++ b/src/Security/CookiePolicy/src/Microsoft.AspNetCore.CookiePolicy.csproj @@ -12,6 +12,8 @@ + + diff --git a/src/Security/CookiePolicy/test/Microsoft.AspNetCore.CookiePolicy.Test.csproj b/src/Security/CookiePolicy/test/Microsoft.AspNetCore.CookiePolicy.Test.csproj index 4bdc80afa01a..e90ac31170b8 100644 --- a/src/Security/CookiePolicy/test/Microsoft.AspNetCore.CookiePolicy.Test.csproj +++ b/src/Security/CookiePolicy/test/Microsoft.AspNetCore.CookiePolicy.Test.csproj @@ -11,8 +11,12 @@ + + + + diff --git a/src/Security/perf/Microbenchmarks/Microsoft.AspNetCore.Security.Microbenchmarks.csproj b/src/Security/perf/Microbenchmarks/Microsoft.AspNetCore.Security.Microbenchmarks.csproj index cf86764d09e2..8400eb8fce7d 100644 --- a/src/Security/perf/Microbenchmarks/Microsoft.AspNetCore.Security.Microbenchmarks.csproj +++ b/src/Security/perf/Microbenchmarks/Microsoft.AspNetCore.Security.Microbenchmarks.csproj @@ -1,5 +1,5 @@ - + $(DefaultNetCoreTargetFramework) Exe @@ -7,13 +7,17 @@ true Microsoft.AspNetCore.Security - + - + + + + + diff --git a/src/Security/samples/ClaimsTransformation/ClaimsTransformation.csproj b/src/Security/samples/ClaimsTransformation/ClaimsTransformation.csproj index 067f0add4562..601bfd26da46 100644 --- a/src/Security/samples/ClaimsTransformation/ClaimsTransformation.csproj +++ b/src/Security/samples/ClaimsTransformation/ClaimsTransformation.csproj @@ -9,6 +9,11 @@ + + + + + diff --git a/src/Security/samples/Cookies/Cookies.csproj b/src/Security/samples/Cookies/Cookies.csproj index 067f0add4562..601bfd26da46 100644 --- a/src/Security/samples/Cookies/Cookies.csproj +++ b/src/Security/samples/Cookies/Cookies.csproj @@ -9,6 +9,11 @@ + + + + + diff --git a/src/Security/samples/CustomAuthorizationFailureResponse/CustomAuthorizationFailureResponse.csproj b/src/Security/samples/CustomAuthorizationFailureResponse/CustomAuthorizationFailureResponse.csproj index 280dc59e6453..abf091d56f21 100644 --- a/src/Security/samples/CustomAuthorizationFailureResponse/CustomAuthorizationFailureResponse.csproj +++ b/src/Security/samples/CustomAuthorizationFailureResponse/CustomAuthorizationFailureResponse.csproj @@ -8,8 +8,14 @@ + + + + + + diff --git a/src/Security/samples/CustomPolicyProvider/CustomPolicyProvider.csproj b/src/Security/samples/CustomPolicyProvider/CustomPolicyProvider.csproj index d7219e687d23..10862e6ed7d6 100644 --- a/src/Security/samples/CustomPolicyProvider/CustomPolicyProvider.csproj +++ b/src/Security/samples/CustomPolicyProvider/CustomPolicyProvider.csproj @@ -10,5 +10,10 @@ + + + + + diff --git a/src/Security/samples/DynamicSchemes/DynamicSchemes.csproj b/src/Security/samples/DynamicSchemes/DynamicSchemes.csproj index 0ccbed38af8e..661871df75db 100644 --- a/src/Security/samples/DynamicSchemes/DynamicSchemes.csproj +++ b/src/Security/samples/DynamicSchemes/DynamicSchemes.csproj @@ -13,6 +13,11 @@ + + + + + diff --git a/src/Security/samples/Identity.ExternalClaims/Identity.ExternalClaims.csproj b/src/Security/samples/Identity.ExternalClaims/Identity.ExternalClaims.csproj index 693cd9388b4f..8271f328c29e 100644 --- a/src/Security/samples/Identity.ExternalClaims/Identity.ExternalClaims.csproj +++ b/src/Security/samples/Identity.ExternalClaims/Identity.ExternalClaims.csproj @@ -17,6 +17,14 @@ + + + + + + + + diff --git a/src/Security/samples/PathSchemeSelection/PathSchemeSelection.csproj b/src/Security/samples/PathSchemeSelection/PathSchemeSelection.csproj index 067f0add4562..540c357acb33 100644 --- a/src/Security/samples/PathSchemeSelection/PathSchemeSelection.csproj +++ b/src/Security/samples/PathSchemeSelection/PathSchemeSelection.csproj @@ -9,6 +9,12 @@ + + + + + + diff --git a/src/Security/samples/StaticFilesAuth/StaticFilesAuth.csproj b/src/Security/samples/StaticFilesAuth/StaticFilesAuth.csproj index 871a361b56ea..5e426d22ebe0 100644 --- a/src/Security/samples/StaticFilesAuth/StaticFilesAuth.csproj +++ b/src/Security/samples/StaticFilesAuth/StaticFilesAuth.csproj @@ -37,6 +37,11 @@ + + + + + diff --git a/src/Security/test/AuthSamples.FunctionalTests/AuthSamples.FunctionalTests.csproj b/src/Security/test/AuthSamples.FunctionalTests/AuthSamples.FunctionalTests.csproj index 27c4ba614c7a..dfdaebbb6b50 100644 --- a/src/Security/test/AuthSamples.FunctionalTests/AuthSamples.FunctionalTests.csproj +++ b/src/Security/test/AuthSamples.FunctionalTests/AuthSamples.FunctionalTests.csproj @@ -11,10 +11,22 @@ + + + + + + + + + + + + diff --git a/src/Servers/HttpSys/samples/HotAddSample/HotAddSample.csproj b/src/Servers/HttpSys/samples/HotAddSample/HotAddSample.csproj index cf4b7f8a960e..47e89c605a65 100644 --- a/src/Servers/HttpSys/samples/HotAddSample/HotAddSample.csproj +++ b/src/Servers/HttpSys/samples/HotAddSample/HotAddSample.csproj @@ -7,7 +7,14 @@ + + + + + + + diff --git a/src/Servers/HttpSys/samples/QueueSharing/QueueSharing.csproj b/src/Servers/HttpSys/samples/QueueSharing/QueueSharing.csproj index 50b95bc6ce4e..c8b9892ae665 100644 --- a/src/Servers/HttpSys/samples/QueueSharing/QueueSharing.csproj +++ b/src/Servers/HttpSys/samples/QueueSharing/QueueSharing.csproj @@ -7,6 +7,12 @@ + + + + + + diff --git a/src/Servers/HttpSys/samples/SelfHostServer/SelfHostServer.csproj b/src/Servers/HttpSys/samples/SelfHostServer/SelfHostServer.csproj index b46454ea0999..809eaafa2b07 100644 --- a/src/Servers/HttpSys/samples/SelfHostServer/SelfHostServer.csproj +++ b/src/Servers/HttpSys/samples/SelfHostServer/SelfHostServer.csproj @@ -5,13 +5,19 @@ Exe true - + 214124cd-d05b-4309-9af9-9caa44b2b74a + + + + + + diff --git a/src/Servers/HttpSys/samples/TlsFeaturesObserve/TlsFeaturesObserve.csproj b/src/Servers/HttpSys/samples/TlsFeaturesObserve/TlsFeaturesObserve.csproj index 3ba4390b4e73..267104d975a1 100644 --- a/src/Servers/HttpSys/samples/TlsFeaturesObserve/TlsFeaturesObserve.csproj +++ b/src/Servers/HttpSys/samples/TlsFeaturesObserve/TlsFeaturesObserve.csproj @@ -8,6 +8,12 @@ + + + + + + diff --git a/src/Servers/HttpSys/src/Microsoft.AspNetCore.Server.HttpSys.csproj b/src/Servers/HttpSys/src/Microsoft.AspNetCore.Server.HttpSys.csproj index 868990b89816..a9527744ca2a 100644 --- a/src/Servers/HttpSys/src/Microsoft.AspNetCore.Server.HttpSys.csproj +++ b/src/Servers/HttpSys/src/Microsoft.AspNetCore.Server.HttpSys.csproj @@ -39,9 +39,15 @@ + + + + + + all diff --git a/src/Servers/HttpSys/test/FunctionalTests/Microsoft.AspNetCore.Server.HttpSys.FunctionalTests.csproj b/src/Servers/HttpSys/test/FunctionalTests/Microsoft.AspNetCore.Server.HttpSys.FunctionalTests.csproj index f59ba8ab7c22..d875c4412c20 100644 --- a/src/Servers/HttpSys/test/FunctionalTests/Microsoft.AspNetCore.Server.HttpSys.FunctionalTests.csproj +++ b/src/Servers/HttpSys/test/FunctionalTests/Microsoft.AspNetCore.Server.HttpSys.FunctionalTests.csproj @@ -28,7 +28,18 @@ + + + + + + + + + + + diff --git a/src/Servers/HttpSys/test/NonHelixTests/Microsoft.AspNetCore.Server.HttpSys.NonHelixTests.csproj b/src/Servers/HttpSys/test/NonHelixTests/Microsoft.AspNetCore.Server.HttpSys.NonHelixTests.csproj index 43ed463c2449..3b6f88c7e83a 100644 --- a/src/Servers/HttpSys/test/NonHelixTests/Microsoft.AspNetCore.Server.HttpSys.NonHelixTests.csproj +++ b/src/Servers/HttpSys/test/NonHelixTests/Microsoft.AspNetCore.Server.HttpSys.NonHelixTests.csproj @@ -12,6 +12,8 @@ + + diff --git a/src/Servers/HttpSys/test/Tests/Microsoft.AspNetCore.Server.HttpSys.Tests.csproj b/src/Servers/HttpSys/test/Tests/Microsoft.AspNetCore.Server.HttpSys.Tests.csproj index 2929bc66f603..6c7b9af81d89 100644 --- a/src/Servers/HttpSys/test/Tests/Microsoft.AspNetCore.Server.HttpSys.Tests.csproj +++ b/src/Servers/HttpSys/test/Tests/Microsoft.AspNetCore.Server.HttpSys.Tests.csproj @@ -6,6 +6,13 @@ + + + + + + + diff --git a/src/Servers/HttpSys/test/testassets/DelegationSite/DelegationSite.csproj b/src/Servers/HttpSys/test/testassets/DelegationSite/DelegationSite.csproj index e125cecc1622..f1dcd830dd94 100644 --- a/src/Servers/HttpSys/test/testassets/DelegationSite/DelegationSite.csproj +++ b/src/Servers/HttpSys/test/testassets/DelegationSite/DelegationSite.csproj @@ -6,6 +6,10 @@ + + + + diff --git a/src/Servers/IIS/IIS/samples/NativeIISSample/NativeIISSample.csproj b/src/Servers/IIS/IIS/samples/NativeIISSample/NativeIISSample.csproj index fa97a75dd5b0..9760d68b4fd4 100644 --- a/src/Servers/IIS/IIS/samples/NativeIISSample/NativeIISSample.csproj +++ b/src/Servers/IIS/IIS/samples/NativeIISSample/NativeIISSample.csproj @@ -10,10 +10,17 @@ + + + + + + + diff --git a/src/Servers/IIS/IIS/src/Microsoft.AspNetCore.Server.IIS.csproj b/src/Servers/IIS/IIS/src/Microsoft.AspNetCore.Server.IIS.csproj index a456190bc234..c54a34640b30 100644 --- a/src/Servers/IIS/IIS/src/Microsoft.AspNetCore.Server.IIS.csproj +++ b/src/Servers/IIS/IIS/src/Microsoft.AspNetCore.Server.IIS.csproj @@ -55,9 +55,13 @@ + + + + diff --git a/src/Servers/IIS/IIS/test/IIS.FunctionalTests/IIS.FunctionalTests.csproj b/src/Servers/IIS/IIS/test/IIS.FunctionalTests/IIS.FunctionalTests.csproj index 057847785d61..024bd9a3e056 100644 --- a/src/Servers/IIS/IIS/test/IIS.FunctionalTests/IIS.FunctionalTests.csproj +++ b/src/Servers/IIS/IIS/test/IIS.FunctionalTests/IIS.FunctionalTests.csproj @@ -16,6 +16,8 @@ + + + + diff --git a/src/Servers/IIS/IIS/test/IIS.NewHandler.FunctionalTests/IIS.NewHandler.FunctionalTests.csproj b/src/Servers/IIS/IIS/test/IIS.NewHandler.FunctionalTests/IIS.NewHandler.FunctionalTests.csproj index e38af72c179b..625669eb65b8 100644 --- a/src/Servers/IIS/IIS/test/IIS.NewHandler.FunctionalTests/IIS.NewHandler.FunctionalTests.csproj +++ b/src/Servers/IIS/IIS/test/IIS.NewHandler.FunctionalTests/IIS.NewHandler.FunctionalTests.csproj @@ -42,6 +42,8 @@ + + diff --git a/src/Servers/IIS/IIS/test/IIS.NewShim.FunctionalTests/IIS.NewShim.FunctionalTests.csproj b/src/Servers/IIS/IIS/test/IIS.NewShim.FunctionalTests/IIS.NewShim.FunctionalTests.csproj index 40e30287b319..8b2c52f2d895 100644 --- a/src/Servers/IIS/IIS/test/IIS.NewShim.FunctionalTests/IIS.NewShim.FunctionalTests.csproj +++ b/src/Servers/IIS/IIS/test/IIS.NewShim.FunctionalTests/IIS.NewShim.FunctionalTests.csproj @@ -37,8 +37,15 @@ + + + + + + + diff --git a/src/Servers/IIS/IIS/test/IIS.ShadowCopy.Tests/IIS.ShadowCopy.Tests.csproj b/src/Servers/IIS/IIS/test/IIS.ShadowCopy.Tests/IIS.ShadowCopy.Tests.csproj index 3093056cd50a..64a7222ec1e0 100644 --- a/src/Servers/IIS/IIS/test/IIS.ShadowCopy.Tests/IIS.ShadowCopy.Tests.csproj +++ b/src/Servers/IIS/IIS/test/IIS.ShadowCopy.Tests/IIS.ShadowCopy.Tests.csproj @@ -27,6 +27,8 @@ + + diff --git a/src/Servers/IIS/IIS/test/IIS.Tests/IIS.Tests.csproj b/src/Servers/IIS/IIS/test/IIS.Tests/IIS.Tests.csproj index db1558e04b10..df99f3a2baf0 100644 --- a/src/Servers/IIS/IIS/test/IIS.Tests/IIS.Tests.csproj +++ b/src/Servers/IIS/IIS/test/IIS.Tests/IIS.Tests.csproj @@ -17,8 +17,15 @@ + + + + + + + diff --git a/src/Servers/IIS/IIS/test/IISExpress.FunctionalTests/IISExpress.FunctionalTests.csproj b/src/Servers/IIS/IIS/test/IISExpress.FunctionalTests/IISExpress.FunctionalTests.csproj index f34f4f9e7cee..4be3bf3f2828 100644 --- a/src/Servers/IIS/IIS/test/IISExpress.FunctionalTests/IISExpress.FunctionalTests.csproj +++ b/src/Servers/IIS/IIS/test/IISExpress.FunctionalTests/IISExpress.FunctionalTests.csproj @@ -12,6 +12,8 @@ + + diff --git a/src/Servers/IIS/IIS/test/testassets/InProcessWebSite/InProcessWebSite.csproj b/src/Servers/IIS/IIS/test/testassets/InProcessWebSite/InProcessWebSite.csproj index 658f4c3f9b58..0fa1448736dc 100644 --- a/src/Servers/IIS/IIS/test/testassets/InProcessWebSite/InProcessWebSite.csproj +++ b/src/Servers/IIS/IIS/test/testassets/InProcessWebSite/InProcessWebSite.csproj @@ -22,12 +22,16 @@ + + + + + - diff --git a/src/Servers/IIS/IISIntegration/samples/IISSample/IISSample.csproj b/src/Servers/IIS/IISIntegration/samples/IISSample/IISSample.csproj index 44323fdee641..b21135c06c5e 100644 --- a/src/Servers/IIS/IISIntegration/samples/IISSample/IISSample.csproj +++ b/src/Servers/IIS/IISIntegration/samples/IISSample/IISSample.csproj @@ -5,8 +5,15 @@ + + + + + + + diff --git a/src/Servers/IIS/IISIntegration/src/Microsoft.AspNetCore.Server.IISIntegration.csproj b/src/Servers/IIS/IISIntegration/src/Microsoft.AspNetCore.Server.IISIntegration.csproj index bd96061e6291..21c32002151e 100644 --- a/src/Servers/IIS/IISIntegration/src/Microsoft.AspNetCore.Server.IISIntegration.csproj +++ b/src/Servers/IIS/IISIntegration/src/Microsoft.AspNetCore.Server.IISIntegration.csproj @@ -15,11 +15,14 @@ + - + + + diff --git a/src/Servers/IIS/IISIntegration/test/Tests/Microsoft.AspNetCore.Server.IISIntegration.Tests.csproj b/src/Servers/IIS/IISIntegration/test/Tests/Microsoft.AspNetCore.Server.IISIntegration.Tests.csproj index 98dad5c427c9..daecd97408d2 100644 --- a/src/Servers/IIS/IISIntegration/test/Tests/Microsoft.AspNetCore.Server.IISIntegration.Tests.csproj +++ b/src/Servers/IIS/IISIntegration/test/Tests/Microsoft.AspNetCore.Server.IISIntegration.Tests.csproj @@ -5,9 +5,17 @@ + + + + + + + + - + diff --git a/src/Servers/Kestrel/Core/src/Microsoft.AspNetCore.Server.Kestrel.Core.csproj b/src/Servers/Kestrel/Core/src/Microsoft.AspNetCore.Server.Kestrel.Core.csproj index c35c22dd8d94..9ca9d863a5cc 100644 --- a/src/Servers/Kestrel/Core/src/Microsoft.AspNetCore.Server.Kestrel.Core.csproj +++ b/src/Servers/Kestrel/Core/src/Microsoft.AspNetCore.Server.Kestrel.Core.csproj @@ -42,7 +42,10 @@ + + + diff --git a/src/Servers/Kestrel/Core/test/Microsoft.AspNetCore.Server.Kestrel.Core.Tests.csproj b/src/Servers/Kestrel/Core/test/Microsoft.AspNetCore.Server.Kestrel.Core.Tests.csproj index 37aea90bcf3c..1089bdce93ef 100644 --- a/src/Servers/Kestrel/Core/test/Microsoft.AspNetCore.Server.Kestrel.Core.Tests.csproj +++ b/src/Servers/Kestrel/Core/test/Microsoft.AspNetCore.Server.Kestrel.Core.Tests.csproj @@ -23,7 +23,12 @@ + + + + + diff --git a/src/Servers/Kestrel/Kestrel/src/Microsoft.AspNetCore.Server.Kestrel.csproj b/src/Servers/Kestrel/Kestrel/src/Microsoft.AspNetCore.Server.Kestrel.csproj index cc61f6a7f5db..4f85a160dd8b 100644 --- a/src/Servers/Kestrel/Kestrel/src/Microsoft.AspNetCore.Server.Kestrel.csproj +++ b/src/Servers/Kestrel/Kestrel/src/Microsoft.AspNetCore.Server.Kestrel.csproj @@ -12,6 +12,8 @@ + + diff --git a/src/Servers/Kestrel/Kestrel/test/Microsoft.AspNetCore.Server.Kestrel.Tests.csproj b/src/Servers/Kestrel/Kestrel/test/Microsoft.AspNetCore.Server.Kestrel.Tests.csproj index 301d784d9e6d..d2bccfac88a3 100644 --- a/src/Servers/Kestrel/Kestrel/test/Microsoft.AspNetCore.Server.Kestrel.Tests.csproj +++ b/src/Servers/Kestrel/Kestrel/test/Microsoft.AspNetCore.Server.Kestrel.Tests.csproj @@ -21,7 +21,14 @@ + + + + + + + diff --git a/src/Servers/Kestrel/Transport.NamedPipes/test/Microsoft.AspNetCore.Server.Kestrel.Transport.NamedPipes.Tests.csproj b/src/Servers/Kestrel/Transport.NamedPipes/test/Microsoft.AspNetCore.Server.Kestrel.Transport.NamedPipes.Tests.csproj index 3010a02590fd..4add8d238c63 100644 --- a/src/Servers/Kestrel/Transport.NamedPipes/test/Microsoft.AspNetCore.Server.Kestrel.Transport.NamedPipes.Tests.csproj +++ b/src/Servers/Kestrel/Transport.NamedPipes/test/Microsoft.AspNetCore.Server.Kestrel.Transport.NamedPipes.Tests.csproj @@ -23,10 +23,17 @@ + + + + - + + + + diff --git a/src/Servers/Kestrel/Transport.Quic/src/Microsoft.AspNetCore.Server.Kestrel.Transport.Quic.csproj b/src/Servers/Kestrel/Transport.Quic/src/Microsoft.AspNetCore.Server.Kestrel.Transport.Quic.csproj index 0b27e701b2ce..58d1e04125cf 100644 --- a/src/Servers/Kestrel/Transport.Quic/src/Microsoft.AspNetCore.Server.Kestrel.Transport.Quic.csproj +++ b/src/Servers/Kestrel/Transport.Quic/src/Microsoft.AspNetCore.Server.Kestrel.Transport.Quic.csproj @@ -32,7 +32,9 @@ + + diff --git a/src/Servers/Kestrel/Transport.Quic/test/Microsoft.AspNetCore.Server.Kestrel.Transport.Quic.Tests.csproj b/src/Servers/Kestrel/Transport.Quic/test/Microsoft.AspNetCore.Server.Kestrel.Transport.Quic.Tests.csproj index f4eccaad18f0..3c7bfb4db380 100644 --- a/src/Servers/Kestrel/Transport.Quic/test/Microsoft.AspNetCore.Server.Kestrel.Transport.Quic.Tests.csproj +++ b/src/Servers/Kestrel/Transport.Quic/test/Microsoft.AspNetCore.Server.Kestrel.Transport.Quic.Tests.csproj @@ -26,10 +26,17 @@ + + + + - + + + + diff --git a/src/Servers/Kestrel/perf/Microbenchmarks/Microsoft.AspNetCore.Server.Kestrel.Microbenchmarks.csproj b/src/Servers/Kestrel/perf/Microbenchmarks/Microsoft.AspNetCore.Server.Kestrel.Microbenchmarks.csproj index 0d4fff0fdc0f..1347421e0554 100644 --- a/src/Servers/Kestrel/perf/Microbenchmarks/Microsoft.AspNetCore.Server.Kestrel.Microbenchmarks.csproj +++ b/src/Servers/Kestrel/perf/Microbenchmarks/Microsoft.AspNetCore.Server.Kestrel.Microbenchmarks.csproj @@ -32,9 +32,16 @@ + + + + + + + - + diff --git a/src/Servers/Kestrel/samples/Http2SampleApp/Http2SampleApp.csproj b/src/Servers/Kestrel/samples/Http2SampleApp/Http2SampleApp.csproj index d0930e69fee0..b94c675e8c95 100644 --- a/src/Servers/Kestrel/samples/Http2SampleApp/Http2SampleApp.csproj +++ b/src/Servers/Kestrel/samples/Http2SampleApp/Http2SampleApp.csproj @@ -7,7 +7,14 @@ + + + + + + + diff --git a/src/Servers/Kestrel/samples/Http3SampleApp/Http3SampleApp.csproj b/src/Servers/Kestrel/samples/Http3SampleApp/Http3SampleApp.csproj index c56f7fb39162..b1633f87f62f 100644 --- a/src/Servers/Kestrel/samples/Http3SampleApp/Http3SampleApp.csproj +++ b/src/Servers/Kestrel/samples/Http3SampleApp/Http3SampleApp.csproj @@ -11,9 +11,15 @@ + + + + + + - - + + diff --git a/src/Servers/Kestrel/samples/LargeResponseApp/LargeResponseApp.csproj b/src/Servers/Kestrel/samples/LargeResponseApp/LargeResponseApp.csproj index 615f2698671c..2ffb9b0abb13 100644 --- a/src/Servers/Kestrel/samples/LargeResponseApp/LargeResponseApp.csproj +++ b/src/Servers/Kestrel/samples/LargeResponseApp/LargeResponseApp.csproj @@ -7,7 +7,14 @@ + + + + + + + diff --git a/src/Servers/Kestrel/samples/PlaintextApp/PlaintextApp.csproj b/src/Servers/Kestrel/samples/PlaintextApp/PlaintextApp.csproj index e5bb31ff0f90..af638c752b13 100644 --- a/src/Servers/Kestrel/samples/PlaintextApp/PlaintextApp.csproj +++ b/src/Servers/Kestrel/samples/PlaintextApp/PlaintextApp.csproj @@ -7,7 +7,14 @@ + + + + + + + diff --git a/src/Servers/Kestrel/samples/SampleApp/Kestrel.SampleApp.csproj b/src/Servers/Kestrel/samples/SampleApp/Kestrel.SampleApp.csproj index 6612d7d2f9aa..06dea565f9c6 100644 --- a/src/Servers/Kestrel/samples/SampleApp/Kestrel.SampleApp.csproj +++ b/src/Servers/Kestrel/samples/SampleApp/Kestrel.SampleApp.csproj @@ -7,8 +7,15 @@ + + + + + + + diff --git a/src/Servers/Kestrel/samples/SystemdTestApp/SystemdTestApp.csproj b/src/Servers/Kestrel/samples/SystemdTestApp/SystemdTestApp.csproj index d0930e69fee0..b94c675e8c95 100644 --- a/src/Servers/Kestrel/samples/SystemdTestApp/SystemdTestApp.csproj +++ b/src/Servers/Kestrel/samples/SystemdTestApp/SystemdTestApp.csproj @@ -7,7 +7,14 @@ + + + + + + + diff --git a/src/Servers/Kestrel/samples/WebTransportInteractiveSampleApp/WebTransportInteractiveSampleApp.csproj b/src/Servers/Kestrel/samples/WebTransportInteractiveSampleApp/WebTransportInteractiveSampleApp.csproj index 49484289eec9..73df39951cc5 100644 --- a/src/Servers/Kestrel/samples/WebTransportInteractiveSampleApp/WebTransportInteractiveSampleApp.csproj +++ b/src/Servers/Kestrel/samples/WebTransportInteractiveSampleApp/WebTransportInteractiveSampleApp.csproj @@ -11,10 +11,17 @@ + + + + + + + diff --git a/src/Servers/Kestrel/samples/WebTransportSampleApp/WebTransportSampleApp.csproj b/src/Servers/Kestrel/samples/WebTransportSampleApp/WebTransportSampleApp.csproj index 1b140b33f192..202a6ff08900 100644 --- a/src/Servers/Kestrel/samples/WebTransportSampleApp/WebTransportSampleApp.csproj +++ b/src/Servers/Kestrel/samples/WebTransportSampleApp/WebTransportSampleApp.csproj @@ -10,10 +10,15 @@ + + + + + - - + + diff --git a/src/Servers/Kestrel/samples/http2cat/http2cat.csproj b/src/Servers/Kestrel/samples/http2cat/http2cat.csproj index a46f806a3471..b05fb1852195 100644 --- a/src/Servers/Kestrel/samples/http2cat/http2cat.csproj +++ b/src/Servers/Kestrel/samples/http2cat/http2cat.csproj @@ -20,11 +20,17 @@ - + + + + + + + + - diff --git a/src/Servers/Kestrel/stress/HttpStress.csproj b/src/Servers/Kestrel/stress/HttpStress.csproj index 7349608451e8..5b68e96bbc03 100644 --- a/src/Servers/Kestrel/stress/HttpStress.csproj +++ b/src/Servers/Kestrel/stress/HttpStress.csproj @@ -7,11 +7,18 @@ - - + + + + + + + + + @@ -19,4 +26,4 @@ 214124cd-d05b-4309-9af9-9caa44b2b74a - \ No newline at end of file + diff --git a/src/Servers/Kestrel/test/InMemory.FunctionalTests/InMemory.FunctionalTests.csproj b/src/Servers/Kestrel/test/InMemory.FunctionalTests/InMemory.FunctionalTests.csproj index 1a69f20b58af..583c19244758 100644 --- a/src/Servers/Kestrel/test/InMemory.FunctionalTests/InMemory.FunctionalTests.csproj +++ b/src/Servers/Kestrel/test/InMemory.FunctionalTests/InMemory.FunctionalTests.csproj @@ -33,9 +33,16 @@ + + + + + + + diff --git a/src/Servers/Kestrel/test/Interop.FunctionalTests/Interop.FunctionalTests.csproj b/src/Servers/Kestrel/test/Interop.FunctionalTests/Interop.FunctionalTests.csproj index e44eb2d00fca..36eeaddda7a0 100644 --- a/src/Servers/Kestrel/test/Interop.FunctionalTests/Interop.FunctionalTests.csproj +++ b/src/Servers/Kestrel/test/Interop.FunctionalTests/Interop.FunctionalTests.csproj @@ -31,11 +31,20 @@ + + + + + + + + - + + diff --git a/src/Servers/Kestrel/test/Sockets.BindTests/Sockets.BindTests.csproj b/src/Servers/Kestrel/test/Sockets.BindTests/Sockets.BindTests.csproj index c98c0f02cb8e..475493c23a87 100644 --- a/src/Servers/Kestrel/test/Sockets.BindTests/Sockets.BindTests.csproj +++ b/src/Servers/Kestrel/test/Sockets.BindTests/Sockets.BindTests.csproj @@ -25,8 +25,17 @@ + + + + + + + + + diff --git a/src/Servers/Kestrel/test/Sockets.FunctionalTests/Sockets.FunctionalTests.csproj b/src/Servers/Kestrel/test/Sockets.FunctionalTests/Sockets.FunctionalTests.csproj index 4066e1592550..294ff5a075bf 100644 --- a/src/Servers/Kestrel/test/Sockets.FunctionalTests/Sockets.FunctionalTests.csproj +++ b/src/Servers/Kestrel/test/Sockets.FunctionalTests/Sockets.FunctionalTests.csproj @@ -30,11 +30,18 @@ + + + + + - + + + diff --git a/src/Servers/Kestrel/tools/CodeGenerator/CodeGenerator.csproj b/src/Servers/Kestrel/tools/CodeGenerator/CodeGenerator.csproj index 207921c9a96b..255145110896 100644 --- a/src/Servers/Kestrel/tools/CodeGenerator/CodeGenerator.csproj +++ b/src/Servers/Kestrel/tools/CodeGenerator/CodeGenerator.csproj @@ -20,6 +20,8 @@ + + diff --git a/src/Servers/testassets/ServerComparison.TestSites/ServerComparison.TestSites.csproj b/src/Servers/testassets/ServerComparison.TestSites/ServerComparison.TestSites.csproj index 2b3690af7420..6d20a10e5a25 100644 --- a/src/Servers/testassets/ServerComparison.TestSites/ServerComparison.TestSites.csproj +++ b/src/Servers/testassets/ServerComparison.TestSites/ServerComparison.TestSites.csproj @@ -11,6 +11,10 @@ + + + + @@ -19,6 +23,7 @@ + diff --git a/src/Shared/test/Shared.Tests/Microsoft.AspNetCore.Shared.Tests.csproj b/src/Shared/test/Shared.Tests/Microsoft.AspNetCore.Shared.Tests.csproj index e017c1501705..941d79b0f3ad 100644 --- a/src/Shared/test/Shared.Tests/Microsoft.AspNetCore.Shared.Tests.csproj +++ b/src/Shared/test/Shared.Tests/Microsoft.AspNetCore.Shared.Tests.csproj @@ -8,6 +8,15 @@ annotations + + + + + + + + + @@ -50,7 +59,6 @@ - diff --git a/src/Shared/test/Shared.Tests/StackTraceHelperTest.cs b/src/Shared/test/Shared.Tests/StackTraceHelperTest.cs index 4f3b6ed178de..11d0e8c42a0e 100644 --- a/src/Shared/test/Shared.Tests/StackTraceHelperTest.cs +++ b/src/Shared/test/Shared.Tests/StackTraceHelperTest.cs @@ -15,6 +15,8 @@ namespace Microsoft.Extensions.Internal; public class StackTraceHelperTest { + private static bool IsMono => Type.GetType("Mono.RuntimeStructs") != null; + [Fact] public void StackTraceHelper_IncludesLineNumbersForFiles() { @@ -179,7 +181,30 @@ public void StackTraceHelper_ProducesReadableOutput() var methodNames = stackFrames.Select(stackFrame => stackFrame.MethodDisplayInfo.ToString()).ToArray(); // Assert - Assert.Equal(expectedCallStack, methodNames); + Assert.Equal(expectedCallStack.Count, methodNames.Length); + + if (IsMono) + { + // On Mono, verify key components are present but allow for runtime-specific formatting + Assert.Contains("Iterator()+MoveNext()", methodNames[0]); + Assert.Contains("string.Join", methodNames[1]); + Assert.Contains("GenericClass.GenericMethod", methodNames[2]); + Assert.Contains("MethodAsync(int value)", methodNames[3]); + + // For async generic method on Mono, check for either resolved form or state machine form + var asyncGenericFrame = methodNames[4]; + Assert.True( + asyncGenericFrame.Contains("MethodAsync(TValue value)") || // Resolved form + asyncGenericFrame.Contains("MethodAsync") && asyncGenericFrame.Contains("TValue"), // State machine form + $"Expected async generic method info in: {asyncGenericFrame}"); + + Assert.Contains("Method(string value)", methodNames[5]); + Assert.Contains("StackTraceHelper_ProducesReadableOutput()", methodNames[6]); + } + else + { + Assert.Equal(expectedCallStack, methodNames); + } } [Fact] @@ -242,9 +267,20 @@ public void GetFrames_DoesNotFailForDynamicallyGeneratedAssemblies() // Assert var frame = frames[0]; Assert.Null(frame.FilePath); - // lambda_method{RandomNumber}(Closure ) - Assert.StartsWith("lambda_method", frame.MethodDisplayInfo.ToString()); - Assert.EndsWith("(Closure )", frame.MethodDisplayInfo.ToString()); + var methodDisplay = frame.MethodDisplayInfo.ToString(); + + if (IsMono) + { + // On Mono, lambda methods may include declaring type prefix (e.g., "object.lambda_method34") + Assert.Contains("lambda_method", methodDisplay); + Assert.EndsWith("(Closure )", methodDisplay); + } + else + { + // On CoreCLR, maintain strict check to prevent regressions + Assert.StartsWith("lambda_method", methodDisplay); + Assert.EndsWith("(Closure )", methodDisplay); + } } [MethodImpl(MethodImplOptions.NoOptimization | MethodImplOptions.NoInlining)] diff --git a/src/SignalR/clients/csharp/Client/test/UnitTests/Microsoft.AspNetCore.SignalR.Client.Tests.csproj b/src/SignalR/clients/csharp/Client/test/UnitTests/Microsoft.AspNetCore.SignalR.Client.Tests.csproj index 9be096369aac..91cd74a0c4ab 100644 --- a/src/SignalR/clients/csharp/Client/test/UnitTests/Microsoft.AspNetCore.SignalR.Client.Tests.csproj +++ b/src/SignalR/clients/csharp/Client/test/UnitTests/Microsoft.AspNetCore.SignalR.Client.Tests.csproj @@ -16,6 +16,8 @@ + + diff --git a/src/SignalR/clients/ts/FunctionalTests/SignalR.Client.FunctionalTestApp.csproj b/src/SignalR/clients/ts/FunctionalTests/SignalR.Client.FunctionalTestApp.csproj index 6bfbd5c69275..2840f73031c6 100644 --- a/src/SignalR/clients/ts/FunctionalTests/SignalR.Client.FunctionalTestApp.csproj +++ b/src/SignalR/clients/ts/FunctionalTests/SignalR.Client.FunctionalTestApp.csproj @@ -23,13 +23,18 @@ + + + + - + + diff --git a/src/SignalR/common/Http.Connections/src/Microsoft.AspNetCore.Http.Connections.csproj b/src/SignalR/common/Http.Connections/src/Microsoft.AspNetCore.Http.Connections.csproj index 6449f8900b1f..5384bc87382e 100644 --- a/src/SignalR/common/Http.Connections/src/Microsoft.AspNetCore.Http.Connections.csproj +++ b/src/SignalR/common/Http.Connections/src/Microsoft.AspNetCore.Http.Connections.csproj @@ -32,11 +32,16 @@ + - + + + + + diff --git a/src/SignalR/common/Http.Connections/test/Microsoft.AspNetCore.Http.Connections.Tests.csproj b/src/SignalR/common/Http.Connections/test/Microsoft.AspNetCore.Http.Connections.Tests.csproj index 5fef17d7259f..c0ea9035e23e 100644 --- a/src/SignalR/common/Http.Connections/test/Microsoft.AspNetCore.Http.Connections.Tests.csproj +++ b/src/SignalR/common/Http.Connections/test/Microsoft.AspNetCore.Http.Connections.Tests.csproj @@ -19,8 +19,11 @@ + + + diff --git a/src/SignalR/common/SignalR.Common/test/Microsoft.AspNetCore.SignalR.Common.Tests.csproj b/src/SignalR/common/SignalR.Common/test/Microsoft.AspNetCore.SignalR.Common.Tests.csproj index 1120424ee602..69c988012438 100644 --- a/src/SignalR/common/SignalR.Common/test/Microsoft.AspNetCore.SignalR.Common.Tests.csproj +++ b/src/SignalR/common/SignalR.Common/test/Microsoft.AspNetCore.SignalR.Common.Tests.csproj @@ -15,6 +15,8 @@ + + diff --git a/src/SignalR/common/testassets/Tests.Utils/Microsoft.AspNetCore.SignalR.Tests.Utils.csproj b/src/SignalR/common/testassets/Tests.Utils/Microsoft.AspNetCore.SignalR.Tests.Utils.csproj index 4ce3552b3f4c..14b6e243a13e 100644 --- a/src/SignalR/common/testassets/Tests.Utils/Microsoft.AspNetCore.SignalR.Tests.Utils.csproj +++ b/src/SignalR/common/testassets/Tests.Utils/Microsoft.AspNetCore.SignalR.Tests.Utils.csproj @@ -11,11 +11,16 @@ + + + + + diff --git a/src/SignalR/samples/JwtSample/JwtSample.csproj b/src/SignalR/samples/JwtSample/JwtSample.csproj index b8ac2dc1a7cb..637f634d21e9 100644 --- a/src/SignalR/samples/JwtSample/JwtSample.csproj +++ b/src/SignalR/samples/JwtSample/JwtSample.csproj @@ -10,13 +10,20 @@ - + + + + + + + + diff --git a/src/SignalR/samples/SignalRSamples/SignalRSamples.csproj b/src/SignalR/samples/SignalRSamples/SignalRSamples.csproj index 9dc610ca8580..27e4017c6775 100644 --- a/src/SignalR/samples/SignalRSamples/SignalRSamples.csproj +++ b/src/SignalR/samples/SignalRSamples/SignalRSamples.csproj @@ -7,17 +7,22 @@ + + + + + - + diff --git a/src/SignalR/samples/SocialWeather/SocialWeather.csproj b/src/SignalR/samples/SocialWeather/SocialWeather.csproj index fe8e362e2cd3..c571d244c152 100644 --- a/src/SignalR/samples/SocialWeather/SocialWeather.csproj +++ b/src/SignalR/samples/SocialWeather/SocialWeather.csproj @@ -7,12 +7,19 @@ + + + + + + + diff --git a/src/SignalR/server/Core/src/Microsoft.AspNetCore.SignalR.Core.csproj b/src/SignalR/server/Core/src/Microsoft.AspNetCore.SignalR.Core.csproj index f5016566f977..0f01a615142d 100644 --- a/src/SignalR/server/Core/src/Microsoft.AspNetCore.SignalR.Core.csproj +++ b/src/SignalR/server/Core/src/Microsoft.AspNetCore.SignalR.Core.csproj @@ -26,6 +26,7 @@ + diff --git a/src/SignalR/server/SignalR/src/Microsoft.AspNetCore.SignalR.csproj b/src/SignalR/server/SignalR/src/Microsoft.AspNetCore.SignalR.csproj index 4fabcecbe46b..6f8e0b3580ea 100644 --- a/src/SignalR/server/SignalR/src/Microsoft.AspNetCore.SignalR.csproj +++ b/src/SignalR/server/SignalR/src/Microsoft.AspNetCore.SignalR.csproj @@ -9,6 +9,12 @@ + + + + + + diff --git a/src/SignalR/server/SignalR/test/Microsoft.AspNetCore.SignalR.Tests/Microsoft.AspNetCore.SignalR.Tests.csproj b/src/SignalR/server/SignalR/test/Microsoft.AspNetCore.SignalR.Tests/Microsoft.AspNetCore.SignalR.Tests.csproj index 1ecfa9a08cb0..0d0b84926f35 100644 --- a/src/SignalR/server/SignalR/test/Microsoft.AspNetCore.SignalR.Tests/Microsoft.AspNetCore.SignalR.Tests.csproj +++ b/src/SignalR/server/SignalR/test/Microsoft.AspNetCore.SignalR.Tests/Microsoft.AspNetCore.SignalR.Tests.csproj @@ -14,8 +14,12 @@ + + + + diff --git a/src/SignalR/server/Specification.Tests/src/Microsoft.AspNetCore.SignalR.Specification.Tests.csproj b/src/SignalR/server/Specification.Tests/src/Microsoft.AspNetCore.SignalR.Specification.Tests.csproj index ad9a4466d6b3..5251deeb68fa 100644 --- a/src/SignalR/server/Specification.Tests/src/Microsoft.AspNetCore.SignalR.Specification.Tests.csproj +++ b/src/SignalR/server/Specification.Tests/src/Microsoft.AspNetCore.SignalR.Specification.Tests.csproj @@ -17,6 +17,8 @@ + + diff --git a/src/SignalR/server/StackExchangeRedis/test/Microsoft.AspNetCore.SignalR.StackExchangeRedis.Tests.csproj b/src/SignalR/server/StackExchangeRedis/test/Microsoft.AspNetCore.SignalR.StackExchangeRedis.Tests.csproj index c884296369d9..f282043ada69 100644 --- a/src/SignalR/server/StackExchangeRedis/test/Microsoft.AspNetCore.SignalR.StackExchangeRedis.Tests.csproj +++ b/src/SignalR/server/StackExchangeRedis/test/Microsoft.AspNetCore.SignalR.StackExchangeRedis.Tests.csproj @@ -9,6 +9,8 @@ + + diff --git a/src/StaticAssets/src/Microsoft.AspNetCore.StaticAssets.csproj b/src/StaticAssets/src/Microsoft.AspNetCore.StaticAssets.csproj index c5a47fce08f1..9b39a0102d25 100644 --- a/src/StaticAssets/src/Microsoft.AspNetCore.StaticAssets.csproj +++ b/src/StaticAssets/src/Microsoft.AspNetCore.StaticAssets.csproj @@ -16,9 +16,15 @@ + + + + + + - + diff --git a/src/StaticAssets/test/Microsoft.AspNetCore.StaticAssets.Tests.csproj b/src/StaticAssets/test/Microsoft.AspNetCore.StaticAssets.Tests.csproj index ce765d832381..9b2d89c8f5ee 100644 --- a/src/StaticAssets/test/Microsoft.AspNetCore.StaticAssets.Tests.csproj +++ b/src/StaticAssets/test/Microsoft.AspNetCore.StaticAssets.Tests.csproj @@ -5,9 +5,17 @@ + + + + + + + + diff --git a/src/Tools/GetDocumentInsider/sample/GetDocumentSample.csproj b/src/Tools/GetDocumentInsider/sample/GetDocumentSample.csproj index 3396143d9a9a..7e1bd70a7de0 100644 --- a/src/Tools/GetDocumentInsider/sample/GetDocumentSample.csproj +++ b/src/Tools/GetDocumentInsider/sample/GetDocumentSample.csproj @@ -11,6 +11,8 @@ + + diff --git a/src/Tools/GetDocumentInsider/src/GetDocument.Insider.csproj b/src/Tools/GetDocumentInsider/src/GetDocument.Insider.csproj index 957b5e34983a..df9ebcffb390 100644 --- a/src/Tools/GetDocumentInsider/src/GetDocument.Insider.csproj +++ b/src/Tools/GetDocumentInsider/src/GetDocument.Insider.csproj @@ -17,6 +17,7 @@ + diff --git a/src/Tools/dotnet-user-jwts/test/dotnet-user-jwts.Tests.csproj b/src/Tools/dotnet-user-jwts/test/dotnet-user-jwts.Tests.csproj index b362c30d0611..d966595f15c0 100644 --- a/src/Tools/dotnet-user-jwts/test/dotnet-user-jwts.Tests.csproj +++ b/src/Tools/dotnet-user-jwts/test/dotnet-user-jwts.Tests.csproj @@ -17,7 +17,15 @@ + + + + + + + + diff --git a/src/Tools/dotnet-user-secrets/src/Internal/SetCommand.cs b/src/Tools/dotnet-user-secrets/src/Internal/SetCommand.cs index 00dd9b68e6b1..3966bf59f961 100644 --- a/src/Tools/dotnet-user-secrets/src/Internal/SetCommand.cs +++ b/src/Tools/dotnet-user-secrets/src/Internal/SetCommand.cs @@ -61,7 +61,7 @@ public sealed class FromStdInStrategy : ICommand public void Execute(CommandContext context) { // parses stdin with the same parser that Microsoft.Extensions.Configuration.Json would use - var provider = new ReadableJsonConfigurationProvider(); + using var provider = new ReadableJsonConfigurationProvider(); using (var stream = new MemoryStream()) { using (var writer = new StreamWriter(stream, Encoding.Unicode, 1024, true)) diff --git a/src/Validation/test/Microsoft.Extensions.Validation.GeneratorTests/Microsoft.Extensions.Validation.GeneratorTests.csproj b/src/Validation/test/Microsoft.Extensions.Validation.GeneratorTests/Microsoft.Extensions.Validation.GeneratorTests.csproj index db08d20e21a2..2b1c23c2f961 100644 --- a/src/Validation/test/Microsoft.Extensions.Validation.GeneratorTests/Microsoft.Extensions.Validation.GeneratorTests.csproj +++ b/src/Validation/test/Microsoft.Extensions.Validation.GeneratorTests/Microsoft.Extensions.Validation.GeneratorTests.csproj @@ -10,20 +10,24 @@ - - + + + + + - + + + + - - - - + + diff --git a/src/Validation/test/Microsoft.Extensions.Validation.Tests/Microsoft.Extensions.Validation.Tests.csproj b/src/Validation/test/Microsoft.Extensions.Validation.Tests/Microsoft.Extensions.Validation.Tests.csproj index f74f56690452..b102403fd635 100644 --- a/src/Validation/test/Microsoft.Extensions.Validation.Tests/Microsoft.Extensions.Validation.Tests.csproj +++ b/src/Validation/test/Microsoft.Extensions.Validation.Tests/Microsoft.Extensions.Validation.Tests.csproj @@ -6,6 +6,8 @@ + + diff --git a/src/submodules/googletest b/src/submodules/googletest index 1b96fa13f549..065127f1e4b4 160000 --- a/src/submodules/googletest +++ b/src/submodules/googletest @@ -1 +1 @@ -Subproject commit 1b96fa13f549387b7549cc89e1a785cf143a1a50 +Subproject commit 065127f1e4b46c5f14fc73cf8d323c221f9dc68e