diff --git a/.azure/pipelines/ci.yml b/.azure/pipelines/ci.yml index 67d59a247f..d9dadaaee6 100644 --- a/.azure/pipelines/ci.yml +++ b/.azure/pipelines/ci.yml @@ -95,6 +95,7 @@ jobs: -pack -noBuildDeps $(_BuildArgs) + condition: ne(variables['Build.Reason'], 'PullRequest') displayName: Build SiteExtension # This runs code-signing on all packages, zips, and jar files as defined in build/CodeSign.targets. If https://github.com/dotnet/arcade/issues/1957 is resolved, @@ -503,16 +504,6 @@ jobs: chmod +x $HOME/bin/jq echo "##vso[task.prependpath]$HOME/bin" displayName: Install jq - - task: UseDotNet@2 - displayName: 'Use .NET Core sdk' - inputs: - packageType: sdk - # The SDK version selected here is intentionally supposed to use the latest release - # For the purpose of building Linux distros, we can't depend on features of the SDK - # which may not exist in pre-built versions of the SDK - version: 3.0.x - installationPath: $(DotNetCoreSdkDir) - includePreviewVersions: true - script: ./eng/scripts/ci-source-build.sh --ci --configuration Release /p:BuildManaged=true /p:BuildNodeJs=false displayName: Run ci-source-build.sh - task: PublishBuildArtifacts@1 diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 86a87beb59..3acc059820 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -14,7 +14,7 @@ /src/Hosting/ @tratcher @anurse /src/Http/ @tratcher @jkotalik @anurse /src/Middleware/ @tratcher @anurse -/src/ProjectTemplates/ @ryanbrandenburg +# /src/ProjectTemplates/ @ryanbrandenburg /src/Security/ @tratcher @anurse /src/Servers/ @tratcher @jkotalik @anurse @halter73 /src/Middleware/Rewrite @jkotalik @anurse diff --git a/Directory.Build.props b/Directory.Build.props index 06e288aa81..76414deaaa 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -43,7 +43,7 @@ true - netcoreapp$(AspNetCoreMajorVersion).$(AspNetCoreMinorVersion) + netcoreapp5.0 diff --git a/eng/PublishSymbols.proj b/eng/PublishSymbols.proj index a33a1df232..ca5ba682f7 100644 --- a/eng/PublishSymbols.proj +++ b/eng/PublishSymbols.proj @@ -1,7 +1,7 @@ - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) true artifacts\manifests\ true diff --git a/eng/SharedFramework.External.props b/eng/SharedFramework.External.props index 36ea360df2..8fdebc787d 100644 --- a/eng/SharedFramework.External.props +++ b/eng/SharedFramework.External.props @@ -107,7 +107,7 @@ These compilation references are necessary to workaround the mismatch of what is found in the ref pack for NETCore.App and what is actually present at runtime. See https://github.com/dotnet/corefx/issues/34906 --> - + <_CompilationOnlyReference Include="Microsoft.Win32.Registry" /> <_CompilationOnlyReference Include="System.Security.Cryptography.Cng" /> <_CompilationOnlyReference Include="System.Security.Principal.Windows" /> diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 1ba3f0c3d5..3de878ef86 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -9,408 +9,412 @@ --> - + https://github.com/aspnet/Blazor - 46d3c36a3b1655c86e122065c4f896c50d986ff0 + 7eeab316fa122b69a9bd777c93dcc78bc6a68905 - + https://github.com/aspnet/AspNetCore-Tooling - 4e09cf160297f7e5e5eb1dc6da509bb6732a71d1 + e60ad5d5d050ab5ee87f4cf1fb9ae440db87777d - + https://github.com/aspnet/AspNetCore-Tooling - 4e09cf160297f7e5e5eb1dc6da509bb6732a71d1 + e60ad5d5d050ab5ee87f4cf1fb9ae440db87777d - + https://github.com/aspnet/AspNetCore-Tooling - 4e09cf160297f7e5e5eb1dc6da509bb6732a71d1 + e60ad5d5d050ab5ee87f4cf1fb9ae440db87777d - + https://github.com/aspnet/AspNetCore-Tooling - 4e09cf160297f7e5e5eb1dc6da509bb6732a71d1 + e60ad5d5d050ab5ee87f4cf1fb9ae440db87777d - + https://github.com/aspnet/EntityFrameworkCore - 879109b44a9963e6a5945e6d0d075381f2ef15cd + 44d8c31bcb4bb46714389619070be9d1c6bad319 - + https://github.com/aspnet/EntityFrameworkCore - 879109b44a9963e6a5945e6d0d075381f2ef15cd + 44d8c31bcb4bb46714389619070be9d1c6bad319 - + https://github.com/aspnet/EntityFrameworkCore - 879109b44a9963e6a5945e6d0d075381f2ef15cd + 44d8c31bcb4bb46714389619070be9d1c6bad319 - + https://github.com/aspnet/EntityFrameworkCore - 879109b44a9963e6a5945e6d0d075381f2ef15cd + 44d8c31bcb4bb46714389619070be9d1c6bad319 - + https://github.com/aspnet/EntityFrameworkCore - 879109b44a9963e6a5945e6d0d075381f2ef15cd + 44d8c31bcb4bb46714389619070be9d1c6bad319 - + https://github.com/aspnet/EntityFrameworkCore - 879109b44a9963e6a5945e6d0d075381f2ef15cd + 44d8c31bcb4bb46714389619070be9d1c6bad319 - + https://github.com/aspnet/EntityFrameworkCore - 879109b44a9963e6a5945e6d0d075381f2ef15cd + 44d8c31bcb4bb46714389619070be9d1c6bad319 - + https://github.com/aspnet/Extensions - 033ea04bab004a477acd6f023af171ee853965b8 + dbe3543601c1ab290fde1ae30ea8dd978d33d4d3 - + https://github.com/aspnet/Extensions - 033ea04bab004a477acd6f023af171ee853965b8 + dbe3543601c1ab290fde1ae30ea8dd978d33d4d3 - + https://github.com/aspnet/Extensions - 033ea04bab004a477acd6f023af171ee853965b8 + dbe3543601c1ab290fde1ae30ea8dd978d33d4d3 - + https://github.com/aspnet/Extensions - 033ea04bab004a477acd6f023af171ee853965b8 + dbe3543601c1ab290fde1ae30ea8dd978d33d4d3 - + https://github.com/aspnet/Extensions - 033ea04bab004a477acd6f023af171ee853965b8 + dbe3543601c1ab290fde1ae30ea8dd978d33d4d3 - + https://github.com/aspnet/Extensions - 033ea04bab004a477acd6f023af171ee853965b8 + dbe3543601c1ab290fde1ae30ea8dd978d33d4d3 - + https://github.com/aspnet/Extensions - 033ea04bab004a477acd6f023af171ee853965b8 + dbe3543601c1ab290fde1ae30ea8dd978d33d4d3 - + https://github.com/aspnet/Extensions - 033ea04bab004a477acd6f023af171ee853965b8 + dbe3543601c1ab290fde1ae30ea8dd978d33d4d3 - + https://github.com/aspnet/Extensions - 033ea04bab004a477acd6f023af171ee853965b8 + dbe3543601c1ab290fde1ae30ea8dd978d33d4d3 - + https://github.com/aspnet/Extensions - 033ea04bab004a477acd6f023af171ee853965b8 + dbe3543601c1ab290fde1ae30ea8dd978d33d4d3 - + https://github.com/aspnet/Extensions - 033ea04bab004a477acd6f023af171ee853965b8 + dbe3543601c1ab290fde1ae30ea8dd978d33d4d3 - + https://github.com/aspnet/Extensions - 033ea04bab004a477acd6f023af171ee853965b8 + dbe3543601c1ab290fde1ae30ea8dd978d33d4d3 - + https://github.com/aspnet/Extensions - 033ea04bab004a477acd6f023af171ee853965b8 + dbe3543601c1ab290fde1ae30ea8dd978d33d4d3 - + https://github.com/aspnet/Extensions - 033ea04bab004a477acd6f023af171ee853965b8 + dbe3543601c1ab290fde1ae30ea8dd978d33d4d3 - + https://github.com/aspnet/Extensions - 033ea04bab004a477acd6f023af171ee853965b8 + dbe3543601c1ab290fde1ae30ea8dd978d33d4d3 - + https://github.com/aspnet/Extensions - 033ea04bab004a477acd6f023af171ee853965b8 + dbe3543601c1ab290fde1ae30ea8dd978d33d4d3 - + https://github.com/aspnet/Extensions - 033ea04bab004a477acd6f023af171ee853965b8 + dbe3543601c1ab290fde1ae30ea8dd978d33d4d3 - + https://github.com/aspnet/Extensions - 033ea04bab004a477acd6f023af171ee853965b8 + dbe3543601c1ab290fde1ae30ea8dd978d33d4d3 - + https://github.com/aspnet/Extensions - 033ea04bab004a477acd6f023af171ee853965b8 + dbe3543601c1ab290fde1ae30ea8dd978d33d4d3 - + https://github.com/aspnet/Extensions - 033ea04bab004a477acd6f023af171ee853965b8 + dbe3543601c1ab290fde1ae30ea8dd978d33d4d3 - + https://github.com/aspnet/Extensions - 033ea04bab004a477acd6f023af171ee853965b8 + dbe3543601c1ab290fde1ae30ea8dd978d33d4d3 - + https://github.com/aspnet/Extensions - 033ea04bab004a477acd6f023af171ee853965b8 + dbe3543601c1ab290fde1ae30ea8dd978d33d4d3 - + https://github.com/aspnet/Extensions - 033ea04bab004a477acd6f023af171ee853965b8 + dbe3543601c1ab290fde1ae30ea8dd978d33d4d3 - + https://github.com/aspnet/Extensions - 033ea04bab004a477acd6f023af171ee853965b8 + dbe3543601c1ab290fde1ae30ea8dd978d33d4d3 - + https://github.com/aspnet/Extensions - 033ea04bab004a477acd6f023af171ee853965b8 + dbe3543601c1ab290fde1ae30ea8dd978d33d4d3 - + https://github.com/aspnet/Extensions - 033ea04bab004a477acd6f023af171ee853965b8 + dbe3543601c1ab290fde1ae30ea8dd978d33d4d3 - + https://github.com/aspnet/Extensions - 033ea04bab004a477acd6f023af171ee853965b8 + dbe3543601c1ab290fde1ae30ea8dd978d33d4d3 - + https://github.com/aspnet/Extensions - 033ea04bab004a477acd6f023af171ee853965b8 + dbe3543601c1ab290fde1ae30ea8dd978d33d4d3 - + https://github.com/aspnet/Extensions - 033ea04bab004a477acd6f023af171ee853965b8 + dbe3543601c1ab290fde1ae30ea8dd978d33d4d3 - + https://github.com/aspnet/Extensions - 033ea04bab004a477acd6f023af171ee853965b8 + dbe3543601c1ab290fde1ae30ea8dd978d33d4d3 - + https://github.com/aspnet/Extensions - 033ea04bab004a477acd6f023af171ee853965b8 + dbe3543601c1ab290fde1ae30ea8dd978d33d4d3 - + https://github.com/aspnet/Extensions - 033ea04bab004a477acd6f023af171ee853965b8 + dbe3543601c1ab290fde1ae30ea8dd978d33d4d3 - + https://github.com/aspnet/Extensions - 033ea04bab004a477acd6f023af171ee853965b8 + dbe3543601c1ab290fde1ae30ea8dd978d33d4d3 - + https://github.com/aspnet/Extensions - 033ea04bab004a477acd6f023af171ee853965b8 + dbe3543601c1ab290fde1ae30ea8dd978d33d4d3 - + https://github.com/aspnet/Extensions - 033ea04bab004a477acd6f023af171ee853965b8 + dbe3543601c1ab290fde1ae30ea8dd978d33d4d3 - + https://github.com/aspnet/Extensions - 033ea04bab004a477acd6f023af171ee853965b8 + dbe3543601c1ab290fde1ae30ea8dd978d33d4d3 - + https://github.com/aspnet/Extensions - 033ea04bab004a477acd6f023af171ee853965b8 + dbe3543601c1ab290fde1ae30ea8dd978d33d4d3 - + https://github.com/aspnet/Extensions - 033ea04bab004a477acd6f023af171ee853965b8 + dbe3543601c1ab290fde1ae30ea8dd978d33d4d3 - + https://github.com/aspnet/Extensions - 033ea04bab004a477acd6f023af171ee853965b8 + dbe3543601c1ab290fde1ae30ea8dd978d33d4d3 - + https://github.com/aspnet/Extensions - 033ea04bab004a477acd6f023af171ee853965b8 + dbe3543601c1ab290fde1ae30ea8dd978d33d4d3 - + https://github.com/aspnet/Extensions - 033ea04bab004a477acd6f023af171ee853965b8 + dbe3543601c1ab290fde1ae30ea8dd978d33d4d3 - + https://github.com/aspnet/Extensions - 033ea04bab004a477acd6f023af171ee853965b8 + dbe3543601c1ab290fde1ae30ea8dd978d33d4d3 - + https://github.com/aspnet/Extensions - 033ea04bab004a477acd6f023af171ee853965b8 + dbe3543601c1ab290fde1ae30ea8dd978d33d4d3 - + https://github.com/aspnet/Extensions - 033ea04bab004a477acd6f023af171ee853965b8 + dbe3543601c1ab290fde1ae30ea8dd978d33d4d3 - + https://github.com/aspnet/Extensions - 033ea04bab004a477acd6f023af171ee853965b8 + dbe3543601c1ab290fde1ae30ea8dd978d33d4d3 - + https://github.com/aspnet/Extensions - 033ea04bab004a477acd6f023af171ee853965b8 + dbe3543601c1ab290fde1ae30ea8dd978d33d4d3 - + https://github.com/aspnet/Extensions - 033ea04bab004a477acd6f023af171ee853965b8 + dbe3543601c1ab290fde1ae30ea8dd978d33d4d3 - + https://github.com/aspnet/Extensions - 033ea04bab004a477acd6f023af171ee853965b8 + dbe3543601c1ab290fde1ae30ea8dd978d33d4d3 - + https://github.com/aspnet/Extensions - 033ea04bab004a477acd6f023af171ee853965b8 + dbe3543601c1ab290fde1ae30ea8dd978d33d4d3 - + https://github.com/aspnet/Extensions - 033ea04bab004a477acd6f023af171ee853965b8 + dbe3543601c1ab290fde1ae30ea8dd978d33d4d3 - + https://github.com/aspnet/Extensions - 033ea04bab004a477acd6f023af171ee853965b8 + dbe3543601c1ab290fde1ae30ea8dd978d33d4d3 - + https://github.com/aspnet/Extensions - 033ea04bab004a477acd6f023af171ee853965b8 + dbe3543601c1ab290fde1ae30ea8dd978d33d4d3 - + https://github.com/aspnet/Extensions - 033ea04bab004a477acd6f023af171ee853965b8 + dbe3543601c1ab290fde1ae30ea8dd978d33d4d3 - + https://github.com/aspnet/Extensions - 033ea04bab004a477acd6f023af171ee853965b8 + dbe3543601c1ab290fde1ae30ea8dd978d33d4d3 - + https://github.com/aspnet/Extensions - 033ea04bab004a477acd6f023af171ee853965b8 + dbe3543601c1ab290fde1ae30ea8dd978d33d4d3 - + https://github.com/aspnet/Extensions - 033ea04bab004a477acd6f023af171ee853965b8 + dbe3543601c1ab290fde1ae30ea8dd978d33d4d3 - + https://github.com/aspnet/Extensions - 033ea04bab004a477acd6f023af171ee853965b8 + dbe3543601c1ab290fde1ae30ea8dd978d33d4d3 - + https://github.com/aspnet/Extensions - 033ea04bab004a477acd6f023af171ee853965b8 + dbe3543601c1ab290fde1ae30ea8dd978d33d4d3 - + https://github.com/aspnet/Extensions - 033ea04bab004a477acd6f023af171ee853965b8 + dbe3543601c1ab290fde1ae30ea8dd978d33d4d3 - + https://github.com/dotnet/corefx - d341fd37dcb2c22e382adccdc06770cf8f160577 + a6c1d1ac235aba5bf17dd06228a62509192cda6a - + https://github.com/dotnet/corefx - d341fd37dcb2c22e382adccdc06770cf8f160577 + a6c1d1ac235aba5bf17dd06228a62509192cda6a - + https://github.com/dotnet/corefx - d341fd37dcb2c22e382adccdc06770cf8f160577 + a6c1d1ac235aba5bf17dd06228a62509192cda6a - + https://github.com/dotnet/corefx - d341fd37dcb2c22e382adccdc06770cf8f160577 + a6c1d1ac235aba5bf17dd06228a62509192cda6a - + https://github.com/dotnet/corefx - d341fd37dcb2c22e382adccdc06770cf8f160577 + a6c1d1ac235aba5bf17dd06228a62509192cda6a https://github.com/dotnet/corefx d341fd37dcb2c22e382adccdc06770cf8f160577 - + https://github.com/dotnet/corefx - d341fd37dcb2c22e382adccdc06770cf8f160577 + a6c1d1ac235aba5bf17dd06228a62509192cda6a - + https://github.com/dotnet/corefx - d341fd37dcb2c22e382adccdc06770cf8f160577 + a6c1d1ac235aba5bf17dd06228a62509192cda6a - + https://github.com/dotnet/corefx - d341fd37dcb2c22e382adccdc06770cf8f160577 + a6c1d1ac235aba5bf17dd06228a62509192cda6a - + https://github.com/dotnet/corefx - d341fd37dcb2c22e382adccdc06770cf8f160577 + a6c1d1ac235aba5bf17dd06228a62509192cda6a - + https://github.com/dotnet/corefx - d341fd37dcb2c22e382adccdc06770cf8f160577 + a6c1d1ac235aba5bf17dd06228a62509192cda6a - + https://github.com/dotnet/corefx - d341fd37dcb2c22e382adccdc06770cf8f160577 + a6c1d1ac235aba5bf17dd06228a62509192cda6a - + https://github.com/dotnet/corefx - d341fd37dcb2c22e382adccdc06770cf8f160577 + a6c1d1ac235aba5bf17dd06228a62509192cda6a - + https://github.com/dotnet/corefx - d341fd37dcb2c22e382adccdc06770cf8f160577 + a6c1d1ac235aba5bf17dd06228a62509192cda6a - + https://github.com/dotnet/corefx - d341fd37dcb2c22e382adccdc06770cf8f160577 + a6c1d1ac235aba5bf17dd06228a62509192cda6a - + https://github.com/dotnet/corefx - d341fd37dcb2c22e382adccdc06770cf8f160577 + a6c1d1ac235aba5bf17dd06228a62509192cda6a - + https://github.com/dotnet/corefx - d341fd37dcb2c22e382adccdc06770cf8f160577 + a6c1d1ac235aba5bf17dd06228a62509192cda6a - + https://github.com/dotnet/corefx - d341fd37dcb2c22e382adccdc06770cf8f160577 + a6c1d1ac235aba5bf17dd06228a62509192cda6a - + https://github.com/dotnet/corefx - d341fd37dcb2c22e382adccdc06770cf8f160577 + a6c1d1ac235aba5bf17dd06228a62509192cda6a - + https://github.com/dotnet/corefx - d341fd37dcb2c22e382adccdc06770cf8f160577 + a6c1d1ac235aba5bf17dd06228a62509192cda6a - + https://github.com/dotnet/corefx - d341fd37dcb2c22e382adccdc06770cf8f160577 + a6c1d1ac235aba5bf17dd06228a62509192cda6a - + https://github.com/dotnet/corefx - d341fd37dcb2c22e382adccdc06770cf8f160577 + a6c1d1ac235aba5bf17dd06228a62509192cda6a - + + https://github.com/dotnet/corefx + a6c1d1ac235aba5bf17dd06228a62509192cda6a + + https://github.com/dotnet/core-setup - b33b6c20d855e7f9fdda6383ad12d849079f9b21 + 62a9f1bdf39ba0b719875d33e248408d3802e925 - + https://github.com/dotnet/core-setup - b33b6c20d855e7f9fdda6383ad12d849079f9b21 + 62a9f1bdf39ba0b719875d33e248408d3802e925 - + https://github.com/dotnet/core-setup - b33b6c20d855e7f9fdda6383ad12d849079f9b21 + 62a9f1bdf39ba0b719875d33e248408d3802e925 - + https://github.com/dotnet/core-setup - b33b6c20d855e7f9fdda6383ad12d849079f9b21 + 62a9f1bdf39ba0b719875d33e248408d3802e925 - + https://github.com/dotnet/corefx - d341fd37dcb2c22e382adccdc06770cf8f160577 + a6c1d1ac235aba5bf17dd06228a62509192cda6a - + https://github.com/aspnet/Extensions - 033ea04bab004a477acd6f023af171ee853965b8 + dbe3543601c1ab290fde1ae30ea8dd978d33d4d3 https://github.com/dotnet/arcade @@ -424,13 +428,13 @@ https://github.com/dotnet/arcade 2de3acc671fc624191672a45564f9ef130af5cd4 - + https://github.com/aspnet/Extensions - 033ea04bab004a477acd6f023af171ee853965b8 + dbe3543601c1ab290fde1ae30ea8dd978d33d4d3 - + https://github.com/dotnet/roslyn - c82648d8964d1e683f92b7daa91beef2fdc5fb72 + a1905991543bed104f7f7f0842aca2b65d263b87 diff --git a/eng/Versions.props b/eng/Versions.props index 60a5384e85..edc87555b3 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -6,15 +6,12 @@ --> - 3 + 5 0 0 1 - rc$(PreReleasePreviewNumber) - Release Candidate $(PreReleasePreviewNumber) - - 9 - preview$(BlazorClientPreReleasePreviewNumber) + alpha$(PreReleasePreviewNumber) + Alpha $(PreReleasePreviewNumber) $(AspNetCoreMajorVersion).$(AspNetCoreMinorVersion) false @@ -55,114 +52,115 @@ 1.0.0-beta.19425.1 - 3.3.1-beta3-19426-02 + 3.3.0-beta3-19406-05 - 3.0.0-rc1-19426-11 - 3.0.0-rc1-19426-11 - 3.0.0-rc1-19426-11 - 2.1.0-rc1-19426-11 + 5.0.0-alpha1.19404.5 + 5.0.0-alpha1.19404.5 + 5.0.0-alpha1.19404.5 + 2.1.0-alpha1.19404.5 - 1.0.0-rc1.19420.10 - 4.6.0-rc1.19420.10 - 4.6.0-rc1.19420.10 - 4.6.0-rc1.19420.10 - 4.6.0-rc1.19420.10 - 4.6.0-rc1.19420.10 - 4.6.0-rc1.19420.10 - 4.6.0-rc1.19420.10 - 4.6.0-rc1.19420.10 - 4.6.0-rc1.19420.10 - 1.7.0-rc1.19420.10 - 4.6.0-rc1.19420.10 - 4.6.0-rc1.19420.10 - 4.6.0-rc1.19420.10 - 4.6.0-rc1.19420.10 - 4.6.0-rc1.19420.10 - 4.6.0-rc1.19420.10 - 4.6.0-rc1.19420.10 - 4.6.0-rc1.19420.10 - 4.6.0-rc1.19420.10 - 4.6.0-rc1.19420.10 - 4.6.0-rc1.19420.10 + 1.1.0-alpha1.19381.2 + 5.0.0-alpha1.19381.2 + 5.0.0-alpha1.19381.2 + 5.0.0-alpha1.19381.2 + 5.0.0-alpha1.19381.2 + 4.7.0-preview6.19264.9 + 5.0.0-alpha1.19381.2 + 5.0.0-alpha1.19381.2 + 5.0.0-alpha1.19381.2 + 5.0.0-alpha1.19381.2 + 5.0.0-alpha1.19381.2 + 1.8.0-alpha1.19381.2 + 5.0.0-alpha1.19381.2 + 5.0.0-alpha1.19381.2 + 5.0.0-alpha1.19381.2 + 5.0.0-alpha1.19381.2 + 5.0.0-alpha1.19381.2 + 5.0.0-alpha1.19381.2 + 5.0.0-alpha1.19381.2 + 5.0.0-alpha1.19381.2 + 5.0.0-alpha1.19381.2 + 5.0.0-alpha1.19381.2 + 5.0.0-alpha1.19381.2 - 3.0.0-rc1.19420.10 + 5.0.0-alpha1.19381.2 - 3.0.0-preview9.19426.1 + 5.0.0-alpha1.19426.2 - 3.0.0-rc1.19427.3 - 3.0.0-rc1.19427.3 - 3.0.0-rc1.19427.3 - 3.0.0-rc1.19427.3 - 3.0.0-rc1.19427.3 - 3.0.0-rc1.19427.3 - 3.0.0-rc1.19427.3 - 3.0.0-rc1.19427.3 - 3.0.0-rc1.19427.3 - 3.0.0-rc1.19427.3 - 3.0.0-rc1.19427.3 - 3.0.0-rc1.19427.3 - 3.0.0-rc1.19427.3 - 3.0.0-rc1.19427.3 - 3.0.0-rc1.19427.3 - 3.0.0-rc1.19427.3 - 3.0.0-rc1.19427.3 - 3.0.0-rc1.19427.3 - 3.0.0-rc1.19427.3 - 3.0.0-rc1.19427.3 - 3.0.0-rc1.19427.3 - 3.0.0-rc1.19427.3 - 3.0.0-rc1.19427.3 - 3.0.0-rc1.19427.3 - 3.0.0-rc1.19427.3 - 3.0.0-rc1.19427.3 - 3.0.0-rc1.19427.3 - 3.0.0-rc1.19427.3 - 3.0.0-rc1.19427.3 - 3.0.0-rc1.19427.3 - 3.0.0-rc1.19427.3 - 3.0.0-rc1.19427.3 - 3.0.0-rc1.19427.3 - 3.0.0-rc1.19427.3 - 3.0.0-rc1.19427.3 - 3.0.0-rc1.19427.3 - 3.0.0-rc1.19427.3 - 3.0.0-rc1.19427.3 - 3.0.0-rc1.19427.3 - 3.0.0-rc1.19427.3 - 3.0.0-rc1.19427.3 - 3.0.0-rc1.19427.3 - 3.0.0-rc1.19427.3 - 3.0.0-rc1.19427.3 - 3.0.0-rc1.19427.3 - 3.0.0-rc1.19427.3 - 3.0.0-rc1.19427.3 - 3.0.0-rc1.19427.3 - 3.0.0-rc1.19427.3 - 3.0.0-rc1.19427.3 - 3.0.0-rc1.19427.3 - 3.0.0-rc1.19427.3 - 3.0.0-rc1.19427.3 - 3.0.0-rc1.19427.3 - 3.0.0-rc1.19427.3 - 3.0.0-rc1.19427.3 - 3.0.0-rc1.19427.3 - 3.0.0-rc1.19427.3 - 3.0.0-rc1.19427.3 - 3.0.0-rc1.19427.3 - 3.0.0-rc1.19427.3 + 5.0.0-alpha1.19406.3 + 5.0.0-alpha1.19406.3 + 5.0.0-alpha1.19406.3 + 5.0.0-alpha1.19406.3 + 5.0.0-alpha1.19406.3 + 5.0.0-alpha1.19406.3 + 5.0.0-alpha1.19406.3 + 5.0.0-alpha1.19406.3 + 5.0.0-alpha1.19406.3 + 5.0.0-alpha1.19406.3 + 5.0.0-alpha1.19406.3 + 5.0.0-alpha1.19406.3 + 5.0.0-alpha1.19406.3 + 5.0.0-alpha1.19406.3 + 5.0.0-alpha1.19406.3 + 5.0.0-alpha1.19406.3 + 5.0.0-alpha1.19406.3 + 5.0.0-alpha1.19406.3 + 5.0.0-alpha1.19406.3 + 5.0.0-alpha1.19406.3 + 5.0.0-alpha1.19406.3 + 5.0.0-alpha1.19406.3 + 5.0.0-alpha1.19406.3 + 5.0.0-alpha1.19406.3 + 5.0.0-alpha1.19406.3 + 5.0.0-alpha1.19406.3 + 5.0.0-alpha1.19406.3 + 5.0.0-alpha1.19406.3 + 5.0.0-alpha1.19406.3 + 5.0.0-alpha1.19406.3 + 5.0.0-alpha1.19406.3 + 5.0.0-alpha1.19406.3 + 5.0.0-alpha1.19406.3 + 5.0.0-alpha1.19406.3 + 5.0.0-alpha1.19406.3 + 5.0.0-alpha1.19406.3 + 5.0.0-alpha1.19406.3 + 5.0.0-alpha1.19406.3 + 5.0.0-alpha1.19406.3 + 5.0.0-alpha1.19406.3 + 5.0.0-alpha1.19406.3 + 5.0.0-alpha1.19406.3 + 5.0.0-alpha1.19406.3 + 5.0.0-alpha1.19406.3 + 5.0.0-alpha1.19406.3 + 5.0.0-alpha1.19406.3 + 5.0.0-alpha1.19406.3 + 5.0.0-alpha1.19406.3 + 5.0.0-alpha1.19406.3 + 5.0.0-alpha1.19406.3 + 5.0.0-alpha1.19406.3 + 5.0.0-alpha1.19406.3 + 5.0.0-alpha1.19406.3 + 5.0.0-alpha1.19406.3 + 5.0.0-alpha1.19406.3 + 5.0.0-alpha1.19406.3 + 5.0.0-alpha1.19406.3 + 5.0.0-alpha1.19406.3 + 5.0.0-alpha1.19406.3 + 5.0.0-alpha1.19406.3 + 5.0.0-alpha1.19406.3 - 3.0.0-rc1.19427.8 - 3.0.0-rc1.19427.8 - 3.0.0-rc1.19427.8 - 3.0.0-rc1.19427.8 - 3.0.0-rc1.19427.8 - 3.0.0-rc1.19427.8 - 3.0.0-rc1.19427.8 + 5.0.0-alpha1.19407.3 + 5.0.0-alpha1.19407.3 + 5.0.0-alpha1.19407.3 + 5.0.0-alpha1.19407.3 + 5.0.0-alpha1.19407.3 + 5.0.0-alpha1.19407.3 + 5.0.0-alpha1.19407.3 - 3.0.0-rc1.19427.3 - 3.0.0-rc1.19427.3 - 3.0.0-rc1.19427.3 - 3.0.0-rc1.19427.3 + 5.0.0-alpha1.19426.2 + 5.0.0-alpha1.19426.2 + 5.0.0-alpha1.19426.2 + 5.0.0-alpha1.19426.2 - - $(MicrosoftNETCorePlatformsPackageVersion) - - "$reporoot/global.json" - - # Restore the original global.json file -trap "{ - mv "$reporoot/global.bak.json" "$reporoot/global.json" -}" EXIT - export DotNetBuildFromSource='true' # Build repo tasks diff --git a/eng/targets/ReferenceAssembly.targets b/eng/targets/ReferenceAssembly.targets index bb6230e633..46225a45e1 100644 --- a/eng/targets/ReferenceAssembly.targets +++ b/eng/targets/ReferenceAssembly.targets @@ -45,8 +45,11 @@ + <_RefSourceFileTFM>$(TargetFramework) + <_RefSourceFileTFM Condition="$(TargetFramework.StartsWith('netcoreapp'))">netcoreapp + <_RefSourceOutputPath>$([System.IO.Directory]::GetParent('$(MSBuildProjectDirectory)'))/ref/ - <_RefSourceFileName>$(AssemblyName).$(TargetFramework).cs + <_RefSourceFileName>$(AssemblyName).$(_RefSourceFileTFM).cs <_RefSourceFileOutputPath>$(_RefSourceOutputPath)$(_RefSourceFileName) diff --git a/eng/tools/BaselineGenerator/BaselineGenerator.csproj b/eng/tools/BaselineGenerator/BaselineGenerator.csproj index 79fd9175cf..082a9eaf02 100644 --- a/eng/tools/BaselineGenerator/BaselineGenerator.csproj +++ b/eng/tools/BaselineGenerator/BaselineGenerator.csproj @@ -2,7 +2,7 @@ Exe - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) -s https://dotnetfeed.blob.core.windows.net/dotnet-core/index.json $(MSBuildThisFileDirectory)../../ diff --git a/eng/tools/Maestro/Maestro.csproj b/eng/tools/Maestro/Maestro.csproj index 67a5210bc4..2ca58dd794 100644 --- a/eng/tools/Maestro/Maestro.csproj +++ b/eng/tools/Maestro/Maestro.csproj @@ -2,7 +2,7 @@ - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) true $(ArtifactsDir)manifests\ true diff --git a/eng/tools/RepoTasks/RepoTasks.csproj b/eng/tools/RepoTasks/RepoTasks.csproj index 0bf6be98ae..5bef776106 100644 --- a/eng/tools/RepoTasks/RepoTasks.csproj +++ b/eng/tools/RepoTasks/RepoTasks.csproj @@ -1,7 +1,7 @@ - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) $(TargetFrameworks);net472 $(DefineConstants);BUILD_MSI_TASKS false @@ -16,7 +16,7 @@ - + diff --git a/eng/tools/RepoTasks/RepoTasks.tasks b/eng/tools/RepoTasks/RepoTasks.tasks index b55f394e4c..0fa015d81f 100644 --- a/eng/tools/RepoTasks/RepoTasks.tasks +++ b/eng/tools/RepoTasks/RepoTasks.tasks @@ -1,6 +1,6 @@ - <_RepoTaskAssemblyFolder Condition="'$(MSBuildRuntimeType)' == 'core'">netcoreapp3.0 + <_RepoTaskAssemblyFolder Condition="'$(MSBuildRuntimeType)' == 'core'">netcoreapp5.0 <_RepoTaskAssemblyFolder Condition="'$(MSBuildRuntimeType)' != 'core'">net472 <_RepoTaskAssembly>$(ArtifactsBinDir)RepoTasks\Release\$(_RepoTaskAssemblyFolder)\RepoTasks.dll diff --git a/global.json b/global.json index 4ead16dbcf..4dbe4044ab 100644 --- a/global.json +++ b/global.json @@ -1,9 +1,9 @@ { "sdk": { - "version": "3.0.100-preview8-013656" + "version": "5.0.100-alpha1-013788" }, "tools": { - "dotnet": "3.0.100-preview8-013656", + "dotnet": "5.0.100-alpha1-013788", "runtimes": { "dotnet/x64": [ "$(MicrosoftNETCoreAppRuntimeVersion)" diff --git a/src/Analyzers/Analyzers/src/StartupAnalyzer.Diagnostics.cs b/src/Analyzers/Analyzers/src/StartupAnalyzer.Diagnostics.cs index 8ef6205631..3185c19f34 100644 --- a/src/Analyzers/Analyzers/src/StartupAnalyzer.Diagnostics.cs +++ b/src/Analyzers/Analyzers/src/StartupAnalyzer.Diagnostics.cs @@ -37,7 +37,7 @@ namespace Microsoft.AspNetCore.Analyzers internal readonly static DiagnosticDescriptor UnsupportedUseMvcWithEndpointRouting = new DiagnosticDescriptor( "MVC1005", "Cannot use UseMvc with Endpoint Routing.", - "Using '{0}' to configure MVC is not supported while using Endpoint Routing. To continue using '{0}', please set 'MvcOptions.EnableEndpointRounting = false' inside '{1}'.", + "Using '{0}' to configure MVC is not supported while using Endpoint Routing. To continue using '{0}', please set 'MvcOptions.EnableEndpointRouting = false' inside '{1}'.", "Usage", DiagnosticSeverity.Warning, isEnabledByDefault: true, diff --git a/src/Analyzers/Analyzers/test/Microsoft.AspNetCore.Analyzers.Test.csproj b/src/Analyzers/Analyzers/test/Microsoft.AspNetCore.Analyzers.Test.csproj index 258da09738..87d62d3fda 100644 --- a/src/Analyzers/Analyzers/test/Microsoft.AspNetCore.Analyzers.Test.csproj +++ b/src/Analyzers/Analyzers/test/Microsoft.AspNetCore.Analyzers.Test.csproj @@ -1,7 +1,7 @@ - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) true Microsoft.AspNetCore.Analyzers diff --git a/src/Antiforgery/ref/Microsoft.AspNetCore.Antiforgery.csproj b/src/Antiforgery/ref/Microsoft.AspNetCore.Antiforgery.csproj index 5f34ef3e76..a2c8bd9b6b 100644 --- a/src/Antiforgery/ref/Microsoft.AspNetCore.Antiforgery.csproj +++ b/src/Antiforgery/ref/Microsoft.AspNetCore.Antiforgery.csproj @@ -1,10 +1,10 @@ - netcoreapp3.0 + netcoreapp5.0 - - + + diff --git a/src/Antiforgery/ref/Microsoft.AspNetCore.Antiforgery.netcoreapp3.0.cs b/src/Antiforgery/ref/Microsoft.AspNetCore.Antiforgery.netcoreapp.cs similarity index 100% rename from src/Antiforgery/ref/Microsoft.AspNetCore.Antiforgery.netcoreapp3.0.cs rename to src/Antiforgery/ref/Microsoft.AspNetCore.Antiforgery.netcoreapp.cs diff --git a/src/Antiforgery/src/Microsoft.AspNetCore.Antiforgery.csproj b/src/Antiforgery/src/Microsoft.AspNetCore.Antiforgery.csproj index d416ab8383..9d823f2f46 100644 --- a/src/Antiforgery/src/Microsoft.AspNetCore.Antiforgery.csproj +++ b/src/Antiforgery/src/Microsoft.AspNetCore.Antiforgery.csproj @@ -2,7 +2,7 @@ An antiforgery system for ASP.NET Core designed to generate and validate tokens to prevent Cross-Site Request Forgery attacks. - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) true true aspnetcore;antiforgery diff --git a/src/Antiforgery/test/Microsoft.AspNetCore.Antiforgery.Test.csproj b/src/Antiforgery/test/Microsoft.AspNetCore.Antiforgery.Test.csproj index ff11534abc..4b4a43b6c1 100644 --- a/src/Antiforgery/test/Microsoft.AspNetCore.Antiforgery.Test.csproj +++ b/src/Antiforgery/test/Microsoft.AspNetCore.Antiforgery.Test.csproj @@ -1,7 +1,7 @@ - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) diff --git a/src/Azure/AzureAD/Authentication.AzureAD.UI/ref/Microsoft.AspNetCore.Authentication.AzureAD.UI.csproj b/src/Azure/AzureAD/Authentication.AzureAD.UI/ref/Microsoft.AspNetCore.Authentication.AzureAD.UI.csproj index f320adac86..cd048a721c 100644 --- a/src/Azure/AzureAD/Authentication.AzureAD.UI/ref/Microsoft.AspNetCore.Authentication.AzureAD.UI.csproj +++ b/src/Azure/AzureAD/Authentication.AzureAD.UI/ref/Microsoft.AspNetCore.Authentication.AzureAD.UI.csproj @@ -1,10 +1,10 @@ - netcoreapp3.0 + netcoreapp5.0 - - + + diff --git a/src/Azure/AzureAD/Authentication.AzureAD.UI/ref/Microsoft.AspNetCore.Authentication.AzureAD.UI.netcoreapp3.0.cs b/src/Azure/AzureAD/Authentication.AzureAD.UI/ref/Microsoft.AspNetCore.Authentication.AzureAD.UI.netcoreapp.cs similarity index 100% rename from src/Azure/AzureAD/Authentication.AzureAD.UI/ref/Microsoft.AspNetCore.Authentication.AzureAD.UI.netcoreapp3.0.cs rename to src/Azure/AzureAD/Authentication.AzureAD.UI/ref/Microsoft.AspNetCore.Authentication.AzureAD.UI.netcoreapp.cs diff --git a/src/Azure/AzureAD/Authentication.AzureAD.UI/src/Microsoft.AspNetCore.Authentication.AzureAD.UI.csproj b/src/Azure/AzureAD/Authentication.AzureAD.UI/src/Microsoft.AspNetCore.Authentication.AzureAD.UI.csproj index baf861cf3e..6720f825e6 100644 --- a/src/Azure/AzureAD/Authentication.AzureAD.UI/src/Microsoft.AspNetCore.Authentication.AzureAD.UI.csproj +++ b/src/Azure/AzureAD/Authentication.AzureAD.UI/src/Microsoft.AspNetCore.Authentication.AzureAD.UI.csproj @@ -3,7 +3,7 @@ ASP.NET Core Azure Active Directory Integration provides components for easily integrating Azure Active Directory authentication within your ASP.NET Core application. Precompiled views assembly for the ASP.NET Core Azure Active Directory Integration package. - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) aspnetcore;authentication;AzureAD true true diff --git a/src/Azure/AzureAD/Authentication.AzureAD.UI/test/Microsoft.AspNetCore.Authentication.AzureAD.UI.Test.csproj b/src/Azure/AzureAD/Authentication.AzureAD.UI/test/Microsoft.AspNetCore.Authentication.AzureAD.UI.Test.csproj index 509d46fde9..1087f46745 100644 --- a/src/Azure/AzureAD/Authentication.AzureAD.UI/test/Microsoft.AspNetCore.Authentication.AzureAD.UI.Test.csproj +++ b/src/Azure/AzureAD/Authentication.AzureAD.UI/test/Microsoft.AspNetCore.Authentication.AzureAD.UI.Test.csproj @@ -1,7 +1,7 @@ - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) Microsoft.AspNetCore.Authentication.AzureAD.UI diff --git a/src/Azure/AzureAD/Authentication.AzureADB2C.UI/ref/Microsoft.AspNetCore.Authentication.AzureADB2C.UI.csproj b/src/Azure/AzureAD/Authentication.AzureADB2C.UI/ref/Microsoft.AspNetCore.Authentication.AzureADB2C.UI.csproj index 8354ceaa59..accd78a681 100644 --- a/src/Azure/AzureAD/Authentication.AzureADB2C.UI/ref/Microsoft.AspNetCore.Authentication.AzureADB2C.UI.csproj +++ b/src/Azure/AzureAD/Authentication.AzureADB2C.UI/ref/Microsoft.AspNetCore.Authentication.AzureADB2C.UI.csproj @@ -1,10 +1,10 @@ - netcoreapp3.0 + netcoreapp5.0 - - + + diff --git a/src/Azure/AzureAD/Authentication.AzureADB2C.UI/ref/Microsoft.AspNetCore.Authentication.AzureADB2C.UI.netcoreapp3.0.cs b/src/Azure/AzureAD/Authentication.AzureADB2C.UI/ref/Microsoft.AspNetCore.Authentication.AzureADB2C.UI.netcoreapp.cs similarity index 100% rename from src/Azure/AzureAD/Authentication.AzureADB2C.UI/ref/Microsoft.AspNetCore.Authentication.AzureADB2C.UI.netcoreapp3.0.cs rename to src/Azure/AzureAD/Authentication.AzureADB2C.UI/ref/Microsoft.AspNetCore.Authentication.AzureADB2C.UI.netcoreapp.cs diff --git a/src/Azure/AzureAD/Authentication.AzureADB2C.UI/src/Microsoft.AspNetCore.Authentication.AzureADB2C.UI.csproj b/src/Azure/AzureAD/Authentication.AzureADB2C.UI/src/Microsoft.AspNetCore.Authentication.AzureADB2C.UI.csproj index cf3601f1ec..2711ae5303 100644 --- a/src/Azure/AzureAD/Authentication.AzureADB2C.UI/src/Microsoft.AspNetCore.Authentication.AzureADB2C.UI.csproj +++ b/src/Azure/AzureAD/Authentication.AzureADB2C.UI/src/Microsoft.AspNetCore.Authentication.AzureADB2C.UI.csproj @@ -3,7 +3,7 @@ ASP.NET Core Azure Active Directory B2C Integration provides components for easily integrating Azure Active Directory B2C authentication within your ASP.NET Core application. Precompiled views assembly for the ASP.NET Core Azure Active Directory B2C Integration package. - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) aspnetcore;authentication;AzureADB2C true true diff --git a/src/Azure/AzureAD/Authentication.AzureADB2C.UI/test/Microsoft.AspNetCore.Authentication.AzureADB2C.UI.Test.csproj b/src/Azure/AzureAD/Authentication.AzureADB2C.UI/test/Microsoft.AspNetCore.Authentication.AzureADB2C.UI.Test.csproj index 6abd66f574..7d0ea17f83 100644 --- a/src/Azure/AzureAD/Authentication.AzureADB2C.UI/test/Microsoft.AspNetCore.Authentication.AzureADB2C.UI.Test.csproj +++ b/src/Azure/AzureAD/Authentication.AzureADB2C.UI/test/Microsoft.AspNetCore.Authentication.AzureADB2C.UI.Test.csproj @@ -1,7 +1,7 @@ - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) Microsoft.AspNetCore.Authentication.AzureADB2C.UI diff --git a/src/Azure/AzureAD/samples/AzureADB2CSample/AzureADB2CSample.csproj b/src/Azure/AzureAD/samples/AzureADB2CSample/AzureADB2CSample.csproj index e1b592ed20..379bc01e8d 100644 --- a/src/Azure/AzureAD/samples/AzureADB2CSample/AzureADB2CSample.csproj +++ b/src/Azure/AzureAD/samples/AzureADB2CSample/AzureADB2CSample.csproj @@ -1,7 +1,7 @@ - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) diff --git a/src/Azure/AzureAD/samples/AzureADSample/AzureADSample.csproj b/src/Azure/AzureAD/samples/AzureADSample/AzureADSample.csproj index 062de172bf..c7b9f69948 100644 --- a/src/Azure/AzureAD/samples/AzureADSample/AzureADSample.csproj +++ b/src/Azure/AzureAD/samples/AzureADSample/AzureADSample.csproj @@ -1,7 +1,7 @@ - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) diff --git a/src/Azure/AzureAD/test/FunctionalTests/Microsoft.AspNetCore.Authentication.AzureAD.FunctionalTests.csproj b/src/Azure/AzureAD/test/FunctionalTests/Microsoft.AspNetCore.Authentication.AzureAD.FunctionalTests.csproj index b13ff3e5f8..d2cb51194b 100644 --- a/src/Azure/AzureAD/test/FunctionalTests/Microsoft.AspNetCore.Authentication.AzureAD.FunctionalTests.csproj +++ b/src/Azure/AzureAD/test/FunctionalTests/Microsoft.AspNetCore.Authentication.AzureAD.FunctionalTests.csproj @@ -1,7 +1,7 @@ - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) true @@ -21,7 +21,7 @@ - <_PublishFiles Include="$(ArtifactsBinDir)AzureAD.WebSite\$(Configuration)\netcoreapp3.0\AzureAD.WebSite.deps.json" /> + <_PublishFiles Include="$(ArtifactsBinDir)AzureAD.WebSite\$(Configuration)\$(DefaultNetCoreTargetFramework)\AzureAD.WebSite.deps.json" /> - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) diff --git a/src/Azure/AzureAppServices.HostingStartup/ref/Microsoft.AspNetCore.AzureAppServices.HostingStartup.csproj b/src/Azure/AzureAppServices.HostingStartup/ref/Microsoft.AspNetCore.AzureAppServices.HostingStartup.csproj index 3984939846..383e81f912 100644 --- a/src/Azure/AzureAppServices.HostingStartup/ref/Microsoft.AspNetCore.AzureAppServices.HostingStartup.csproj +++ b/src/Azure/AzureAppServices.HostingStartup/ref/Microsoft.AspNetCore.AzureAppServices.HostingStartup.csproj @@ -1,10 +1,10 @@ - netcoreapp3.0 + netcoreapp5.0 - - + + diff --git a/src/Azure/AzureAppServices.HostingStartup/ref/Microsoft.AspNetCore.AzureAppServices.HostingStartup.netcoreapp3.0.cs b/src/Azure/AzureAppServices.HostingStartup/ref/Microsoft.AspNetCore.AzureAppServices.HostingStartup.netcoreapp.cs similarity index 100% rename from src/Azure/AzureAppServices.HostingStartup/ref/Microsoft.AspNetCore.AzureAppServices.HostingStartup.netcoreapp3.0.cs rename to src/Azure/AzureAppServices.HostingStartup/ref/Microsoft.AspNetCore.AzureAppServices.HostingStartup.netcoreapp.cs 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 821f07eb68..8992d007b8 100644 --- a/src/Azure/AzureAppServices.HostingStartup/src/Microsoft.AspNetCore.AzureAppServices.HostingStartup.csproj +++ b/src/Azure/AzureAppServices.HostingStartup/src/Microsoft.AspNetCore.AzureAppServices.HostingStartup.csproj @@ -4,7 +4,7 @@ ASP.NET Core lightup integration with Azure AppServices. - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) true aspnetcore;azure;appservices true diff --git a/src/Azure/AzureAppServicesIntegration/ref/Microsoft.AspNetCore.AzureAppServicesIntegration.csproj b/src/Azure/AzureAppServicesIntegration/ref/Microsoft.AspNetCore.AzureAppServicesIntegration.csproj index 10dbbbeb46..713aefa0fb 100644 --- a/src/Azure/AzureAppServicesIntegration/ref/Microsoft.AspNetCore.AzureAppServicesIntegration.csproj +++ b/src/Azure/AzureAppServicesIntegration/ref/Microsoft.AspNetCore.AzureAppServicesIntegration.csproj @@ -1,10 +1,10 @@ - netcoreapp3.0 + netcoreapp5.0 - - + + diff --git a/src/Azure/AzureAppServicesIntegration/ref/Microsoft.AspNetCore.AzureAppServicesIntegration.netcoreapp3.0.cs b/src/Azure/AzureAppServicesIntegration/ref/Microsoft.AspNetCore.AzureAppServicesIntegration.netcoreapp.cs similarity index 100% rename from src/Azure/AzureAppServicesIntegration/ref/Microsoft.AspNetCore.AzureAppServicesIntegration.netcoreapp3.0.cs rename to src/Azure/AzureAppServicesIntegration/ref/Microsoft.AspNetCore.AzureAppServicesIntegration.netcoreapp.cs diff --git a/src/Azure/AzureAppServicesIntegration/src/Microsoft.AspNetCore.AzureAppServicesIntegration.csproj b/src/Azure/AzureAppServicesIntegration/src/Microsoft.AspNetCore.AzureAppServicesIntegration.csproj index 7cd3dc1453..972ea62ff8 100644 --- a/src/Azure/AzureAppServicesIntegration/src/Microsoft.AspNetCore.AzureAppServicesIntegration.csproj +++ b/src/Azure/AzureAppServicesIntegration/src/Microsoft.AspNetCore.AzureAppServicesIntegration.csproj @@ -2,7 +2,7 @@ ASP.NET Core integration with Azure AppServices. - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) $(NoWarn);CS1591 true true diff --git a/src/Azure/AzureAppServicesIntegration/test/Microsoft.AspNetCore.AzureAppServicesIntegration.Tests.csproj b/src/Azure/AzureAppServicesIntegration/test/Microsoft.AspNetCore.AzureAppServicesIntegration.Tests.csproj index d325471015..4307d47260 100644 --- a/src/Azure/AzureAppServicesIntegration/test/Microsoft.AspNetCore.AzureAppServicesIntegration.Tests.csproj +++ b/src/Azure/AzureAppServicesIntegration/test/Microsoft.AspNetCore.AzureAppServicesIntegration.Tests.csproj @@ -1,7 +1,7 @@  - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) diff --git a/src/Azure/samples/AzureAppServicesHostingStartupSample/AzureAppServicesHostingStartupSample.csproj b/src/Azure/samples/AzureAppServicesHostingStartupSample/AzureAppServicesHostingStartupSample.csproj index 6985ea6c0c..81d6f1f4b5 100644 --- a/src/Azure/samples/AzureAppServicesHostingStartupSample/AzureAppServicesHostingStartupSample.csproj +++ b/src/Azure/samples/AzureAppServicesHostingStartupSample/AzureAppServicesHostingStartupSample.csproj @@ -1,7 +1,7 @@ - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) diff --git a/src/Azure/samples/AzureAppServicesSample/AzureAppServicesSample.csproj b/src/Azure/samples/AzureAppServicesSample/AzureAppServicesSample.csproj index 9f7be59933..2e75ddaed4 100644 --- a/src/Azure/samples/AzureAppServicesSample/AzureAppServicesSample.csproj +++ b/src/Azure/samples/AzureAppServicesSample/AzureAppServicesSample.csproj @@ -1,7 +1,7 @@  - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) diff --git a/src/Components/Analyzers/test/Microsoft.AspNetCore.Components.Analyzers.Tests.csproj b/src/Components/Analyzers/test/Microsoft.AspNetCore.Components.Analyzers.Tests.csproj index 45b379c65c..10085017d1 100644 --- a/src/Components/Analyzers/test/Microsoft.AspNetCore.Components.Analyzers.Tests.csproj +++ b/src/Components/Analyzers/test/Microsoft.AspNetCore.Components.Analyzers.Tests.csproj @@ -1,7 +1,7 @@  - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) diff --git a/src/Components/Authorization/ref/Microsoft.AspNetCore.Components.Authorization.csproj b/src/Components/Authorization/ref/Microsoft.AspNetCore.Components.Authorization.csproj index d60eb31594..02d6621e2f 100644 --- a/src/Components/Authorization/ref/Microsoft.AspNetCore.Components.Authorization.csproj +++ b/src/Components/Authorization/ref/Microsoft.AspNetCore.Components.Authorization.csproj @@ -1,15 +1,15 @@ - netstandard2.0;netcoreapp3.0 + netstandard2.0;netcoreapp5.0 - - + + diff --git a/src/Components/Authorization/ref/Microsoft.AspNetCore.Components.Authorization.netcoreapp3.0.cs b/src/Components/Authorization/ref/Microsoft.AspNetCore.Components.Authorization.netcoreapp.cs similarity index 100% rename from src/Components/Authorization/ref/Microsoft.AspNetCore.Components.Authorization.netcoreapp3.0.cs rename to src/Components/Authorization/ref/Microsoft.AspNetCore.Components.Authorization.netcoreapp.cs diff --git a/src/Components/Authorization/src/Microsoft.AspNetCore.Components.Authorization.csproj b/src/Components/Authorization/src/Microsoft.AspNetCore.Components.Authorization.csproj index 84da2d5ea2..8f3142849a 100644 --- a/src/Components/Authorization/src/Microsoft.AspNetCore.Components.Authorization.csproj +++ b/src/Components/Authorization/src/Microsoft.AspNetCore.Components.Authorization.csproj @@ -1,8 +1,8 @@ - netstandard2.0;netcoreapp3.0 - netcoreapp3.0 + netstandard2.0;$(DefaultNetCoreTargetFramework) + $(DefaultNetCoreTargetFramework) true Authentication and authorization support for Blazor applications. true 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 fedc3e7a4e..5f7ae8f772 100644 --- a/src/Components/Authorization/test/Microsoft.AspNetCore.Components.Authorization.Tests.csproj +++ b/src/Components/Authorization/test/Microsoft.AspNetCore.Components.Authorization.Tests.csproj @@ -1,7 +1,7 @@  - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) Microsoft.AspNetCore.Components.Authorization diff --git a/src/Components/Blazor/Blazor/test/Microsoft.AspNetCore.Blazor.Tests.csproj b/src/Components/Blazor/Blazor/test/Microsoft.AspNetCore.Blazor.Tests.csproj index 43c8df3786..a0acf4173e 100644 --- a/src/Components/Blazor/Blazor/test/Microsoft.AspNetCore.Blazor.Tests.csproj +++ b/src/Components/Blazor/Blazor/test/Microsoft.AspNetCore.Blazor.Tests.csproj @@ -1,7 +1,7 @@  - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) diff --git a/src/Components/Blazor/Build/src/Microsoft.AspNetCore.Blazor.Build.csproj b/src/Components/Blazor/Build/src/Microsoft.AspNetCore.Blazor.Build.csproj index adfa71ef6b..35853a4b9e 100644 --- a/src/Components/Blazor/Build/src/Microsoft.AspNetCore.Blazor.Build.csproj +++ b/src/Components/Blazor/Build/src/Microsoft.AspNetCore.Blazor.Build.csproj @@ -1,7 +1,7 @@ - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) Build mechanism for ASP.NET Core Blazor applications. Exe true diff --git a/src/Components/Blazor/Build/src/ReferenceFromSource.props b/src/Components/Blazor/Build/src/ReferenceFromSource.props index 927ec8c757..8067cdc131 100644 --- a/src/Components/Blazor/Build/src/ReferenceFromSource.props +++ b/src/Components/Blazor/Build/src/ReferenceFromSource.props @@ -27,7 +27,7 @@ --> dotnet - <_BlazorCliLocation>$(MSBuildThisFileDirectory)../../DevServer/src/bin/$(Configuration)/netcoreapp3.0/blazor-devserver.dll + <_BlazorCliLocation>$(MSBuildThisFileDirectory)../../DevServer/src/bin/$(Configuration)/$(DefaultNetCoreTargetFramework)/blazor-devserver.dll exec "$(_BlazorCliLocation)" serve --applicationpath "$(MSBuildProjectDirectory)/$(OutputPath)$(TargetFileName)" $(AdditionalRunArguments) diff --git a/src/Components/Blazor/Build/src/targets/Blazor.MonoRuntime.targets b/src/Components/Blazor/Build/src/targets/Blazor.MonoRuntime.targets index 96a844817e..42ef903f15 100644 --- a/src/Components/Blazor/Build/src/targets/Blazor.MonoRuntime.targets +++ b/src/Components/Blazor/Build/src/targets/Blazor.MonoRuntime.targets @@ -436,9 +436,15 @@ + + + + <_MonoLinkerDotNetPath>$(DOTNET_HOST_PATH) + <_MonoLinkerDotNetPath Condition="'$(_MonoLinkerDotNetPath)' == ''">dotnet + - + diff --git a/src/Components/Blazor/Build/test/Microsoft.AspNetCore.Blazor.Build.Tests.csproj b/src/Components/Blazor/Build/test/Microsoft.AspNetCore.Blazor.Build.Tests.csproj index 0263c9f800..02a15015e4 100644 --- a/src/Components/Blazor/Build/test/Microsoft.AspNetCore.Blazor.Build.Tests.csproj +++ b/src/Components/Blazor/Build/test/Microsoft.AspNetCore.Blazor.Build.Tests.csproj @@ -1,7 +1,7 @@  - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) $(DefaultItemExcludes);TestFiles\**\* diff --git a/src/Components/Blazor/DevServer/src/Microsoft.AspNetCore.Blazor.DevServer.csproj b/src/Components/Blazor/DevServer/src/Microsoft.AspNetCore.Blazor.DevServer.csproj index b12f55ef82..d18ab7c9e4 100644 --- a/src/Components/Blazor/DevServer/src/Microsoft.AspNetCore.Blazor.DevServer.csproj +++ b/src/Components/Blazor/DevServer/src/Microsoft.AspNetCore.Blazor.DevServer.csproj @@ -1,7 +1,7 @@  - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) Exe blazor-devserver Microsoft.AspNetCore.Blazor.DevServer diff --git a/src/Components/Blazor/Http/test/Microsoft.AspNetCore.Blazor.HttpClient.Tests.csproj b/src/Components/Blazor/Http/test/Microsoft.AspNetCore.Blazor.HttpClient.Tests.csproj index 375cc47dde..e7a9870ecd 100644 --- a/src/Components/Blazor/Http/test/Microsoft.AspNetCore.Blazor.HttpClient.Tests.csproj +++ b/src/Components/Blazor/Http/test/Microsoft.AspNetCore.Blazor.HttpClient.Tests.csproj @@ -1,7 +1,7 @@  - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) diff --git a/src/Components/Blazor/Server/ref/Microsoft.AspNetCore.Blazor.Server.csproj b/src/Components/Blazor/Server/ref/Microsoft.AspNetCore.Blazor.Server.csproj index b72d6c201c..440c9de42e 100644 --- a/src/Components/Blazor/Server/ref/Microsoft.AspNetCore.Blazor.Server.csproj +++ b/src/Components/Blazor/Server/ref/Microsoft.AspNetCore.Blazor.Server.csproj @@ -1,10 +1,10 @@ - netcoreapp3.0 + netcoreapp5.0 - - + + diff --git a/src/Components/Blazor/Server/ref/Microsoft.AspNetCore.Blazor.Server.netcoreapp3.0.cs b/src/Components/Blazor/Server/ref/Microsoft.AspNetCore.Blazor.Server.netcoreapp.cs similarity index 100% rename from src/Components/Blazor/Server/ref/Microsoft.AspNetCore.Blazor.Server.netcoreapp3.0.cs rename to src/Components/Blazor/Server/ref/Microsoft.AspNetCore.Blazor.Server.netcoreapp.cs diff --git a/src/Components/Blazor/Server/src/Microsoft.AspNetCore.Blazor.Server.csproj b/src/Components/Blazor/Server/src/Microsoft.AspNetCore.Blazor.Server.csproj index 7770f6bdd2..2d7b2d8fb4 100644 --- a/src/Components/Blazor/Server/src/Microsoft.AspNetCore.Blazor.Server.csproj +++ b/src/Components/Blazor/Server/src/Microsoft.AspNetCore.Blazor.Server.csproj @@ -1,7 +1,7 @@  - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) Runtime server features for ASP.NET Core Blazor applications. true diff --git a/src/Components/Blazor/Templates/src/content/BlazorWasm-CSharp/.template.config.src/template.json b/src/Components/Blazor/Templates/src/content/BlazorWasm-CSharp/.template.config.src/template.json index 755c0a8ad7..119303324e 100644 --- a/src/Components/Blazor/Templates/src/content/BlazorWasm-CSharp/.template.config.src/template.json +++ b/src/Components/Blazor/Templates/src/content/BlazorWasm-CSharp/.template.config.src/template.json @@ -83,12 +83,12 @@ "datatype": "choice", "choices": [ { - "choice": "netcoreapp3.0", - "description": "Target netcoreapp3.0" + "choice": "netcoreapp5.0", + "description": "Target netcoreapp5.0" } ], - "replaces": "netcoreapp3.0", - "defaultValue": "netcoreapp3.0" + "replaces": "netcoreapp5.0", + "defaultValue": "netcoreapp5.0" }, "HostIdentifier": { "type": "bind", diff --git a/src/Components/Blazor/Templates/src/content/BlazorWasm-CSharp/Server/BlazorWasm-CSharp.Server.csproj b/src/Components/Blazor/Templates/src/content/BlazorWasm-CSharp/Server/BlazorWasm-CSharp.Server.csproj index b116a53964..0d42f8eef5 100644 --- a/src/Components/Blazor/Templates/src/content/BlazorWasm-CSharp/Server/BlazorWasm-CSharp.Server.csproj +++ b/src/Components/Blazor/Templates/src/content/BlazorWasm-CSharp/Server/BlazorWasm-CSharp.Server.csproj @@ -1,7 +1,7 @@  - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) 7.3 diff --git a/src/Components/Blazor/testassets/HostedInAspNet.Server/HostedInAspNet.Server.csproj b/src/Components/Blazor/testassets/HostedInAspNet.Server/HostedInAspNet.Server.csproj index 6927153f36..10605ed6fe 100644 --- a/src/Components/Blazor/testassets/HostedInAspNet.Server/HostedInAspNet.Server.csproj +++ b/src/Components/Blazor/testassets/HostedInAspNet.Server/HostedInAspNet.Server.csproj @@ -1,7 +1,7 @@  - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) diff --git a/src/Components/Blazor/testassets/MonoSanity/MonoSanity.csproj b/src/Components/Blazor/testassets/MonoSanity/MonoSanity.csproj index 3afb1cf708..1373ade74e 100644 --- a/src/Components/Blazor/testassets/MonoSanity/MonoSanity.csproj +++ b/src/Components/Blazor/testassets/MonoSanity/MonoSanity.csproj @@ -1,7 +1,7 @@  - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) diff --git a/src/Components/Components/perf/Microsoft.AspNetCore.Components.Performance.csproj b/src/Components/Components/perf/Microsoft.AspNetCore.Components.Performance.csproj index 8a2d0ce6d0..a893d64abd 100644 --- a/src/Components/Components/perf/Microsoft.AspNetCore.Components.Performance.csproj +++ b/src/Components/Components/perf/Microsoft.AspNetCore.Components.Performance.csproj @@ -1,7 +1,7 @@  - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) Exe true true diff --git a/src/Components/Components/ref/Microsoft.AspNetCore.Components.csproj b/src/Components/Components/ref/Microsoft.AspNetCore.Components.csproj index 3f0b80424f..c69015f185 100644 --- a/src/Components/Components/ref/Microsoft.AspNetCore.Components.csproj +++ b/src/Components/Components/ref/Microsoft.AspNetCore.Components.csproj @@ -1,7 +1,7 @@ - netstandard2.0;netcoreapp3.0 + netstandard2.0;netcoreapp5.0 @@ -10,8 +10,8 @@ - - + + diff --git a/src/Components/Components/ref/Microsoft.AspNetCore.Components.netcoreapp3.0.cs b/src/Components/Components/ref/Microsoft.AspNetCore.Components.netcoreapp.cs similarity index 100% rename from src/Components/Components/ref/Microsoft.AspNetCore.Components.netcoreapp3.0.cs rename to src/Components/Components/ref/Microsoft.AspNetCore.Components.netcoreapp.cs diff --git a/src/Components/Components/src/Microsoft.AspNetCore.Components.csproj b/src/Components/Components/src/Microsoft.AspNetCore.Components.csproj index a7ad3493c9..bdbe946125 100644 --- a/src/Components/Components/src/Microsoft.AspNetCore.Components.csproj +++ b/src/Components/Components/src/Microsoft.AspNetCore.Components.csproj @@ -1,8 +1,8 @@ - netstandard2.0;netcoreapp3.0 - netcoreapp3.0 + netstandard2.0;$(DefaultNetCoreTargetFramework) + $(DefaultNetCoreTargetFramework) Components feature for ASP.NET Core. true true @@ -38,7 +38,7 @@ Microsoft.AspNetCore.Components.multitarget.nuspec - Microsoft.AspNetCore.Components.netcoreapp3.0.nuspec + Microsoft.AspNetCore.Components.$(DefaultNetCoreTargetFramework).nuspec $(GenerateNuspecDependsOn);_GetNuspecDependencyPackageVersions diff --git a/src/Components/Components/src/Microsoft.AspNetCore.Components.multitarget.nuspec b/src/Components/Components/src/Microsoft.AspNetCore.Components.multitarget.nuspec index 6324ea3136..19ee259e88 100644 --- a/src/Components/Components/src/Microsoft.AspNetCore.Components.multitarget.nuspec +++ b/src/Components/Components/src/Microsoft.AspNetCore.Components.multitarget.nuspec @@ -9,7 +9,7 @@ - + diff --git a/src/Components/Components/src/Microsoft.AspNetCore.Components.netcoreapp3.0.nuspec b/src/Components/Components/src/Microsoft.AspNetCore.Components.netcoreapp5.0.nuspec similarity index 94% rename from src/Components/Components/src/Microsoft.AspNetCore.Components.netcoreapp3.0.nuspec rename to src/Components/Components/src/Microsoft.AspNetCore.Components.netcoreapp5.0.nuspec index 8dec24f270..d7bd9c31de 100644 --- a/src/Components/Components/src/Microsoft.AspNetCore.Components.netcoreapp3.0.nuspec +++ b/src/Components/Components/src/Microsoft.AspNetCore.Components.netcoreapp5.0.nuspec @@ -3,7 +3,7 @@ $CommonMetadataElements$ - + diff --git a/src/Components/Components/test/Microsoft.AspNetCore.Components.Tests.csproj b/src/Components/Components/test/Microsoft.AspNetCore.Components.Tests.csproj index e97f75fd2a..fd2a5406c1 100644 --- a/src/Components/Components/test/Microsoft.AspNetCore.Components.Tests.csproj +++ b/src/Components/Components/test/Microsoft.AspNetCore.Components.Tests.csproj @@ -1,7 +1,7 @@ - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) Microsoft.AspNetCore.Components diff --git a/src/Components/Directory.Build.props b/src/Components/Directory.Build.props index ee0ff057fa..02d423b43e 100644 --- a/src/Components/Directory.Build.props +++ b/src/Components/Directory.Build.props @@ -15,7 +15,7 @@ $(MSBuildThisFileDirectory)Shared\ - $(MSBuildThisFileDirectory)Blazor\Build\src\bin\$(Configuration)\netcoreapp3.0\ + $(MSBuildThisFileDirectory)Blazor\Build\src\bin\$(Configuration)\$(DefaultNetCoreTargetFramework)\ diff --git a/src/Components/Forms/ref/Microsoft.AspNetCore.Components.Forms.csproj b/src/Components/Forms/ref/Microsoft.AspNetCore.Components.Forms.csproj index 8e24904b63..f302e6311d 100644 --- a/src/Components/Forms/ref/Microsoft.AspNetCore.Components.Forms.csproj +++ b/src/Components/Forms/ref/Microsoft.AspNetCore.Components.Forms.csproj @@ -1,15 +1,15 @@ - netstandard2.0;netcoreapp3.0 + netstandard2.0;netcoreapp5.0 - - + + diff --git a/src/Components/Forms/ref/Microsoft.AspNetCore.Components.Forms.netcoreapp3.0.cs b/src/Components/Forms/ref/Microsoft.AspNetCore.Components.Forms.netcoreapp.cs similarity index 100% rename from src/Components/Forms/ref/Microsoft.AspNetCore.Components.Forms.netcoreapp3.0.cs rename to src/Components/Forms/ref/Microsoft.AspNetCore.Components.Forms.netcoreapp.cs diff --git a/src/Components/Forms/src/Microsoft.AspNetCore.Components.Forms.csproj b/src/Components/Forms/src/Microsoft.AspNetCore.Components.Forms.csproj index dba25a048e..d338f21000 100644 --- a/src/Components/Forms/src/Microsoft.AspNetCore.Components.Forms.csproj +++ b/src/Components/Forms/src/Microsoft.AspNetCore.Components.Forms.csproj @@ -1,8 +1,8 @@ - netstandard2.0;netcoreapp3.0 - netcoreapp3.0 + netstandard2.0;$(DefaultNetCoreTargetFramework) + $(DefaultNetCoreTargetFramework) true Forms and validation support for Blazor applications. true 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 e78bb47ed3..6c611379a5 100644 --- a/src/Components/Forms/test/Microsoft.AspNetCore.Components.Forms.Tests.csproj +++ b/src/Components/Forms/test/Microsoft.AspNetCore.Components.Forms.Tests.csproj @@ -1,7 +1,7 @@  - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) Microsoft.AspNetCore.Components.Forms diff --git a/src/Components/Server/ref/Microsoft.AspNetCore.Components.Server.csproj b/src/Components/Server/ref/Microsoft.AspNetCore.Components.Server.csproj index 21f0c740e5..8b8060df74 100644 --- a/src/Components/Server/ref/Microsoft.AspNetCore.Components.Server.csproj +++ b/src/Components/Server/ref/Microsoft.AspNetCore.Components.Server.csproj @@ -1,10 +1,10 @@ - netcoreapp3.0 + netcoreapp5.0 - - + + diff --git a/src/Components/Server/ref/Microsoft.AspNetCore.Components.Server.netcoreapp3.0.cs b/src/Components/Server/ref/Microsoft.AspNetCore.Components.Server.netcoreapp.cs similarity index 100% rename from src/Components/Server/ref/Microsoft.AspNetCore.Components.Server.netcoreapp3.0.cs rename to src/Components/Server/ref/Microsoft.AspNetCore.Components.Server.netcoreapp.cs diff --git a/src/Components/Server/src/Microsoft.AspNetCore.Components.Server.csproj b/src/Components/Server/src/Microsoft.AspNetCore.Components.Server.csproj index fb56748e6e..e80b45f7ab 100644 --- a/src/Components/Server/src/Microsoft.AspNetCore.Components.Server.csproj +++ b/src/Components/Server/src/Microsoft.AspNetCore.Components.Server.csproj @@ -1,7 +1,7 @@ - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) Runtime server features for ASP.NET Core Components. true true 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 4e8dfbf7f2..c6e294a63c 100644 --- a/src/Components/Server/test/Microsoft.AspNetCore.Components.Server.Tests.csproj +++ b/src/Components/Server/test/Microsoft.AspNetCore.Components.Server.Tests.csproj @@ -1,7 +1,7 @@  - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) diff --git a/src/Components/Web/ref/Microsoft.AspNetCore.Components.Web.csproj b/src/Components/Web/ref/Microsoft.AspNetCore.Components.Web.csproj index 74a0b82c27..aab684c227 100644 --- a/src/Components/Web/ref/Microsoft.AspNetCore.Components.Web.csproj +++ b/src/Components/Web/ref/Microsoft.AspNetCore.Components.Web.csproj @@ -1,7 +1,7 @@ - netstandard2.0;netcoreapp3.0 + netstandard2.0;netcoreapp5.0 @@ -10,8 +10,8 @@ - - + + diff --git a/src/Components/Web/ref/Microsoft.AspNetCore.Components.Web.netcoreapp3.0.cs b/src/Components/Web/ref/Microsoft.AspNetCore.Components.Web.netcoreapp.cs similarity index 100% rename from src/Components/Web/ref/Microsoft.AspNetCore.Components.Web.netcoreapp3.0.cs rename to src/Components/Web/ref/Microsoft.AspNetCore.Components.Web.netcoreapp.cs diff --git a/src/Components/Web/src/Microsoft.AspNetCore.Components.Web.csproj b/src/Components/Web/src/Microsoft.AspNetCore.Components.Web.csproj index 2c602acd95..02ae3157d2 100644 --- a/src/Components/Web/src/Microsoft.AspNetCore.Components.Web.csproj +++ b/src/Components/Web/src/Microsoft.AspNetCore.Components.Web.csproj @@ -1,8 +1,8 @@  - netstandard2.0;netcoreapp3.0 - netcoreapp3.0 + netstandard2.0;$(DefaultNetCoreTargetFramework) + $(DefaultNetCoreTargetFramework) true Support for rendering ASP.NET Core components for browsers. true 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 ae732d3e10..5c8a5a0d19 100644 --- a/src/Components/Web/test/Microsoft.AspNetCore.Components.Web.Tests.csproj +++ b/src/Components/Web/test/Microsoft.AspNetCore.Components.Web.Tests.csproj @@ -1,7 +1,7 @@ - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) Microsoft.AspNetCore.Components diff --git a/src/Components/test/E2ETest/Microsoft.AspNetCore.Components.E2ETests.csproj b/src/Components/test/E2ETest/Microsoft.AspNetCore.Components.E2ETests.csproj index 6b91b2d230..387bbbfb16 100644 --- a/src/Components/test/E2ETest/Microsoft.AspNetCore.Components.E2ETests.csproj +++ b/src/Components/test/E2ETest/Microsoft.AspNetCore.Components.E2ETests.csproj @@ -4,7 +4,7 @@ - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) Components.E2ETests diff --git a/src/Components/test/Ignitor.Test/Ignitor.Test.csproj b/src/Components/test/Ignitor.Test/Ignitor.Test.csproj index ad35b17b42..7f23d6804f 100644 --- a/src/Components/test/Ignitor.Test/Ignitor.Test.csproj +++ b/src/Components/test/Ignitor.Test/Ignitor.Test.csproj @@ -1,7 +1,7 @@ - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) diff --git a/src/Components/test/testassets/ComponentsApp.Server/ComponentsApp.Server.csproj b/src/Components/test/testassets/ComponentsApp.Server/ComponentsApp.Server.csproj index 52a6e6206c..d960dfa01d 100644 --- a/src/Components/test/testassets/ComponentsApp.Server/ComponentsApp.Server.csproj +++ b/src/Components/test/testassets/ComponentsApp.Server/ComponentsApp.Server.csproj @@ -1,7 +1,7 @@  - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) diff --git a/src/Components/test/testassets/Ignitor/Ignitor.csproj b/src/Components/test/testassets/Ignitor/Ignitor.csproj index 6816e44df1..ab7aeccfc6 100644 --- a/src/Components/test/testassets/Ignitor/Ignitor.csproj +++ b/src/Components/test/testassets/Ignitor/Ignitor.csproj @@ -2,7 +2,7 @@ Exe - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) diff --git a/src/Components/test/testassets/TestServer/Components.TestServer.csproj b/src/Components/test/testassets/TestServer/Components.TestServer.csproj index 62b354608a..869449b19d 100644 --- a/src/Components/test/testassets/TestServer/Components.TestServer.csproj +++ b/src/Components/test/testassets/TestServer/Components.TestServer.csproj @@ -1,7 +1,7 @@  - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) diff --git a/src/DataProtection/Abstractions/test/Microsoft.AspNetCore.DataProtection.Abstractions.Tests.csproj b/src/DataProtection/Abstractions/test/Microsoft.AspNetCore.DataProtection.Abstractions.Tests.csproj index 0f17586d23..a6eeb69ec8 100644 --- a/src/DataProtection/Abstractions/test/Microsoft.AspNetCore.DataProtection.Abstractions.Tests.csproj +++ b/src/DataProtection/Abstractions/test/Microsoft.AspNetCore.DataProtection.Abstractions.Tests.csproj @@ -1,7 +1,7 @@  - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) diff --git a/src/DataProtection/AzureKeyVault/test/Microsoft.AspNetCore.DataProtection.AzureKeyVault.Tests.csproj b/src/DataProtection/AzureKeyVault/test/Microsoft.AspNetCore.DataProtection.AzureKeyVault.Tests.csproj index 17b9fe4ac8..b5864335b7 100644 --- a/src/DataProtection/AzureKeyVault/test/Microsoft.AspNetCore.DataProtection.AzureKeyVault.Tests.csproj +++ b/src/DataProtection/AzureKeyVault/test/Microsoft.AspNetCore.DataProtection.AzureKeyVault.Tests.csproj @@ -1,7 +1,7 @@  - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) true diff --git a/src/DataProtection/AzureStorage/src/Microsoft.AspNetCore.DataProtection.AzureStorage.csproj b/src/DataProtection/AzureStorage/src/Microsoft.AspNetCore.DataProtection.AzureStorage.csproj index 8272cd539b..0f3cdaa077 100644 --- a/src/DataProtection/AzureStorage/src/Microsoft.AspNetCore.DataProtection.AzureStorage.csproj +++ b/src/DataProtection/AzureStorage/src/Microsoft.AspNetCore.DataProtection.AzureStorage.csproj @@ -14,7 +14,7 @@ - + diff --git a/src/DataProtection/AzureStorage/test/Microsoft.AspNetCore.DataProtection.AzureStorage.Tests.csproj b/src/DataProtection/AzureStorage/test/Microsoft.AspNetCore.DataProtection.AzureStorage.Tests.csproj index ed16b18390..7d56c0ecc7 100644 --- a/src/DataProtection/AzureStorage/test/Microsoft.AspNetCore.DataProtection.AzureStorage.Tests.csproj +++ b/src/DataProtection/AzureStorage/test/Microsoft.AspNetCore.DataProtection.AzureStorage.Tests.csproj @@ -1,7 +1,7 @@  - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) true diff --git a/src/DataProtection/Cryptography.Internal/test/Microsoft.AspNetCore.Cryptography.Internal.Tests.csproj b/src/DataProtection/Cryptography.Internal/test/Microsoft.AspNetCore.Cryptography.Internal.Tests.csproj index 1fa55228db..2bce1bc391 100644 --- a/src/DataProtection/Cryptography.Internal/test/Microsoft.AspNetCore.Cryptography.Internal.Tests.csproj +++ b/src/DataProtection/Cryptography.Internal/test/Microsoft.AspNetCore.Cryptography.Internal.Tests.csproj @@ -1,7 +1,7 @@  - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) true diff --git a/src/DataProtection/Cryptography.KeyDerivation/ref/Microsoft.AspNetCore.Cryptography.KeyDerivation.csproj b/src/DataProtection/Cryptography.KeyDerivation/ref/Microsoft.AspNetCore.Cryptography.KeyDerivation.csproj index 0dd3dbf34c..65086c1969 100644 --- a/src/DataProtection/Cryptography.KeyDerivation/ref/Microsoft.AspNetCore.Cryptography.KeyDerivation.csproj +++ b/src/DataProtection/Cryptography.KeyDerivation/ref/Microsoft.AspNetCore.Cryptography.KeyDerivation.csproj @@ -8,7 +8,7 @@ - + diff --git a/src/DataProtection/Cryptography.KeyDerivation/ref/Microsoft.AspNetCore.Cryptography.KeyDerivation.netcoreapp2.0.cs b/src/DataProtection/Cryptography.KeyDerivation/ref/Microsoft.AspNetCore.Cryptography.KeyDerivation.netcoreapp.cs similarity index 100% rename from src/DataProtection/Cryptography.KeyDerivation/ref/Microsoft.AspNetCore.Cryptography.KeyDerivation.netcoreapp2.0.cs rename to src/DataProtection/Cryptography.KeyDerivation/ref/Microsoft.AspNetCore.Cryptography.KeyDerivation.netcoreapp.cs diff --git a/src/DataProtection/Cryptography.KeyDerivation/test/Microsoft.AspNetCore.Cryptography.KeyDerivation.Tests.csproj b/src/DataProtection/Cryptography.KeyDerivation/test/Microsoft.AspNetCore.Cryptography.KeyDerivation.Tests.csproj index 5d3ff930af..c0d90626fb 100644 --- a/src/DataProtection/Cryptography.KeyDerivation/test/Microsoft.AspNetCore.Cryptography.KeyDerivation.Tests.csproj +++ b/src/DataProtection/Cryptography.KeyDerivation/test/Microsoft.AspNetCore.Cryptography.KeyDerivation.Tests.csproj @@ -1,7 +1,7 @@  - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) true diff --git a/src/DataProtection/DataProtection/ref/Microsoft.AspNetCore.DataProtection.csproj b/src/DataProtection/DataProtection/ref/Microsoft.AspNetCore.DataProtection.csproj index 2a41fa1e75..ab8510aa6a 100644 --- a/src/DataProtection/DataProtection/ref/Microsoft.AspNetCore.DataProtection.csproj +++ b/src/DataProtection/DataProtection/ref/Microsoft.AspNetCore.DataProtection.csproj @@ -1,7 +1,7 @@ - netstandard2.0;netcoreapp3.0 + netstandard2.0;netcoreapp5.0 @@ -15,8 +15,8 @@ - - + + diff --git a/src/DataProtection/DataProtection/ref/Microsoft.AspNetCore.DataProtection.netcoreapp3.0.cs b/src/DataProtection/DataProtection/ref/Microsoft.AspNetCore.DataProtection.netcoreapp.cs similarity index 100% rename from src/DataProtection/DataProtection/ref/Microsoft.AspNetCore.DataProtection.netcoreapp3.0.cs rename to src/DataProtection/DataProtection/ref/Microsoft.AspNetCore.DataProtection.netcoreapp.cs diff --git a/src/DataProtection/DataProtection/src/Microsoft.AspNetCore.DataProtection.csproj b/src/DataProtection/DataProtection/src/Microsoft.AspNetCore.DataProtection.csproj index 57127419bd..4ce14755df 100644 --- a/src/DataProtection/DataProtection/src/Microsoft.AspNetCore.DataProtection.csproj +++ b/src/DataProtection/DataProtection/src/Microsoft.AspNetCore.DataProtection.csproj @@ -2,8 +2,8 @@ ASP.NET Core logic to protect and unprotect data, similar to DPAPI. - netstandard2.0;netcoreapp3.0 - netcoreapp3.0 + netstandard2.0;$(DefaultNetCoreTargetFramework) + $(DefaultNetCoreTargetFramework) true true $(NoWarn);CS1591 diff --git a/src/DataProtection/DataProtection/test/Microsoft.AspNetCore.DataProtection.Tests.csproj b/src/DataProtection/DataProtection/test/Microsoft.AspNetCore.DataProtection.Tests.csproj index 2e4c664234..41eeb22a12 100644 --- a/src/DataProtection/DataProtection/test/Microsoft.AspNetCore.DataProtection.Tests.csproj +++ b/src/DataProtection/DataProtection/test/Microsoft.AspNetCore.DataProtection.Tests.csproj @@ -1,7 +1,7 @@ - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) true diff --git a/src/DataProtection/EntityFrameworkCore/test/Microsoft.AspNetCore.DataProtection.EntityFrameworkCore.Test.csproj b/src/DataProtection/EntityFrameworkCore/test/Microsoft.AspNetCore.DataProtection.EntityFrameworkCore.Test.csproj index 6d3e504879..b2dbf36a08 100644 --- a/src/DataProtection/EntityFrameworkCore/test/Microsoft.AspNetCore.DataProtection.EntityFrameworkCore.Test.csproj +++ b/src/DataProtection/EntityFrameworkCore/test/Microsoft.AspNetCore.DataProtection.EntityFrameworkCore.Test.csproj @@ -1,7 +1,7 @@  - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) diff --git a/src/DataProtection/Extensions/ref/Microsoft.AspNetCore.DataProtection.Extensions.csproj b/src/DataProtection/Extensions/ref/Microsoft.AspNetCore.DataProtection.Extensions.csproj index 32b774090f..76c4888bfc 100644 --- a/src/DataProtection/Extensions/ref/Microsoft.AspNetCore.DataProtection.Extensions.csproj +++ b/src/DataProtection/Extensions/ref/Microsoft.AspNetCore.DataProtection.Extensions.csproj @@ -1,15 +1,15 @@ - netstandard2.0;netcoreapp3.0 + netstandard2.0;netcoreapp5.0 - - + + diff --git a/src/DataProtection/Extensions/ref/Microsoft.AspNetCore.DataProtection.Extensions.netcoreapp3.0.cs b/src/DataProtection/Extensions/ref/Microsoft.AspNetCore.DataProtection.Extensions.netcoreapp.cs similarity index 100% rename from src/DataProtection/Extensions/ref/Microsoft.AspNetCore.DataProtection.Extensions.netcoreapp3.0.cs rename to src/DataProtection/Extensions/ref/Microsoft.AspNetCore.DataProtection.Extensions.netcoreapp.cs diff --git a/src/DataProtection/Extensions/src/Microsoft.AspNetCore.DataProtection.Extensions.csproj b/src/DataProtection/Extensions/src/Microsoft.AspNetCore.DataProtection.Extensions.csproj index b3098cbf72..21c2eae6b7 100644 --- a/src/DataProtection/Extensions/src/Microsoft.AspNetCore.DataProtection.Extensions.csproj +++ b/src/DataProtection/Extensions/src/Microsoft.AspNetCore.DataProtection.Extensions.csproj @@ -2,8 +2,8 @@ Additional APIs for ASP.NET Core data protection. - netstandard2.0;netcoreapp3.0 - netcoreapp3.0 + netstandard2.0;$(DefaultNetCoreTargetFramework) + $(DefaultNetCoreTargetFramework) true true true diff --git a/src/DataProtection/Extensions/test/Microsoft.AspNetCore.DataProtection.Extensions.Tests.csproj b/src/DataProtection/Extensions/test/Microsoft.AspNetCore.DataProtection.Extensions.Tests.csproj index 2ed2eb310d..f184844f0c 100644 --- a/src/DataProtection/Extensions/test/Microsoft.AspNetCore.DataProtection.Extensions.Tests.csproj +++ b/src/DataProtection/Extensions/test/Microsoft.AspNetCore.DataProtection.Extensions.Tests.csproj @@ -1,7 +1,7 @@  - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) diff --git a/src/DataProtection/README.md b/src/DataProtection/README.md index cd58074d9e..4c558753b0 100644 --- a/src/DataProtection/README.md +++ b/src/DataProtection/README.md @@ -1,7 +1,7 @@ DataProtection ============== -Data Protection APIs for protecting and unprotecting data. You can find documentation for Data Protection in the [ASP.NET Core Documentation](https://docs.microsoft.com/en-us/aspnet/core/security/data-protection/). +Data Protection APIs for protecting and unprotecting data. You can find documentation for Data Protection in the [ASP.NET Core Documentation](https://docs.microsoft.com/aspnet/core/security/data-protection/). ## Community Maintained Data Protection Providers & Projects diff --git a/src/DataProtection/StackExchangeRedis/test/Microsoft.AspNetCore.DataProtection.StackExchangeRedis.Tests.csproj b/src/DataProtection/StackExchangeRedis/test/Microsoft.AspNetCore.DataProtection.StackExchangeRedis.Tests.csproj index ff9e397e77..51ab16d490 100644 --- a/src/DataProtection/StackExchangeRedis/test/Microsoft.AspNetCore.DataProtection.StackExchangeRedis.Tests.csproj +++ b/src/DataProtection/StackExchangeRedis/test/Microsoft.AspNetCore.DataProtection.StackExchangeRedis.Tests.csproj @@ -1,7 +1,7 @@  - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) diff --git a/src/DataProtection/samples/AzureBlob/AzureBlob.csproj b/src/DataProtection/samples/AzureBlob/AzureBlob.csproj index 55e41b6b18..da0aaac779 100644 --- a/src/DataProtection/samples/AzureBlob/AzureBlob.csproj +++ b/src/DataProtection/samples/AzureBlob/AzureBlob.csproj @@ -1,7 +1,7 @@ - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) exe diff --git a/src/DataProtection/samples/AzureKeyVault/AzureKeyVault.csproj b/src/DataProtection/samples/AzureKeyVault/AzureKeyVault.csproj index b577b27124..81e12db14e 100644 --- a/src/DataProtection/samples/AzureKeyVault/AzureKeyVault.csproj +++ b/src/DataProtection/samples/AzureKeyVault/AzureKeyVault.csproj @@ -1,7 +1,7 @@ - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) exe diff --git a/src/DataProtection/samples/CustomEncryptorSample/CustomEncryptorSample.csproj b/src/DataProtection/samples/CustomEncryptorSample/CustomEncryptorSample.csproj index c4afb59727..a7d5100772 100644 --- a/src/DataProtection/samples/CustomEncryptorSample/CustomEncryptorSample.csproj +++ b/src/DataProtection/samples/CustomEncryptorSample/CustomEncryptorSample.csproj @@ -1,7 +1,7 @@ - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) exe diff --git a/src/DataProtection/samples/EntityFrameworkCoreSample/EntityFrameworkCoreSample.csproj b/src/DataProtection/samples/EntityFrameworkCoreSample/EntityFrameworkCoreSample.csproj index 0796b4d4b8..6c161137a5 100644 --- a/src/DataProtection/samples/EntityFrameworkCoreSample/EntityFrameworkCoreSample.csproj +++ b/src/DataProtection/samples/EntityFrameworkCoreSample/EntityFrameworkCoreSample.csproj @@ -2,7 +2,7 @@ exe - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) diff --git a/src/DataProtection/samples/KeyManagementSample/KeyManagementSample.csproj b/src/DataProtection/samples/KeyManagementSample/KeyManagementSample.csproj index a996ad452a..4539a6111e 100644 --- a/src/DataProtection/samples/KeyManagementSample/KeyManagementSample.csproj +++ b/src/DataProtection/samples/KeyManagementSample/KeyManagementSample.csproj @@ -1,7 +1,7 @@ - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) exe diff --git a/src/DataProtection/samples/NonDISample/NonDISample.csproj b/src/DataProtection/samples/NonDISample/NonDISample.csproj index 8dd5fd3f1a..32661436b0 100644 --- a/src/DataProtection/samples/NonDISample/NonDISample.csproj +++ b/src/DataProtection/samples/NonDISample/NonDISample.csproj @@ -1,7 +1,7 @@ - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) exe diff --git a/src/DataProtection/samples/Redis/Redis.csproj b/src/DataProtection/samples/Redis/Redis.csproj index f30e056234..5a6bc7cf17 100644 --- a/src/DataProtection/samples/Redis/Redis.csproj +++ b/src/DataProtection/samples/Redis/Redis.csproj @@ -1,7 +1,7 @@  - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) exe diff --git a/src/DefaultBuilder/ref/Microsoft.AspNetCore.csproj b/src/DefaultBuilder/ref/Microsoft.AspNetCore.csproj index dd42476a01..4c41e898f2 100644 --- a/src/DefaultBuilder/ref/Microsoft.AspNetCore.csproj +++ b/src/DefaultBuilder/ref/Microsoft.AspNetCore.csproj @@ -1,10 +1,10 @@ - netcoreapp3.0 + netcoreapp5.0 - - + + diff --git a/src/DefaultBuilder/ref/Microsoft.AspNetCore.netcoreapp3.0.cs b/src/DefaultBuilder/ref/Microsoft.AspNetCore.netcoreapp.cs similarity index 100% rename from src/DefaultBuilder/ref/Microsoft.AspNetCore.netcoreapp3.0.cs rename to src/DefaultBuilder/ref/Microsoft.AspNetCore.netcoreapp.cs diff --git a/src/DefaultBuilder/samples/SampleApp/DefaultBuilder.SampleApp.csproj b/src/DefaultBuilder/samples/SampleApp/DefaultBuilder.SampleApp.csproj index 4d24f50730..e616256aea 100644 --- a/src/DefaultBuilder/samples/SampleApp/DefaultBuilder.SampleApp.csproj +++ b/src/DefaultBuilder/samples/SampleApp/DefaultBuilder.SampleApp.csproj @@ -1,7 +1,7 @@ - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) aspnetcore-MetaPackagesSampleApp-20170406180413 OutOfProcess diff --git a/src/DefaultBuilder/src/Microsoft.AspNetCore.csproj b/src/DefaultBuilder/src/Microsoft.AspNetCore.csproj index d49d64e17c..19ed686fb0 100644 --- a/src/DefaultBuilder/src/Microsoft.AspNetCore.csproj +++ b/src/DefaultBuilder/src/Microsoft.AspNetCore.csproj @@ -1,7 +1,7 @@ - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) true aspnetcore Microsoft.AspNetCore diff --git a/src/DefaultBuilder/test/Microsoft.AspNetCore.FunctionalTests/Microsoft.AspNetCore.FunctionalTests.csproj b/src/DefaultBuilder/test/Microsoft.AspNetCore.FunctionalTests/Microsoft.AspNetCore.FunctionalTests.csproj index efef69f713..41aee06e07 100644 --- a/src/DefaultBuilder/test/Microsoft.AspNetCore.FunctionalTests/Microsoft.AspNetCore.FunctionalTests.csproj +++ b/src/DefaultBuilder/test/Microsoft.AspNetCore.FunctionalTests/Microsoft.AspNetCore.FunctionalTests.csproj @@ -1,7 +1,7 @@ - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) diff --git a/src/DefaultBuilder/test/Microsoft.AspNetCore.FunctionalTests/WebHostFunctionalTests.cs b/src/DefaultBuilder/test/Microsoft.AspNetCore.FunctionalTests/WebHostFunctionalTests.cs index 8162172cbf..da51bb4a3c 100644 --- a/src/DefaultBuilder/test/Microsoft.AspNetCore.FunctionalTests/WebHostFunctionalTests.cs +++ b/src/DefaultBuilder/test/Microsoft.AspNetCore.FunctionalTests/WebHostFunctionalTests.cs @@ -158,7 +158,7 @@ namespace Microsoft.AspNetCore.Tests var applicationName = "CreateDefaultBuilderApp"; var deploymentParameters = new DeploymentParameters(Path.Combine(GetTestSitesPath(), applicationName), ServerType.IISExpress, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64) { - TargetFramework = "netcoreapp3.0", + TargetFramework = "netcoreapp5.0", HostingModel = HostingModel.InProcess }; @@ -213,7 +213,7 @@ namespace Microsoft.AspNetCore.Tests { var deploymentParameters = new DeploymentParameters(Path.Combine(GetTestSitesPath(), applicationName), ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64) { - TargetFramework = "netcoreapp3.0", + TargetFramework = "netcoreapp5.0", }; if (setTestEnvVars) 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 06f55e13d9..c02c7cc090 100644 --- a/src/DefaultBuilder/test/Microsoft.AspNetCore.Tests/Microsoft.AspNetCore.Tests.csproj +++ b/src/DefaultBuilder/test/Microsoft.AspNetCore.Tests/Microsoft.AspNetCore.Tests.csproj @@ -1,7 +1,7 @@ - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) diff --git a/src/DefaultBuilder/testassets/CreateDefaultBuilderApp/CreateDefaultBuilderApp.csproj b/src/DefaultBuilder/testassets/CreateDefaultBuilderApp/CreateDefaultBuilderApp.csproj index 25248775e9..230dfe2f2d 100644 --- a/src/DefaultBuilder/testassets/CreateDefaultBuilderApp/CreateDefaultBuilderApp.csproj +++ b/src/DefaultBuilder/testassets/CreateDefaultBuilderApp/CreateDefaultBuilderApp.csproj @@ -4,7 +4,7 @@ Exe - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) aspnetcore-CreateDefaultBuilder-20170424224131 true diff --git a/src/DefaultBuilder/testassets/CreateDefaultBuilderOfTApp/CreateDefaultBuilderOfTApp.csproj b/src/DefaultBuilder/testassets/CreateDefaultBuilderOfTApp/CreateDefaultBuilderOfTApp.csproj index 0020cf9f48..61671a8b21 100644 --- a/src/DefaultBuilder/testassets/CreateDefaultBuilderOfTApp/CreateDefaultBuilderOfTApp.csproj +++ b/src/DefaultBuilder/testassets/CreateDefaultBuilderOfTApp/CreateDefaultBuilderOfTApp.csproj @@ -2,7 +2,7 @@ Exe - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) aspnetcore-CreateDefaultBuilderOfT-20170424224131 diff --git a/src/DefaultBuilder/testassets/DependencyInjectionApp/DependencyInjectionApp.csproj b/src/DefaultBuilder/testassets/DependencyInjectionApp/DependencyInjectionApp.csproj index 08de4c797a..81fb60ddab 100644 --- a/src/DefaultBuilder/testassets/DependencyInjectionApp/DependencyInjectionApp.csproj +++ b/src/DefaultBuilder/testassets/DependencyInjectionApp/DependencyInjectionApp.csproj @@ -2,7 +2,7 @@ Exe - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) diff --git a/src/DefaultBuilder/testassets/StartRequestDelegateUrlApp/StartRequestDelegateUrlApp.csproj b/src/DefaultBuilder/testassets/StartRequestDelegateUrlApp/StartRequestDelegateUrlApp.csproj index 08de4c797a..81fb60ddab 100644 --- a/src/DefaultBuilder/testassets/StartRequestDelegateUrlApp/StartRequestDelegateUrlApp.csproj +++ b/src/DefaultBuilder/testassets/StartRequestDelegateUrlApp/StartRequestDelegateUrlApp.csproj @@ -2,7 +2,7 @@ Exe - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) diff --git a/src/DefaultBuilder/testassets/StartRouteBuilderUrlApp/StartRouteBuilderUrlApp.csproj b/src/DefaultBuilder/testassets/StartRouteBuilderUrlApp/StartRouteBuilderUrlApp.csproj index 08de4c797a..81fb60ddab 100644 --- a/src/DefaultBuilder/testassets/StartRouteBuilderUrlApp/StartRouteBuilderUrlApp.csproj +++ b/src/DefaultBuilder/testassets/StartRouteBuilderUrlApp/StartRouteBuilderUrlApp.csproj @@ -2,7 +2,7 @@ Exe - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) diff --git a/src/DefaultBuilder/testassets/StartWithIApplicationBuilderUrlApp/StartWithIApplicationBuilderUrlApp.csproj b/src/DefaultBuilder/testassets/StartWithIApplicationBuilderUrlApp/StartWithIApplicationBuilderUrlApp.csproj index 08de4c797a..81fb60ddab 100644 --- a/src/DefaultBuilder/testassets/StartWithIApplicationBuilderUrlApp/StartWithIApplicationBuilderUrlApp.csproj +++ b/src/DefaultBuilder/testassets/StartWithIApplicationBuilderUrlApp/StartWithIApplicationBuilderUrlApp.csproj @@ -2,7 +2,7 @@ Exe - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) diff --git a/src/Features/JsonPatch/test/Microsoft.AspNetCore.JsonPatch.Tests.csproj b/src/Features/JsonPatch/test/Microsoft.AspNetCore.JsonPatch.Tests.csproj index 1a3c83556c..d378a4e876 100644 --- a/src/Features/JsonPatch/test/Microsoft.AspNetCore.JsonPatch.Tests.csproj +++ b/src/Features/JsonPatch/test/Microsoft.AspNetCore.JsonPatch.Tests.csproj @@ -1,7 +1,7 @@ - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) diff --git a/src/Framework/src/Microsoft.AspNetCore.App.Runtime.csproj b/src/Framework/src/Microsoft.AspNetCore.App.Runtime.csproj index 9b6fe29f6f..2761d442cf 100644 --- a/src/Framework/src/Microsoft.AspNetCore.App.Runtime.csproj +++ b/src/Framework/src/Microsoft.AspNetCore.App.Runtime.csproj @@ -25,7 +25,7 @@ This package is an internal implementation of the .NET Core SDK and is not meant aspnetcore_base_runtime.version $(InstallersOutputPath)$(BaseRuntimeVersionFileName) - + runtimes/$(RuntimeIdentifier)/lib/ $(BuildOutputTargetFolder)$(DefaultNetCoreTargetFramework) diff --git a/src/Framework/test/Microsoft.AspNetCore.App.UnitTests.csproj b/src/Framework/test/Microsoft.AspNetCore.App.UnitTests.csproj index 8cde3262d9..e90141a86e 100644 --- a/src/Framework/test/Microsoft.AspNetCore.App.UnitTests.csproj +++ b/src/Framework/test/Microsoft.AspNetCore.App.UnitTests.csproj @@ -1,10 +1,12 @@ - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) Microsoft.AspNetCore false + + true diff --git a/src/Hosting/Abstractions/ref/Microsoft.AspNetCore.Hosting.Abstractions.csproj b/src/Hosting/Abstractions/ref/Microsoft.AspNetCore.Hosting.Abstractions.csproj index 494c7d61ae..cad74994d2 100644 --- a/src/Hosting/Abstractions/ref/Microsoft.AspNetCore.Hosting.Abstractions.csproj +++ b/src/Hosting/Abstractions/ref/Microsoft.AspNetCore.Hosting.Abstractions.csproj @@ -1,10 +1,10 @@ - netcoreapp3.0 + netcoreapp5.0 - - + + diff --git a/src/Hosting/Abstractions/ref/Microsoft.AspNetCore.Hosting.Abstractions.netcoreapp3.0.cs b/src/Hosting/Abstractions/ref/Microsoft.AspNetCore.Hosting.Abstractions.netcoreapp.cs similarity index 100% rename from src/Hosting/Abstractions/ref/Microsoft.AspNetCore.Hosting.Abstractions.netcoreapp3.0.cs rename to src/Hosting/Abstractions/ref/Microsoft.AspNetCore.Hosting.Abstractions.netcoreapp.cs diff --git a/src/Hosting/Abstractions/src/Microsoft.AspNetCore.Hosting.Abstractions.csproj b/src/Hosting/Abstractions/src/Microsoft.AspNetCore.Hosting.Abstractions.csproj index f0a3c27ae6..f0f0b97592 100644 --- a/src/Hosting/Abstractions/src/Microsoft.AspNetCore.Hosting.Abstractions.csproj +++ b/src/Hosting/Abstractions/src/Microsoft.AspNetCore.Hosting.Abstractions.csproj @@ -2,7 +2,7 @@ ASP.NET Core hosting and startup abstractions for web applications. - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) true $(NoWarn);CS1591 true diff --git a/src/Hosting/Hosting/ref/Microsoft.AspNetCore.Hosting.csproj b/src/Hosting/Hosting/ref/Microsoft.AspNetCore.Hosting.csproj index 40455060c2..dad087ff21 100644 --- a/src/Hosting/Hosting/ref/Microsoft.AspNetCore.Hosting.csproj +++ b/src/Hosting/Hosting/ref/Microsoft.AspNetCore.Hosting.csproj @@ -1,10 +1,10 @@ - netcoreapp3.0 + netcoreapp5.0 - - + + diff --git a/src/Hosting/Hosting/ref/Microsoft.AspNetCore.Hosting.netcoreapp3.0.cs b/src/Hosting/Hosting/ref/Microsoft.AspNetCore.Hosting.netcoreapp.cs similarity index 100% rename from src/Hosting/Hosting/ref/Microsoft.AspNetCore.Hosting.netcoreapp3.0.cs rename to src/Hosting/Hosting/ref/Microsoft.AspNetCore.Hosting.netcoreapp.cs diff --git a/src/Hosting/Hosting/src/Internal/HostingApplication.cs b/src/Hosting/Hosting/src/Internal/HostingApplication.cs index c64426c0db..84363221ba 100644 --- a/src/Hosting/Hosting/src/Internal/HostingApplication.cs +++ b/src/Hosting/Hosting/src/Internal/HostingApplication.cs @@ -114,6 +114,7 @@ namespace Microsoft.AspNetCore.Hosting public HttpContext HttpContext { get; set; } public IDisposable Scope { get; set; } public Activity Activity { get; set; } + internal HostingRequestStartingLog StartLog { get; set; } public long StartTimestamp { get; set; } internal bool HasDiagnosticListener { get; set; } @@ -125,6 +126,7 @@ namespace Microsoft.AspNetCore.Hosting Scope = null; Activity = null; + StartLog = null; StartTimestamp = 0; HasDiagnosticListener = false; diff --git a/src/Hosting/Hosting/src/Internal/HostingApplicationDiagnostics.cs b/src/Hosting/Hosting/src/Internal/HostingApplicationDiagnostics.cs index 65730d67ff..385bcbf46d 100644 --- a/src/Hosting/Hosting/src/Internal/HostingApplicationDiagnostics.cs +++ b/src/Hosting/Hosting/src/Internal/HostingApplicationDiagnostics.cs @@ -78,7 +78,7 @@ namespace Microsoft.AspNetCore.Hosting } // Non-inline - LogRequestStarting(httpContext); + LogRequestStarting(context); } } context.StartTimestamp = startTimestamp; @@ -97,7 +97,7 @@ namespace Microsoft.AspNetCore.Hosting { currentTimestamp = Stopwatch.GetTimestamp(); // Non-inline - LogRequestFinished(httpContext, startTimestamp, currentTimestamp); + LogRequestFinished(context, startTimestamp, currentTimestamp); } if (_diagnosticListener.IsEnabled()) @@ -167,30 +167,34 @@ namespace Microsoft.AspNetCore.Hosting } [MethodImpl(MethodImplOptions.NoInlining)] - private void LogRequestStarting(HttpContext httpContext) + private void LogRequestStarting(HostingApplication.Context context) { // IsEnabled is checked in the caller, so if we are here just log + var startLog = new HostingRequestStartingLog(context.HttpContext); + context.StartLog = startLog; + _logger.Log( logLevel: LogLevel.Information, eventId: LoggerEventIds.RequestStarting, - state: new HostingRequestStartingLog(httpContext), + state: startLog, exception: null, formatter: HostingRequestStartingLog.Callback); } [MethodImpl(MethodImplOptions.NoInlining)] - private void LogRequestFinished(HttpContext httpContext, long startTimestamp, long currentTimestamp) + private void LogRequestFinished(HostingApplication.Context context, long startTimestamp, long currentTimestamp) { // IsEnabled isn't checked in the caller, startTimestamp > 0 is used as a fast proxy check - // but that may be because diagnostics are enabled, which also uses startTimestamp, so check here - if (_logger.IsEnabled(LogLevel.Information)) + // but that may be because diagnostics are enabled, which also uses startTimestamp, + // so check if we logged the start event + if (context.StartLog != null) { var elapsed = new TimeSpan((long)(TimestampToTicks * (currentTimestamp - startTimestamp))); _logger.Log( logLevel: LogLevel.Information, eventId: LoggerEventIds.RequestFinished, - state: new HostingRequestFinishedLog(httpContext, elapsed), + state: new HostingRequestFinishedLog(context, elapsed), exception: null, formatter: HostingRequestFinishedLog.Callback); } diff --git a/src/Hosting/Hosting/src/Internal/HostingRequestFinishedLog.cs b/src/Hosting/Hosting/src/Internal/HostingRequestFinishedLog.cs index 63fd5f0921..09a132851d 100644 --- a/src/Hosting/Hosting/src/Internal/HostingRequestFinishedLog.cs +++ b/src/Hosting/Hosting/src/Internal/HostingRequestFinishedLog.cs @@ -9,51 +9,56 @@ using Microsoft.AspNetCore.Http; namespace Microsoft.AspNetCore.Hosting { + using static HostingRequestStartingLog; + internal class HostingRequestFinishedLog : IReadOnlyList> { internal static readonly Func Callback = (state, exception) => ((HostingRequestFinishedLog)state).ToString(); - private readonly HttpContext _httpContext; - private readonly TimeSpan _elapsed; + private readonly HostingApplication.Context _context; private string _cachedToString; + public TimeSpan Elapsed { get; } - public int Count => 3; + public int Count => 11; public KeyValuePair this[int index] { get { - switch (index) + var request = _context.HttpContext.Request; + var response = _context.HttpContext.Response; + + return index switch { - case 0: - return new KeyValuePair("ElapsedMilliseconds", _elapsed.TotalMilliseconds); - case 1: - return new KeyValuePair("StatusCode", _httpContext.Response.StatusCode); - case 2: - return new KeyValuePair("ContentType", _httpContext.Response.ContentType); - default: - throw new IndexOutOfRangeException(nameof(index)); - } + 0 => new KeyValuePair("ElapsedMilliseconds", Elapsed.TotalMilliseconds), + 1 => new KeyValuePair(nameof(response.StatusCode), response.StatusCode), + 2 => new KeyValuePair(nameof(response.ContentType), response.ContentType), + 3 => new KeyValuePair(nameof(response.ContentLength), response.ContentLength), + 4 => new KeyValuePair(nameof(request.Protocol), request.Protocol), + 5 => new KeyValuePair(nameof(request.Method), request.Method), + 6 => new KeyValuePair(nameof(request.Scheme), request.Scheme), + 7 => new KeyValuePair(nameof(request.Host), request.Host.Value), + 8 => new KeyValuePair(nameof(request.PathBase), request.PathBase.Value), + 9 => new KeyValuePair(nameof(request.Path), request.Path.Value), + 10 => new KeyValuePair(nameof(request.QueryString), request.QueryString.Value), + _ => throw new IndexOutOfRangeException(nameof(index)), + }; } } - public HostingRequestFinishedLog(HttpContext httpContext, TimeSpan elapsed) + public HostingRequestFinishedLog(HostingApplication.Context context, TimeSpan elapsed) { - _httpContext = httpContext; - _elapsed = elapsed; + _context = context; + Elapsed = elapsed; } public override string ToString() { if (_cachedToString == null) { - _cachedToString = string.Format( - CultureInfo.InvariantCulture, - "Request finished in {0}ms {1} {2}", - _elapsed.TotalMilliseconds, - _httpContext.Response.StatusCode, - _httpContext.Response.ContentType); + var response = _context.HttpContext.Response; + _cachedToString = $"Request finished {_context.StartLog.ToStringWithoutPreamble()} - {response.StatusCode.ToString(CultureInfo.InvariantCulture)} {ValueOrEmptyMarker(response.ContentLength)} {EscapedValueOrEmptyMarker(response.ContentType)} {Elapsed.TotalMilliseconds.ToString("0.0000", CultureInfo.InvariantCulture)}ms"; } return _cachedToString; diff --git a/src/Hosting/Hosting/src/Internal/HostingRequestStartingLog.cs b/src/Hosting/Hosting/src/Internal/HostingRequestStartingLog.cs index 279fa06aed..3a7586b1c9 100644 --- a/src/Hosting/Hosting/src/Internal/HostingRequestStartingLog.cs +++ b/src/Hosting/Hosting/src/Internal/HostingRequestStartingLog.cs @@ -5,12 +5,16 @@ using System; using System.Collections; using System.Collections.Generic; using System.Globalization; +using System.Net; using Microsoft.AspNetCore.Http; namespace Microsoft.AspNetCore.Hosting { internal class HostingRequestStartingLog : IReadOnlyList> { + private const string LogPreamble = "Request starting "; + private const string EmptyEntry = "-"; + internal static readonly Func Callback = (state, exception) => ((HostingRequestStartingLog)state).ToString(); private readonly HttpRequest _request; @@ -19,35 +23,19 @@ namespace Microsoft.AspNetCore.Hosting public int Count => 9; - public KeyValuePair this[int index] + public KeyValuePair this[int index] => index switch { - get - { - switch (index) - { - case 0: - return new KeyValuePair("Protocol", _request.Protocol); - case 1: - return new KeyValuePair("Method", _request.Method); - case 2: - return new KeyValuePair("ContentType", _request.ContentType); - case 3: - return new KeyValuePair("ContentLength", _request.ContentLength); - case 4: - return new KeyValuePair("Scheme", _request.Scheme); - case 5: - return new KeyValuePair("Host", _request.Host.ToString()); - case 6: - return new KeyValuePair("PathBase", _request.PathBase.ToString()); - case 7: - return new KeyValuePair("Path", _request.Path.ToString()); - case 8: - return new KeyValuePair("QueryString", _request.QueryString.ToString()); - default: - throw new IndexOutOfRangeException(nameof(index)); - } - } - } + 0 => new KeyValuePair(nameof(_request.Protocol), _request.Protocol), + 1 => new KeyValuePair(nameof(_request.Method), _request.Method), + 2 => new KeyValuePair(nameof(_request.ContentType), _request.ContentType), + 3 => new KeyValuePair(nameof(_request.ContentLength), _request.ContentLength), + 4 => new KeyValuePair(nameof(_request.Scheme), _request.Scheme), + 5 => new KeyValuePair(nameof(_request.Host), _request.Host.Value), + 6 => new KeyValuePair(nameof(_request.PathBase), _request.PathBase.Value), + 7 => new KeyValuePair(nameof(_request.Path), _request.Path.Value), + 8 => new KeyValuePair(nameof(_request.QueryString), _request.QueryString.Value), + _ => throw new IndexOutOfRangeException(nameof(index)), + }; public HostingRequestStartingLog(HttpContext httpContext) { @@ -58,18 +46,8 @@ namespace Microsoft.AspNetCore.Hosting { if (_cachedToString == null) { - _cachedToString = string.Format( - CultureInfo.InvariantCulture, - "Request starting {0} {1} {2}://{3}{4}{5}{6} {7} {8}", - _request.Protocol, - _request.Method, - _request.Scheme, - _request.Host.Value, - _request.PathBase.Value, - _request.Path.Value, - _request.QueryString.Value, - _request.ContentType, - _request.ContentLength); + var request = _request; + _cachedToString = $"{LogPreamble}{request.Protocol} {request.Method} {request.Scheme}://{request.Host.Value}{request.PathBase.Value}{request.Path.Value}{request.QueryString.Value} {EscapedValueOrEmptyMarker(request.ContentType)} {ValueOrEmptyMarker(request.ContentLength)}"; ; } return _cachedToString; @@ -87,5 +65,15 @@ namespace Microsoft.AspNetCore.Hosting { return GetEnumerator(); } + + internal string ToStringWithoutPreamble() + => ToString().Substring(LogPreamble.Length); + + internal static string EscapedValueOrEmptyMarker(string potentialValue) + // Encode space as + + => potentialValue?.Length > 0 ? potentialValue.Replace(' ', '+') : EmptyEntry; + + internal static string ValueOrEmptyMarker(T? potentialValue) where T : struct, IFormattable + => potentialValue?.ToString(null, CultureInfo.InvariantCulture) ?? EmptyEntry; } } diff --git a/src/Hosting/Hosting/src/Microsoft.AspNetCore.Hosting.csproj b/src/Hosting/Hosting/src/Microsoft.AspNetCore.Hosting.csproj index dfc668f4a2..2810d8a1a4 100644 --- a/src/Hosting/Hosting/src/Microsoft.AspNetCore.Hosting.csproj +++ b/src/Hosting/Hosting/src/Microsoft.AspNetCore.Hosting.csproj @@ -2,7 +2,7 @@ ASP.NET Core hosting infrastructure and startup logic for web applications. - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) true $(NoWarn);CS1591 true diff --git a/src/Hosting/Hosting/test/Microsoft.AspNetCore.Hosting.Tests.csproj b/src/Hosting/Hosting/test/Microsoft.AspNetCore.Hosting.Tests.csproj index 4bc7d5cf38..55c6f7fa54 100644 --- a/src/Hosting/Hosting/test/Microsoft.AspNetCore.Hosting.Tests.csproj +++ b/src/Hosting/Hosting/test/Microsoft.AspNetCore.Hosting.Tests.csproj @@ -1,7 +1,7 @@  - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) diff --git a/src/Hosting/Server.Abstractions/ref/Microsoft.AspNetCore.Hosting.Server.Abstractions.csproj b/src/Hosting/Server.Abstractions/ref/Microsoft.AspNetCore.Hosting.Server.Abstractions.csproj index b9c84f7e33..24f54bf7cc 100644 --- a/src/Hosting/Server.Abstractions/ref/Microsoft.AspNetCore.Hosting.Server.Abstractions.csproj +++ b/src/Hosting/Server.Abstractions/ref/Microsoft.AspNetCore.Hosting.Server.Abstractions.csproj @@ -1,10 +1,10 @@ - netcoreapp3.0 + netcoreapp5.0 - - + + diff --git a/src/Hosting/Server.Abstractions/ref/Microsoft.AspNetCore.Hosting.Server.Abstractions.netcoreapp3.0.cs b/src/Hosting/Server.Abstractions/ref/Microsoft.AspNetCore.Hosting.Server.Abstractions.netcoreapp.cs similarity index 100% rename from src/Hosting/Server.Abstractions/ref/Microsoft.AspNetCore.Hosting.Server.Abstractions.netcoreapp3.0.cs rename to src/Hosting/Server.Abstractions/ref/Microsoft.AspNetCore.Hosting.Server.Abstractions.netcoreapp.cs diff --git a/src/Hosting/Server.Abstractions/src/Microsoft.AspNetCore.Hosting.Server.Abstractions.csproj b/src/Hosting/Server.Abstractions/src/Microsoft.AspNetCore.Hosting.Server.Abstractions.csproj index 48b93a678e..b2a219e0ba 100644 --- a/src/Hosting/Server.Abstractions/src/Microsoft.AspNetCore.Hosting.Server.Abstractions.csproj +++ b/src/Hosting/Server.Abstractions/src/Microsoft.AspNetCore.Hosting.Server.Abstractions.csproj @@ -2,7 +2,7 @@ ASP.NET Core hosting server abstractions for web applications. - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) true $(NoWarn);CS1591 true diff --git a/src/Hosting/Server.IntegrationTesting/ref/Microsoft.AspNetCore.Server.IntegrationTesting.csproj b/src/Hosting/Server.IntegrationTesting/ref/Microsoft.AspNetCore.Server.IntegrationTesting.csproj index 6bcbe4e83c..0f14df02a0 100644 --- a/src/Hosting/Server.IntegrationTesting/ref/Microsoft.AspNetCore.Server.IntegrationTesting.csproj +++ b/src/Hosting/Server.IntegrationTesting/ref/Microsoft.AspNetCore.Server.IntegrationTesting.csproj @@ -1,10 +1,10 @@ - netcoreapp3.0 + netcoreapp5.0 - - + + diff --git a/src/Hosting/Server.IntegrationTesting/ref/Microsoft.AspNetCore.Server.IntegrationTesting.netcoreapp3.0.cs b/src/Hosting/Server.IntegrationTesting/ref/Microsoft.AspNetCore.Server.IntegrationTesting.netcoreapp.cs similarity index 99% rename from src/Hosting/Server.IntegrationTesting/ref/Microsoft.AspNetCore.Server.IntegrationTesting.netcoreapp3.0.cs rename to src/Hosting/Server.IntegrationTesting/ref/Microsoft.AspNetCore.Server.IntegrationTesting.netcoreapp.cs index a9d6aac1e1..a7552d9f95 100644 --- a/src/Hosting/Server.IntegrationTesting/ref/Microsoft.AspNetCore.Server.IntegrationTesting.netcoreapp3.0.cs +++ b/src/Hosting/Server.IntegrationTesting/ref/Microsoft.AspNetCore.Server.IntegrationTesting.netcoreapp.cs @@ -246,6 +246,7 @@ namespace Microsoft.AspNetCore.Server.IntegrationTesting public const string NetCoreApp21 = "netcoreapp2.1"; public const string NetCoreApp22 = "netcoreapp2.2"; public const string NetCoreApp30 = "netcoreapp3.0"; + public const string NetCoreApp50 = "netcoreapp5.0"; public static bool Matches(string tfm1, string tfm2) { throw null; } } } diff --git a/src/Hosting/Server.IntegrationTesting/src/Common/Tfm.cs b/src/Hosting/Server.IntegrationTesting/src/Common/Tfm.cs index 4fb0bb57ef..f0fbd7aa35 100644 --- a/src/Hosting/Server.IntegrationTesting/src/Common/Tfm.cs +++ b/src/Hosting/Server.IntegrationTesting/src/Common/Tfm.cs @@ -12,6 +12,7 @@ namespace Microsoft.AspNetCore.Server.IntegrationTesting public const string NetCoreApp21 = "netcoreapp2.1"; public const string NetCoreApp22 = "netcoreapp2.2"; public const string NetCoreApp30 = "netcoreapp3.0"; + public const string NetCoreApp50 = "netcoreapp5.0"; public static bool Matches(string tfm1, string tfm2) { diff --git a/src/Hosting/Server.IntegrationTesting/src/Microsoft.AspNetCore.Server.IntegrationTesting.csproj b/src/Hosting/Server.IntegrationTesting/src/Microsoft.AspNetCore.Server.IntegrationTesting.csproj index be449d691a..8edf4ff3f0 100644 --- a/src/Hosting/Server.IntegrationTesting/src/Microsoft.AspNetCore.Server.IntegrationTesting.csproj +++ b/src/Hosting/Server.IntegrationTesting/src/Microsoft.AspNetCore.Server.IntegrationTesting.csproj @@ -2,7 +2,7 @@ ASP.NET Core helpers to deploy applications to IIS Express, IIS, WebListener and Kestrel for testing. - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) $(NoWarn);CS1591 true aspnetcore;testing diff --git a/src/Hosting/TestHost/ref/Microsoft.AspNetCore.TestHost.csproj b/src/Hosting/TestHost/ref/Microsoft.AspNetCore.TestHost.csproj index 3e9b20abad..c604089c42 100644 --- a/src/Hosting/TestHost/ref/Microsoft.AspNetCore.TestHost.csproj +++ b/src/Hosting/TestHost/ref/Microsoft.AspNetCore.TestHost.csproj @@ -1,10 +1,10 @@ - netcoreapp3.0 + netcoreapp5.0 - - + + diff --git a/src/Hosting/TestHost/ref/Microsoft.AspNetCore.TestHost.netcoreapp3.0.cs b/src/Hosting/TestHost/ref/Microsoft.AspNetCore.TestHost.netcoreapp.cs similarity index 100% rename from src/Hosting/TestHost/ref/Microsoft.AspNetCore.TestHost.netcoreapp3.0.cs rename to src/Hosting/TestHost/ref/Microsoft.AspNetCore.TestHost.netcoreapp.cs diff --git a/src/Hosting/TestHost/src/Microsoft.AspNetCore.TestHost.csproj b/src/Hosting/TestHost/src/Microsoft.AspNetCore.TestHost.csproj index 3b85fd0c9c..0ef4679eb1 100644 --- a/src/Hosting/TestHost/src/Microsoft.AspNetCore.TestHost.csproj +++ b/src/Hosting/TestHost/src/Microsoft.AspNetCore.TestHost.csproj @@ -2,7 +2,7 @@ ASP.NET Core web server for writing and running tests. - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) $(NoWarn);CS1591 true aspnetcore;hosting;testing diff --git a/src/Hosting/TestHost/test/Microsoft.AspNetCore.TestHost.Tests.csproj b/src/Hosting/TestHost/test/Microsoft.AspNetCore.TestHost.Tests.csproj index 4561181222..bc32f814ab 100644 --- a/src/Hosting/TestHost/test/Microsoft.AspNetCore.TestHost.Tests.csproj +++ b/src/Hosting/TestHost/test/Microsoft.AspNetCore.TestHost.Tests.csproj @@ -1,7 +1,7 @@ - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) diff --git a/src/Hosting/WindowsServices/ref/Microsoft.AspNetCore.Hosting.WindowsServices.csproj b/src/Hosting/WindowsServices/ref/Microsoft.AspNetCore.Hosting.WindowsServices.csproj index 6ddfceca7c..68c8e65758 100644 --- a/src/Hosting/WindowsServices/ref/Microsoft.AspNetCore.Hosting.WindowsServices.csproj +++ b/src/Hosting/WindowsServices/ref/Microsoft.AspNetCore.Hosting.WindowsServices.csproj @@ -1,10 +1,10 @@ - netcoreapp3.0 + netcoreapp5.0 - - + + diff --git a/src/Hosting/WindowsServices/ref/Microsoft.AspNetCore.Hosting.WindowsServices.netcoreapp3.0.cs b/src/Hosting/WindowsServices/ref/Microsoft.AspNetCore.Hosting.WindowsServices.netcoreapp.cs similarity index 100% rename from src/Hosting/WindowsServices/ref/Microsoft.AspNetCore.Hosting.WindowsServices.netcoreapp3.0.cs rename to src/Hosting/WindowsServices/ref/Microsoft.AspNetCore.Hosting.WindowsServices.netcoreapp.cs diff --git a/src/Hosting/WindowsServices/src/Microsoft.AspNetCore.Hosting.WindowsServices.csproj b/src/Hosting/WindowsServices/src/Microsoft.AspNetCore.Hosting.WindowsServices.csproj index 3ea91fde9f..05e0c574f8 100644 --- a/src/Hosting/WindowsServices/src/Microsoft.AspNetCore.Hosting.WindowsServices.csproj +++ b/src/Hosting/WindowsServices/src/Microsoft.AspNetCore.Hosting.WindowsServices.csproj @@ -2,7 +2,7 @@ ASP.NET Core hosting infrastructure and startup logic for web applications running within a Windows service. - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) $(NoWarn);CS1591 true aspnetcore;hosting 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 5fecfdba0a..aa4d901e77 100644 --- a/src/Hosting/WindowsServices/test/Microsoft.AspNetCore.Hosting.WindowsServices.Tests.csproj +++ b/src/Hosting/WindowsServices/test/Microsoft.AspNetCore.Hosting.WindowsServices.Tests.csproj @@ -1,7 +1,7 @@  - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) diff --git a/src/Hosting/samples/GenericWebHost/GenericWebHost.csproj b/src/Hosting/samples/GenericWebHost/GenericWebHost.csproj index 120b4b4276..2e701e73e3 100644 --- a/src/Hosting/samples/GenericWebHost/GenericWebHost.csproj +++ b/src/Hosting/samples/GenericWebHost/GenericWebHost.csproj @@ -2,7 +2,7 @@ Exe - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) latest true diff --git a/src/Hosting/samples/SampleStartups/SampleStartups.csproj b/src/Hosting/samples/SampleStartups/SampleStartups.csproj index 1efd69367b..02ed170423 100644 --- a/src/Hosting/samples/SampleStartups/SampleStartups.csproj +++ b/src/Hosting/samples/SampleStartups/SampleStartups.csproj @@ -1,7 +1,7 @@ - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) SampleStartups.StartupBlockingOnStart exe diff --git a/src/Hosting/test/FunctionalTests/Microsoft.AspNetCore.Hosting.FunctionalTests.csproj b/src/Hosting/test/FunctionalTests/Microsoft.AspNetCore.Hosting.FunctionalTests.csproj index c848da3647..75a2f330f7 100644 --- a/src/Hosting/test/FunctionalTests/Microsoft.AspNetCore.Hosting.FunctionalTests.csproj +++ b/src/Hosting/test/FunctionalTests/Microsoft.AspNetCore.Hosting.FunctionalTests.csproj @@ -1,7 +1,7 @@ - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) diff --git a/src/Hosting/test/FunctionalTests/ShutdownTests.cs b/src/Hosting/test/FunctionalTests/ShutdownTests.cs index b7f837c110..51f450cfad 100644 --- a/src/Hosting/test/FunctionalTests/ShutdownTests.cs +++ b/src/Hosting/test/FunctionalTests/ShutdownTests.cs @@ -61,7 +61,7 @@ namespace Microsoft.AspNetCore.Hosting.FunctionalTests RuntimeArchitecture.x64) { EnvironmentName = "Shutdown", - TargetFramework = Tfm.NetCoreApp30, + TargetFramework = Tfm.NetCoreApp50, ApplicationType = ApplicationType.Portable, PublishApplicationBeforeDeployment = true, StatusMessagesEnabled = false diff --git a/src/Hosting/test/FunctionalTests/WebHostBuilderTests.cs b/src/Hosting/test/FunctionalTests/WebHostBuilderTests.cs index 53fa50ed8d..8747a75f26 100644 --- a/src/Hosting/test/FunctionalTests/WebHostBuilderTests.cs +++ b/src/Hosting/test/FunctionalTests/WebHostBuilderTests.cs @@ -17,7 +17,7 @@ namespace Microsoft.AspNetCore.Hosting.FunctionalTests public WebHostBuilderTests(ITestOutputHelper output) : base(output) { } public static TestMatrix TestVariants => TestMatrix.ForServers(ServerType.Kestrel) - .WithTfms(Tfm.NetCoreApp30); + .WithTfms(Tfm.NetCoreApp50); [ConditionalTheory] [MemberData(nameof(TestVariants))] diff --git a/src/Hosting/test/testassets/IStartupInjectionAssemblyName/IStartupInjectionAssemblyName.csproj b/src/Hosting/test/testassets/IStartupInjectionAssemblyName/IStartupInjectionAssemblyName.csproj index 3ea37b679b..71d8a7873c 100644 --- a/src/Hosting/test/testassets/IStartupInjectionAssemblyName/IStartupInjectionAssemblyName.csproj +++ b/src/Hosting/test/testassets/IStartupInjectionAssemblyName/IStartupInjectionAssemblyName.csproj @@ -1,7 +1,7 @@ - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) Exe 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 aeffde5b3b..6412438725 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 @@ -1,7 +1,7 @@ - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) Exe diff --git a/src/Hosting/test/testassets/TestStartupAssembly1/TestStartupAssembly1.csproj b/src/Hosting/test/testassets/TestStartupAssembly1/TestStartupAssembly1.csproj index caba858766..e2744c9b14 100644 --- a/src/Hosting/test/testassets/TestStartupAssembly1/TestStartupAssembly1.csproj +++ b/src/Hosting/test/testassets/TestStartupAssembly1/TestStartupAssembly1.csproj @@ -1,7 +1,7 @@ - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) diff --git a/src/Html/Abstractions/ref/Microsoft.AspNetCore.Html.Abstractions.csproj b/src/Html/Abstractions/ref/Microsoft.AspNetCore.Html.Abstractions.csproj index e78b021524..d5603de914 100644 --- a/src/Html/Abstractions/ref/Microsoft.AspNetCore.Html.Abstractions.csproj +++ b/src/Html/Abstractions/ref/Microsoft.AspNetCore.Html.Abstractions.csproj @@ -1,10 +1,10 @@ - netcoreapp3.0 + netcoreapp5.0 - - + + diff --git a/src/Html/Abstractions/ref/Microsoft.AspNetCore.Html.Abstractions.netcoreapp3.0.cs b/src/Html/Abstractions/ref/Microsoft.AspNetCore.Html.Abstractions.netcoreapp.cs similarity index 100% rename from src/Html/Abstractions/ref/Microsoft.AspNetCore.Html.Abstractions.netcoreapp3.0.cs rename to src/Html/Abstractions/ref/Microsoft.AspNetCore.Html.Abstractions.netcoreapp.cs diff --git a/src/Html/Abstractions/src/Microsoft.AspNetCore.Html.Abstractions.csproj b/src/Html/Abstractions/src/Microsoft.AspNetCore.Html.Abstractions.csproj index 2fe58e4a1f..51545da71f 100644 --- a/src/Html/Abstractions/src/Microsoft.AspNetCore.Html.Abstractions.csproj +++ b/src/Html/Abstractions/src/Microsoft.AspNetCore.Html.Abstractions.csproj @@ -6,7 +6,7 @@ Commonly used types: Microsoft.AspNetCore.Html.HtmlString Microsoft.AspNetCore.Html.IHtmlContent - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) true true aspnetcore 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 be5d2850cb..849d9f5bf1 100644 --- a/src/Html/Abstractions/test/Microsoft.AspNetCore.Html.Abstractions.Tests.csproj +++ b/src/Html/Abstractions/test/Microsoft.AspNetCore.Html.Abstractions.Tests.csproj @@ -1,7 +1,7 @@ - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) diff --git a/src/Http/Authentication.Abstractions/ref/Microsoft.AspNetCore.Authentication.Abstractions.csproj b/src/Http/Authentication.Abstractions/ref/Microsoft.AspNetCore.Authentication.Abstractions.csproj index 192cf51270..1c4a03271f 100644 --- a/src/Http/Authentication.Abstractions/ref/Microsoft.AspNetCore.Authentication.Abstractions.csproj +++ b/src/Http/Authentication.Abstractions/ref/Microsoft.AspNetCore.Authentication.Abstractions.csproj @@ -1,10 +1,10 @@ - netcoreapp3.0 + netcoreapp5.0 - - + + diff --git a/src/Http/Authentication.Abstractions/ref/Microsoft.AspNetCore.Authentication.Abstractions.netcoreapp3.0.cs b/src/Http/Authentication.Abstractions/ref/Microsoft.AspNetCore.Authentication.Abstractions.netcoreapp.cs similarity index 100% rename from src/Http/Authentication.Abstractions/ref/Microsoft.AspNetCore.Authentication.Abstractions.netcoreapp3.0.cs rename to src/Http/Authentication.Abstractions/ref/Microsoft.AspNetCore.Authentication.Abstractions.netcoreapp.cs diff --git a/src/Http/Authentication.Abstractions/src/Microsoft.AspNetCore.Authentication.Abstractions.csproj b/src/Http/Authentication.Abstractions/src/Microsoft.AspNetCore.Authentication.Abstractions.csproj index 4c295dc373..e50c15f1f2 100644 --- a/src/Http/Authentication.Abstractions/src/Microsoft.AspNetCore.Authentication.Abstractions.csproj +++ b/src/Http/Authentication.Abstractions/src/Microsoft.AspNetCore.Authentication.Abstractions.csproj @@ -1,7 +1,7 @@  ASP.NET Core common types used by the various authentication components. - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) true $(NoWarn);CS1591 true diff --git a/src/Http/Authentication.Core/ref/Microsoft.AspNetCore.Authentication.Core.csproj b/src/Http/Authentication.Core/ref/Microsoft.AspNetCore.Authentication.Core.csproj index 9f4bc43e08..4ad53ea166 100644 --- a/src/Http/Authentication.Core/ref/Microsoft.AspNetCore.Authentication.Core.csproj +++ b/src/Http/Authentication.Core/ref/Microsoft.AspNetCore.Authentication.Core.csproj @@ -1,10 +1,10 @@ - netcoreapp3.0 + netcoreapp5.0 - - + + diff --git a/src/Http/Authentication.Core/ref/Microsoft.AspNetCore.Authentication.Core.netcoreapp3.0.cs b/src/Http/Authentication.Core/ref/Microsoft.AspNetCore.Authentication.Core.netcoreapp.cs similarity index 100% rename from src/Http/Authentication.Core/ref/Microsoft.AspNetCore.Authentication.Core.netcoreapp3.0.cs rename to src/Http/Authentication.Core/ref/Microsoft.AspNetCore.Authentication.Core.netcoreapp.cs 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 ba87512a70..da7705d1a7 100644 --- a/src/Http/Authentication.Core/src/Microsoft.AspNetCore.Authentication.Core.csproj +++ b/src/Http/Authentication.Core/src/Microsoft.AspNetCore.Authentication.Core.csproj @@ -2,7 +2,7 @@ ASP.NET Core common types used by the various authentication middleware components. - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) true $(NoWarn);CS1591 true 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 ca122fdb44..ca55bdd85c 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 @@ -1,7 +1,7 @@ - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) diff --git a/src/Http/Headers/ref/Microsoft.Net.Http.Headers.csproj b/src/Http/Headers/ref/Microsoft.Net.Http.Headers.csproj index 4ac03925e9..76510cbd2a 100644 --- a/src/Http/Headers/ref/Microsoft.Net.Http.Headers.csproj +++ b/src/Http/Headers/ref/Microsoft.Net.Http.Headers.csproj @@ -1,10 +1,10 @@ - netcoreapp3.0 + netcoreapp5.0 - - + + diff --git a/src/Http/Headers/ref/Microsoft.Net.Http.Headers.netcoreapp3.0.cs b/src/Http/Headers/ref/Microsoft.Net.Http.Headers.netcoreapp.cs similarity index 100% rename from src/Http/Headers/ref/Microsoft.Net.Http.Headers.netcoreapp3.0.cs rename to src/Http/Headers/ref/Microsoft.Net.Http.Headers.netcoreapp.cs diff --git a/src/Http/Headers/src/Microsoft.Net.Http.Headers.csproj b/src/Http/Headers/src/Microsoft.Net.Http.Headers.csproj index 720ac8cecb..4c430cf233 100644 --- a/src/Http/Headers/src/Microsoft.Net.Http.Headers.csproj +++ b/src/Http/Headers/src/Microsoft.Net.Http.Headers.csproj @@ -2,7 +2,7 @@ HTTP header parser implementations. - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) true $(NoWarn);CS1591 true 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 06b6fecb95..40c26c701b 100644 --- a/src/Http/Headers/test/Microsoft.Net.Http.Headers.Tests.csproj +++ b/src/Http/Headers/test/Microsoft.Net.Http.Headers.Tests.csproj @@ -1,7 +1,7 @@ - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) diff --git a/src/Http/Http.Abstractions/ref/Microsoft.AspNetCore.Http.Abstractions.csproj b/src/Http/Http.Abstractions/ref/Microsoft.AspNetCore.Http.Abstractions.csproj index fe49c287c4..68123ae6e8 100644 --- a/src/Http/Http.Abstractions/ref/Microsoft.AspNetCore.Http.Abstractions.csproj +++ b/src/Http/Http.Abstractions/ref/Microsoft.AspNetCore.Http.Abstractions.csproj @@ -1,10 +1,10 @@ - netcoreapp3.0 + netcoreapp5.0 - - + + diff --git a/src/Http/Http.Abstractions/ref/Microsoft.AspNetCore.Http.Abstractions.netcoreapp3.0.cs b/src/Http/Http.Abstractions/ref/Microsoft.AspNetCore.Http.Abstractions.netcoreapp.cs similarity index 100% rename from src/Http/Http.Abstractions/ref/Microsoft.AspNetCore.Http.Abstractions.netcoreapp3.0.cs rename to src/Http/Http.Abstractions/ref/Microsoft.AspNetCore.Http.Abstractions.netcoreapp.cs diff --git a/src/Http/Http.Abstractions/src/Microsoft.AspNetCore.Http.Abstractions.csproj b/src/Http/Http.Abstractions/src/Microsoft.AspNetCore.Http.Abstractions.csproj index e328afbfac..503335eeb2 100644 --- a/src/Http/Http.Abstractions/src/Microsoft.AspNetCore.Http.Abstractions.csproj +++ b/src/Http/Http.Abstractions/src/Microsoft.AspNetCore.Http.Abstractions.csproj @@ -8,7 +8,7 @@ Microsoft.AspNetCore.Builder.IApplicationBuilder Microsoft.AspNetCore.Http.HttpContext Microsoft.AspNetCore.Http.HttpRequest Microsoft.AspNetCore.Http.HttpResponse - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) true true aspnetcore 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 962602a872..b8bfa1c1c8 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 @@ -1,7 +1,7 @@ - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) diff --git a/src/Http/Http.Extensions/ref/Microsoft.AspNetCore.Http.Extensions.csproj b/src/Http/Http.Extensions/ref/Microsoft.AspNetCore.Http.Extensions.csproj index bba8cc701e..93fb21a811 100644 --- a/src/Http/Http.Extensions/ref/Microsoft.AspNetCore.Http.Extensions.csproj +++ b/src/Http/Http.Extensions/ref/Microsoft.AspNetCore.Http.Extensions.csproj @@ -1,10 +1,10 @@ - netcoreapp3.0 + netcoreapp5.0 - - + + diff --git a/src/Http/Http.Extensions/ref/Microsoft.AspNetCore.Http.Extensions.netcoreapp3.0.cs b/src/Http/Http.Extensions/ref/Microsoft.AspNetCore.Http.Extensions.netcoreapp.cs similarity index 100% rename from src/Http/Http.Extensions/ref/Microsoft.AspNetCore.Http.Extensions.netcoreapp3.0.cs rename to src/Http/Http.Extensions/ref/Microsoft.AspNetCore.Http.Extensions.netcoreapp.cs diff --git a/src/Http/Http.Extensions/src/Microsoft.AspNetCore.Http.Extensions.csproj b/src/Http/Http.Extensions/src/Microsoft.AspNetCore.Http.Extensions.csproj index 2e9b744af2..8d548b8fa7 100644 --- a/src/Http/Http.Extensions/src/Microsoft.AspNetCore.Http.Extensions.csproj +++ b/src/Http/Http.Extensions/src/Microsoft.AspNetCore.Http.Extensions.csproj @@ -2,7 +2,7 @@ ASP.NET Core common extension methods for HTTP abstractions, HTTP headers, HTTP request/response, and session state. - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) true $(NoWarn);CS1591 true 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 1ef7469dba..19bf5e753a 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 @@ -1,7 +1,7 @@ - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) diff --git a/src/Http/Http.Features/ref/Microsoft.AspNetCore.Http.Features.csproj b/src/Http/Http.Features/ref/Microsoft.AspNetCore.Http.Features.csproj index 1e342f6be0..476cfebee7 100644 --- a/src/Http/Http.Features/ref/Microsoft.AspNetCore.Http.Features.csproj +++ b/src/Http/Http.Features/ref/Microsoft.AspNetCore.Http.Features.csproj @@ -1,15 +1,15 @@ - netstandard2.0;netcoreapp3.0 + netstandard2.0;netcoreapp5.0 - - + + diff --git a/src/Http/Http.Features/ref/Microsoft.AspNetCore.Http.Features.netcoreapp3.0.cs b/src/Http/Http.Features/ref/Microsoft.AspNetCore.Http.Features.netcoreapp.cs similarity index 100% rename from src/Http/Http.Features/ref/Microsoft.AspNetCore.Http.Features.netcoreapp3.0.cs rename to src/Http/Http.Features/ref/Microsoft.AspNetCore.Http.Features.netcoreapp.cs diff --git a/src/Http/Http.Features/src/Microsoft.AspNetCore.Http.Features.csproj b/src/Http/Http.Features/src/Microsoft.AspNetCore.Http.Features.csproj index ef0453fde1..74dc703d74 100644 --- a/src/Http/Http.Features/src/Microsoft.AspNetCore.Http.Features.csproj +++ b/src/Http/Http.Features/src/Microsoft.AspNetCore.Http.Features.csproj @@ -2,8 +2,8 @@ ASP.NET Core HTTP feature interface definitions. - netstandard2.0;netcoreapp3.0 - netcoreapp3.0 + netstandard2.0;$(DefaultNetCoreTargetFramework) + $(DefaultNetCoreTargetFramework) true $(NoWarn);CS1591 true diff --git a/src/Http/Http.Features/test/Microsoft.AspNetCore.Http.Features.Tests.csproj b/src/Http/Http.Features/test/Microsoft.AspNetCore.Http.Features.Tests.csproj index 6a80fe588a..1a041d50b7 100644 --- a/src/Http/Http.Features/test/Microsoft.AspNetCore.Http.Features.Tests.csproj +++ b/src/Http/Http.Features/test/Microsoft.AspNetCore.Http.Features.Tests.csproj @@ -1,7 +1,7 @@ - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) diff --git a/src/Http/Http/perf/Microsoft.AspNetCore.Http.Performance.csproj b/src/Http/Http/perf/Microsoft.AspNetCore.Http.Performance.csproj index 117496a75a..6a42bef5fe 100644 --- a/src/Http/Http/perf/Microsoft.AspNetCore.Http.Performance.csproj +++ b/src/Http/Http/perf/Microsoft.AspNetCore.Http.Performance.csproj @@ -1,7 +1,7 @@ - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) Exe true true diff --git a/src/Http/Http/ref/Microsoft.AspNetCore.Http.csproj b/src/Http/Http/ref/Microsoft.AspNetCore.Http.csproj index f59274ed7f..8b63679654 100644 --- a/src/Http/Http/ref/Microsoft.AspNetCore.Http.csproj +++ b/src/Http/Http/ref/Microsoft.AspNetCore.Http.csproj @@ -1,10 +1,10 @@ - netcoreapp3.0 + netcoreapp5.0 - - + + diff --git a/src/Http/Http/ref/Microsoft.AspNetCore.Http.netcoreapp3.0.cs b/src/Http/Http/ref/Microsoft.AspNetCore.Http.netcoreapp.cs similarity index 100% rename from src/Http/Http/ref/Microsoft.AspNetCore.Http.netcoreapp3.0.cs rename to src/Http/Http/ref/Microsoft.AspNetCore.Http.netcoreapp.cs diff --git a/src/Http/Http/src/Microsoft.AspNetCore.Http.csproj b/src/Http/Http/src/Microsoft.AspNetCore.Http.csproj index 83cacf0c19..ff7a345569 100644 --- a/src/Http/Http/src/Microsoft.AspNetCore.Http.csproj +++ b/src/Http/Http/src/Microsoft.AspNetCore.Http.csproj @@ -2,7 +2,7 @@ ASP.NET Core default HTTP feature implementations. - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) true $(NoWarn);CS1591 true diff --git a/src/Http/Http/test/Microsoft.AspNetCore.Http.Tests.csproj b/src/Http/Http/test/Microsoft.AspNetCore.Http.Tests.csproj index 888e8211e7..f85700528b 100644 --- a/src/Http/Http/test/Microsoft.AspNetCore.Http.Tests.csproj +++ b/src/Http/Http/test/Microsoft.AspNetCore.Http.Tests.csproj @@ -1,7 +1,7 @@ - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) true diff --git a/src/Http/Owin/ref/Microsoft.AspNetCore.Owin.csproj b/src/Http/Owin/ref/Microsoft.AspNetCore.Owin.csproj index d053acd1b3..4a89179fee 100644 --- a/src/Http/Owin/ref/Microsoft.AspNetCore.Owin.csproj +++ b/src/Http/Owin/ref/Microsoft.AspNetCore.Owin.csproj @@ -1,10 +1,10 @@ - netcoreapp3.0 + netcoreapp5.0 - - + + diff --git a/src/Http/Owin/ref/Microsoft.AspNetCore.Owin.netcoreapp3.0.cs b/src/Http/Owin/ref/Microsoft.AspNetCore.Owin.netcoreapp.cs similarity index 100% rename from src/Http/Owin/ref/Microsoft.AspNetCore.Owin.netcoreapp3.0.cs rename to src/Http/Owin/ref/Microsoft.AspNetCore.Owin.netcoreapp.cs diff --git a/src/Http/Owin/src/Microsoft.AspNetCore.Owin.csproj b/src/Http/Owin/src/Microsoft.AspNetCore.Owin.csproj index ef6d70075d..0baf3ca385 100644 --- a/src/Http/Owin/src/Microsoft.AspNetCore.Owin.csproj +++ b/src/Http/Owin/src/Microsoft.AspNetCore.Owin.csproj @@ -2,7 +2,7 @@ ASP.NET Core component for running OWIN middleware in an ASP.NET Core application, and to run ASP.NET Core middleware in an OWIN application. - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) $(NoWarn);CS1591 true aspnetcore;owin diff --git a/src/Http/Owin/test/Microsoft.AspNetCore.Owin.Tests.csproj b/src/Http/Owin/test/Microsoft.AspNetCore.Owin.Tests.csproj index b447a72968..f281b83195 100644 --- a/src/Http/Owin/test/Microsoft.AspNetCore.Owin.Tests.csproj +++ b/src/Http/Owin/test/Microsoft.AspNetCore.Owin.Tests.csproj @@ -1,7 +1,7 @@ - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) diff --git a/src/Http/Routing.Abstractions/ref/Microsoft.AspNetCore.Routing.Abstractions.csproj b/src/Http/Routing.Abstractions/ref/Microsoft.AspNetCore.Routing.Abstractions.csproj index 909f00e6e0..1bda3b9150 100644 --- a/src/Http/Routing.Abstractions/ref/Microsoft.AspNetCore.Routing.Abstractions.csproj +++ b/src/Http/Routing.Abstractions/ref/Microsoft.AspNetCore.Routing.Abstractions.csproj @@ -1,10 +1,10 @@ - netcoreapp3.0 + netcoreapp5.0 - - + + diff --git a/src/Http/Routing.Abstractions/ref/Microsoft.AspNetCore.Routing.Abstractions.netcoreapp3.0.cs b/src/Http/Routing.Abstractions/ref/Microsoft.AspNetCore.Routing.Abstractions.netcoreapp.cs similarity index 100% rename from src/Http/Routing.Abstractions/ref/Microsoft.AspNetCore.Routing.Abstractions.netcoreapp3.0.cs rename to src/Http/Routing.Abstractions/ref/Microsoft.AspNetCore.Routing.Abstractions.netcoreapp.cs diff --git a/src/Http/Routing.Abstractions/src/Microsoft.AspNetCore.Routing.Abstractions.csproj b/src/Http/Routing.Abstractions/src/Microsoft.AspNetCore.Routing.Abstractions.csproj index a0249fd7fd..630c13d6f3 100644 --- a/src/Http/Routing.Abstractions/src/Microsoft.AspNetCore.Routing.Abstractions.csproj +++ b/src/Http/Routing.Abstractions/src/Microsoft.AspNetCore.Routing.Abstractions.csproj @@ -5,7 +5,7 @@ Commonly used types: Microsoft.AspNetCore.Routing.IRouter Microsoft.AspNetCore.Routing.RouteData - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) true $(NoWarn);CS1591 true 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 4b9efd5989..ecaf259d84 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 @@ -1,7 +1,7 @@ - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) diff --git a/src/Http/Routing/perf/Microsoft.AspNetCore.Routing.Performance.csproj b/src/Http/Routing/perf/Microsoft.AspNetCore.Routing.Performance.csproj index 8e055a81d9..308dc68011 100644 --- a/src/Http/Routing/perf/Microsoft.AspNetCore.Routing.Performance.csproj +++ b/src/Http/Routing/perf/Microsoft.AspNetCore.Routing.Performance.csproj @@ -1,7 +1,7 @@  - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) Exe true true diff --git a/src/Http/Routing/ref/Microsoft.AspNetCore.Routing.csproj b/src/Http/Routing/ref/Microsoft.AspNetCore.Routing.csproj index a68d86a042..c90631b4b2 100644 --- a/src/Http/Routing/ref/Microsoft.AspNetCore.Routing.csproj +++ b/src/Http/Routing/ref/Microsoft.AspNetCore.Routing.csproj @@ -1,10 +1,10 @@ - netcoreapp3.0 + netcoreapp5.0 - - + + diff --git a/src/Http/Routing/ref/Microsoft.AspNetCore.Routing.netcoreapp3.0.cs b/src/Http/Routing/ref/Microsoft.AspNetCore.Routing.netcoreapp.cs similarity index 100% rename from src/Http/Routing/ref/Microsoft.AspNetCore.Routing.netcoreapp3.0.cs rename to src/Http/Routing/ref/Microsoft.AspNetCore.Routing.netcoreapp.cs diff --git a/src/Http/Routing/src/Microsoft.AspNetCore.Routing.csproj b/src/Http/Routing/src/Microsoft.AspNetCore.Routing.csproj index 70f62b2cfe..c1c3736f04 100644 --- a/src/Http/Routing/src/Microsoft.AspNetCore.Routing.csproj +++ b/src/Http/Routing/src/Microsoft.AspNetCore.Routing.csproj @@ -5,7 +5,7 @@ Commonly used types: Microsoft.AspNetCore.Routing.Route Microsoft.AspNetCore.Routing.RouteCollection - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) true $(NoWarn);CS1591 true 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 c281194c0c..571658d907 100644 --- a/src/Http/Routing/test/FunctionalTests/Microsoft.AspNetCore.Routing.FunctionalTests.csproj +++ b/src/Http/Routing/test/FunctionalTests/Microsoft.AspNetCore.Routing.FunctionalTests.csproj @@ -1,7 +1,7 @@ - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) 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 198d7624c3..b8de156a21 100644 --- a/src/Http/Routing/test/UnitTests/Microsoft.AspNetCore.Routing.Tests.csproj +++ b/src/Http/Routing/test/UnitTests/Microsoft.AspNetCore.Routing.Tests.csproj @@ -1,7 +1,7 @@  - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) Microsoft.AspNetCore.Routing true diff --git a/src/Http/Routing/test/testassets/Benchmarks/Benchmarks.csproj b/src/Http/Routing/test/testassets/Benchmarks/Benchmarks.csproj index 76b49714d4..8bab94164f 100644 --- a/src/Http/Routing/test/testassets/Benchmarks/Benchmarks.csproj +++ b/src/Http/Routing/test/testassets/Benchmarks/Benchmarks.csproj @@ -1,7 +1,7 @@  - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) $(BenchmarksTargetFramework) true diff --git a/src/Http/Routing/test/testassets/RoutingSandbox/RoutingSandbox.csproj b/src/Http/Routing/test/testassets/RoutingSandbox/RoutingSandbox.csproj index 36f27b2b9c..873236404f 100644 --- a/src/Http/Routing/test/testassets/RoutingSandbox/RoutingSandbox.csproj +++ b/src/Http/Routing/test/testassets/RoutingSandbox/RoutingSandbox.csproj @@ -1,7 +1,7 @@  - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) diff --git a/src/Http/Routing/test/testassets/RoutingWebSite/RoutingWebSite.csproj b/src/Http/Routing/test/testassets/RoutingWebSite/RoutingWebSite.csproj index 36f27b2b9c..873236404f 100644 --- a/src/Http/Routing/test/testassets/RoutingWebSite/RoutingWebSite.csproj +++ b/src/Http/Routing/test/testassets/RoutingWebSite/RoutingWebSite.csproj @@ -1,7 +1,7 @@  - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) diff --git a/src/Http/Routing/tools/Swaggatherer/Swaggatherer.csproj b/src/Http/Routing/tools/Swaggatherer/Swaggatherer.csproj index 80082abe89..cd256b125c 100644 --- a/src/Http/Routing/tools/Swaggatherer/Swaggatherer.csproj +++ b/src/Http/Routing/tools/Swaggatherer/Swaggatherer.csproj @@ -2,7 +2,7 @@ Exe - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) true diff --git a/src/Http/WebUtilities/perf/Microsoft.AspNetCore.WebUtilities.Performance/Microsoft.AspNetCore.WebUtilities.Performance.csproj b/src/Http/WebUtilities/perf/Microsoft.AspNetCore.WebUtilities.Performance/Microsoft.AspNetCore.WebUtilities.Performance.csproj index 3829484d8d..adbd0714f6 100644 --- a/src/Http/WebUtilities/perf/Microsoft.AspNetCore.WebUtilities.Performance/Microsoft.AspNetCore.WebUtilities.Performance.csproj +++ b/src/Http/WebUtilities/perf/Microsoft.AspNetCore.WebUtilities.Performance/Microsoft.AspNetCore.WebUtilities.Performance.csproj @@ -1,7 +1,7 @@  - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) Exe true true diff --git a/src/Http/WebUtilities/ref/Microsoft.AspNetCore.WebUtilities.csproj b/src/Http/WebUtilities/ref/Microsoft.AspNetCore.WebUtilities.csproj index e48d4616af..abff1e59e7 100644 --- a/src/Http/WebUtilities/ref/Microsoft.AspNetCore.WebUtilities.csproj +++ b/src/Http/WebUtilities/ref/Microsoft.AspNetCore.WebUtilities.csproj @@ -1,10 +1,10 @@ - netcoreapp3.0 + netcoreapp5.0 - - + + diff --git a/src/Http/WebUtilities/ref/Microsoft.AspNetCore.WebUtilities.netcoreapp3.0.cs b/src/Http/WebUtilities/ref/Microsoft.AspNetCore.WebUtilities.netcoreapp.cs similarity index 100% rename from src/Http/WebUtilities/ref/Microsoft.AspNetCore.WebUtilities.netcoreapp3.0.cs rename to src/Http/WebUtilities/ref/Microsoft.AspNetCore.WebUtilities.netcoreapp.cs diff --git a/src/Http/WebUtilities/src/Microsoft.AspNetCore.WebUtilities.csproj b/src/Http/WebUtilities/src/Microsoft.AspNetCore.WebUtilities.csproj index 8a6333619a..ac0cbab417 100644 --- a/src/Http/WebUtilities/src/Microsoft.AspNetCore.WebUtilities.csproj +++ b/src/Http/WebUtilities/src/Microsoft.AspNetCore.WebUtilities.csproj @@ -2,7 +2,7 @@ ASP.NET Core utilities, such as for working with forms, multipart messages, and query strings. - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) true $(DefineConstants);WebEncoders_In_WebUtilities $(NoWarn);CS1591 diff --git a/src/Http/WebUtilities/test/Microsoft.AspNetCore.WebUtilities.Tests.csproj b/src/Http/WebUtilities/test/Microsoft.AspNetCore.WebUtilities.Tests.csproj index dbea182d73..a82322d746 100644 --- a/src/Http/WebUtilities/test/Microsoft.AspNetCore.WebUtilities.Tests.csproj +++ b/src/Http/WebUtilities/test/Microsoft.AspNetCore.WebUtilities.Tests.csproj @@ -1,7 +1,7 @@  - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) diff --git a/src/Http/perf/Microbenchmarks/Microsoft.AspNetCore.Http.Microbenchmarks.csproj b/src/Http/perf/Microbenchmarks/Microsoft.AspNetCore.Http.Microbenchmarks.csproj index 7a31f1da5b..08e9b73b5f 100644 --- a/src/Http/perf/Microbenchmarks/Microsoft.AspNetCore.Http.Microbenchmarks.csproj +++ b/src/Http/perf/Microbenchmarks/Microsoft.AspNetCore.Http.Microbenchmarks.csproj @@ -2,7 +2,7 @@ Exe - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) diff --git a/src/Http/samples/SampleApp/HttpAbstractions.SampleApp.csproj b/src/Http/samples/SampleApp/HttpAbstractions.SampleApp.csproj index 60e2ddd0c5..b28850cf2f 100644 --- a/src/Http/samples/SampleApp/HttpAbstractions.SampleApp.csproj +++ b/src/Http/samples/SampleApp/HttpAbstractions.SampleApp.csproj @@ -1,7 +1,7 @@ - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) Exe diff --git a/src/Identity/ApiAuthorization.IdentityServer/samples/ApiAuthSample/ApiAuthSample.csproj b/src/Identity/ApiAuthorization.IdentityServer/samples/ApiAuthSample/ApiAuthSample.csproj index c9883821b4..fc7fd6784f 100644 --- a/src/Identity/ApiAuthorization.IdentityServer/samples/ApiAuthSample/ApiAuthSample.csproj +++ b/src/Identity/ApiAuthorization.IdentityServer/samples/ApiAuthSample/ApiAuthSample.csproj @@ -1,7 +1,7 @@  - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) aspnet-ApiAuthSample-12ED8ECC-9EF1-4D31-87B4-1405B3198E5E diff --git a/src/Identity/ApiAuthorization.IdentityServer/src/Microsoft.AspNetCore.ApiAuthorization.IdentityServer.csproj b/src/Identity/ApiAuthorization.IdentityServer/src/Microsoft.AspNetCore.ApiAuthorization.IdentityServer.csproj index 7c09a6e368..5efefb23bf 100644 --- a/src/Identity/ApiAuthorization.IdentityServer/src/Microsoft.AspNetCore.ApiAuthorization.IdentityServer.csproj +++ b/src/Identity/ApiAuthorization.IdentityServer/src/Microsoft.AspNetCore.ApiAuthorization.IdentityServer.csproj @@ -1,7 +1,7 @@  - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) ASP.NET Core API Authorization package powered by Identity Server. true aspnetcore;apiauth;identity diff --git a/src/Identity/ApiAuthorization.IdentityServer/test/Microsoft.AspNetCore.ApiAuthorization.IdentityServer.Tests.csproj b/src/Identity/ApiAuthorization.IdentityServer/test/Microsoft.AspNetCore.ApiAuthorization.IdentityServer.Tests.csproj index e2030d5620..e50086da71 100644 --- a/src/Identity/ApiAuthorization.IdentityServer/test/Microsoft.AspNetCore.ApiAuthorization.IdentityServer.Tests.csproj +++ b/src/Identity/ApiAuthorization.IdentityServer/test/Microsoft.AspNetCore.ApiAuthorization.IdentityServer.Tests.csproj @@ -1,7 +1,7 @@ - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) false diff --git a/src/Identity/Core/ref/Microsoft.AspNetCore.Identity.csproj b/src/Identity/Core/ref/Microsoft.AspNetCore.Identity.csproj index 29f919fbe6..0cd3412453 100644 --- a/src/Identity/Core/ref/Microsoft.AspNetCore.Identity.csproj +++ b/src/Identity/Core/ref/Microsoft.AspNetCore.Identity.csproj @@ -1,10 +1,10 @@ - netcoreapp3.0 + netcoreapp5.0 - - + + diff --git a/src/Identity/Core/ref/Microsoft.AspNetCore.Identity.netcoreapp3.0.cs b/src/Identity/Core/ref/Microsoft.AspNetCore.Identity.netcoreapp.cs similarity index 100% rename from src/Identity/Core/ref/Microsoft.AspNetCore.Identity.netcoreapp3.0.cs rename to src/Identity/Core/ref/Microsoft.AspNetCore.Identity.netcoreapp.cs diff --git a/src/Identity/Core/src/Microsoft.AspNetCore.Identity.csproj b/src/Identity/Core/src/Microsoft.AspNetCore.Identity.csproj index 1804604b76..844baa2030 100644 --- a/src/Identity/Core/src/Microsoft.AspNetCore.Identity.csproj +++ b/src/Identity/Core/src/Microsoft.AspNetCore.Identity.csproj @@ -2,7 +2,7 @@ ASP.NET Core Identity is the membership system for building ASP.NET Core web applications, including membership, login, and user data. ASP.NET Core Identity allows you to add login features to your application and makes it easy to customize data about the logged in user. - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) true true aspnetcore;identity;membership diff --git a/src/Identity/EntityFrameworkCore/ref/Microsoft.AspNetCore.Identity.EntityFrameworkCore.csproj b/src/Identity/EntityFrameworkCore/ref/Microsoft.AspNetCore.Identity.EntityFrameworkCore.csproj index 2550d6fc05..fb968b323e 100644 --- a/src/Identity/EntityFrameworkCore/ref/Microsoft.AspNetCore.Identity.EntityFrameworkCore.csproj +++ b/src/Identity/EntityFrameworkCore/ref/Microsoft.AspNetCore.Identity.EntityFrameworkCore.csproj @@ -1,15 +1,15 @@ - netstandard2.1;netcoreapp3.0 + netstandard2.1;netcoreapp5.0 - - + + diff --git a/src/Identity/EntityFrameworkCore/ref/Microsoft.AspNetCore.Identity.EntityFrameworkCore.netcoreapp3.0.cs b/src/Identity/EntityFrameworkCore/ref/Microsoft.AspNetCore.Identity.EntityFrameworkCore.netcoreapp.cs similarity index 100% rename from src/Identity/EntityFrameworkCore/ref/Microsoft.AspNetCore.Identity.EntityFrameworkCore.netcoreapp3.0.cs rename to src/Identity/EntityFrameworkCore/ref/Microsoft.AspNetCore.Identity.EntityFrameworkCore.netcoreapp.cs diff --git a/src/Identity/EntityFrameworkCore/src/Microsoft.AspNetCore.Identity.EntityFrameworkCore.csproj b/src/Identity/EntityFrameworkCore/src/Microsoft.AspNetCore.Identity.EntityFrameworkCore.csproj index 1f6877a044..87df2f8e9e 100644 --- a/src/Identity/EntityFrameworkCore/src/Microsoft.AspNetCore.Identity.EntityFrameworkCore.csproj +++ b/src/Identity/EntityFrameworkCore/src/Microsoft.AspNetCore.Identity.EntityFrameworkCore.csproj @@ -2,7 +2,7 @@ ASP.NET Core Identity provider that uses Entity Framework Core. - netstandard2.1;netcoreapp3.0 + netstandard2.1;$(DefaultNetCoreTargetFramework) true aspnetcore;entityframeworkcore;identity;membership true diff --git a/src/Identity/EntityFrameworkCore/test/EF.InMemory.Test/Microsoft.AspNetCore.Identity.EntityFrameworkCore.InMemory.Test.csproj b/src/Identity/EntityFrameworkCore/test/EF.InMemory.Test/Microsoft.AspNetCore.Identity.EntityFrameworkCore.InMemory.Test.csproj index e5ef39b41b..ea50aebe59 100644 --- a/src/Identity/EntityFrameworkCore/test/EF.InMemory.Test/Microsoft.AspNetCore.Identity.EntityFrameworkCore.InMemory.Test.csproj +++ b/src/Identity/EntityFrameworkCore/test/EF.InMemory.Test/Microsoft.AspNetCore.Identity.EntityFrameworkCore.InMemory.Test.csproj @@ -1,7 +1,7 @@  - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) diff --git a/src/Identity/EntityFrameworkCore/test/EF.Test/Microsoft.AspNetCore.Identity.EntityFrameworkCore.Test.csproj b/src/Identity/EntityFrameworkCore/test/EF.Test/Microsoft.AspNetCore.Identity.EntityFrameworkCore.Test.csproj index 8f724760cb..69d90764b5 100644 --- a/src/Identity/EntityFrameworkCore/test/EF.Test/Microsoft.AspNetCore.Identity.EntityFrameworkCore.Test.csproj +++ b/src/Identity/EntityFrameworkCore/test/EF.Test/Microsoft.AspNetCore.Identity.EntityFrameworkCore.Test.csproj @@ -1,7 +1,7 @@ - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) diff --git a/src/Identity/Extensions.Core/ref/Microsoft.Extensions.Identity.Core.csproj b/src/Identity/Extensions.Core/ref/Microsoft.Extensions.Identity.Core.csproj index 50615ee4e1..1c9a519e22 100644 --- a/src/Identity/Extensions.Core/ref/Microsoft.Extensions.Identity.Core.csproj +++ b/src/Identity/Extensions.Core/ref/Microsoft.Extensions.Identity.Core.csproj @@ -1,7 +1,7 @@ - netstandard2.0;netcoreapp3.0 + netstandard2.0;netcoreapp5.0 @@ -9,8 +9,8 @@ - - + + diff --git a/src/Identity/Extensions.Core/ref/Microsoft.Extensions.Identity.Core.netcoreapp3.0.cs b/src/Identity/Extensions.Core/ref/Microsoft.Extensions.Identity.Core.netcoreapp.cs similarity index 100% rename from src/Identity/Extensions.Core/ref/Microsoft.Extensions.Identity.Core.netcoreapp3.0.cs rename to src/Identity/Extensions.Core/ref/Microsoft.Extensions.Identity.Core.netcoreapp.cs diff --git a/src/Identity/Extensions.Core/src/Microsoft.Extensions.Identity.Core.csproj b/src/Identity/Extensions.Core/src/Microsoft.Extensions.Identity.Core.csproj index fec5c078c8..7fab931436 100644 --- a/src/Identity/Extensions.Core/src/Microsoft.Extensions.Identity.Core.csproj +++ b/src/Identity/Extensions.Core/src/Microsoft.Extensions.Identity.Core.csproj @@ -2,8 +2,8 @@ ASP.NET Core Identity is the membership system for building ASP.NET Core web applications, including membership, login, and user data. ASP.NET Core Identity allows you to add login features to your application and makes it easy to customize data about the logged in user. - netstandard2.0;netcoreapp3.0 - netcoreapp3.0 + netstandard2.0;$(DefaultNetCoreTargetFramework) + $(DefaultNetCoreTargetFramework) true true true diff --git a/src/Identity/Extensions.Core/src/PasswordHasher.cs b/src/Identity/Extensions.Core/src/PasswordHasher.cs index 54c7fd2126..00d92952a3 100644 --- a/src/Identity/Extensions.Core/src/PasswordHasher.cs +++ b/src/Identity/Extensions.Core/src/PasswordHasher.cs @@ -246,7 +246,7 @@ namespace Microsoft.AspNetCore.Identity byte[] actualSubkey = KeyDerivation.Pbkdf2(password, salt, Pbkdf2Prf, Pbkdf2IterCount, Pbkdf2SubkeyLength); #if NETSTANDARD2_0 return ByteArraysEqual(actualSubkey, expectedSubkey); -#elif NETCOREAPP3_0 +#elif NETCOREAPP return CryptographicOperations.FixedTimeEquals(actualSubkey, expectedSubkey); #else #error Update target frameworks @@ -285,7 +285,7 @@ namespace Microsoft.AspNetCore.Identity byte[] actualSubkey = KeyDerivation.Pbkdf2(password, salt, prf, iterCount, subkeyLength); #if NETSTANDARD2_0 return ByteArraysEqual(actualSubkey, expectedSubkey); -#elif NETCOREAPP3_0 +#elif NETCOREAPP return CryptographicOperations.FixedTimeEquals(actualSubkey, expectedSubkey); #else #error Update target frameworks diff --git a/src/Identity/Extensions.Stores/ref/Microsoft.Extensions.Identity.Stores.csproj b/src/Identity/Extensions.Stores/ref/Microsoft.Extensions.Identity.Stores.csproj index 7a0f728cb4..167609e4d7 100644 --- a/src/Identity/Extensions.Stores/ref/Microsoft.Extensions.Identity.Stores.csproj +++ b/src/Identity/Extensions.Stores/ref/Microsoft.Extensions.Identity.Stores.csproj @@ -1,15 +1,15 @@ - netstandard2.0;netcoreapp3.0 + netstandard2.0;netcoreapp5.0 - - + + diff --git a/src/Identity/Extensions.Stores/ref/Microsoft.Extensions.Identity.Stores.netcoreapp3.0.cs b/src/Identity/Extensions.Stores/ref/Microsoft.Extensions.Identity.Stores.netcoreapp.cs similarity index 100% rename from src/Identity/Extensions.Stores/ref/Microsoft.Extensions.Identity.Stores.netcoreapp3.0.cs rename to src/Identity/Extensions.Stores/ref/Microsoft.Extensions.Identity.Stores.netcoreapp.cs diff --git a/src/Identity/Extensions.Stores/src/Microsoft.Extensions.Identity.Stores.csproj b/src/Identity/Extensions.Stores/src/Microsoft.Extensions.Identity.Stores.csproj index 49955dc48b..13e5b4d34b 100644 --- a/src/Identity/Extensions.Stores/src/Microsoft.Extensions.Identity.Stores.csproj +++ b/src/Identity/Extensions.Stores/src/Microsoft.Extensions.Identity.Stores.csproj @@ -2,8 +2,8 @@ ASP.NET Core Identity is the membership system for building ASP.NET Core web applications, including membership, login, and user data. ASP.NET Core Identity allows you to add login features to your application and makes it easy to customize data about the logged in user. - netstandard2.0;netcoreapp3.0 - netcoreapp3.0 + netstandard2.0;$(DefaultNetCoreTargetFramework) + $(DefaultNetCoreTargetFramework) true true true 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 bb443edec0..0440e8914a 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 @@ -2,7 +2,7 @@ Shared test suite for Asp.Net Identity Core store implementations. - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) true aspnetcore;identity;membership false diff --git a/src/Identity/UI/ref/Microsoft.AspNetCore.Identity.UI.csproj b/src/Identity/UI/ref/Microsoft.AspNetCore.Identity.UI.csproj index 4ae55abe9a..b3a8c89be5 100644 --- a/src/Identity/UI/ref/Microsoft.AspNetCore.Identity.UI.csproj +++ b/src/Identity/UI/ref/Microsoft.AspNetCore.Identity.UI.csproj @@ -1,10 +1,10 @@ - netcoreapp3.0 + netcoreapp5.0 - - + + diff --git a/src/Identity/UI/ref/Microsoft.AspNetCore.Identity.UI.netcoreapp3.0.cs b/src/Identity/UI/ref/Microsoft.AspNetCore.Identity.UI.netcoreapp.cs similarity index 100% rename from src/Identity/UI/ref/Microsoft.AspNetCore.Identity.UI.netcoreapp3.0.cs rename to src/Identity/UI/ref/Microsoft.AspNetCore.Identity.UI.netcoreapp.cs diff --git a/src/Identity/UI/src/Areas/Identity/Pages/V3/Account/ExternalLogin.cshtml b/src/Identity/UI/src/Areas/Identity/Pages/V3/Account/ExternalLogin.cshtml index e0053be7fd..f73e2fe556 100644 --- a/src/Identity/UI/src/Areas/Identity/Pages/V3/Account/ExternalLogin.cshtml +++ b/src/Identity/UI/src/Areas/Identity/Pages/V3/Account/ExternalLogin.cshtml @@ -17,7 +17,7 @@
-
+
diff --git a/src/Identity/UI/src/Areas/Identity/Pages/V3/Account/ForgotPassword.cshtml b/src/Identity/UI/src/Areas/Identity/Pages/V3/Account/ForgotPassword.cshtml index b938724210..7541125984 100644 --- a/src/Identity/UI/src/Areas/Identity/Pages/V3/Account/ForgotPassword.cshtml +++ b/src/Identity/UI/src/Areas/Identity/Pages/V3/Account/ForgotPassword.cshtml @@ -10,7 +10,7 @@
-
+
diff --git a/src/Identity/UI/src/Areas/Identity/Pages/V3/Account/Login.cshtml b/src/Identity/UI/src/Areas/Identity/Pages/V3/Account/Login.cshtml index a58edae8a8..8ebfba2d1b 100644 --- a/src/Identity/UI/src/Areas/Identity/Pages/V3/Account/Login.cshtml +++ b/src/Identity/UI/src/Areas/Identity/Pages/V3/Account/Login.cshtml @@ -12,7 +12,7 @@

Use a local account to log in.


-
+
diff --git a/src/Identity/UI/src/Areas/Identity/Pages/V3/Account/LoginWith2fa.cshtml b/src/Identity/UI/src/Areas/Identity/Pages/V3/Account/LoginWith2fa.cshtml index 94242c929e..28b23ae8e1 100644 --- a/src/Identity/UI/src/Areas/Identity/Pages/V3/Account/LoginWith2fa.cshtml +++ b/src/Identity/UI/src/Areas/Identity/Pages/V3/Account/LoginWith2fa.cshtml @@ -11,7 +11,7 @@
-
+
diff --git a/src/Identity/UI/src/Areas/Identity/Pages/V3/Account/LoginWithRecoveryCode.cshtml b/src/Identity/UI/src/Areas/Identity/Pages/V3/Account/LoginWithRecoveryCode.cshtml index abaad2a4d4..9f0e526bcf 100644 --- a/src/Identity/UI/src/Areas/Identity/Pages/V3/Account/LoginWithRecoveryCode.cshtml +++ b/src/Identity/UI/src/Areas/Identity/Pages/V3/Account/LoginWithRecoveryCode.cshtml @@ -13,7 +13,7 @@
-
+
diff --git a/src/Identity/UI/src/Areas/Identity/Pages/V3/Account/Manage/ChangePassword.cshtml b/src/Identity/UI/src/Areas/Identity/Pages/V3/Account/Manage/ChangePassword.cshtml index 701c1ea457..0cdc9c97a7 100644 --- a/src/Identity/UI/src/Areas/Identity/Pages/V3/Account/Manage/ChangePassword.cshtml +++ b/src/Identity/UI/src/Areas/Identity/Pages/V3/Account/Manage/ChangePassword.cshtml @@ -10,7 +10,7 @@
-
+
diff --git a/src/Identity/UI/src/Areas/Identity/Pages/V3/Account/Manage/DeletePersonalData.cshtml b/src/Identity/UI/src/Areas/Identity/Pages/V3/Account/Manage/DeletePersonalData.cshtml index e1a2b7a8a2..4939c7fd5a 100644 --- a/src/Identity/UI/src/Areas/Identity/Pages/V3/Account/Manage/DeletePersonalData.cshtml +++ b/src/Identity/UI/src/Areas/Identity/Pages/V3/Account/Manage/DeletePersonalData.cshtml @@ -16,7 +16,7 @@
-
+
@if (Model.RequirePassword) {
diff --git a/src/Identity/UI/src/Areas/Identity/Pages/V3/Account/Manage/Index.cshtml b/src/Identity/UI/src/Areas/Identity/Pages/V3/Account/Manage/Index.cshtml index 19ac1a296e..2adbdecf6f 100644 --- a/src/Identity/UI/src/Areas/Identity/Pages/V3/Account/Manage/Index.cshtml +++ b/src/Identity/UI/src/Areas/Identity/Pages/V3/Account/Manage/Index.cshtml @@ -10,7 +10,7 @@
-
+
diff --git a/src/Identity/UI/src/Areas/Identity/Pages/V3/Account/Manage/SetPassword.cshtml b/src/Identity/UI/src/Areas/Identity/Pages/V3/Account/Manage/SetPassword.cshtml index 31632c3860..e82ce19df5 100644 --- a/src/Identity/UI/src/Areas/Identity/Pages/V3/Account/Manage/SetPassword.cshtml +++ b/src/Identity/UI/src/Areas/Identity/Pages/V3/Account/Manage/SetPassword.cshtml @@ -14,7 +14,7 @@
-
+
diff --git a/src/Identity/UI/src/Areas/Identity/Pages/V3/Account/Register.cshtml b/src/Identity/UI/src/Areas/Identity/Pages/V3/Account/Register.cshtml index cf6a7c6e96..78415afe1a 100644 --- a/src/Identity/UI/src/Areas/Identity/Pages/V3/Account/Register.cshtml +++ b/src/Identity/UI/src/Areas/Identity/Pages/V3/Account/Register.cshtml @@ -11,7 +11,7 @@

Create a new account.


-
+
diff --git a/src/Identity/UI/src/Areas/Identity/Pages/V3/Account/ResetPassword.cshtml b/src/Identity/UI/src/Areas/Identity/Pages/V3/Account/ResetPassword.cshtml index 5ccb61edcf..97629b27cd 100644 --- a/src/Identity/UI/src/Areas/Identity/Pages/V3/Account/ResetPassword.cshtml +++ b/src/Identity/UI/src/Areas/Identity/Pages/V3/Account/ResetPassword.cshtml @@ -10,7 +10,7 @@
-
+
diff --git a/src/Identity/UI/src/Areas/Identity/Pages/V4/Account/ExternalLogin.cshtml b/src/Identity/UI/src/Areas/Identity/Pages/V4/Account/ExternalLogin.cshtml index d92664c31c..7579138faa 100644 --- a/src/Identity/UI/src/Areas/Identity/Pages/V4/Account/ExternalLogin.cshtml +++ b/src/Identity/UI/src/Areas/Identity/Pages/V4/Account/ExternalLogin.cshtml @@ -17,7 +17,7 @@
-
+
diff --git a/src/Identity/UI/src/Areas/Identity/Pages/V4/Account/ForgotPassword.cshtml b/src/Identity/UI/src/Areas/Identity/Pages/V4/Account/ForgotPassword.cshtml index d3eb7ce65d..4570844df8 100644 --- a/src/Identity/UI/src/Areas/Identity/Pages/V4/Account/ForgotPassword.cshtml +++ b/src/Identity/UI/src/Areas/Identity/Pages/V4/Account/ForgotPassword.cshtml @@ -10,7 +10,7 @@
-
+
diff --git a/src/Identity/UI/src/Areas/Identity/Pages/V4/Account/Login.cshtml b/src/Identity/UI/src/Areas/Identity/Pages/V4/Account/Login.cshtml index b98655e0f6..7db2738277 100644 --- a/src/Identity/UI/src/Areas/Identity/Pages/V4/Account/Login.cshtml +++ b/src/Identity/UI/src/Areas/Identity/Pages/V4/Account/Login.cshtml @@ -12,7 +12,7 @@

Use a local account to log in.


-
+
diff --git a/src/Identity/UI/src/Areas/Identity/Pages/V4/Account/LoginWith2fa.cshtml b/src/Identity/UI/src/Areas/Identity/Pages/V4/Account/LoginWith2fa.cshtml index b5508902f6..5cc2aa2d13 100644 --- a/src/Identity/UI/src/Areas/Identity/Pages/V4/Account/LoginWith2fa.cshtml +++ b/src/Identity/UI/src/Areas/Identity/Pages/V4/Account/LoginWith2fa.cshtml @@ -11,7 +11,7 @@
-
+
diff --git a/src/Identity/UI/src/Areas/Identity/Pages/V4/Account/LoginWithRecoveryCode.cshtml b/src/Identity/UI/src/Areas/Identity/Pages/V4/Account/LoginWithRecoveryCode.cshtml index 957f72b00f..5947903f87 100644 --- a/src/Identity/UI/src/Areas/Identity/Pages/V4/Account/LoginWithRecoveryCode.cshtml +++ b/src/Identity/UI/src/Areas/Identity/Pages/V4/Account/LoginWithRecoveryCode.cshtml @@ -13,7 +13,7 @@
-
+
diff --git a/src/Identity/UI/src/Areas/Identity/Pages/V4/Account/Manage/ChangePassword.cshtml b/src/Identity/UI/src/Areas/Identity/Pages/V4/Account/Manage/ChangePassword.cshtml index 07e23b117c..4d5dda19ec 100644 --- a/src/Identity/UI/src/Areas/Identity/Pages/V4/Account/Manage/ChangePassword.cshtml +++ b/src/Identity/UI/src/Areas/Identity/Pages/V4/Account/Manage/ChangePassword.cshtml @@ -10,7 +10,7 @@
-
+
diff --git a/src/Identity/UI/src/Areas/Identity/Pages/V4/Account/Manage/DeletePersonalData.cshtml b/src/Identity/UI/src/Areas/Identity/Pages/V4/Account/Manage/DeletePersonalData.cshtml index e1896604ff..abcd16a82f 100644 --- a/src/Identity/UI/src/Areas/Identity/Pages/V4/Account/Manage/DeletePersonalData.cshtml +++ b/src/Identity/UI/src/Areas/Identity/Pages/V4/Account/Manage/DeletePersonalData.cshtml @@ -15,7 +15,7 @@
-
+
@if (Model.RequirePassword) {
diff --git a/src/Identity/UI/src/Areas/Identity/Pages/V4/Account/Manage/Index.cshtml b/src/Identity/UI/src/Areas/Identity/Pages/V4/Account/Manage/Index.cshtml index dd25959817..1c125b18f7 100644 --- a/src/Identity/UI/src/Areas/Identity/Pages/V4/Account/Manage/Index.cshtml +++ b/src/Identity/UI/src/Areas/Identity/Pages/V4/Account/Manage/Index.cshtml @@ -10,7 +10,7 @@
-
+
diff --git a/src/Identity/UI/src/Areas/Identity/Pages/V4/Account/Manage/SetPassword.cshtml b/src/Identity/UI/src/Areas/Identity/Pages/V4/Account/Manage/SetPassword.cshtml index 2a42c34f36..593526746e 100644 --- a/src/Identity/UI/src/Areas/Identity/Pages/V4/Account/Manage/SetPassword.cshtml +++ b/src/Identity/UI/src/Areas/Identity/Pages/V4/Account/Manage/SetPassword.cshtml @@ -14,7 +14,7 @@
-
+
diff --git a/src/Identity/UI/src/Areas/Identity/Pages/V4/Account/Register.cshtml b/src/Identity/UI/src/Areas/Identity/Pages/V4/Account/Register.cshtml index 99620a5836..0a2f84f935 100644 --- a/src/Identity/UI/src/Areas/Identity/Pages/V4/Account/Register.cshtml +++ b/src/Identity/UI/src/Areas/Identity/Pages/V4/Account/Register.cshtml @@ -11,7 +11,7 @@

Create a new account.


-
+
diff --git a/src/Identity/UI/src/Areas/Identity/Pages/V4/Account/ResetPassword.cshtml b/src/Identity/UI/src/Areas/Identity/Pages/V4/Account/ResetPassword.cshtml index 3202efb8ec..953261844b 100644 --- a/src/Identity/UI/src/Areas/Identity/Pages/V4/Account/ResetPassword.cshtml +++ b/src/Identity/UI/src/Areas/Identity/Pages/V4/Account/ResetPassword.cshtml @@ -10,7 +10,7 @@
-
+
diff --git a/src/Identity/UI/src/Microsoft.AspNetCore.Identity.UI.csproj b/src/Identity/UI/src/Microsoft.AspNetCore.Identity.UI.csproj index 3b2154e8f1..d803f42f5a 100644 --- a/src/Identity/UI/src/Microsoft.AspNetCore.Identity.UI.csproj +++ b/src/Identity/UI/src/Microsoft.AspNetCore.Identity.UI.csproj @@ -3,7 +3,7 @@ ASP.NET Core Identity UI is the default Razor Pages built-in UI for the ASP.NET Core Identity framework. Compiled Razor views assembly for the ASP.NET Core Identity UI package. - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) true aspnetcore;identity;membership;razorpages true diff --git a/src/Identity/samples/IdentitySample.DefaultUI/Areas/Identity/Pages/Account/Manage/Index.cshtml b/src/Identity/samples/IdentitySample.DefaultUI/Areas/Identity/Pages/Account/Manage/Index.cshtml index 6b2de21b43..23593ab99a 100644 --- a/src/Identity/samples/IdentitySample.DefaultUI/Areas/Identity/Pages/Account/Manage/Index.cshtml +++ b/src/Identity/samples/IdentitySample.DefaultUI/Areas/Identity/Pages/Account/Manage/Index.cshtml @@ -9,7 +9,7 @@
-
+
diff --git a/src/Identity/samples/IdentitySample.DefaultUI/Areas/Identity/Pages/Account/Register.cshtml b/src/Identity/samples/IdentitySample.DefaultUI/Areas/Identity/Pages/Account/Register.cshtml index 259373e966..42297ce4d6 100644 --- a/src/Identity/samples/IdentitySample.DefaultUI/Areas/Identity/Pages/Account/Register.cshtml +++ b/src/Identity/samples/IdentitySample.DefaultUI/Areas/Identity/Pages/Account/Register.cshtml @@ -11,7 +11,7 @@

Create a new account.


-
+
diff --git a/src/Identity/samples/IdentitySample.DefaultUI/IdentitySample.DefaultUI.csproj b/src/Identity/samples/IdentitySample.DefaultUI/IdentitySample.DefaultUI.csproj index 5512886233..f5b5354906 100644 --- a/src/Identity/samples/IdentitySample.DefaultUI/IdentitySample.DefaultUI.csproj +++ b/src/Identity/samples/IdentitySample.DefaultUI/IdentitySample.DefaultUI.csproj @@ -2,7 +2,7 @@ Identity sample MVC application on ASP.NET Core using the default UI - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) aspnetcore-2ff9bc27-5e8c-4484-90ca-e3aace89b72a Bootstrap4 diff --git a/src/Identity/samples/IdentitySample.Mvc/IdentitySample.Mvc.csproj b/src/Identity/samples/IdentitySample.Mvc/IdentitySample.Mvc.csproj index b78dc55331..cfd9be2a03 100644 --- a/src/Identity/samples/IdentitySample.Mvc/IdentitySample.Mvc.csproj +++ b/src/Identity/samples/IdentitySample.Mvc/IdentitySample.Mvc.csproj @@ -2,7 +2,7 @@ Identity sample MVC application on ASP.NET Core - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) aspnetcore-b3d20cbe-418e-4bf2-a0f4-57f91d067e07 diff --git a/src/Identity/samples/IdentitySample.Mvc/Views/Account/ExternalLoginConfirmation.cshtml b/src/Identity/samples/IdentitySample.Mvc/Views/Account/ExternalLoginConfirmation.cshtml index 0bd3f75c1a..c9151a4239 100644 --- a/src/Identity/samples/IdentitySample.Mvc/Views/Account/ExternalLoginConfirmation.cshtml +++ b/src/Identity/samples/IdentitySample.Mvc/Views/Account/ExternalLoginConfirmation.cshtml @@ -9,7 +9,7 @@

Association Form


-
+

You've successfully authenticated with @ViewData["ProviderDisplayName"]. diff --git a/src/Identity/samples/IdentitySample.Mvc/Views/Account/ForgotPassword.cshtml b/src/Identity/samples/IdentitySample.Mvc/Views/Account/ForgotPassword.cshtml index 5603e2a08c..74f769a750 100644 --- a/src/Identity/samples/IdentitySample.Mvc/Views/Account/ForgotPassword.cshtml +++ b/src/Identity/samples/IdentitySample.Mvc/Views/Account/ForgotPassword.cshtml @@ -11,7 +11,7 @@ @*

Enter your email.


-
+
diff --git a/src/Identity/samples/IdentitySample.Mvc/Views/Account/Login.cshtml b/src/Identity/samples/IdentitySample.Mvc/Views/Account/Login.cshtml index b8803908e1..92e5a4a89a 100644 --- a/src/Identity/samples/IdentitySample.Mvc/Views/Account/Login.cshtml +++ b/src/Identity/samples/IdentitySample.Mvc/Views/Account/Login.cshtml @@ -15,7 +15,7 @@

Use a local account to log in.


-
+
diff --git a/src/Identity/samples/IdentitySample.Mvc/Views/Account/Register.cshtml b/src/Identity/samples/IdentitySample.Mvc/Views/Account/Register.cshtml index 44e11d6955..f2d23a465c 100644 --- a/src/Identity/samples/IdentitySample.Mvc/Views/Account/Register.cshtml +++ b/src/Identity/samples/IdentitySample.Mvc/Views/Account/Register.cshtml @@ -8,7 +8,7 @@

Create a new account.


-
+
diff --git a/src/Identity/samples/IdentitySample.Mvc/Views/Account/ResetPassword.cshtml b/src/Identity/samples/IdentitySample.Mvc/Views/Account/ResetPassword.cshtml index 343fcd8d33..c815424623 100644 --- a/src/Identity/samples/IdentitySample.Mvc/Views/Account/ResetPassword.cshtml +++ b/src/Identity/samples/IdentitySample.Mvc/Views/Account/ResetPassword.cshtml @@ -8,7 +8,7 @@

Reset your password.


-
+
diff --git a/src/Identity/samples/IdentitySample.Mvc/Views/Account/UseRecoveryCode.cshtml b/src/Identity/samples/IdentitySample.Mvc/Views/Account/UseRecoveryCode.cshtml index 7c74d72a23..dd52938373 100644 --- a/src/Identity/samples/IdentitySample.Mvc/Views/Account/UseRecoveryCode.cshtml +++ b/src/Identity/samples/IdentitySample.Mvc/Views/Account/UseRecoveryCode.cshtml @@ -6,7 +6,7 @@

@ViewData["Title"].

-
+

@ViewData["Status"]


diff --git a/src/Identity/samples/IdentitySample.Mvc/Views/Account/VerifyAuthenticatorCode.cshtml b/src/Identity/samples/IdentitySample.Mvc/Views/Account/VerifyAuthenticatorCode.cshtml index f675dd1535..04ead74dbb 100644 --- a/src/Identity/samples/IdentitySample.Mvc/Views/Account/VerifyAuthenticatorCode.cshtml +++ b/src/Identity/samples/IdentitySample.Mvc/Views/Account/VerifyAuthenticatorCode.cshtml @@ -6,7 +6,7 @@

@ViewData["Title"].

-
+

@ViewData["Status"]


diff --git a/src/Identity/samples/IdentitySample.Mvc/Views/Account/VerifyCode.cshtml b/src/Identity/samples/IdentitySample.Mvc/Views/Account/VerifyCode.cshtml index 330a659ca7..4f15eda730 100644 --- a/src/Identity/samples/IdentitySample.Mvc/Views/Account/VerifyCode.cshtml +++ b/src/Identity/samples/IdentitySample.Mvc/Views/Account/VerifyCode.cshtml @@ -6,7 +6,7 @@

@ViewData["Title"].

-
+

@ViewData["Status"]

diff --git a/src/Identity/samples/IdentitySample.Mvc/Views/Manage/AddPhoneNumber.cshtml b/src/Identity/samples/IdentitySample.Mvc/Views/Manage/AddPhoneNumber.cshtml index 40885f3832..679dcb0a05 100644 --- a/src/Identity/samples/IdentitySample.Mvc/Views/Manage/AddPhoneNumber.cshtml +++ b/src/Identity/samples/IdentitySample.Mvc/Views/Manage/AddPhoneNumber.cshtml @@ -7,7 +7,7 @@

Add a phone number.


-
+
diff --git a/src/Identity/samples/IdentitySample.Mvc/Views/Manage/ChangePassword.cshtml b/src/Identity/samples/IdentitySample.Mvc/Views/Manage/ChangePassword.cshtml index a8d076821b..4d3b38c13c 100644 --- a/src/Identity/samples/IdentitySample.Mvc/Views/Manage/ChangePassword.cshtml +++ b/src/Identity/samples/IdentitySample.Mvc/Views/Manage/ChangePassword.cshtml @@ -8,7 +8,7 @@

Change Password Form


-
+
diff --git a/src/Identity/samples/IdentitySample.Mvc/Views/Manage/SetPassword.cshtml b/src/Identity/samples/IdentitySample.Mvc/Views/Manage/SetPassword.cshtml index d1a1b77a44..ccd5781882 100644 --- a/src/Identity/samples/IdentitySample.Mvc/Views/Manage/SetPassword.cshtml +++ b/src/Identity/samples/IdentitySample.Mvc/Views/Manage/SetPassword.cshtml @@ -11,7 +11,7 @@

Set your password


-
+
diff --git a/src/Identity/samples/IdentitySample.Mvc/Views/Manage/VerifyPhoneNumber.cshtml b/src/Identity/samples/IdentitySample.Mvc/Views/Manage/VerifyPhoneNumber.cshtml index 076c20562c..6c4718a6f7 100644 --- a/src/Identity/samples/IdentitySample.Mvc/Views/Manage/VerifyPhoneNumber.cshtml +++ b/src/Identity/samples/IdentitySample.Mvc/Views/Manage/VerifyPhoneNumber.cshtml @@ -10,7 +10,7 @@

Add a phone number.

@ViewData["Status"]

-
+
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 534f1b50a5..a69bb12e4a 100644 --- a/src/Identity/test/Identity.FunctionalTests/Microsoft.AspNetCore.Identity.FunctionalTests.csproj +++ b/src/Identity/test/Identity.FunctionalTests/Microsoft.AspNetCore.Identity.FunctionalTests.csproj @@ -1,7 +1,7 @@  - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) true @@ -63,9 +63,9 @@ - <_PublishFiles Include="$(ArtifactsBinDir)Microsoft.AspNetCore.Identity.UI\$(Configuration)\netcoreapp3.0\Microsoft.AspNetCore.Identity.UI.Views.*.dll" /> - <_PublishFiles Include="$(ArtifactsBinDir)Identity.DefaultUI.WebSite\$(Configuration)\netcoreapp3.0\Identity.DefaultUI.WebSite.deps.json" /> - <_PublishFiles Include="$(ArtifactsBinDir)Identity.DefaultUI.WebSite\$(Configuration)\netcoreapp3.0\Identity.DefaultUI.WebSite.deps.json" /> + <_PublishFiles Include="$(ArtifactsBinDir)Microsoft.AspNetCore.Identity.UI\$(Configuration)\$(DefaultNetCoreTargetFramework)\Microsoft.AspNetCore.Identity.UI.Views.*.dll" /> + <_PublishFiles Include="$(ArtifactsBinDir)Identity.DefaultUI.WebSite\$(Configuration)\$(DefaultNetCoreTargetFramework)\Identity.DefaultUI.WebSite.deps.json" /> + <_PublishFiles Include="$(ArtifactsBinDir)Identity.DefaultUI.WebSite\$(Configuration)\$(DefaultNetCoreTargetFramework)\Identity.DefaultUI.WebSite.deps.json" /> <_wwwrootFiles Include="$(MSBuildThisFileDirectory)..\..\testassets\Identity.DefaultUI.WebSite\wwwroot\**\*.*" /> <_PagesFiles Include="$(MSBuildThisFileDirectory)..\..\testassets\Identity.DefaultUI.WebSite\Pages\**\*.*" /> <_IdentityUIContent Include="$(MSBuildThisFileDirectory)..\..\UI\src\wwwroot\**\*" /> diff --git a/src/Identity/test/Identity.Test/Microsoft.AspNetCore.Identity.Test.csproj b/src/Identity/test/Identity.Test/Microsoft.AspNetCore.Identity.Test.csproj index 9ed81cbcb8..bf30305d68 100644 --- a/src/Identity/test/Identity.Test/Microsoft.AspNetCore.Identity.Test.csproj +++ b/src/Identity/test/Identity.Test/Microsoft.AspNetCore.Identity.Test.csproj @@ -1,7 +1,7 @@ - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) diff --git a/src/Identity/test/InMemory.Test/Microsoft.AspNetCore.Identity.InMemory.Test.csproj b/src/Identity/test/InMemory.Test/Microsoft.AspNetCore.Identity.InMemory.Test.csproj index 4026796ab7..3acb0ea06c 100644 --- a/src/Identity/test/InMemory.Test/Microsoft.AspNetCore.Identity.InMemory.Test.csproj +++ b/src/Identity/test/InMemory.Test/Microsoft.AspNetCore.Identity.InMemory.Test.csproj @@ -1,7 +1,7 @@  - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) 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 4309f2248c..4b303fe2f2 100644 --- a/src/Identity/testassets/Identity.DefaultUI.WebSite/Identity.DefaultUI.WebSite.csproj +++ b/src/Identity/testassets/Identity.DefaultUI.WebSite/Identity.DefaultUI.WebSite.csproj @@ -1,7 +1,7 @@  - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) aspnet-Identity.DefaultUI.WebSite-80C658D8-CED7-467F-9B47-75DA3BC1A16D Bootstrap3 diff --git a/src/Identity/testassets/Identity.DefaultUI.WebSite/Pages/Contoso/Login.cshtml b/src/Identity/testassets/Identity.DefaultUI.WebSite/Pages/Contoso/Login.cshtml index 91d36c62b0..0bcefd7555 100644 --- a/src/Identity/testassets/Identity.DefaultUI.WebSite/Pages/Contoso/Login.cshtml +++ b/src/Identity/testassets/Identity.DefaultUI.WebSite/Pages/Contoso/Login.cshtml @@ -10,7 +10,7 @@
-
+
diff --git a/src/Middleware/CORS/ref/Microsoft.AspNetCore.Cors.csproj b/src/Middleware/CORS/ref/Microsoft.AspNetCore.Cors.csproj index 7f2aea4570..c19156a530 100644 --- a/src/Middleware/CORS/ref/Microsoft.AspNetCore.Cors.csproj +++ b/src/Middleware/CORS/ref/Microsoft.AspNetCore.Cors.csproj @@ -1,10 +1,10 @@ - netcoreapp3.0 + netcoreapp5.0 - - + + diff --git a/src/Middleware/CORS/ref/Microsoft.AspNetCore.Cors.netcoreapp3.0.cs b/src/Middleware/CORS/ref/Microsoft.AspNetCore.Cors.netcoreapp.cs similarity index 100% rename from src/Middleware/CORS/ref/Microsoft.AspNetCore.Cors.netcoreapp3.0.cs rename to src/Middleware/CORS/ref/Microsoft.AspNetCore.Cors.netcoreapp.cs diff --git a/src/Middleware/CORS/src/Microsoft.AspNetCore.Cors.csproj b/src/Middleware/CORS/src/Microsoft.AspNetCore.Cors.csproj index 4a9008883b..56c2765858 100644 --- a/src/Middleware/CORS/src/Microsoft.AspNetCore.Cors.csproj +++ b/src/Middleware/CORS/src/Microsoft.AspNetCore.Cors.csproj @@ -5,7 +5,7 @@ Commonly used types: Microsoft.AspNetCore.Cors.DisableCorsAttribute Microsoft.AspNetCore.Cors.EnableCorsAttribute - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) true $(NoWarn);CS1591 true diff --git a/src/Middleware/CORS/test/FunctionalTests/CORS.FunctionalTests.csproj b/src/Middleware/CORS/test/FunctionalTests/CORS.FunctionalTests.csproj index cb106651e5..33d09105fd 100644 --- a/src/Middleware/CORS/test/FunctionalTests/CORS.FunctionalTests.csproj +++ b/src/Middleware/CORS/test/FunctionalTests/CORS.FunctionalTests.csproj @@ -1,7 +1,7 @@  - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) Cors.FunctionalTests $(DefaultItemExcludes);node_modules\**\* diff --git a/src/Middleware/CORS/test/FunctionalTests/CorsMiddlewareFunctionalTest.cs b/src/Middleware/CORS/test/FunctionalTests/CorsMiddlewareFunctionalTest.cs index 305165c922..043fef17e6 100644 --- a/src/Middleware/CORS/test/FunctionalTests/CorsMiddlewareFunctionalTest.cs +++ b/src/Middleware/CORS/test/FunctionalTests/CorsMiddlewareFunctionalTest.cs @@ -85,7 +85,7 @@ namespace FunctionalTests var originParameters = new DeploymentParameters { - TargetFramework = "netcoreapp3.0", + TargetFramework = "netcoreapp5.0", RuntimeFlavor = RuntimeFlavor.CoreClr, ServerType = ServerType.Kestrel, ApplicationPath = Path.Combine(solutionPath, "CORS", "test", "testassets", "TestOrigin"), @@ -103,7 +103,7 @@ namespace FunctionalTests var port = originDeployment.HttpClient.BaseAddress.Port; var destinationParameters = new DeploymentParameters { - TargetFramework = "netcoreapp3.0", + TargetFramework = "netcoreapp5.0", RuntimeFlavor = RuntimeFlavor.CoreClr, ServerType = ServerType.Kestrel, ApplicationPath = Path.Combine(solutionPath, "CORS", "test", "testassets", "TestDestination"), diff --git a/src/Middleware/CORS/test/UnitTests/Microsoft.AspNetCore.Cors.Test.csproj b/src/Middleware/CORS/test/UnitTests/Microsoft.AspNetCore.Cors.Test.csproj index ecb230f3d4..72d2177c34 100644 --- a/src/Middleware/CORS/test/UnitTests/Microsoft.AspNetCore.Cors.Test.csproj +++ b/src/Middleware/CORS/test/UnitTests/Microsoft.AspNetCore.Cors.Test.csproj @@ -1,7 +1,7 @@ - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) diff --git a/src/Middleware/CORS/test/testassets/CorsMiddlewareWebSite/CorsMiddlewareWebSite.csproj b/src/Middleware/CORS/test/testassets/CorsMiddlewareWebSite/CorsMiddlewareWebSite.csproj index 5b4776417e..802ceb3d0b 100644 --- a/src/Middleware/CORS/test/testassets/CorsMiddlewareWebSite/CorsMiddlewareWebSite.csproj +++ b/src/Middleware/CORS/test/testassets/CorsMiddlewareWebSite/CorsMiddlewareWebSite.csproj @@ -1,7 +1,7 @@ - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) diff --git a/src/Middleware/CORS/test/testassets/TestDestination/TestDestination.csproj b/src/Middleware/CORS/test/testassets/TestDestination/TestDestination.csproj index 080cf3e910..a3f38adb02 100644 --- a/src/Middleware/CORS/test/testassets/TestDestination/TestDestination.csproj +++ b/src/Middleware/CORS/test/testassets/TestDestination/TestDestination.csproj @@ -1,7 +1,7 @@  - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) diff --git a/src/Middleware/CORS/test/testassets/TestOrigin/TestOrigin.csproj b/src/Middleware/CORS/test/testassets/TestOrigin/TestOrigin.csproj index 055d7b1363..065d7fb49a 100644 --- a/src/Middleware/CORS/test/testassets/TestOrigin/TestOrigin.csproj +++ b/src/Middleware/CORS/test/testassets/TestOrigin/TestOrigin.csproj @@ -1,7 +1,7 @@  - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) diff --git a/src/Middleware/ConcurrencyLimiter/perf/Microbenchmarks/Microsoft.AspNetCore.ConcurrencyLimiter.Microbenchmarks.csproj b/src/Middleware/ConcurrencyLimiter/perf/Microbenchmarks/Microsoft.AspNetCore.ConcurrencyLimiter.Microbenchmarks.csproj index 45f51fb5eb..83717156df 100644 --- a/src/Middleware/ConcurrencyLimiter/perf/Microbenchmarks/Microsoft.AspNetCore.ConcurrencyLimiter.Microbenchmarks.csproj +++ b/src/Middleware/ConcurrencyLimiter/perf/Microbenchmarks/Microsoft.AspNetCore.ConcurrencyLimiter.Microbenchmarks.csproj @@ -2,7 +2,7 @@ Exe - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) diff --git a/src/Middleware/ConcurrencyLimiter/ref/Microsoft.AspNetCore.ConcurrencyLimiter.csproj b/src/Middleware/ConcurrencyLimiter/ref/Microsoft.AspNetCore.ConcurrencyLimiter.csproj index 9744b563e9..00d3c91145 100644 --- a/src/Middleware/ConcurrencyLimiter/ref/Microsoft.AspNetCore.ConcurrencyLimiter.csproj +++ b/src/Middleware/ConcurrencyLimiter/ref/Microsoft.AspNetCore.ConcurrencyLimiter.csproj @@ -1,10 +1,10 @@ - netcoreapp3.0 + netcoreapp5.0 - - + + diff --git a/src/Middleware/ConcurrencyLimiter/ref/Microsoft.AspNetCore.ConcurrencyLimiter.netcoreapp3.0.cs b/src/Middleware/ConcurrencyLimiter/ref/Microsoft.AspNetCore.ConcurrencyLimiter.netcoreapp.cs similarity index 100% rename from src/Middleware/ConcurrencyLimiter/ref/Microsoft.AspNetCore.ConcurrencyLimiter.netcoreapp3.0.cs rename to src/Middleware/ConcurrencyLimiter/ref/Microsoft.AspNetCore.ConcurrencyLimiter.netcoreapp.cs diff --git a/src/Middleware/ConcurrencyLimiter/sample/ConcurrencyLimiterSample.csproj b/src/Middleware/ConcurrencyLimiter/sample/ConcurrencyLimiterSample.csproj index cb1aa19fa2..d23f5807df 100644 --- a/src/Middleware/ConcurrencyLimiter/sample/ConcurrencyLimiterSample.csproj +++ b/src/Middleware/ConcurrencyLimiter/sample/ConcurrencyLimiterSample.csproj @@ -1,7 +1,7 @@  - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) diff --git a/src/Middleware/ConcurrencyLimiter/src/Microsoft.AspNetCore.ConcurrencyLimiter.csproj b/src/Middleware/ConcurrencyLimiter/src/Microsoft.AspNetCore.ConcurrencyLimiter.csproj index ff9d48ffaa..fd2eb47d66 100644 --- a/src/Middleware/ConcurrencyLimiter/src/Microsoft.AspNetCore.ConcurrencyLimiter.csproj +++ b/src/Middleware/ConcurrencyLimiter/src/Microsoft.AspNetCore.ConcurrencyLimiter.csproj @@ -2,7 +2,7 @@ ASP.NET Core middleware for queuing incoming HTTP requests, to avoid threadpool starvation. - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) true aspnetcore;queue;queuing true diff --git a/src/Middleware/ConcurrencyLimiter/test/Microsoft.AspNetCore.ConcurrencyLimiter.Tests.csproj b/src/Middleware/ConcurrencyLimiter/test/Microsoft.AspNetCore.ConcurrencyLimiter.Tests.csproj index 99bf7ae196..5bb19e39be 100644 --- a/src/Middleware/ConcurrencyLimiter/test/Microsoft.AspNetCore.ConcurrencyLimiter.Tests.csproj +++ b/src/Middleware/ConcurrencyLimiter/test/Microsoft.AspNetCore.ConcurrencyLimiter.Tests.csproj @@ -1,7 +1,7 @@  - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) diff --git a/src/Middleware/Diagnostics.Abstractions/ref/Microsoft.AspNetCore.Diagnostics.Abstractions.csproj b/src/Middleware/Diagnostics.Abstractions/ref/Microsoft.AspNetCore.Diagnostics.Abstractions.csproj index eeb85ae239..0ff2874835 100644 --- a/src/Middleware/Diagnostics.Abstractions/ref/Microsoft.AspNetCore.Diagnostics.Abstractions.csproj +++ b/src/Middleware/Diagnostics.Abstractions/ref/Microsoft.AspNetCore.Diagnostics.Abstractions.csproj @@ -1,10 +1,10 @@ - netcoreapp3.0 + netcoreapp5.0 - - + + diff --git a/src/Middleware/Diagnostics.Abstractions/ref/Microsoft.AspNetCore.Diagnostics.Abstractions.netcoreapp3.0.cs b/src/Middleware/Diagnostics.Abstractions/ref/Microsoft.AspNetCore.Diagnostics.Abstractions.netcoreapp.cs similarity index 100% rename from src/Middleware/Diagnostics.Abstractions/ref/Microsoft.AspNetCore.Diagnostics.Abstractions.netcoreapp3.0.cs rename to src/Middleware/Diagnostics.Abstractions/ref/Microsoft.AspNetCore.Diagnostics.Abstractions.netcoreapp.cs diff --git a/src/Middleware/Diagnostics.Abstractions/src/Microsoft.AspNetCore.Diagnostics.Abstractions.csproj b/src/Middleware/Diagnostics.Abstractions/src/Microsoft.AspNetCore.Diagnostics.Abstractions.csproj index d7f67d031c..747ad22394 100644 --- a/src/Middleware/Diagnostics.Abstractions/src/Microsoft.AspNetCore.Diagnostics.Abstractions.csproj +++ b/src/Middleware/Diagnostics.Abstractions/src/Microsoft.AspNetCore.Diagnostics.Abstractions.csproj @@ -2,7 +2,7 @@ ASP.NET Core diagnostics middleware abstractions and feature interface definitions. - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) true $(NoWarn);CS1591 true diff --git a/src/Middleware/Diagnostics.EntityFrameworkCore/ref/Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore.csproj b/src/Middleware/Diagnostics.EntityFrameworkCore/ref/Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore.csproj index f7efb9db49..9b46210511 100644 --- a/src/Middleware/Diagnostics.EntityFrameworkCore/ref/Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore.csproj +++ b/src/Middleware/Diagnostics.EntityFrameworkCore/ref/Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore.csproj @@ -1,10 +1,10 @@ - netcoreapp3.0 + netcoreapp5.0 - - + + diff --git a/src/Middleware/Diagnostics.EntityFrameworkCore/ref/Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore.netcoreapp3.0.cs b/src/Middleware/Diagnostics.EntityFrameworkCore/ref/Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore.netcoreapp.cs similarity index 100% rename from src/Middleware/Diagnostics.EntityFrameworkCore/ref/Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore.netcoreapp3.0.cs rename to src/Middleware/Diagnostics.EntityFrameworkCore/ref/Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore.netcoreapp.cs 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 481720db16..ae641e7693 100644 --- a/src/Middleware/Diagnostics.EntityFrameworkCore/src/Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore.csproj +++ b/src/Middleware/Diagnostics.EntityFrameworkCore/src/Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore.csproj @@ -2,7 +2,7 @@ ASP.NET Core middleware for Entity Framework Core error pages. Use this middleware to detect and diagnose errors with Entity Framework Core migrations. - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) $(NoWarn);CS1591 true aspnetcore;diagnostics;entityframeworkcore 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 d5020b851c..11fec3c8b8 100644 --- a/src/Middleware/Diagnostics.EntityFrameworkCore/test/FunctionalTests/Diagnostics.EFCore.FunctionalTests.csproj +++ b/src/Middleware/Diagnostics.EntityFrameworkCore/test/FunctionalTests/Diagnostics.EFCore.FunctionalTests.csproj @@ -1,7 +1,7 @@ - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) Diagnostics.EFCore.FunctionalTests 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 b0f219bc79..c10097fd17 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 @@ -1,7 +1,7 @@ - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) diff --git a/src/Middleware/Diagnostics/ref/Microsoft.AspNetCore.Diagnostics.csproj b/src/Middleware/Diagnostics/ref/Microsoft.AspNetCore.Diagnostics.csproj index a33f66dfdc..2262621466 100644 --- a/src/Middleware/Diagnostics/ref/Microsoft.AspNetCore.Diagnostics.csproj +++ b/src/Middleware/Diagnostics/ref/Microsoft.AspNetCore.Diagnostics.csproj @@ -1,10 +1,10 @@ - netcoreapp3.0 + netcoreapp5.0 - - + + diff --git a/src/Middleware/Diagnostics/ref/Microsoft.AspNetCore.Diagnostics.netcoreapp3.0.cs b/src/Middleware/Diagnostics/ref/Microsoft.AspNetCore.Diagnostics.netcoreapp.cs similarity index 100% rename from src/Middleware/Diagnostics/ref/Microsoft.AspNetCore.Diagnostics.netcoreapp3.0.cs rename to src/Middleware/Diagnostics/ref/Microsoft.AspNetCore.Diagnostics.netcoreapp.cs diff --git a/src/Middleware/Diagnostics/src/Microsoft.AspNetCore.Diagnostics.csproj b/src/Middleware/Diagnostics/src/Microsoft.AspNetCore.Diagnostics.csproj index ef0a3160f5..40a8891578 100644 --- a/src/Middleware/Diagnostics/src/Microsoft.AspNetCore.Diagnostics.csproj +++ b/src/Middleware/Diagnostics/src/Microsoft.AspNetCore.Diagnostics.csproj @@ -2,7 +2,7 @@ ASP.NET Core middleware for exception handling, exception display pages, and diagnostics information. Includes developer exception page middleware, exception handler middleware, runtime info middleware, status code page middleware, and welcome page middleware - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) true $(NoWarn);CS1591 true diff --git a/src/Middleware/Diagnostics/test/FunctionalTests/Diagnostics.FunctionalTests.csproj b/src/Middleware/Diagnostics/test/FunctionalTests/Diagnostics.FunctionalTests.csproj index 4c8951746c..b7caf9c87e 100644 --- a/src/Middleware/Diagnostics/test/FunctionalTests/Diagnostics.FunctionalTests.csproj +++ b/src/Middleware/Diagnostics/test/FunctionalTests/Diagnostics.FunctionalTests.csproj @@ -1,7 +1,7 @@ - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) false Diagnostics.FunctionalTests true 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 10368f3fce..c1b33b09a2 100644 --- a/src/Middleware/Diagnostics/test/UnitTests/Microsoft.AspNetCore.Diagnostics.Tests.csproj +++ b/src/Middleware/Diagnostics/test/UnitTests/Microsoft.AspNetCore.Diagnostics.Tests.csproj @@ -1,7 +1,7 @@ - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) diff --git a/src/Middleware/Diagnostics/test/testassets/ClassLibraryWithPortablePdbs/ClassLibraryWithPortablePdbs.csproj b/src/Middleware/Diagnostics/test/testassets/ClassLibraryWithPortablePdbs/ClassLibraryWithPortablePdbs.csproj index 4562a82bec..37b04d5b04 100644 --- a/src/Middleware/Diagnostics/test/testassets/ClassLibraryWithPortablePdbs/ClassLibraryWithPortablePdbs.csproj +++ b/src/Middleware/Diagnostics/test/testassets/ClassLibraryWithPortablePdbs/ClassLibraryWithPortablePdbs.csproj @@ -1,7 +1,7 @@  - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) portable diff --git a/src/Middleware/Diagnostics/test/testassets/DatabaseErrorPageSample/DatabaseErrorPageSample.csproj b/src/Middleware/Diagnostics/test/testassets/DatabaseErrorPageSample/DatabaseErrorPageSample.csproj index 397c24b633..f110f1152d 100644 --- a/src/Middleware/Diagnostics/test/testassets/DatabaseErrorPageSample/DatabaseErrorPageSample.csproj +++ b/src/Middleware/Diagnostics/test/testassets/DatabaseErrorPageSample/DatabaseErrorPageSample.csproj @@ -1,7 +1,7 @@ - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) diff --git a/src/Middleware/Diagnostics/test/testassets/DeveloperExceptionPageSample/DeveloperExceptionPageSample.csproj b/src/Middleware/Diagnostics/test/testassets/DeveloperExceptionPageSample/DeveloperExceptionPageSample.csproj index 6728950059..40106c9233 100644 --- a/src/Middleware/Diagnostics/test/testassets/DeveloperExceptionPageSample/DeveloperExceptionPageSample.csproj +++ b/src/Middleware/Diagnostics/test/testassets/DeveloperExceptionPageSample/DeveloperExceptionPageSample.csproj @@ -1,7 +1,7 @@  - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) diff --git a/src/Middleware/Diagnostics/test/testassets/ExceptionHandlerSample/ExceptionHandlerSample.csproj b/src/Middleware/Diagnostics/test/testassets/ExceptionHandlerSample/ExceptionHandlerSample.csproj index bcbefe0fda..907fa264f8 100644 --- a/src/Middleware/Diagnostics/test/testassets/ExceptionHandlerSample/ExceptionHandlerSample.csproj +++ b/src/Middleware/Diagnostics/test/testassets/ExceptionHandlerSample/ExceptionHandlerSample.csproj @@ -1,7 +1,7 @@  - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) diff --git a/src/Middleware/Diagnostics/test/testassets/StatusCodePagesSample/StatusCodePagesSample.csproj b/src/Middleware/Diagnostics/test/testassets/StatusCodePagesSample/StatusCodePagesSample.csproj index 7f287786c3..755410745d 100644 --- a/src/Middleware/Diagnostics/test/testassets/StatusCodePagesSample/StatusCodePagesSample.csproj +++ b/src/Middleware/Diagnostics/test/testassets/StatusCodePagesSample/StatusCodePagesSample.csproj @@ -1,7 +1,7 @@  - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) diff --git a/src/Middleware/Diagnostics/test/testassets/WelcomePageSample/WelcomePageSample.csproj b/src/Middleware/Diagnostics/test/testassets/WelcomePageSample/WelcomePageSample.csproj index 7f287786c3..755410745d 100644 --- a/src/Middleware/Diagnostics/test/testassets/WelcomePageSample/WelcomePageSample.csproj +++ b/src/Middleware/Diagnostics/test/testassets/WelcomePageSample/WelcomePageSample.csproj @@ -1,7 +1,7 @@  - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) diff --git a/src/Middleware/HeaderPropagation/ref/Microsoft.AspNetCore.HeaderPropagation.csproj b/src/Middleware/HeaderPropagation/ref/Microsoft.AspNetCore.HeaderPropagation.csproj index 7c2004e0a7..124d9d3bf0 100644 --- a/src/Middleware/HeaderPropagation/ref/Microsoft.AspNetCore.HeaderPropagation.csproj +++ b/src/Middleware/HeaderPropagation/ref/Microsoft.AspNetCore.HeaderPropagation.csproj @@ -1,10 +1,10 @@ - netcoreapp3.0 + netcoreapp5.0 - - + + diff --git a/src/Middleware/HeaderPropagation/ref/Microsoft.AspNetCore.HeaderPropagation.netcoreapp3.0.cs b/src/Middleware/HeaderPropagation/ref/Microsoft.AspNetCore.HeaderPropagation.netcoreapp.cs similarity index 100% rename from src/Middleware/HeaderPropagation/ref/Microsoft.AspNetCore.HeaderPropagation.netcoreapp3.0.cs rename to src/Middleware/HeaderPropagation/ref/Microsoft.AspNetCore.HeaderPropagation.netcoreapp.cs diff --git a/src/Middleware/HeaderPropagation/samples/HeaderPropagationSample/HeaderPropagationSample.csproj b/src/Middleware/HeaderPropagation/samples/HeaderPropagationSample/HeaderPropagationSample.csproj index 8410f6d290..a142440c71 100644 --- a/src/Middleware/HeaderPropagation/samples/HeaderPropagationSample/HeaderPropagationSample.csproj +++ b/src/Middleware/HeaderPropagation/samples/HeaderPropagationSample/HeaderPropagationSample.csproj @@ -1,7 +1,7 @@ - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) diff --git a/src/Middleware/HeaderPropagation/src/Microsoft.AspNetCore.HeaderPropagation.csproj b/src/Middleware/HeaderPropagation/src/Microsoft.AspNetCore.HeaderPropagation.csproj index 5ae4e64cc2..dcebbcf2f6 100644 --- a/src/Middleware/HeaderPropagation/src/Microsoft.AspNetCore.HeaderPropagation.csproj +++ b/src/Middleware/HeaderPropagation/src/Microsoft.AspNetCore.HeaderPropagation.csproj @@ -2,7 +2,7 @@ ASP.NET Core middleware to propagate HTTP headers from the incoming request to the outgoing HTTP Client requests - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) true $(NoWarn);CS1591 true diff --git a/src/Middleware/HeaderPropagation/test/Microsoft.AspNetCore.HeaderPropagation.Tests.csproj b/src/Middleware/HeaderPropagation/test/Microsoft.AspNetCore.HeaderPropagation.Tests.csproj index 39ce2903ea..e570da7e7d 100644 --- a/src/Middleware/HeaderPropagation/test/Microsoft.AspNetCore.HeaderPropagation.Tests.csproj +++ b/src/Middleware/HeaderPropagation/test/Microsoft.AspNetCore.HeaderPropagation.Tests.csproj @@ -1,7 +1,7 @@ - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) 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 45271b91bc..7cd8abe252 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 @@ -1,7 +1,7 @@ - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) Microsoft.AspNetCore.Diagnostics.HealthChecks diff --git a/src/Middleware/HealthChecks/ref/Microsoft.AspNetCore.Diagnostics.HealthChecks.csproj b/src/Middleware/HealthChecks/ref/Microsoft.AspNetCore.Diagnostics.HealthChecks.csproj index fc35786978..45e94933d8 100644 --- a/src/Middleware/HealthChecks/ref/Microsoft.AspNetCore.Diagnostics.HealthChecks.csproj +++ b/src/Middleware/HealthChecks/ref/Microsoft.AspNetCore.Diagnostics.HealthChecks.csproj @@ -1,10 +1,10 @@ - netcoreapp3.0 + netcoreapp5.0 - - + + diff --git a/src/Middleware/HealthChecks/ref/Microsoft.AspNetCore.Diagnostics.HealthChecks.netcoreapp3.0.cs b/src/Middleware/HealthChecks/ref/Microsoft.AspNetCore.Diagnostics.HealthChecks.netcoreapp.cs similarity index 100% rename from src/Middleware/HealthChecks/ref/Microsoft.AspNetCore.Diagnostics.HealthChecks.netcoreapp3.0.cs rename to src/Middleware/HealthChecks/ref/Microsoft.AspNetCore.Diagnostics.HealthChecks.netcoreapp.cs diff --git a/src/Middleware/HealthChecks/src/Microsoft.AspNetCore.Diagnostics.HealthChecks.csproj b/src/Middleware/HealthChecks/src/Microsoft.AspNetCore.Diagnostics.HealthChecks.csproj index 34929e104e..0df676ccda 100644 --- a/src/Middleware/HealthChecks/src/Microsoft.AspNetCore.Diagnostics.HealthChecks.csproj +++ b/src/Middleware/HealthChecks/src/Microsoft.AspNetCore.Diagnostics.HealthChecks.csproj @@ -2,7 +2,7 @@ ASP.NET Core middleware for returning the results of Health Checks in the application - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) true $(NoWarn);CS1591 true @@ -10,7 +10,7 @@ ASP.NET Core middleware for returning the results of Health Checks in the application - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) $(NoWarn);CS1591 true diagnostics;healthchecks 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 abdf2618c0..41cf710852 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 @@ -1,7 +1,7 @@ - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) Microsoft.AspNetCore.Diagnostics.HealthChecks diff --git a/src/Middleware/HealthChecks/test/testassets/HealthChecksSample/HealthChecksSample.csproj b/src/Middleware/HealthChecks/test/testassets/HealthChecksSample/HealthChecksSample.csproj index d41b783539..6547dc7232 100644 --- a/src/Middleware/HealthChecks/test/testassets/HealthChecksSample/HealthChecksSample.csproj +++ b/src/Middleware/HealthChecks/test/testassets/HealthChecksSample/HealthChecksSample.csproj @@ -1,7 +1,7 @@ - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) diff --git a/src/Middleware/HostFiltering/ref/Microsoft.AspNetCore.HostFiltering.csproj b/src/Middleware/HostFiltering/ref/Microsoft.AspNetCore.HostFiltering.csproj index 0c879a2ba6..53e06849fb 100644 --- a/src/Middleware/HostFiltering/ref/Microsoft.AspNetCore.HostFiltering.csproj +++ b/src/Middleware/HostFiltering/ref/Microsoft.AspNetCore.HostFiltering.csproj @@ -1,10 +1,10 @@ - netcoreapp3.0 + netcoreapp5.0 - - + + diff --git a/src/Middleware/HostFiltering/ref/Microsoft.AspNetCore.HostFiltering.netcoreapp3.0.cs b/src/Middleware/HostFiltering/ref/Microsoft.AspNetCore.HostFiltering.netcoreapp.cs similarity index 100% rename from src/Middleware/HostFiltering/ref/Microsoft.AspNetCore.HostFiltering.netcoreapp3.0.cs rename to src/Middleware/HostFiltering/ref/Microsoft.AspNetCore.HostFiltering.netcoreapp.cs diff --git a/src/Middleware/HostFiltering/sample/HostFilteringSample.csproj b/src/Middleware/HostFiltering/sample/HostFilteringSample.csproj index a3af4c632a..c963c9edc8 100644 --- a/src/Middleware/HostFiltering/sample/HostFilteringSample.csproj +++ b/src/Middleware/HostFiltering/sample/HostFilteringSample.csproj @@ -1,7 +1,7 @@  - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) diff --git a/src/Middleware/HostFiltering/src/Microsoft.AspNetCore.HostFiltering.csproj b/src/Middleware/HostFiltering/src/Microsoft.AspNetCore.HostFiltering.csproj index 3680fd570d..c7d15a008d 100644 --- a/src/Middleware/HostFiltering/src/Microsoft.AspNetCore.HostFiltering.csproj +++ b/src/Middleware/HostFiltering/src/Microsoft.AspNetCore.HostFiltering.csproj @@ -4,7 +4,7 @@ ASP.NET Core middleware for filtering out requests with unknown HTTP host headers. - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) true true aspnetcore diff --git a/src/Middleware/HostFiltering/test/Microsoft.AspNetCore.HostFiltering.Tests.csproj b/src/Middleware/HostFiltering/test/Microsoft.AspNetCore.HostFiltering.Tests.csproj index 8a0b5dd532..b8974a9955 100644 --- a/src/Middleware/HostFiltering/test/Microsoft.AspNetCore.HostFiltering.Tests.csproj +++ b/src/Middleware/HostFiltering/test/Microsoft.AspNetCore.HostFiltering.Tests.csproj @@ -1,7 +1,7 @@ - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) diff --git a/src/Middleware/HttpOverrides/ref/Microsoft.AspNetCore.HttpOverrides.csproj b/src/Middleware/HttpOverrides/ref/Microsoft.AspNetCore.HttpOverrides.csproj index c2cc319345..6d0902e1d1 100644 --- a/src/Middleware/HttpOverrides/ref/Microsoft.AspNetCore.HttpOverrides.csproj +++ b/src/Middleware/HttpOverrides/ref/Microsoft.AspNetCore.HttpOverrides.csproj @@ -1,10 +1,10 @@ - netcoreapp3.0 + netcoreapp5.0 - - + + diff --git a/src/Middleware/HttpOverrides/ref/Microsoft.AspNetCore.HttpOverrides.netcoreapp3.0.cs b/src/Middleware/HttpOverrides/ref/Microsoft.AspNetCore.HttpOverrides.netcoreapp.cs similarity index 100% rename from src/Middleware/HttpOverrides/ref/Microsoft.AspNetCore.HttpOverrides.netcoreapp3.0.cs rename to src/Middleware/HttpOverrides/ref/Microsoft.AspNetCore.HttpOverrides.netcoreapp.cs diff --git a/src/Middleware/HttpOverrides/sample/HttpOverridesSample.csproj b/src/Middleware/HttpOverrides/sample/HttpOverridesSample.csproj index 7b8a31369d..12815fc592 100644 --- a/src/Middleware/HttpOverrides/sample/HttpOverridesSample.csproj +++ b/src/Middleware/HttpOverrides/sample/HttpOverridesSample.csproj @@ -1,7 +1,7 @@  - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) diff --git a/src/Middleware/HttpOverrides/src/Microsoft.AspNetCore.HttpOverrides.csproj b/src/Middleware/HttpOverrides/src/Microsoft.AspNetCore.HttpOverrides.csproj index f398eb67d2..cc0643dd9d 100644 --- a/src/Middleware/HttpOverrides/src/Microsoft.AspNetCore.HttpOverrides.csproj +++ b/src/Middleware/HttpOverrides/src/Microsoft.AspNetCore.HttpOverrides.csproj @@ -4,7 +4,7 @@ ASP.NET Core basic middleware for supporting HTTP method overrides. Includes: * X-Forwarded-* headers to forward headers from a proxy. * HTTP method override header. - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) true $(NoWarn);CS1591 true diff --git a/src/Middleware/HttpOverrides/test/Microsoft.AspNetCore.HttpOverrides.Tests.csproj b/src/Middleware/HttpOverrides/test/Microsoft.AspNetCore.HttpOverrides.Tests.csproj index c5f9652ddc..215004202c 100644 --- a/src/Middleware/HttpOverrides/test/Microsoft.AspNetCore.HttpOverrides.Tests.csproj +++ b/src/Middleware/HttpOverrides/test/Microsoft.AspNetCore.HttpOverrides.Tests.csproj @@ -1,7 +1,7 @@  - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) diff --git a/src/Middleware/HttpsPolicy/ref/Microsoft.AspNetCore.HttpsPolicy.csproj b/src/Middleware/HttpsPolicy/ref/Microsoft.AspNetCore.HttpsPolicy.csproj index 05f6a42637..a9f5911173 100644 --- a/src/Middleware/HttpsPolicy/ref/Microsoft.AspNetCore.HttpsPolicy.csproj +++ b/src/Middleware/HttpsPolicy/ref/Microsoft.AspNetCore.HttpsPolicy.csproj @@ -1,10 +1,10 @@ - netcoreapp3.0 + netcoreapp5.0 - - + + diff --git a/src/Middleware/HttpsPolicy/ref/Microsoft.AspNetCore.HttpsPolicy.netcoreapp3.0.cs b/src/Middleware/HttpsPolicy/ref/Microsoft.AspNetCore.HttpsPolicy.netcoreapp.cs similarity index 100% rename from src/Middleware/HttpsPolicy/ref/Microsoft.AspNetCore.HttpsPolicy.netcoreapp3.0.cs rename to src/Middleware/HttpsPolicy/ref/Microsoft.AspNetCore.HttpsPolicy.netcoreapp.cs diff --git a/src/Middleware/HttpsPolicy/sample/HttpsPolicySample.csproj b/src/Middleware/HttpsPolicy/sample/HttpsPolicySample.csproj index 57892c2249..fd534c9f58 100644 --- a/src/Middleware/HttpsPolicy/sample/HttpsPolicySample.csproj +++ b/src/Middleware/HttpsPolicy/sample/HttpsPolicySample.csproj @@ -1,7 +1,7 @@ - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) diff --git a/src/Middleware/HttpsPolicy/src/Microsoft.AspNetCore.HttpsPolicy.csproj b/src/Middleware/HttpsPolicy/src/Microsoft.AspNetCore.HttpsPolicy.csproj index d8858bd7b4..014eca701c 100644 --- a/src/Middleware/HttpsPolicy/src/Microsoft.AspNetCore.HttpsPolicy.csproj +++ b/src/Middleware/HttpsPolicy/src/Microsoft.AspNetCore.HttpsPolicy.csproj @@ -4,7 +4,7 @@ ASP.NET Core basic middleware for supporting HTTPS Redirection and HTTP Strict-Transport-Security. - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) true $(NoWarn);CS1591 true diff --git a/src/Middleware/HttpsPolicy/test/Microsoft.AspNetCore.HttpsPolicy.Tests.csproj b/src/Middleware/HttpsPolicy/test/Microsoft.AspNetCore.HttpsPolicy.Tests.csproj index 2e47300f58..88adeda351 100644 --- a/src/Middleware/HttpsPolicy/test/Microsoft.AspNetCore.HttpsPolicy.Tests.csproj +++ b/src/Middleware/HttpsPolicy/test/Microsoft.AspNetCore.HttpsPolicy.Tests.csproj @@ -1,7 +1,7 @@ - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) diff --git a/src/Middleware/Localization.Routing/ref/Microsoft.AspNetCore.Localization.Routing.csproj b/src/Middleware/Localization.Routing/ref/Microsoft.AspNetCore.Localization.Routing.csproj index 050ea0a4af..95b8ea51f3 100644 --- a/src/Middleware/Localization.Routing/ref/Microsoft.AspNetCore.Localization.Routing.csproj +++ b/src/Middleware/Localization.Routing/ref/Microsoft.AspNetCore.Localization.Routing.csproj @@ -1,10 +1,10 @@ - netcoreapp3.0 + netcoreapp5.0 - - + + diff --git a/src/Middleware/Localization.Routing/ref/Microsoft.AspNetCore.Localization.Routing.netcoreapp3.0.cs b/src/Middleware/Localization.Routing/ref/Microsoft.AspNetCore.Localization.Routing.netcoreapp.cs similarity index 100% rename from src/Middleware/Localization.Routing/ref/Microsoft.AspNetCore.Localization.Routing.netcoreapp3.0.cs rename to src/Middleware/Localization.Routing/ref/Microsoft.AspNetCore.Localization.Routing.netcoreapp.cs 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 f66c77765c..71cb701b8f 100644 --- a/src/Middleware/Localization.Routing/src/Microsoft.AspNetCore.Localization.Routing.csproj +++ b/src/Middleware/Localization.Routing/src/Microsoft.AspNetCore.Localization.Routing.csproj @@ -3,7 +3,7 @@ Microsoft ASP.NET Core Provides a request culture provider which gets culture and ui-culture from request's route data. - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) true $(NoWarn);CS1591 true 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 4ee784f000..d0654674bf 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 @@ -1,7 +1,7 @@ - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) diff --git a/src/Middleware/Localization/Localization.slnf b/src/Middleware/Localization/Localization.slnf new file mode 100644 index 0000000000..e4494b3619 --- /dev/null +++ b/src/Middleware/Localization/Localization.slnf @@ -0,0 +1,16 @@ +{ + "solution": { + "path": "..\\Middleware.sln", + "projects": [ + "Localization.Routing\\src\\Microsoft.AspNetCore.Localization.Routing.csproj", + "Localization.Routing\\test\\Microsoft.AspNetCore.Localization.Routing.Tests.csproj", + "Localization\\sample\\LocalizationSample.csproj", + "Localization\\src\\Microsoft.AspNetCore.Localization.csproj", + "Localization\\test\\FunctionalTests\\Microsoft.AspNetCore.Localization.FunctionalTests.csproj", + "Localization\\test\\UnitTests\\Microsoft.AspNetCore.Localization.Tests.csproj", + "Localization\\testassets\\LocalizationWebsite\\LocalizationWebsite.csproj", + "Localization\\testassets\\ResourcesClassLibraryNoAttribute\\ResourcesClassLibraryNoAttribute.csproj", + "Localization\\testassets\\ResourcesClassLibraryWithAttribute\\ResourcesClassLibraryWithAttribute.csproj" + ] + } +} \ No newline at end of file diff --git a/src/Middleware/Localization/ref/Microsoft.AspNetCore.Localization.csproj b/src/Middleware/Localization/ref/Microsoft.AspNetCore.Localization.csproj index 9ae583c9ec..afb0d85918 100644 --- a/src/Middleware/Localization/ref/Microsoft.AspNetCore.Localization.csproj +++ b/src/Middleware/Localization/ref/Microsoft.AspNetCore.Localization.csproj @@ -1,10 +1,10 @@ - netcoreapp3.0 + netcoreapp5.0 - - + + diff --git a/src/Middleware/Localization/ref/Microsoft.AspNetCore.Localization.netcoreapp3.0.cs b/src/Middleware/Localization/ref/Microsoft.AspNetCore.Localization.netcoreapp.cs similarity index 98% rename from src/Middleware/Localization/ref/Microsoft.AspNetCore.Localization.netcoreapp3.0.cs rename to src/Middleware/Localization/ref/Microsoft.AspNetCore.Localization.netcoreapp.cs index 599db4aca6..558921ba6b 100644 --- a/src/Middleware/Localization/ref/Microsoft.AspNetCore.Localization.netcoreapp3.0.cs +++ b/src/Middleware/Localization/ref/Microsoft.AspNetCore.Localization.netcoreapp.cs @@ -13,6 +13,7 @@ namespace Microsoft.AspNetCore.Builder public partial class RequestLocalizationOptions { public RequestLocalizationOptions() { } + public bool ApplyCurrentCultureToResponseHeaders { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } public Microsoft.AspNetCore.Localization.RequestCulture DefaultRequestCulture { get { throw null; } set { } } public bool FallBackToParentCultures { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } public bool FallBackToParentUICultures { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } diff --git a/src/Middleware/Localization/sample/LocalizationSample.csproj b/src/Middleware/Localization/sample/LocalizationSample.csproj index 678121156b..07e8a83753 100644 --- a/src/Middleware/Localization/sample/LocalizationSample.csproj +++ b/src/Middleware/Localization/sample/LocalizationSample.csproj @@ -1,7 +1,7 @@  - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) false diff --git a/src/Middleware/Localization/src/Microsoft.AspNetCore.Localization.csproj b/src/Middleware/Localization/src/Microsoft.AspNetCore.Localization.csproj index 48dae9489a..58f3fa5ab9 100644 --- a/src/Middleware/Localization/src/Microsoft.AspNetCore.Localization.csproj +++ b/src/Middleware/Localization/src/Microsoft.AspNetCore.Localization.csproj @@ -3,7 +3,7 @@ Microsoft ASP.NET Core ASP.NET Core middleware for automatically applying culture information to HTTP requests. Culture information can be specified in the HTTP header, query string, cookie, or custom source. - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) true $(NoWarn);CS1591 true diff --git a/src/Middleware/Localization/src/RequestLocalizationMiddleware.cs b/src/Middleware/Localization/src/RequestLocalizationMiddleware.cs index c6ec3e1c06..07277ecdd7 100644 --- a/src/Middleware/Localization/src/RequestLocalizationMiddleware.cs +++ b/src/Middleware/Localization/src/RequestLocalizationMiddleware.cs @@ -1,5 +1,5 @@ -// Copyright (c) .NET Foundation. All rights reserved. -// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System; using System.Collections.Generic; @@ -13,6 +13,7 @@ using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging.Abstractions; using Microsoft.Extensions.Options; using Microsoft.Extensions.Primitives; +using Microsoft.Net.Http.Headers; namespace Microsoft.AspNetCore.Localization { @@ -146,6 +147,11 @@ namespace Microsoft.AspNetCore.Localization SetCurrentThreadCulture(requestCulture); + if (_options.ApplyCurrentCultureToResponseHeaders) + { + context.Response.Headers.Add(HeaderNames.ContentLanguage, requestCulture.UICulture.Name); + } + await _next(context); } diff --git a/src/Middleware/Localization/src/RequestLocalizationOptions.cs b/src/Middleware/Localization/src/RequestLocalizationOptions.cs index 16776364f0..95ca74fe32 100644 --- a/src/Middleware/Localization/src/RequestLocalizationOptions.cs +++ b/src/Middleware/Localization/src/RequestLocalizationOptions.cs @@ -84,6 +84,11 @@ namespace Microsoft.AspNetCore.Builder /// public bool FallBackToParentUICultures { get; set; } = true; + /// + /// Gets or sets a value that determines if is applied to the response Content-Language header. + /// + public bool ApplyCurrentCultureToResponseHeaders { get; set; } + /// /// The cultures supported by the application. The will only set /// the current request culture to an entry in this list. diff --git a/src/Middleware/Localization/test/FunctionalTests/LocalizationTest.cs b/src/Middleware/Localization/test/FunctionalTests/LocalizationTest.cs index 5f09115be2..15b00dfacf 100644 --- a/src/Middleware/Localization/test/FunctionalTests/LocalizationTest.cs +++ b/src/Middleware/Localization/test/FunctionalTests/LocalizationTest.cs @@ -1,5 +1,5 @@ -// Copyright (c) .NET Foundation. All rights reserved. -// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System; using System.Net; @@ -14,6 +14,15 @@ namespace Microsoft.AspNetCore.Localization.FunctionalTests { public class LocalizationTest { + [Fact] + public Task Localization_ContentLanguageHeader() + { + return RunTest( + typeof(StartupContentLanguageHeader), + "ar-YE", + "True ar-YE"); + } + [Fact] public Task Localization_CustomCulture() { 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 356e5af987..97c05ed0c8 100644 --- a/src/Middleware/Localization/test/FunctionalTests/Microsoft.AspNetCore.Localization.FunctionalTests.csproj +++ b/src/Middleware/Localization/test/FunctionalTests/Microsoft.AspNetCore.Localization.FunctionalTests.csproj @@ -1,7 +1,7 @@ - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) 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 18e2369329..f5b5f9ef95 100644 --- a/src/Middleware/Localization/test/UnitTests/Microsoft.AspNetCore.Localization.Tests.csproj +++ b/src/Middleware/Localization/test/UnitTests/Microsoft.AspNetCore.Localization.Tests.csproj @@ -1,7 +1,7 @@ - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) diff --git a/src/Middleware/Localization/testassets/LocalizationWebsite/LocalizationWebsite.csproj b/src/Middleware/Localization/testassets/LocalizationWebsite/LocalizationWebsite.csproj index 0d58bdc384..33f44843fc 100644 --- a/src/Middleware/Localization/testassets/LocalizationWebsite/LocalizationWebsite.csproj +++ b/src/Middleware/Localization/testassets/LocalizationWebsite/LocalizationWebsite.csproj @@ -1,7 +1,7 @@ - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) diff --git a/src/Middleware/Localization/testassets/LocalizationWebsite/StartupContentLanguageHeader.cs b/src/Middleware/Localization/testassets/LocalizationWebsite/StartupContentLanguageHeader.cs new file mode 100644 index 0000000000..849743184c --- /dev/null +++ b/src/Middleware/Localization/testassets/LocalizationWebsite/StartupContentLanguageHeader.cs @@ -0,0 +1,49 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +using System.Collections.Generic; +using System.Globalization; +using Microsoft.AspNetCore.Builder; +using Microsoft.AspNetCore.Http; +using Microsoft.AspNetCore.Localization; +using Microsoft.Extensions.DependencyInjection; +using Microsoft.Net.Http.Headers; + +namespace LocalizationWebsite +{ + public class StartupContentLanguageHeader + { + public void ConfigureServices(IServiceCollection services) + { + services.AddLocalization(); + } + + public void Configure( + IApplicationBuilder app) + { + app.UseRequestLocalization(new RequestLocalizationOptions + { + DefaultRequestCulture = new RequestCulture("en-US"), + SupportedCultures = new List() + { + new CultureInfo("ar-YE") + }, + SupportedUICultures = new List() + { + new CultureInfo("ar-YE") + }, + ApplyCurrentCultureToResponseHeaders = true + }); + + app.Run(async (context) => + { + var hasContentLanguageHeader = context.Response.Headers.ContainsKey(HeaderNames.ContentLanguage); + var contentLanguage = context.Response.Headers[HeaderNames.ContentLanguage].ToString(); + + await context.Response.WriteAsync(hasContentLanguageHeader.ToString()); + await context.Response.WriteAsync(" "); + await context.Response.WriteAsync(contentLanguage); + }); + } + } +} \ No newline at end of file diff --git a/src/Middleware/MiddlewareAnalysis/ref/Microsoft.AspNetCore.MiddlewareAnalysis.csproj b/src/Middleware/MiddlewareAnalysis/ref/Microsoft.AspNetCore.MiddlewareAnalysis.csproj index 0d6b743c99..5db76d703a 100644 --- a/src/Middleware/MiddlewareAnalysis/ref/Microsoft.AspNetCore.MiddlewareAnalysis.csproj +++ b/src/Middleware/MiddlewareAnalysis/ref/Microsoft.AspNetCore.MiddlewareAnalysis.csproj @@ -1,10 +1,10 @@ - netcoreapp3.0 + netcoreapp5.0 - - + + diff --git a/src/Middleware/MiddlewareAnalysis/ref/Microsoft.AspNetCore.MiddlewareAnalysis.netcoreapp3.0.cs b/src/Middleware/MiddlewareAnalysis/ref/Microsoft.AspNetCore.MiddlewareAnalysis.netcoreapp.cs similarity index 100% rename from src/Middleware/MiddlewareAnalysis/ref/Microsoft.AspNetCore.MiddlewareAnalysis.netcoreapp3.0.cs rename to src/Middleware/MiddlewareAnalysis/ref/Microsoft.AspNetCore.MiddlewareAnalysis.netcoreapp.cs diff --git a/src/Middleware/MiddlewareAnalysis/samples/MiddlewareAnalysisSample/MiddlewareAnalysisSample.csproj b/src/Middleware/MiddlewareAnalysis/samples/MiddlewareAnalysisSample/MiddlewareAnalysisSample.csproj index 9a9b2b4bff..5f4a294842 100644 --- a/src/Middleware/MiddlewareAnalysis/samples/MiddlewareAnalysisSample/MiddlewareAnalysisSample.csproj +++ b/src/Middleware/MiddlewareAnalysis/samples/MiddlewareAnalysisSample/MiddlewareAnalysisSample.csproj @@ -1,7 +1,7 @@  - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) diff --git a/src/Middleware/MiddlewareAnalysis/src/Microsoft.AspNetCore.MiddlewareAnalysis.csproj b/src/Middleware/MiddlewareAnalysis/src/Microsoft.AspNetCore.MiddlewareAnalysis.csproj index 038cfb3444..4989ea776d 100644 --- a/src/Middleware/MiddlewareAnalysis/src/Microsoft.AspNetCore.MiddlewareAnalysis.csproj +++ b/src/Middleware/MiddlewareAnalysis/src/Microsoft.AspNetCore.MiddlewareAnalysis.csproj @@ -2,7 +2,7 @@ ASP.NET Core middleware for analyzing middleware in the request pipeline with System.Diagnostics.DiagnosticSource. - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) $(NoWarn);CS1591 true aspnetcore;diagnostics diff --git a/src/Middleware/MiddlewareAnalysis/test/Microsoft.AspNetCore.MiddlewareAnalysis.Tests.csproj b/src/Middleware/MiddlewareAnalysis/test/Microsoft.AspNetCore.MiddlewareAnalysis.Tests.csproj index 0bfd6c15f3..cd69a2fb13 100644 --- a/src/Middleware/MiddlewareAnalysis/test/Microsoft.AspNetCore.MiddlewareAnalysis.Tests.csproj +++ b/src/Middleware/MiddlewareAnalysis/test/Microsoft.AspNetCore.MiddlewareAnalysis.Tests.csproj @@ -1,7 +1,7 @@ - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) diff --git a/src/Middleware/NodeServices/ref/Microsoft.AspNetCore.NodeServices.csproj b/src/Middleware/NodeServices/ref/Microsoft.AspNetCore.NodeServices.csproj index fceac7cf81..e076960bb6 100644 --- a/src/Middleware/NodeServices/ref/Microsoft.AspNetCore.NodeServices.csproj +++ b/src/Middleware/NodeServices/ref/Microsoft.AspNetCore.NodeServices.csproj @@ -1,10 +1,10 @@ - netcoreapp3.0 + netcoreapp5.0 - - + + diff --git a/src/Middleware/NodeServices/ref/Microsoft.AspNetCore.NodeServices.netcoreapp3.0.cs b/src/Middleware/NodeServices/ref/Microsoft.AspNetCore.NodeServices.netcoreapp.cs similarity index 100% rename from src/Middleware/NodeServices/ref/Microsoft.AspNetCore.NodeServices.netcoreapp3.0.cs rename to src/Middleware/NodeServices/ref/Microsoft.AspNetCore.NodeServices.netcoreapp.cs diff --git a/src/Middleware/NodeServices/samples/NodeServicesExamples/NodeServicesExamples.csproj b/src/Middleware/NodeServices/samples/NodeServicesExamples/NodeServicesExamples.csproj index 13ae55cac3..2b834b5b0e 100644 --- a/src/Middleware/NodeServices/samples/NodeServicesExamples/NodeServicesExamples.csproj +++ b/src/Middleware/NodeServices/samples/NodeServicesExamples/NodeServicesExamples.csproj @@ -1,7 +1,7 @@  - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) true false diff --git a/src/Middleware/NodeServices/src/Microsoft.AspNetCore.NodeServices.csproj b/src/Middleware/NodeServices/src/Microsoft.AspNetCore.NodeServices.csproj index b6e0c32519..e67862ea45 100644 --- a/src/Middleware/NodeServices/src/Microsoft.AspNetCore.NodeServices.csproj +++ b/src/Middleware/NodeServices/src/Microsoft.AspNetCore.NodeServices.csproj @@ -1,7 +1,7 @@  Invoke Node.js modules at runtime in ASP.NET Core applications. - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) true diff --git a/src/Middleware/NodeServices/test/Microsoft.AspNetCore.NodeServices.Tests.csproj b/src/Middleware/NodeServices/test/Microsoft.AspNetCore.NodeServices.Tests.csproj index 7d0bed922f..464d457f90 100644 --- a/src/Middleware/NodeServices/test/Microsoft.AspNetCore.NodeServices.Tests.csproj +++ b/src/Middleware/NodeServices/test/Microsoft.AspNetCore.NodeServices.Tests.csproj @@ -1,7 +1,7 @@  - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) true diff --git a/src/Middleware/ResponseCaching.Abstractions/ref/Microsoft.AspNetCore.ResponseCaching.Abstractions.csproj b/src/Middleware/ResponseCaching.Abstractions/ref/Microsoft.AspNetCore.ResponseCaching.Abstractions.csproj index fe10c4e2a8..6882e29b20 100644 --- a/src/Middleware/ResponseCaching.Abstractions/ref/Microsoft.AspNetCore.ResponseCaching.Abstractions.csproj +++ b/src/Middleware/ResponseCaching.Abstractions/ref/Microsoft.AspNetCore.ResponseCaching.Abstractions.csproj @@ -1,10 +1,10 @@ - netcoreapp3.0 + netcoreapp5.0 - - + + diff --git a/src/Middleware/ResponseCaching.Abstractions/ref/Microsoft.AspNetCore.ResponseCaching.Abstractions.netcoreapp3.0.cs b/src/Middleware/ResponseCaching.Abstractions/ref/Microsoft.AspNetCore.ResponseCaching.Abstractions.netcoreapp.cs similarity index 100% rename from src/Middleware/ResponseCaching.Abstractions/ref/Microsoft.AspNetCore.ResponseCaching.Abstractions.netcoreapp3.0.cs rename to src/Middleware/ResponseCaching.Abstractions/ref/Microsoft.AspNetCore.ResponseCaching.Abstractions.netcoreapp.cs diff --git a/src/Middleware/ResponseCaching.Abstractions/src/Microsoft.AspNetCore.ResponseCaching.Abstractions.csproj b/src/Middleware/ResponseCaching.Abstractions/src/Microsoft.AspNetCore.ResponseCaching.Abstractions.csproj index 0dc8be2b8d..f58db81fea 100644 --- a/src/Middleware/ResponseCaching.Abstractions/src/Microsoft.AspNetCore.ResponseCaching.Abstractions.csproj +++ b/src/Middleware/ResponseCaching.Abstractions/src/Microsoft.AspNetCore.ResponseCaching.Abstractions.csproj @@ -2,7 +2,7 @@ ASP.NET Core response caching middleware abstractions and feature interface definitions. - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) true true aspnetcore;cache;caching diff --git a/src/Middleware/ResponseCaching/ref/Microsoft.AspNetCore.ResponseCaching.csproj b/src/Middleware/ResponseCaching/ref/Microsoft.AspNetCore.ResponseCaching.csproj index 985bcdbbc9..d717a32220 100644 --- a/src/Middleware/ResponseCaching/ref/Microsoft.AspNetCore.ResponseCaching.csproj +++ b/src/Middleware/ResponseCaching/ref/Microsoft.AspNetCore.ResponseCaching.csproj @@ -1,10 +1,10 @@ - netcoreapp3.0 + netcoreapp5.0 - - + + diff --git a/src/Middleware/ResponseCaching/ref/Microsoft.AspNetCore.ResponseCaching.netcoreapp3.0.cs b/src/Middleware/ResponseCaching/ref/Microsoft.AspNetCore.ResponseCaching.netcoreapp.cs similarity index 100% rename from src/Middleware/ResponseCaching/ref/Microsoft.AspNetCore.ResponseCaching.netcoreapp3.0.cs rename to src/Middleware/ResponseCaching/ref/Microsoft.AspNetCore.ResponseCaching.netcoreapp.cs diff --git a/src/Middleware/ResponseCaching/samples/ResponseCachingSample/ResponseCachingSample.csproj b/src/Middleware/ResponseCaching/samples/ResponseCachingSample/ResponseCachingSample.csproj index a81712c49f..6522e4a12b 100644 --- a/src/Middleware/ResponseCaching/samples/ResponseCachingSample/ResponseCachingSample.csproj +++ b/src/Middleware/ResponseCaching/samples/ResponseCachingSample/ResponseCachingSample.csproj @@ -1,7 +1,7 @@  - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) diff --git a/src/Middleware/ResponseCaching/src/Microsoft.AspNetCore.ResponseCaching.csproj b/src/Middleware/ResponseCaching/src/Microsoft.AspNetCore.ResponseCaching.csproj index ef8199808c..90291b1650 100644 --- a/src/Middleware/ResponseCaching/src/Microsoft.AspNetCore.ResponseCaching.csproj +++ b/src/Middleware/ResponseCaching/src/Microsoft.AspNetCore.ResponseCaching.csproj @@ -2,7 +2,7 @@ ASP.NET Core middleware for caching HTTP responses on the server. - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) true $(NoWarn);CS1591 true diff --git a/src/Middleware/ResponseCaching/test/Microsoft.AspNetCore.ResponseCaching.Tests.csproj b/src/Middleware/ResponseCaching/test/Microsoft.AspNetCore.ResponseCaching.Tests.csproj index bc2c33dc25..7d9ee28f2e 100644 --- a/src/Middleware/ResponseCaching/test/Microsoft.AspNetCore.ResponseCaching.Tests.csproj +++ b/src/Middleware/ResponseCaching/test/Microsoft.AspNetCore.ResponseCaching.Tests.csproj @@ -1,7 +1,7 @@ - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) diff --git a/src/Middleware/ResponseCompression/perf/Microsoft.AspNetCore.ResponseCompression.Performance.csproj b/src/Middleware/ResponseCompression/perf/Microsoft.AspNetCore.ResponseCompression.Performance.csproj index 11d176ba1c..a4ec7230f6 100644 --- a/src/Middleware/ResponseCompression/perf/Microsoft.AspNetCore.ResponseCompression.Performance.csproj +++ b/src/Middleware/ResponseCompression/perf/Microsoft.AspNetCore.ResponseCompression.Performance.csproj @@ -2,7 +2,7 @@ Exe - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) diff --git a/src/Middleware/ResponseCompression/ref/Microsoft.AspNetCore.ResponseCompression.csproj b/src/Middleware/ResponseCompression/ref/Microsoft.AspNetCore.ResponseCompression.csproj index 4cf1f5fef4..e10a873624 100644 --- a/src/Middleware/ResponseCompression/ref/Microsoft.AspNetCore.ResponseCompression.csproj +++ b/src/Middleware/ResponseCompression/ref/Microsoft.AspNetCore.ResponseCompression.csproj @@ -1,10 +1,10 @@ - netcoreapp3.0 + netcoreapp5.0 - - + + diff --git a/src/Middleware/ResponseCompression/ref/Microsoft.AspNetCore.ResponseCompression.netcoreapp3.0.cs b/src/Middleware/ResponseCompression/ref/Microsoft.AspNetCore.ResponseCompression.netcoreapp.cs similarity index 100% rename from src/Middleware/ResponseCompression/ref/Microsoft.AspNetCore.ResponseCompression.netcoreapp3.0.cs rename to src/Middleware/ResponseCompression/ref/Microsoft.AspNetCore.ResponseCompression.netcoreapp.cs diff --git a/src/Middleware/ResponseCompression/sample/ResponseCompressionSample.csproj b/src/Middleware/ResponseCompression/sample/ResponseCompressionSample.csproj index 434c42ba0c..d5d099263a 100644 --- a/src/Middleware/ResponseCompression/sample/ResponseCompressionSample.csproj +++ b/src/Middleware/ResponseCompression/sample/ResponseCompressionSample.csproj @@ -1,7 +1,7 @@  - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) diff --git a/src/Middleware/ResponseCompression/src/Microsoft.AspNetCore.ResponseCompression.csproj b/src/Middleware/ResponseCompression/src/Microsoft.AspNetCore.ResponseCompression.csproj index c32fbd417e..dfa7e7ae5e 100644 --- a/src/Middleware/ResponseCompression/src/Microsoft.AspNetCore.ResponseCompression.csproj +++ b/src/Middleware/ResponseCompression/src/Microsoft.AspNetCore.ResponseCompression.csproj @@ -2,7 +2,7 @@ ASP.NET Core middleware for HTTP Response compression. - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) true true aspnetcore diff --git a/src/Middleware/ResponseCompression/test/Microsoft.AspNetCore.ResponseCompression.Tests.csproj b/src/Middleware/ResponseCompression/test/Microsoft.AspNetCore.ResponseCompression.Tests.csproj index a2c0269f2e..14628115a8 100644 --- a/src/Middleware/ResponseCompression/test/Microsoft.AspNetCore.ResponseCompression.Tests.csproj +++ b/src/Middleware/ResponseCompression/test/Microsoft.AspNetCore.ResponseCompression.Tests.csproj @@ -1,7 +1,7 @@ - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) diff --git a/src/Middleware/Rewrite/ref/Microsoft.AspNetCore.Rewrite.csproj b/src/Middleware/Rewrite/ref/Microsoft.AspNetCore.Rewrite.csproj index a4014b3f94..2071f06d3c 100644 --- a/src/Middleware/Rewrite/ref/Microsoft.AspNetCore.Rewrite.csproj +++ b/src/Middleware/Rewrite/ref/Microsoft.AspNetCore.Rewrite.csproj @@ -1,10 +1,10 @@ - netcoreapp3.0 + netcoreapp5.0 - - + + diff --git a/src/Middleware/Rewrite/ref/Microsoft.AspNetCore.Rewrite.netcoreapp3.0.cs b/src/Middleware/Rewrite/ref/Microsoft.AspNetCore.Rewrite.netcoreapp.cs similarity index 100% rename from src/Middleware/Rewrite/ref/Microsoft.AspNetCore.Rewrite.netcoreapp3.0.cs rename to src/Middleware/Rewrite/ref/Microsoft.AspNetCore.Rewrite.netcoreapp.cs diff --git a/src/Middleware/Rewrite/sample/RewriteSample.csproj b/src/Middleware/Rewrite/sample/RewriteSample.csproj index 95dd8d25a8..d89f3f138f 100644 --- a/src/Middleware/Rewrite/sample/RewriteSample.csproj +++ b/src/Middleware/Rewrite/sample/RewriteSample.csproj @@ -1,7 +1,7 @@  - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) diff --git a/src/Middleware/Rewrite/src/Microsoft.AspNetCore.Rewrite.csproj b/src/Middleware/Rewrite/src/Microsoft.AspNetCore.Rewrite.csproj index b7f9f44efa..c3baaf1722 100644 --- a/src/Middleware/Rewrite/src/Microsoft.AspNetCore.Rewrite.csproj +++ b/src/Middleware/Rewrite/src/Microsoft.AspNetCore.Rewrite.csproj @@ -5,7 +5,7 @@ * Support for custom URL rewrite rules * Support for running IIS URL Rewrite module rules * Support for running Apache mod_rewrite rules. - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) true $(NoWarn);CS1591 true diff --git a/src/Middleware/Rewrite/test/Microsoft.AspNetCore.Rewrite.Tests.csproj b/src/Middleware/Rewrite/test/Microsoft.AspNetCore.Rewrite.Tests.csproj index a86b25e47f..da3f518789 100644 --- a/src/Middleware/Rewrite/test/Microsoft.AspNetCore.Rewrite.Tests.csproj +++ b/src/Middleware/Rewrite/test/Microsoft.AspNetCore.Rewrite.Tests.csproj @@ -1,7 +1,7 @@ - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) diff --git a/src/Middleware/Session/ref/Microsoft.AspNetCore.Session.csproj b/src/Middleware/Session/ref/Microsoft.AspNetCore.Session.csproj index 3c0a92ba63..28fbf23087 100644 --- a/src/Middleware/Session/ref/Microsoft.AspNetCore.Session.csproj +++ b/src/Middleware/Session/ref/Microsoft.AspNetCore.Session.csproj @@ -1,10 +1,10 @@ - netcoreapp3.0 + netcoreapp5.0 - - + + diff --git a/src/Middleware/Session/ref/Microsoft.AspNetCore.Session.netcoreapp3.0.cs b/src/Middleware/Session/ref/Microsoft.AspNetCore.Session.netcoreapp.cs similarity index 100% rename from src/Middleware/Session/ref/Microsoft.AspNetCore.Session.netcoreapp3.0.cs rename to src/Middleware/Session/ref/Microsoft.AspNetCore.Session.netcoreapp.cs diff --git a/src/Middleware/Session/samples/SessionSample.csproj b/src/Middleware/Session/samples/SessionSample.csproj index 1bdda0779f..c1d8559a47 100644 --- a/src/Middleware/Session/samples/SessionSample.csproj +++ b/src/Middleware/Session/samples/SessionSample.csproj @@ -1,7 +1,7 @@  - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) diff --git a/src/Middleware/Session/src/Microsoft.AspNetCore.Session.csproj b/src/Middleware/Session/src/Microsoft.AspNetCore.Session.csproj index 3d917be5a0..d566d6fe36 100644 --- a/src/Middleware/Session/src/Microsoft.AspNetCore.Session.csproj +++ b/src/Middleware/Session/src/Microsoft.AspNetCore.Session.csproj @@ -2,7 +2,7 @@ ASP.NET Core session state middleware. - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) true $(NoWarn);CS1591 true diff --git a/src/Middleware/Session/test/Microsoft.AspNetCore.Session.Tests.csproj b/src/Middleware/Session/test/Microsoft.AspNetCore.Session.Tests.csproj index 622426b623..0a3b0a288a 100644 --- a/src/Middleware/Session/test/Microsoft.AspNetCore.Session.Tests.csproj +++ b/src/Middleware/Session/test/Microsoft.AspNetCore.Session.Tests.csproj @@ -1,7 +1,7 @@ - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) diff --git a/src/Middleware/SpaServices.Extensions/ref/Microsoft.AspNetCore.SpaServices.Extensions.csproj b/src/Middleware/SpaServices.Extensions/ref/Microsoft.AspNetCore.SpaServices.Extensions.csproj index b3c1224b3d..5665fc2ef1 100644 --- a/src/Middleware/SpaServices.Extensions/ref/Microsoft.AspNetCore.SpaServices.Extensions.csproj +++ b/src/Middleware/SpaServices.Extensions/ref/Microsoft.AspNetCore.SpaServices.Extensions.csproj @@ -1,10 +1,10 @@ - netcoreapp3.0 + netcoreapp5.0 - - + + diff --git a/src/Middleware/SpaServices.Extensions/ref/Microsoft.AspNetCore.SpaServices.Extensions.netcoreapp3.0.cs b/src/Middleware/SpaServices.Extensions/ref/Microsoft.AspNetCore.SpaServices.Extensions.netcoreapp.cs similarity index 98% rename from src/Middleware/SpaServices.Extensions/ref/Microsoft.AspNetCore.SpaServices.Extensions.netcoreapp3.0.cs rename to src/Middleware/SpaServices.Extensions/ref/Microsoft.AspNetCore.SpaServices.Extensions.netcoreapp.cs index 97f23b740d..6691b79a64 100644 --- a/src/Middleware/SpaServices.Extensions/ref/Microsoft.AspNetCore.SpaServices.Extensions.netcoreapp3.0.cs +++ b/src/Middleware/SpaServices.Extensions/ref/Microsoft.AspNetCore.SpaServices.Extensions.netcoreapp.cs @@ -41,6 +41,7 @@ namespace Microsoft.AspNetCore.SpaServices public SpaOptions() { } public Microsoft.AspNetCore.Http.PathString DefaultPage { get { throw null; } set { } } public Microsoft.AspNetCore.Builder.StaticFileOptions DefaultPageStaticFileOptions { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public string PackageManagerCommand { get { throw null; } set { } } public string SourcePath { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } public System.TimeSpan StartupTimeout { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } } diff --git a/src/Middleware/SpaServices.Extensions/src/AngularCli/AngularCliBuilder.cs b/src/Middleware/SpaServices.Extensions/src/AngularCli/AngularCliBuilder.cs index fa3e9cc449..24f0ba430f 100644 --- a/src/Middleware/SpaServices.Extensions/src/AngularCli/AngularCliBuilder.cs +++ b/src/Middleware/SpaServices.Extensions/src/AngularCli/AngularCliBuilder.cs @@ -22,7 +22,7 @@ namespace Microsoft.AspNetCore.SpaServices.AngularCli { private static TimeSpan RegexMatchTimeout = TimeSpan.FromSeconds(5); // This is a development-time only feature, so a very long timeout is fine - private readonly string _npmScriptName; + private readonly string _scriptName; /// /// Constructs an instance of . @@ -35,12 +35,13 @@ namespace Microsoft.AspNetCore.SpaServices.AngularCli throw new ArgumentException("Cannot be null or empty.", nameof(npmScript)); } - _npmScriptName = npmScript; + _scriptName = npmScript; } /// public async Task Build(ISpaBuilder spaBuilder) { + var pkgManagerCommand = spaBuilder.Options.PackageManagerCommand; var sourcePath = spaBuilder.Options.SourcePath; if (string.IsNullOrEmpty(sourcePath)) { @@ -50,32 +51,33 @@ namespace Microsoft.AspNetCore.SpaServices.AngularCli var logger = LoggerFinder.GetOrCreateLogger( spaBuilder.ApplicationBuilder, nameof(AngularCliBuilder)); - var npmScriptRunner = new NpmScriptRunner( + var scriptRunner = new NodeScriptRunner( sourcePath, - _npmScriptName, + _scriptName, "--watch", - null); - npmScriptRunner.AttachToLogger(logger); + null, + pkgManagerCommand); + scriptRunner.AttachToLogger(logger); - using (var stdOutReader = new EventedStreamStringReader(npmScriptRunner.StdOut)) - using (var stdErrReader = new EventedStreamStringReader(npmScriptRunner.StdErr)) + using (var stdOutReader = new EventedStreamStringReader(scriptRunner.StdOut)) + using (var stdErrReader = new EventedStreamStringReader(scriptRunner.StdErr)) { try { - await npmScriptRunner.StdOut.WaitForMatch( + await scriptRunner.StdOut.WaitForMatch( new Regex("Date", RegexOptions.None, RegexMatchTimeout)); } catch (EndOfStreamException ex) { throw new InvalidOperationException( - $"The NPM script '{_npmScriptName}' exited without indicating success.\n" + + $"The {pkgManagerCommand} script '{_scriptName}' exited without indicating success.\n" + $"Output was: {stdOutReader.ReadAsString()}\n" + $"Error output was: {stdErrReader.ReadAsString()}", ex); } catch (OperationCanceledException ex) { throw new InvalidOperationException( - $"The NPM script '{_npmScriptName}' timed out without indicating success. " + + $"The {pkgManagerCommand} script '{_scriptName}' timed out without indicating success. " + $"Output was: {stdOutReader.ReadAsString()}\n" + $"Error output was: {stdErrReader.ReadAsString()}", ex); } diff --git a/src/Middleware/SpaServices.Extensions/src/AngularCli/AngularCliMiddleware.cs b/src/Middleware/SpaServices.Extensions/src/AngularCli/AngularCliMiddleware.cs index 9090f7738b..c4e109b8f7 100644 --- a/src/Middleware/SpaServices.Extensions/src/AngularCli/AngularCliMiddleware.cs +++ b/src/Middleware/SpaServices.Extensions/src/AngularCli/AngularCliMiddleware.cs @@ -23,23 +23,24 @@ namespace Microsoft.AspNetCore.SpaServices.AngularCli public static void Attach( ISpaBuilder spaBuilder, - string npmScriptName) + string scriptName) { + var pkgManagerCommand = spaBuilder.Options.PackageManagerCommand; var sourcePath = spaBuilder.Options.SourcePath; if (string.IsNullOrEmpty(sourcePath)) { throw new ArgumentException("Cannot be null or empty", nameof(sourcePath)); } - if (string.IsNullOrEmpty(npmScriptName)) + if (string.IsNullOrEmpty(scriptName)) { - throw new ArgumentException("Cannot be null or empty", nameof(npmScriptName)); + throw new ArgumentException("Cannot be null or empty", nameof(scriptName)); } // Start Angular CLI and attach to middleware pipeline var appBuilder = spaBuilder.ApplicationBuilder; var logger = LoggerFinder.GetOrCreateLogger(appBuilder, LogCategoryName); - var angularCliServerInfoTask = StartAngularCliServerAsync(sourcePath, npmScriptName, logger); + var angularCliServerInfoTask = StartAngularCliServerAsync(sourcePath, scriptName, pkgManagerCommand, logger); // Everything we proxy is hardcoded to target http://localhost because: // - the requests are always from the local machine (we're not accepting remote @@ -62,27 +63,27 @@ namespace Microsoft.AspNetCore.SpaServices.AngularCli } private static async Task StartAngularCliServerAsync( - string sourcePath, string npmScriptName, ILogger logger) + string sourcePath, string scriptName, string pkgManagerCommand, ILogger logger) { var portNumber = TcpPortFinder.FindAvailablePort(); logger.LogInformation($"Starting @angular/cli on port {portNumber}..."); - var npmScriptRunner = new NpmScriptRunner( - sourcePath, npmScriptName, $"--port {portNumber}", null); - npmScriptRunner.AttachToLogger(logger); + var scriptRunner = new NodeScriptRunner( + sourcePath, scriptName, $"--port {portNumber}", null, pkgManagerCommand); + scriptRunner.AttachToLogger(logger); Match openBrowserLine; - using (var stdErrReader = new EventedStreamStringReader(npmScriptRunner.StdErr)) + using (var stdErrReader = new EventedStreamStringReader(scriptRunner.StdErr)) { try { - openBrowserLine = await npmScriptRunner.StdOut.WaitForMatch( + openBrowserLine = await scriptRunner.StdOut.WaitForMatch( new Regex("open your browser on (http\\S+)", RegexOptions.None, RegexMatchTimeout)); } catch (EndOfStreamException ex) { throw new InvalidOperationException( - $"The NPM script '{npmScriptName}' exited without indicating that the " + + $"The {pkgManagerCommand} script '{scriptName}' exited without indicating that the " + $"Angular CLI was listening for requests. The error output was: " + $"{stdErrReader.ReadAsString()}", ex); } diff --git a/src/Middleware/SpaServices.Extensions/src/AngularCli/AngularCliMiddlewareExtensions.cs b/src/Middleware/SpaServices.Extensions/src/AngularCli/AngularCliMiddlewareExtensions.cs index 28e63c8e35..8f8176447b 100644 --- a/src/Middleware/SpaServices.Extensions/src/AngularCli/AngularCliMiddlewareExtensions.cs +++ b/src/Middleware/SpaServices.Extensions/src/AngularCli/AngularCliMiddlewareExtensions.cs @@ -1,4 +1,4 @@ -// Copyright (c) .NET Foundation. All rights reserved. +// Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using Microsoft.AspNetCore.Builder; diff --git a/src/Middleware/SpaServices.Extensions/src/Microsoft.AspNetCore.SpaServices.Extensions.csproj b/src/Middleware/SpaServices.Extensions/src/Microsoft.AspNetCore.SpaServices.Extensions.csproj index 38e9a0e72c..9aa1e94247 100644 --- a/src/Middleware/SpaServices.Extensions/src/Microsoft.AspNetCore.SpaServices.Extensions.csproj +++ b/src/Middleware/SpaServices.Extensions/src/Microsoft.AspNetCore.SpaServices.Extensions.csproj @@ -2,7 +2,7 @@ Helpers for building single-page applications on ASP.NET MVC Core. - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) true diff --git a/src/Middleware/SpaServices.Extensions/src/Npm/NpmScriptRunner.cs b/src/Middleware/SpaServices.Extensions/src/Npm/NodeScriptRunner.cs similarity index 77% rename from src/Middleware/SpaServices.Extensions/src/Npm/NpmScriptRunner.cs rename to src/Middleware/SpaServices.Extensions/src/Npm/NodeScriptRunner.cs index 378ec5f9fa..f08abeb19c 100644 --- a/src/Middleware/SpaServices.Extensions/src/Npm/NpmScriptRunner.cs +++ b/src/Middleware/SpaServices.Extensions/src/Npm/NodeScriptRunner.cs @@ -1,4 +1,4 @@ -// Copyright (c) .NET Foundation. All rights reserved. +// Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using Microsoft.Extensions.Logging; @@ -16,14 +16,14 @@ namespace Microsoft.AspNetCore.NodeServices.Npm /// Executes the script entries defined in a package.json file, /// capturing any output written to stdio. /// - internal class NpmScriptRunner + internal class NodeScriptRunner { public EventedStreamReader StdOut { get; } public EventedStreamReader StdErr { get; } private static Regex AnsiColorRegex = new Regex("\x001b\\[[0-9;]*m", RegexOptions.None, TimeSpan.FromSeconds(1)); - public NpmScriptRunner(string workingDirectory, string scriptName, string arguments, IDictionary envVars) + public NodeScriptRunner(string workingDirectory, string scriptName, string arguments, IDictionary envVars, string pkgManagerCommand) { if (string.IsNullOrEmpty(workingDirectory)) { @@ -35,18 +35,23 @@ namespace Microsoft.AspNetCore.NodeServices.Npm throw new ArgumentException("Cannot be null or empty.", nameof(scriptName)); } - var npmExe = "npm"; + if (string.IsNullOrEmpty(pkgManagerCommand)) + { + throw new ArgumentException("Cannot be null or empty.", nameof(pkgManagerCommand)); + } + + var exeToRun = pkgManagerCommand; var completeArguments = $"run {scriptName} -- {arguments ?? string.Empty}"; if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) { - // On Windows, the NPM executable is a .cmd file, so it can't be executed + // On Windows, the node executable is a .cmd file, so it can't be executed // directly (except with UseShellExecute=true, but that's no good, because // it prevents capturing stdio). So we need to invoke it via "cmd /c". - npmExe = "cmd"; - completeArguments = $"/c npm {completeArguments}"; + exeToRun = "cmd"; + completeArguments = $"/c {pkgManagerCommand} {completeArguments}"; } - var processStartInfo = new ProcessStartInfo(npmExe) + var processStartInfo = new ProcessStartInfo(exeToRun) { Arguments = completeArguments, UseShellExecute = false, @@ -64,19 +69,19 @@ namespace Microsoft.AspNetCore.NodeServices.Npm } } - var process = LaunchNodeProcess(processStartInfo); + var process = LaunchNodeProcess(processStartInfo, pkgManagerCommand); StdOut = new EventedStreamReader(process.StandardOutput); StdErr = new EventedStreamReader(process.StandardError); } public void AttachToLogger(ILogger logger) { - // When the NPM task emits complete lines, pass them through to the real logger + // When the node task emits complete lines, pass them through to the real logger StdOut.OnReceivedLine += line => { if (!string.IsNullOrWhiteSpace(line)) { - // NPM tasks commonly emit ANSI colors, but it wouldn't make sense to forward + // Node tasks commonly emit ANSI colors, but it wouldn't make sense to forward // those to loggers (because a logger isn't necessarily any kind of terminal) logger.LogInformation(StripAnsiColors(line)); } @@ -106,7 +111,7 @@ namespace Microsoft.AspNetCore.NodeServices.Npm private static string StripAnsiColors(string line) => AnsiColorRegex.Replace(line, string.Empty); - private static Process LaunchNodeProcess(ProcessStartInfo startInfo) + private static Process LaunchNodeProcess(ProcessStartInfo startInfo, string commandName) { try { @@ -119,8 +124,8 @@ namespace Microsoft.AspNetCore.NodeServices.Npm } catch (Exception ex) { - var message = $"Failed to start 'npm'. To resolve this:.\n\n" - + "[1] Ensure that 'npm' is installed and can be found in one of the PATH directories.\n" + var message = $"Failed to start '{commandName}'. To resolve this:.\n\n" + + $"[1] Ensure that '{commandName}' is installed and can be found in one of the PATH directories.\n" + $" Current PATH enviroment variable is: { Environment.GetEnvironmentVariable("PATH") }\n" + " Make sure the executable is in one of those directories, or update your PATH.\n\n" + "[2] See the InnerException for further details of the cause."; diff --git a/src/Middleware/SpaServices.Extensions/src/ReactDevelopmentServer/ReactDevelopmentServerMiddleware.cs b/src/Middleware/SpaServices.Extensions/src/ReactDevelopmentServer/ReactDevelopmentServerMiddleware.cs index 78a7b4f03f..6566fef706 100644 --- a/src/Middleware/SpaServices.Extensions/src/ReactDevelopmentServer/ReactDevelopmentServerMiddleware.cs +++ b/src/Middleware/SpaServices.Extensions/src/ReactDevelopmentServer/ReactDevelopmentServerMiddleware.cs @@ -22,23 +22,24 @@ namespace Microsoft.AspNetCore.SpaServices.ReactDevelopmentServer public static void Attach( ISpaBuilder spaBuilder, - string npmScriptName) + string scriptName) { + var pkgManagerCommand = spaBuilder.Options.PackageManagerCommand; var sourcePath = spaBuilder.Options.SourcePath; if (string.IsNullOrEmpty(sourcePath)) { throw new ArgumentException("Cannot be null or empty", nameof(sourcePath)); } - if (string.IsNullOrEmpty(npmScriptName)) + if (string.IsNullOrEmpty(scriptName)) { - throw new ArgumentException("Cannot be null or empty", nameof(npmScriptName)); + throw new ArgumentException("Cannot be null or empty", nameof(scriptName)); } // Start create-react-app and attach to middleware pipeline var appBuilder = spaBuilder.ApplicationBuilder; var logger = LoggerFinder.GetOrCreateLogger(appBuilder, LogCategoryName); - var portTask = StartCreateReactAppServerAsync(sourcePath, npmScriptName, logger); + var portTask = StartCreateReactAppServerAsync(sourcePath, scriptName, pkgManagerCommand, logger); // Everything we proxy is hardcoded to target http://localhost because: // - the requests are always from the local machine (we're not accepting remote @@ -61,7 +62,7 @@ namespace Microsoft.AspNetCore.SpaServices.ReactDevelopmentServer } private static async Task StartCreateReactAppServerAsync( - string sourcePath, string npmScriptName, ILogger logger) + string sourcePath, string scriptName, string pkgManagerCommand, ILogger logger) { var portNumber = TcpPortFinder.FindAvailablePort(); logger.LogInformation($"Starting create-react-app server on port {portNumber}..."); @@ -71,11 +72,11 @@ namespace Microsoft.AspNetCore.SpaServices.ReactDevelopmentServer { "PORT", portNumber.ToString() }, { "BROWSER", "none" }, // We don't want create-react-app to open its own extra browser window pointing to the internal dev server port }; - var npmScriptRunner = new NpmScriptRunner( - sourcePath, npmScriptName, null, envVars); - npmScriptRunner.AttachToLogger(logger); + var scriptRunner = new NodeScriptRunner( + sourcePath, scriptName, null, envVars, pkgManagerCommand); + scriptRunner.AttachToLogger(logger); - using (var stdErrReader = new EventedStreamStringReader(npmScriptRunner.StdErr)) + using (var stdErrReader = new EventedStreamStringReader(scriptRunner.StdErr)) { try { @@ -83,13 +84,13 @@ namespace Microsoft.AspNetCore.SpaServices.ReactDevelopmentServer // it doesn't do so until it's finished compiling, and even then only if there were // no compiler warnings. So instead of waiting for that, consider it ready as soon // as it starts listening for requests. - await npmScriptRunner.StdOut.WaitForMatch( + await scriptRunner.StdOut.WaitForMatch( new Regex("Starting the development server", RegexOptions.None, RegexMatchTimeout)); } catch (EndOfStreamException ex) { throw new InvalidOperationException( - $"The NPM script '{npmScriptName}' exited without indicating that the " + + $"The {pkgManagerCommand} script '{scriptName}' exited without indicating that the " + $"create-react-app server was listening for requests. The error output was: " + $"{stdErrReader.ReadAsString()}", ex); } diff --git a/src/Middleware/SpaServices.Extensions/src/ReactDevelopmentServer/ReactDevelopmentServerMiddlewareExtensions.cs b/src/Middleware/SpaServices.Extensions/src/ReactDevelopmentServer/ReactDevelopmentServerMiddlewareExtensions.cs index f58a6d1a9d..346e839046 100644 --- a/src/Middleware/SpaServices.Extensions/src/ReactDevelopmentServer/ReactDevelopmentServerMiddlewareExtensions.cs +++ b/src/Middleware/SpaServices.Extensions/src/ReactDevelopmentServer/ReactDevelopmentServerMiddlewareExtensions.cs @@ -1,4 +1,4 @@ -// Copyright (c) .NET Foundation. All rights reserved. +// Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using Microsoft.AspNetCore.Builder; diff --git a/src/Middleware/SpaServices.Extensions/src/SpaOptions.cs b/src/Middleware/SpaServices.Extensions/src/SpaOptions.cs index b2823396dc..59ccc1eda4 100644 --- a/src/Middleware/SpaServices.Extensions/src/SpaOptions.cs +++ b/src/Middleware/SpaServices.Extensions/src/SpaOptions.cs @@ -1,11 +1,10 @@ -// Copyright (c) .NET Foundation. All rights reserved. +// Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. +using System; using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore.Hosting; using Microsoft.AspNetCore.Http; -using Microsoft.Extensions.FileProviders; -using System; namespace Microsoft.AspNetCore.SpaServices { @@ -15,6 +14,7 @@ namespace Microsoft.AspNetCore.SpaServices public class SpaOptions { private PathString _defaultPage = "/index.html"; + private string _packageManagerCommand = "npm"; /// /// Constructs a new instance of . @@ -30,6 +30,7 @@ namespace Microsoft.AspNetCore.SpaServices internal SpaOptions(SpaOptions copyFromOptions) { _defaultPage = copyFromOptions.DefaultPage; + _packageManagerCommand = copyFromOptions.PackageManagerCommand; DefaultPageStaticFileOptions = copyFromOptions.DefaultPageStaticFileOptions; SourcePath = copyFromOptions.SourcePath; } @@ -69,6 +70,26 @@ namespace Microsoft.AspNetCore.SpaServices /// public string SourcePath { get; set; } + /// + /// Gets or sets the name of the package manager executible, (e.g npm, + /// yarn) to run the SPA. + /// + /// The default value is 'npm'. + /// + public string PackageManagerCommand + { + get => _packageManagerCommand; + set + { + if (string.IsNullOrEmpty(value)) + { + throw new ArgumentException($"The value for {nameof(PackageManagerCommand)} cannot be null or empty."); + } + + _packageManagerCommand = value; + } + } + /// /// Gets or sets the maximum duration that a request will wait for the SPA /// to become ready to serve to the client. diff --git a/src/Middleware/SpaServices.Extensions/src/Util/EventedStreamReader.cs b/src/Middleware/SpaServices.Extensions/src/Util/EventedStreamReader.cs index 95e018a590..298d5289d6 100644 --- a/src/Middleware/SpaServices.Extensions/src/Util/EventedStreamReader.cs +++ b/src/Middleware/SpaServices.Extensions/src/Util/EventedStreamReader.cs @@ -89,17 +89,23 @@ namespace Microsoft.AspNetCore.NodeServices.Util OnChunk(new ArraySegment(buf, 0, chunkLength)); - var lineBreakPos = Array.IndexOf(buf, '\n', 0, chunkLength); - if (lineBreakPos < 0) + int lineBreakPos = -1; + int startPos = 0; + + // get all the newlines + while ((lineBreakPos = Array.IndexOf(buf, '\n', startPos, chunkLength - startPos)) >= 0 && startPos < chunkLength) { - _linesBuffer.Append(buf, 0, chunkLength); - } - else - { - _linesBuffer.Append(buf, 0, lineBreakPos + 1); + var length = (lineBreakPos + 1) - startPos; + _linesBuffer.Append(buf, startPos, length); OnCompleteLine(_linesBuffer.ToString()); _linesBuffer.Clear(); - _linesBuffer.Append(buf, lineBreakPos + 1, chunkLength - (lineBreakPos + 1)); + startPos = lineBreakPos + 1; + } + + // get the rest + if (lineBreakPos < 0 && startPos < chunkLength) + { + _linesBuffer.Append(buf, startPos, chunkLength); } } } diff --git a/src/Middleware/SpaServices.Extensions/test/Microsoft.AspNetCore.SpaServices.Extensions.Tests.csproj b/src/Middleware/SpaServices.Extensions/test/Microsoft.AspNetCore.SpaServices.Extensions.Tests.csproj index 78dc7705ba..b3e5aa7c29 100644 --- a/src/Middleware/SpaServices.Extensions/test/Microsoft.AspNetCore.SpaServices.Extensions.Tests.csproj +++ b/src/Middleware/SpaServices.Extensions/test/Microsoft.AspNetCore.SpaServices.Extensions.Tests.csproj @@ -1,7 +1,7 @@  - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) true diff --git a/src/Middleware/SpaServices/ref/Microsoft.AspNetCore.SpaServices.csproj b/src/Middleware/SpaServices/ref/Microsoft.AspNetCore.SpaServices.csproj index 3c4c84ffb7..8a0fd7e2a5 100644 --- a/src/Middleware/SpaServices/ref/Microsoft.AspNetCore.SpaServices.csproj +++ b/src/Middleware/SpaServices/ref/Microsoft.AspNetCore.SpaServices.csproj @@ -1,10 +1,10 @@ - netcoreapp3.0 + netcoreapp5.0 - - + + diff --git a/src/Middleware/SpaServices/ref/Microsoft.AspNetCore.SpaServices.netcoreapp3.0.cs b/src/Middleware/SpaServices/ref/Microsoft.AspNetCore.SpaServices.netcoreapp.cs similarity index 100% rename from src/Middleware/SpaServices/ref/Microsoft.AspNetCore.SpaServices.netcoreapp3.0.cs rename to src/Middleware/SpaServices/ref/Microsoft.AspNetCore.SpaServices.netcoreapp.cs diff --git a/src/Middleware/SpaServices/src/Microsoft.AspNetCore.SpaServices.csproj b/src/Middleware/SpaServices/src/Microsoft.AspNetCore.SpaServices.csproj index 7efd6b6832..3db479b01e 100644 --- a/src/Middleware/SpaServices/src/Microsoft.AspNetCore.SpaServices.csproj +++ b/src/Middleware/SpaServices/src/Microsoft.AspNetCore.SpaServices.csproj @@ -2,7 +2,7 @@ Helpers for building single-page applications on ASP.NET MVC Core. - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) true diff --git a/src/Middleware/StaticFiles/ref/Microsoft.AspNetCore.StaticFiles.csproj b/src/Middleware/StaticFiles/ref/Microsoft.AspNetCore.StaticFiles.csproj index 0bd2351f38..0daa921c68 100644 --- a/src/Middleware/StaticFiles/ref/Microsoft.AspNetCore.StaticFiles.csproj +++ b/src/Middleware/StaticFiles/ref/Microsoft.AspNetCore.StaticFiles.csproj @@ -1,10 +1,10 @@ - netcoreapp3.0 + netcoreapp5.0 - - + + diff --git a/src/Middleware/StaticFiles/ref/Microsoft.AspNetCore.StaticFiles.netcoreapp3.0.cs b/src/Middleware/StaticFiles/ref/Microsoft.AspNetCore.StaticFiles.netcoreapp.cs similarity index 97% rename from src/Middleware/StaticFiles/ref/Microsoft.AspNetCore.StaticFiles.netcoreapp3.0.cs rename to src/Middleware/StaticFiles/ref/Microsoft.AspNetCore.StaticFiles.netcoreapp.cs index 424801bb14..155d816cb8 100644 --- a/src/Middleware/StaticFiles/ref/Microsoft.AspNetCore.StaticFiles.netcoreapp3.0.cs +++ b/src/Middleware/StaticFiles/ref/Microsoft.AspNetCore.StaticFiles.netcoreapp.cs @@ -120,12 +120,14 @@ namespace Microsoft.AspNetCore.StaticFiles.Infrastructure { public SharedOptions() { } public Microsoft.Extensions.FileProviders.IFileProvider FileProvider { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } + public bool RedirectToAppendTrailingSlash { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } public Microsoft.AspNetCore.Http.PathString RequestPath { get { throw null; } set { } } } public abstract partial class SharedOptionsBase { protected SharedOptionsBase(Microsoft.AspNetCore.StaticFiles.Infrastructure.SharedOptions sharedOptions) { } public Microsoft.Extensions.FileProviders.IFileProvider FileProvider { get { throw null; } set { } } + public bool RedirectToAppendTrailingSlash { get { throw null; } set { } } public Microsoft.AspNetCore.Http.PathString RequestPath { get { throw null; } set { } } protected Microsoft.AspNetCore.StaticFiles.Infrastructure.SharedOptions SharedOptions { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } } diff --git a/src/Middleware/StaticFiles/samples/StaticFileSample/StaticFileSample.csproj b/src/Middleware/StaticFiles/samples/StaticFileSample/StaticFileSample.csproj index e9a94e7443..a953d61577 100644 --- a/src/Middleware/StaticFiles/samples/StaticFileSample/StaticFileSample.csproj +++ b/src/Middleware/StaticFiles/samples/StaticFileSample/StaticFileSample.csproj @@ -1,6 +1,6 @@ - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) OutOfProcess diff --git a/src/Middleware/StaticFiles/src/DefaultFilesMiddleware.cs b/src/Middleware/StaticFiles/src/DefaultFilesMiddleware.cs index 3aabe2fe65..b3b4755789 100644 --- a/src/Middleware/StaticFiles/src/DefaultFilesMiddleware.cs +++ b/src/Middleware/StaticFiles/src/DefaultFilesMiddleware.cs @@ -80,17 +80,13 @@ namespace Microsoft.AspNetCore.StaticFiles { // If the path matches a directory but does not end in a slash, redirect to add the slash. // This prevents relative links from breaking. - if (!Helpers.PathEndsInSlash(context.Request.Path)) + if (!Helpers.PathEndsInSlash(context.Request.Path) && _options.RedirectToAppendTrailingSlash) { - context.Response.StatusCode = StatusCodes.Status301MovedPermanently; - var request = context.Request; - var redirect = UriHelper.BuildAbsolute(request.Scheme, request.Host, request.PathBase, request.Path + "/", request.QueryString); - context.Response.Headers[HeaderNames.Location] = redirect; + Helpers.RedirectToPathWithSlash(context); return Task.CompletedTask; } - // Match found, re-write the url. A later middleware will actually serve the file. - context.Request.Path = new PathString(context.Request.Path.Value + defaultFile); + context.Request.Path = new PathString(Helpers.GetPathValueWithSlash(context.Request.Path) + defaultFile); break; } } diff --git a/src/Middleware/StaticFiles/src/DirectoryBrowserMiddleware.cs b/src/Middleware/StaticFiles/src/DirectoryBrowserMiddleware.cs index 2d0a07b509..e689b309e4 100644 --- a/src/Middleware/StaticFiles/src/DirectoryBrowserMiddleware.cs +++ b/src/Middleware/StaticFiles/src/DirectoryBrowserMiddleware.cs @@ -87,12 +87,9 @@ namespace Microsoft.AspNetCore.StaticFiles { // If the path matches a directory but does not end in a slash, redirect to add the slash. // This prevents relative links from breaking. - if (!Helpers.PathEndsInSlash(context.Request.Path)) + if (!Helpers.PathEndsInSlash(context.Request.Path) && _options.RedirectToAppendTrailingSlash) { - context.Response.StatusCode = StatusCodes.Status301MovedPermanently; - var request = context.Request; - var redirect = UriHelper.BuildAbsolute(request.Scheme, request.Host, request.PathBase, request.Path + "/", request.QueryString); - context.Response.Headers[HeaderNames.Location] = redirect; + Helpers.RedirectToPathWithSlash(context); return Task.CompletedTask; } diff --git a/src/Middleware/StaticFiles/src/Helpers.cs b/src/Middleware/StaticFiles/src/Helpers.cs index a7a49e9070..d9b29c082f 100644 --- a/src/Middleware/StaticFiles/src/Helpers.cs +++ b/src/Middleware/StaticFiles/src/Helpers.cs @@ -2,9 +2,12 @@ // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System; +using System.Threading.Tasks; using Microsoft.AspNetCore.Hosting; using Microsoft.AspNetCore.Http; +using Microsoft.AspNetCore.Http.Extensions; using Microsoft.Extensions.FileProviders; +using Microsoft.Net.Http.Headers; namespace Microsoft.AspNetCore.StaticFiles { @@ -12,7 +15,8 @@ namespace Microsoft.AspNetCore.StaticFiles { internal static IFileProvider ResolveFileProvider(IWebHostEnvironment hostingEnv) { - if (hostingEnv.WebRootFileProvider == null) { + if (hostingEnv.WebRootFileProvider == null) + { throw new InvalidOperationException("Missing FileProvider."); } return hostingEnv.WebRootFileProvider; @@ -28,6 +32,23 @@ namespace Microsoft.AspNetCore.StaticFiles return path.Value.EndsWith("/", StringComparison.Ordinal); } + internal static string GetPathValueWithSlash(PathString path) + { + if (!PathEndsInSlash(path)) + { + return path.Value + "/"; + } + return path.Value; + } + + internal static void RedirectToPathWithSlash(HttpContext context) + { + context.Response.StatusCode = StatusCodes.Status301MovedPermanently; + var request = context.Request; + var redirect = UriHelper.BuildAbsolute(request.Scheme, request.Host, request.PathBase, request.Path + "/", request.QueryString); + context.Response.Headers[HeaderNames.Location] = redirect; + } + internal static bool TryMatchPath(HttpContext context, PathString matchUrl, bool forDirectory, out PathString subpath) { var path = context.Request.Path; diff --git a/src/Middleware/StaticFiles/src/Infrastructure/SharedOptions.cs b/src/Middleware/StaticFiles/src/Infrastructure/SharedOptions.cs index 1c1cc80ad5..d6f08129a1 100644 --- a/src/Middleware/StaticFiles/src/Infrastructure/SharedOptions.cs +++ b/src/Middleware/StaticFiles/src/Infrastructure/SharedOptions.cs @@ -42,5 +42,10 @@ namespace Microsoft.AspNetCore.StaticFiles.Infrastructure /// The file system used to locate resources /// public IFileProvider FileProvider { get; set; } + + /// + /// Indicates whether to redirect to add a trailing slash at the end of path. Relative resource links may require this. + /// + public bool RedirectToAppendTrailingSlash { get; set; } = true; } } diff --git a/src/Middleware/StaticFiles/src/Infrastructure/SharedOptionsBase.cs b/src/Middleware/StaticFiles/src/Infrastructure/SharedOptionsBase.cs index 16900ec6fb..9e41b96cdc 100644 --- a/src/Middleware/StaticFiles/src/Infrastructure/SharedOptionsBase.cs +++ b/src/Middleware/StaticFiles/src/Infrastructure/SharedOptionsBase.cs @@ -48,5 +48,14 @@ namespace Microsoft.AspNetCore.StaticFiles.Infrastructure get { return SharedOptions.FileProvider; } set { SharedOptions.FileProvider = value; } } + + /// + /// Indicates whether to redirect to add a trailing slash at the end of path. Relative resource links may require this. + /// + public bool RedirectToAppendTrailingSlash + { + get { return SharedOptions.RedirectToAppendTrailingSlash; } + set { SharedOptions.RedirectToAppendTrailingSlash = value; } + } } } diff --git a/src/Middleware/StaticFiles/src/Microsoft.AspNetCore.StaticFiles.csproj b/src/Middleware/StaticFiles/src/Microsoft.AspNetCore.StaticFiles.csproj index c4a164b987..5f4e9d1a46 100644 --- a/src/Middleware/StaticFiles/src/Microsoft.AspNetCore.StaticFiles.csproj +++ b/src/Middleware/StaticFiles/src/Microsoft.AspNetCore.StaticFiles.csproj @@ -2,7 +2,7 @@ ASP.NET Core static files middleware. Includes middleware for serving static files, directory browsing, and default files. - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) true $(NoWarn);CS1591 true 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 e6c8278b30..0c54844dbd 100644 --- a/src/Middleware/StaticFiles/test/FunctionalTests/Microsoft.AspNetCore.StaticFiles.FunctionalTests.csproj +++ b/src/Middleware/StaticFiles/test/FunctionalTests/Microsoft.AspNetCore.StaticFiles.FunctionalTests.csproj @@ -1,7 +1,7 @@ - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) - netcoreapp3.0 + netcoreapp5.0 - - + + diff --git a/src/Middleware/WebSockets/ref/Microsoft.AspNetCore.WebSockets.netcoreapp3.0.cs b/src/Middleware/WebSockets/ref/Microsoft.AspNetCore.WebSockets.netcoreapp.cs similarity index 100% rename from src/Middleware/WebSockets/ref/Microsoft.AspNetCore.WebSockets.netcoreapp3.0.cs rename to src/Middleware/WebSockets/ref/Microsoft.AspNetCore.WebSockets.netcoreapp.cs diff --git a/src/Middleware/WebSockets/samples/EchoApp/EchoApp.csproj b/src/Middleware/WebSockets/samples/EchoApp/EchoApp.csproj index 0b821199f6..15f4b19a4f 100644 --- a/src/Middleware/WebSockets/samples/EchoApp/EchoApp.csproj +++ b/src/Middleware/WebSockets/samples/EchoApp/EchoApp.csproj @@ -1,7 +1,7 @@  - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) diff --git a/src/Middleware/WebSockets/src/Microsoft.AspNetCore.WebSockets.csproj b/src/Middleware/WebSockets/src/Microsoft.AspNetCore.WebSockets.csproj index ff746ce830..711d5f3ae8 100644 --- a/src/Middleware/WebSockets/src/Microsoft.AspNetCore.WebSockets.csproj +++ b/src/Middleware/WebSockets/src/Microsoft.AspNetCore.WebSockets.csproj @@ -2,7 +2,7 @@ ASP.NET Core web socket middleware for use on top of opaque servers. - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) true $(NoWarn);CS1591 true diff --git a/src/Middleware/WebSockets/test/ConformanceTests/Autobahn/AutobahnTester.cs b/src/Middleware/WebSockets/test/ConformanceTests/Autobahn/AutobahnTester.cs index 05b1d55ee1..7e985a0599 100644 --- a/src/Middleware/WebSockets/test/ConformanceTests/Autobahn/AutobahnTester.cs +++ b/src/Middleware/WebSockets/test/ConformanceTests/Autobahn/AutobahnTester.cs @@ -139,7 +139,7 @@ namespace Microsoft.AspNetCore.WebSockets.ConformanceTest.Autobahn { Scheme = (ssl ? Uri.UriSchemeHttps : Uri.UriSchemeHttp), ApplicationType = ApplicationType.Portable, - TargetFramework = "netcoreapp3.0", + TargetFramework = "netcoreapp5.0", EnvironmentName = environment, SiteName = "HttpTestSite", // This is configured in the Http.config ServerConfigTemplateContent = (server == ServerType.IISExpress) ? File.ReadAllText(configPath) : null, diff --git a/src/Middleware/WebSockets/test/ConformanceTests/AutobahnTestApp/AutobahnTestApp.csproj b/src/Middleware/WebSockets/test/ConformanceTests/AutobahnTestApp/AutobahnTestApp.csproj index 27988f2008..dff1565f7f 100644 --- a/src/Middleware/WebSockets/test/ConformanceTests/AutobahnTestApp/AutobahnTestApp.csproj +++ b/src/Middleware/WebSockets/test/ConformanceTests/AutobahnTestApp/AutobahnTestApp.csproj @@ -1,7 +1,7 @@ - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) true diff --git a/src/Middleware/WebSockets/test/ConformanceTests/Microsoft.AspNetCore.WebSockets.ConformanceTests.csproj b/src/Middleware/WebSockets/test/ConformanceTests/Microsoft.AspNetCore.WebSockets.ConformanceTests.csproj index 518742a102..8a3b9ec58c 100644 --- a/src/Middleware/WebSockets/test/ConformanceTests/Microsoft.AspNetCore.WebSockets.ConformanceTests.csproj +++ b/src/Middleware/WebSockets/test/ConformanceTests/Microsoft.AspNetCore.WebSockets.ConformanceTests.csproj @@ -1,7 +1,7 @@  - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) $(DefaultItemExcludes);AutobahnTestApp\**\* 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 42aefeaebd..e654e836e6 100644 --- a/src/Middleware/WebSockets/test/UnitTests/Microsoft.AspNetCore.WebSockets.Tests.csproj +++ b/src/Middleware/WebSockets/test/UnitTests/Microsoft.AspNetCore.WebSockets.Tests.csproj @@ -1,7 +1,7 @@ - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) diff --git a/src/MusicStore/samples/MusicStore/MusicStore.csproj b/src/MusicStore/samples/MusicStore/MusicStore.csproj index 989c42a4a6..bf1762d331 100644 --- a/src/MusicStore/samples/MusicStore/MusicStore.csproj +++ b/src/MusicStore/samples/MusicStore/MusicStore.csproj @@ -4,7 +4,7 @@ Music store application on ASP.NET Core - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) $(DefineConstants);DEMO win-x86;win-x64;linux-x64;osx-x64 true diff --git a/src/MusicStore/test/MusicStore.E2ETests/DotnetRunTests.cs b/src/MusicStore/test/MusicStore.E2ETests/DotnetRunTests.cs index 7325917892..ed7fb66de9 100644 --- a/src/MusicStore/test/MusicStore.E2ETests/DotnetRunTests.cs +++ b/src/MusicStore/test/MusicStore.E2ETests/DotnetRunTests.cs @@ -17,7 +17,7 @@ namespace E2ETests { public static TestMatrix TestVariants => TestMatrix.ForServers(ServerType.Kestrel) - .WithTfms(Tfm.NetCoreApp30); + .WithTfms(Tfm.NetCoreApp50); [ConditionalTheory] [MemberData(nameof(TestVariants))] diff --git a/src/MusicStore/test/MusicStore.E2ETests/MusicStore.E2ETests.csproj b/src/MusicStore/test/MusicStore.E2ETests/MusicStore.E2ETests.csproj index ee3ed0e04f..09854d0428 100644 --- a/src/MusicStore/test/MusicStore.E2ETests/MusicStore.E2ETests.csproj +++ b/src/MusicStore/test/MusicStore.E2ETests/MusicStore.E2ETests.csproj @@ -1,7 +1,7 @@  - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) MusicStore.E2ETests MusicStore.E2ETests true diff --git a/src/MusicStore/test/MusicStore.E2ETests/NtlmAuthentationTest.cs b/src/MusicStore/test/MusicStore.E2ETests/NtlmAuthentationTest.cs index d1d82a9717..ee2973fe1b 100644 --- a/src/MusicStore/test/MusicStore.E2ETests/NtlmAuthentationTest.cs +++ b/src/MusicStore/test/MusicStore.E2ETests/NtlmAuthentationTest.cs @@ -18,7 +18,7 @@ namespace E2ETests { public static TestMatrix TestVariants => TestMatrix.ForServers(ServerType.IISExpress, ServerType.HttpSys) - .WithTfms(Tfm.NetCoreApp30) + .WithTfms(Tfm.NetCoreApp50) .WithAllApplicationTypes() .WithAllArchitectures(); diff --git a/src/MusicStore/test/MusicStore.E2ETests/OpenIdConnectTests.cs b/src/MusicStore/test/MusicStore.E2ETests/OpenIdConnectTests.cs index d65b0c0d49..5e59c33c38 100644 --- a/src/MusicStore/test/MusicStore.E2ETests/OpenIdConnectTests.cs +++ b/src/MusicStore/test/MusicStore.E2ETests/OpenIdConnectTests.cs @@ -15,7 +15,7 @@ namespace E2ETests { public static TestMatrix TestVariants => TestMatrix.ForServers(ServerType.IISExpress, ServerType.Kestrel) - .WithTfms(Tfm.NetCoreApp30); + .WithTfms(Tfm.NetCoreApp50); [ConditionalTheory] [MemberData(nameof(TestVariants))] diff --git a/src/MusicStore/test/MusicStore.E2ETests/PublishAndRunTests.cs b/src/MusicStore/test/MusicStore.E2ETests/PublishAndRunTests.cs index 66216c0d43..d0760c261f 100644 --- a/src/MusicStore/test/MusicStore.E2ETests/PublishAndRunTests.cs +++ b/src/MusicStore/test/MusicStore.E2ETests/PublishAndRunTests.cs @@ -16,7 +16,7 @@ namespace E2ETests { public static TestMatrix TestVariants => TestMatrix.ForServers(ServerType.IISExpress, ServerType.HttpSys) - .WithTfms(Tfm.NetCoreApp30) + .WithTfms(Tfm.NetCoreApp50) .WithAllApplicationTypes() .WithAllHostingModels() .WithAllArchitectures(); diff --git a/src/MusicStore/test/MusicStore.E2ETests/SmokeTests.cs b/src/MusicStore/test/MusicStore.E2ETests/SmokeTests.cs index a109d20340..26d8cd2771 100644 --- a/src/MusicStore/test/MusicStore.E2ETests/SmokeTests.cs +++ b/src/MusicStore/test/MusicStore.E2ETests/SmokeTests.cs @@ -17,7 +17,7 @@ namespace E2ETests { public static TestMatrix TestVariants => TestMatrix.ForServers(ServerType.IISExpress, ServerType.Kestrel, ServerType.HttpSys) - .WithTfms(Tfm.NetCoreApp30) + .WithTfms(Tfm.NetCoreApp50) .WithAllApplicationTypes() .WithAllHostingModels(); diff --git a/src/MusicStore/test/MusicStore.E2ETests/SmokeTestsOnNanoServer.cs b/src/MusicStore/test/MusicStore.E2ETests/SmokeTestsOnNanoServer.cs index 93bd014a2c..490d2148ce 100644 --- a/src/MusicStore/test/MusicStore.E2ETests/SmokeTestsOnNanoServer.cs +++ b/src/MusicStore/test/MusicStore.E2ETests/SmokeTestsOnNanoServer.cs @@ -244,7 +244,7 @@ namespace E2ETests _remoteDeploymentConfig.AccountName, _remoteDeploymentConfig.AccountPassword) { - TargetFramework = Tfm.NetCoreApp30, + TargetFramework = Tfm.NetCoreApp50, ApplicationBaseUriHint = applicationBaseUrl, ApplicationType = applicationType }; diff --git a/src/MusicStore/test/MusicStore.E2ETests/StoreSmokeTests.cs b/src/MusicStore/test/MusicStore.E2ETests/StoreSmokeTests.cs index aa9a908d66..5995c16391 100644 --- a/src/MusicStore/test/MusicStore.E2ETests/StoreSmokeTests.cs +++ b/src/MusicStore/test/MusicStore.E2ETests/StoreSmokeTests.cs @@ -34,7 +34,7 @@ namespace E2ETests EnvironmentName = "SocialTesting", PublishApplicationBeforeDeployment = true, PreservePublishedApplicationForDebugging = Helpers.PreservePublishedApplicationForDebugging, - TargetFramework = Tfm.NetCoreApp30, + TargetFramework = Tfm.NetCoreApp50, UserAdditionalCleanup = parameters => { DbUtils.DropDatabase(musicStoreDbName, logger); diff --git a/src/MusicStore/test/MusicStore.Test/MusicStore.Test.csproj b/src/MusicStore/test/MusicStore.Test/MusicStore.Test.csproj index 88a794f766..9394095a66 100644 --- a/src/MusicStore/test/MusicStore.Test/MusicStore.Test.csproj +++ b/src/MusicStore/test/MusicStore.Test/MusicStore.Test.csproj @@ -1,7 +1,7 @@  - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) diff --git a/src/Mvc/Mvc.Abstractions/ref/Microsoft.AspNetCore.Mvc.Abstractions.csproj b/src/Mvc/Mvc.Abstractions/ref/Microsoft.AspNetCore.Mvc.Abstractions.csproj index 90b63669a8..b279abb8a7 100644 --- a/src/Mvc/Mvc.Abstractions/ref/Microsoft.AspNetCore.Mvc.Abstractions.csproj +++ b/src/Mvc/Mvc.Abstractions/ref/Microsoft.AspNetCore.Mvc.Abstractions.csproj @@ -1,10 +1,10 @@ - netcoreapp3.0 + netcoreapp5.0 - - + + diff --git a/src/Mvc/Mvc.Abstractions/ref/Microsoft.AspNetCore.Mvc.Abstractions.netcoreapp3.0.cs b/src/Mvc/Mvc.Abstractions/ref/Microsoft.AspNetCore.Mvc.Abstractions.netcoreapp.cs similarity index 100% rename from src/Mvc/Mvc.Abstractions/ref/Microsoft.AspNetCore.Mvc.Abstractions.netcoreapp3.0.cs rename to src/Mvc/Mvc.Abstractions/ref/Microsoft.AspNetCore.Mvc.Abstractions.netcoreapp.cs 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 e3517b9413..7588b3858f 100644 --- a/src/Mvc/Mvc.Abstractions/src/Microsoft.AspNetCore.Mvc.Abstractions.csproj +++ b/src/Mvc/Mvc.Abstractions/src/Microsoft.AspNetCore.Mvc.Abstractions.csproj @@ -4,7 +4,7 @@ ASP.NET Core MVC abstractions and interfaces for action invocation and dispatching, authorization, action filters, formatters, model binding, routing, validation, and more. Commonly used types: Microsoft.AspNetCore.Mvc.IActionResult - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) true true aspnetcore;aspnetcoremvc diff --git a/src/Mvc/Mvc.Abstractions/test/Microsoft.AspNetCore.Mvc.Abstractions.Test.csproj b/src/Mvc/Mvc.Abstractions/test/Microsoft.AspNetCore.Mvc.Abstractions.Test.csproj index 28eee994cd..20346bbd0b 100644 --- a/src/Mvc/Mvc.Abstractions/test/Microsoft.AspNetCore.Mvc.Abstractions.Test.csproj +++ b/src/Mvc/Mvc.Abstractions/test/Microsoft.AspNetCore.Mvc.Abstractions.Test.csproj @@ -1,7 +1,7 @@ - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) diff --git a/src/Mvc/Mvc.Analyzers/test/Mvc.Analyzers.Test.csproj b/src/Mvc/Mvc.Analyzers/test/Mvc.Analyzers.Test.csproj index 94f546a1cd..2a6bf81ebb 100644 --- a/src/Mvc/Mvc.Analyzers/test/Mvc.Analyzers.Test.csproj +++ b/src/Mvc/Mvc.Analyzers/test/Mvc.Analyzers.Test.csproj @@ -1,7 +1,7 @@  - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) true Microsoft.AspNetCore.Mvc.Analyzers 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 285dfc7866..5bed22b17f 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 @@ -1,7 +1,7 @@  - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) Microsoft.AspNetCore.Mvc.Api.Analyzers diff --git a/src/Mvc/Mvc.ApiExplorer/ref/Microsoft.AspNetCore.Mvc.ApiExplorer.csproj b/src/Mvc/Mvc.ApiExplorer/ref/Microsoft.AspNetCore.Mvc.ApiExplorer.csproj index 791b79a913..b99e1f3349 100644 --- a/src/Mvc/Mvc.ApiExplorer/ref/Microsoft.AspNetCore.Mvc.ApiExplorer.csproj +++ b/src/Mvc/Mvc.ApiExplorer/ref/Microsoft.AspNetCore.Mvc.ApiExplorer.csproj @@ -1,10 +1,10 @@ - netcoreapp3.0 + netcoreapp5.0 - - + + diff --git a/src/Mvc/Mvc.ApiExplorer/ref/Microsoft.AspNetCore.Mvc.ApiExplorer.netcoreapp3.0.cs b/src/Mvc/Mvc.ApiExplorer/ref/Microsoft.AspNetCore.Mvc.ApiExplorer.netcoreapp.cs similarity index 100% rename from src/Mvc/Mvc.ApiExplorer/ref/Microsoft.AspNetCore.Mvc.ApiExplorer.netcoreapp3.0.cs rename to src/Mvc/Mvc.ApiExplorer/ref/Microsoft.AspNetCore.Mvc.ApiExplorer.netcoreapp.cs 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 6874fc0a53..7265eba3b1 100644 --- a/src/Mvc/Mvc.ApiExplorer/src/Microsoft.AspNetCore.Mvc.ApiExplorer.csproj +++ b/src/Mvc/Mvc.ApiExplorer/src/Microsoft.AspNetCore.Mvc.ApiExplorer.csproj @@ -2,7 +2,7 @@ ASP.NET Core MVC API explorer functionality for discovering metadata such as the list of controllers and actions, and their URLs and allowed HTTP methods. - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) true true aspnetcore;aspnetcoremvc diff --git a/src/Mvc/Mvc.ApiExplorer/test/Microsoft.AspNetCore.Mvc.ApiExplorer.Test.csproj b/src/Mvc/Mvc.ApiExplorer/test/Microsoft.AspNetCore.Mvc.ApiExplorer.Test.csproj index df8bb63d3b..3f1a6d7374 100644 --- a/src/Mvc/Mvc.ApiExplorer/test/Microsoft.AspNetCore.Mvc.ApiExplorer.Test.csproj +++ b/src/Mvc/Mvc.ApiExplorer/test/Microsoft.AspNetCore.Mvc.ApiExplorer.Test.csproj @@ -1,7 +1,7 @@ - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) diff --git a/src/Mvc/Mvc.Core/ref/Microsoft.AspNetCore.Mvc.Core.csproj b/src/Mvc/Mvc.Core/ref/Microsoft.AspNetCore.Mvc.Core.csproj index d319a85c95..c84d3a98f0 100644 --- a/src/Mvc/Mvc.Core/ref/Microsoft.AspNetCore.Mvc.Core.csproj +++ b/src/Mvc/Mvc.Core/ref/Microsoft.AspNetCore.Mvc.Core.csproj @@ -1,10 +1,10 @@ - netcoreapp3.0 + netcoreapp5.0 - - + + diff --git a/src/Mvc/Mvc.Core/ref/Microsoft.AspNetCore.Mvc.Core.netcoreapp3.0.cs b/src/Mvc/Mvc.Core/ref/Microsoft.AspNetCore.Mvc.Core.netcoreapp.cs similarity index 100% rename from src/Mvc/Mvc.Core/ref/Microsoft.AspNetCore.Mvc.Core.netcoreapp3.0.cs rename to src/Mvc/Mvc.Core/ref/Microsoft.AspNetCore.Mvc.Core.netcoreapp.cs diff --git a/src/Mvc/Mvc.Core/src/FileContentResult.cs b/src/Mvc/Mvc.Core/src/FileContentResult.cs index 0c33859001..b289f20413 100644 --- a/src/Mvc/Mvc.Core/src/FileContentResult.cs +++ b/src/Mvc/Mvc.Core/src/FileContentResult.cs @@ -27,10 +27,6 @@ namespace Microsoft.AspNetCore.Mvc public FileContentResult(byte[] fileContents, string contentType) : this(fileContents, MediaTypeHeaderValue.Parse(contentType)) { - if (fileContents == null) - { - throw new ArgumentNullException(nameof(fileContents)); - } } /// @@ -80,4 +76,4 @@ namespace Microsoft.AspNetCore.Mvc return executor.ExecuteAsync(context, this); } } -} \ No newline at end of file +} 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 fafac71bf7..c8140176dc 100644 --- a/src/Mvc/Mvc.Core/src/Microsoft.AspNetCore.Mvc.Core.csproj +++ b/src/Mvc/Mvc.Core/src/Microsoft.AspNetCore.Mvc.Core.csproj @@ -10,7 +10,7 @@ Microsoft.AspNetCore.Mvc.FromBodyAttribute Microsoft.AspNetCore.Mvc.FromFormAttribute Microsoft.AspNetCore.Mvc.RequireHttpsAttribute Microsoft.AspNetCore.Mvc.RouteAttribute - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) true $(NoWarn);CS1591 true diff --git a/src/Mvc/Mvc.Core/src/Routing/UrlHelperFactory.cs b/src/Mvc/Mvc.Core/src/Routing/UrlHelperFactory.cs index dfe16c2421..5fffa77974 100644 --- a/src/Mvc/Mvc.Core/src/Routing/UrlHelperFactory.cs +++ b/src/Mvc/Mvc.Core/src/Routing/UrlHelperFactory.cs @@ -21,7 +21,7 @@ namespace Microsoft.AspNetCore.Mvc.Routing { if (context == null) { - throw new ArgumentNullException(Resources.ArgumentCannotBeNullOrEmpty, (nameof(context))); + throw new ArgumentNullException(nameof(context)); } var httpContext = context.HttpContext; @@ -69,4 +69,4 @@ namespace Microsoft.AspNetCore.Mvc.Routing return urlHelper; } } -} \ No newline at end of file +} diff --git a/src/Mvc/Mvc.Core/src/VirtualFileResult.cs b/src/Mvc/Mvc.Core/src/VirtualFileResult.cs index af075b5a09..e44b0623ff 100644 --- a/src/Mvc/Mvc.Core/src/VirtualFileResult.cs +++ b/src/Mvc/Mvc.Core/src/VirtualFileResult.cs @@ -27,10 +27,6 @@ namespace Microsoft.AspNetCore.Mvc public VirtualFileResult(string fileName, string contentType) : this(fileName, MediaTypeHeaderValue.Parse(contentType)) { - if (fileName == null) - { - throw new ArgumentNullException(nameof(fileName)); - } } /// diff --git a/src/Mvc/Mvc.Core/test/Authorization/AuthorizeFilterTest.cs b/src/Mvc/Mvc.Core/test/Authorization/AuthorizeFilterTest.cs index e5c390395b..15d2341e12 100644 --- a/src/Mvc/Mvc.Core/test/Authorization/AuthorizeFilterTest.cs +++ b/src/Mvc/Mvc.Core/test/Authorization/AuthorizeFilterTest.cs @@ -317,11 +317,11 @@ namespace Microsoft.AspNetCore.Mvc.Authorization public async Task AuthorizationFilterCombinesMultipleFilters() { // Arrange - var authorizeFilter = new AuthorizeFilter(new AuthorizationPolicyBuilder().RequireAssertion(a => true).Build()); + var authorizeFilter = new AuthorizeFilter(new AuthorizationPolicyBuilder().RequireAssertion(a => false).Build()); var authorizationContext = GetAuthorizationContext(anonymous: false); // Effective policy should fail, if both are combined authorizationContext.Filters.Add(authorizeFilter); - var secondFilter = new AuthorizeFilter(new AuthorizationPolicyBuilder().RequireAssertion(a => false).Build()); + var secondFilter = new AuthorizeFilter(new AuthorizationPolicyBuilder().RequireAssertion(a => true).Build()); authorizationContext.Filters.Add(secondFilter); // Act diff --git a/src/Mvc/Mvc.Core/test/Microsoft.AspNetCore.Mvc.Core.Test.csproj b/src/Mvc/Mvc.Core/test/Microsoft.AspNetCore.Mvc.Core.Test.csproj index 1552b9c6e4..e8b96dab5a 100644 --- a/src/Mvc/Mvc.Core/test/Microsoft.AspNetCore.Mvc.Core.Test.csproj +++ b/src/Mvc/Mvc.Core/test/Microsoft.AspNetCore.Mvc.Core.Test.csproj @@ -1,7 +1,7 @@  - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) Microsoft.AspNetCore.Mvc diff --git a/src/Mvc/Mvc.Cors/ref/Microsoft.AspNetCore.Mvc.Cors.csproj b/src/Mvc/Mvc.Cors/ref/Microsoft.AspNetCore.Mvc.Cors.csproj index a3bf5f99a6..8842cb0ec9 100644 --- a/src/Mvc/Mvc.Cors/ref/Microsoft.AspNetCore.Mvc.Cors.csproj +++ b/src/Mvc/Mvc.Cors/ref/Microsoft.AspNetCore.Mvc.Cors.csproj @@ -1,10 +1,10 @@ - netcoreapp3.0 + netcoreapp5.0 - - + + diff --git a/src/Mvc/Mvc.Cors/ref/Microsoft.AspNetCore.Mvc.Cors.netcoreapp3.0.cs b/src/Mvc/Mvc.Cors/ref/Microsoft.AspNetCore.Mvc.Cors.netcoreapp.cs similarity index 100% rename from src/Mvc/Mvc.Cors/ref/Microsoft.AspNetCore.Mvc.Cors.netcoreapp3.0.cs rename to src/Mvc/Mvc.Cors/ref/Microsoft.AspNetCore.Mvc.Cors.netcoreapp.cs 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 02878c2b9c..00855c2b75 100644 --- a/src/Mvc/Mvc.Cors/src/Microsoft.AspNetCore.Mvc.Cors.csproj +++ b/src/Mvc/Mvc.Cors/src/Microsoft.AspNetCore.Mvc.Cors.csproj @@ -2,7 +2,7 @@ ASP.NET Core MVC cross-origin resource sharing (CORS) features. - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) true true aspnetcore;aspnetcoremvc;cors diff --git a/src/Mvc/Mvc.Cors/test/Microsoft.AspNetCore.Mvc.Cors.Test.csproj b/src/Mvc/Mvc.Cors/test/Microsoft.AspNetCore.Mvc.Cors.Test.csproj index ce15e8efbc..48d890f11f 100644 --- a/src/Mvc/Mvc.Cors/test/Microsoft.AspNetCore.Mvc.Cors.Test.csproj +++ b/src/Mvc/Mvc.Cors/test/Microsoft.AspNetCore.Mvc.Cors.Test.csproj @@ -1,7 +1,7 @@ - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) diff --git a/src/Mvc/Mvc.DataAnnotations/ref/Microsoft.AspNetCore.Mvc.DataAnnotations.csproj b/src/Mvc/Mvc.DataAnnotations/ref/Microsoft.AspNetCore.Mvc.DataAnnotations.csproj index 31f61788d1..48d9a6c09d 100644 --- a/src/Mvc/Mvc.DataAnnotations/ref/Microsoft.AspNetCore.Mvc.DataAnnotations.csproj +++ b/src/Mvc/Mvc.DataAnnotations/ref/Microsoft.AspNetCore.Mvc.DataAnnotations.csproj @@ -1,10 +1,10 @@ - netcoreapp3.0 + netcoreapp5.0 - - + + diff --git a/src/Mvc/Mvc.DataAnnotations/ref/Microsoft.AspNetCore.Mvc.DataAnnotations.netcoreapp3.0.cs b/src/Mvc/Mvc.DataAnnotations/ref/Microsoft.AspNetCore.Mvc.DataAnnotations.netcoreapp.cs similarity index 100% rename from src/Mvc/Mvc.DataAnnotations/ref/Microsoft.AspNetCore.Mvc.DataAnnotations.netcoreapp3.0.cs rename to src/Mvc/Mvc.DataAnnotations/ref/Microsoft.AspNetCore.Mvc.DataAnnotations.netcoreapp.cs 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 6fab4f9c40..d073730b62 100644 --- a/src/Mvc/Mvc.DataAnnotations/src/Microsoft.AspNetCore.Mvc.DataAnnotations.csproj +++ b/src/Mvc/Mvc.DataAnnotations/src/Microsoft.AspNetCore.Mvc.DataAnnotations.csproj @@ -2,7 +2,7 @@ ASP.NET Core MVC metadata and validation system using System.ComponentModel.DataAnnotations. - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) true true aspnetcore;aspnetcoremvc diff --git a/src/Mvc/Mvc.DataAnnotations/test/Microsoft.AspNetCore.Mvc.DataAnnotations.Test.csproj b/src/Mvc/Mvc.DataAnnotations/test/Microsoft.AspNetCore.Mvc.DataAnnotations.Test.csproj index c205a676cd..b3970c0edf 100644 --- a/src/Mvc/Mvc.DataAnnotations/test/Microsoft.AspNetCore.Mvc.DataAnnotations.Test.csproj +++ b/src/Mvc/Mvc.DataAnnotations/test/Microsoft.AspNetCore.Mvc.DataAnnotations.Test.csproj @@ -1,7 +1,7 @@ - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) false diff --git a/src/Mvc/Mvc.Formatters.Json/ref/Microsoft.AspNetCore.Mvc.Formatters.Json.csproj b/src/Mvc/Mvc.Formatters.Json/ref/Microsoft.AspNetCore.Mvc.Formatters.Json.csproj index c32a9966a4..d6be5b9237 100644 --- a/src/Mvc/Mvc.Formatters.Json/ref/Microsoft.AspNetCore.Mvc.Formatters.Json.csproj +++ b/src/Mvc/Mvc.Formatters.Json/ref/Microsoft.AspNetCore.Mvc.Formatters.Json.csproj @@ -1,10 +1,10 @@ - netcoreapp3.0 + netcoreapp5.0 - - + + diff --git a/src/Mvc/Mvc.Formatters.Json/ref/Microsoft.AspNetCore.Mvc.Formatters.Json.netcoreapp3.0.cs b/src/Mvc/Mvc.Formatters.Json/ref/Microsoft.AspNetCore.Mvc.Formatters.Json.netcoreapp.cs similarity index 100% rename from src/Mvc/Mvc.Formatters.Json/ref/Microsoft.AspNetCore.Mvc.Formatters.Json.netcoreapp3.0.cs rename to src/Mvc/Mvc.Formatters.Json/ref/Microsoft.AspNetCore.Mvc.Formatters.Json.netcoreapp.cs diff --git a/src/Mvc/Mvc.Formatters.Json/src/Microsoft.AspNetCore.Mvc.Formatters.Json.csproj b/src/Mvc/Mvc.Formatters.Json/src/Microsoft.AspNetCore.Mvc.Formatters.Json.csproj index a8ad907b98..3ff2d5ec1a 100644 --- a/src/Mvc/Mvc.Formatters.Json/src/Microsoft.AspNetCore.Mvc.Formatters.Json.csproj +++ b/src/Mvc/Mvc.Formatters.Json/src/Microsoft.AspNetCore.Mvc.Formatters.Json.csproj @@ -2,7 +2,7 @@ ASP.NET Core MVC formatters for JSON input and output. - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) true true aspnetcore;aspnetcoremvc;json diff --git a/src/Mvc/Mvc.Formatters.Xml/ref/Microsoft.AspNetCore.Mvc.Formatters.Xml.csproj b/src/Mvc/Mvc.Formatters.Xml/ref/Microsoft.AspNetCore.Mvc.Formatters.Xml.csproj index c83f79c76f..177d62355b 100644 --- a/src/Mvc/Mvc.Formatters.Xml/ref/Microsoft.AspNetCore.Mvc.Formatters.Xml.csproj +++ b/src/Mvc/Mvc.Formatters.Xml/ref/Microsoft.AspNetCore.Mvc.Formatters.Xml.csproj @@ -1,10 +1,10 @@ - netcoreapp3.0 + netcoreapp5.0 - - + + diff --git a/src/Mvc/Mvc.Formatters.Xml/ref/Microsoft.AspNetCore.Mvc.Formatters.Xml.netcoreapp3.0.cs b/src/Mvc/Mvc.Formatters.Xml/ref/Microsoft.AspNetCore.Mvc.Formatters.Xml.netcoreapp.cs similarity index 99% rename from src/Mvc/Mvc.Formatters.Xml/ref/Microsoft.AspNetCore.Mvc.Formatters.Xml.netcoreapp3.0.cs rename to src/Mvc/Mvc.Formatters.Xml/ref/Microsoft.AspNetCore.Mvc.Formatters.Xml.netcoreapp.cs index fa9ffb071d..eae4a1a733 100644 --- a/src/Mvc/Mvc.Formatters.Xml/ref/Microsoft.AspNetCore.Mvc.Formatters.Xml.netcoreapp3.0.cs +++ b/src/Mvc/Mvc.Formatters.Xml/ref/Microsoft.AspNetCore.Mvc.Formatters.Xml.netcoreapp.cs @@ -47,6 +47,7 @@ namespace Microsoft.AspNetCore.Mvc.Formatters protected override bool CanReadType(System.Type type) { throw null; } protected virtual System.Xml.Serialization.XmlSerializer CreateSerializer(System.Type type) { throw null; } protected virtual System.Xml.XmlReader CreateXmlReader(System.IO.Stream readStream, System.Text.Encoding encoding) { throw null; } + protected virtual System.Xml.XmlReader CreateXmlReader(System.IO.Stream readStream, System.Text.Encoding encoding, System.Type type) { throw null; } protected virtual System.Xml.Serialization.XmlSerializer GetCachedSerializer(System.Type type) { throw null; } protected virtual System.Type GetSerializableType(System.Type declaredType) { throw null; } [System.Diagnostics.DebuggerStepThroughAttribute] 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 4ac6c2733c..f94d19a845 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 @@ -2,7 +2,7 @@ ASP.NET Core MVC formatters for XML input and output using DataContractSerializer and XmlSerializer. - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) true $(NoWarn);CS1591 true diff --git a/src/Mvc/Mvc.Formatters.Xml/src/XmlSerializerInputFormatter.cs b/src/Mvc/Mvc.Formatters.Xml/src/XmlSerializerInputFormatter.cs index 4debb6fe69..da40141ded 100644 --- a/src/Mvc/Mvc.Formatters.Xml/src/XmlSerializerInputFormatter.cs +++ b/src/Mvc/Mvc.Formatters.Xml/src/XmlSerializerInputFormatter.cs @@ -119,8 +119,8 @@ namespace Microsoft.AspNetCore.Mvc.Formatters try { - using var xmlReader = CreateXmlReader(readStream, encoding); - var type = GetSerializableType(context.ModelType); + var type = GetSerializableType(context.ModelType); + using var xmlReader = CreateXmlReader(readStream, encoding, type); var serializer = GetCachedSerializer(type); @@ -191,6 +191,18 @@ namespace Microsoft.AspNetCore.Mvc.Formatters return wrapperProvider?.WrappingType ?? declaredType; } + /// + /// Called during deserialization to get the . + /// + /// The from which to read. + /// The used to read the stream. + /// The that is to be deserialized. + /// The used during deserialization. + protected virtual XmlReader CreateXmlReader(Stream readStream, Encoding encoding, Type type) + { + return CreateXmlReader(readStream, encoding); + } + /// /// Called during deserialization to get the . /// diff --git a/src/Mvc/Mvc.Formatters.Xml/test/Microsoft.AspNetCore.Mvc.Formatters.Xml.Test.csproj b/src/Mvc/Mvc.Formatters.Xml/test/Microsoft.AspNetCore.Mvc.Formatters.Xml.Test.csproj index b51ba4d2df..7d3b2eeb06 100644 --- a/src/Mvc/Mvc.Formatters.Xml/test/Microsoft.AspNetCore.Mvc.Formatters.Xml.Test.csproj +++ b/src/Mvc/Mvc.Formatters.Xml/test/Microsoft.AspNetCore.Mvc.Formatters.Xml.Test.csproj @@ -1,7 +1,7 @@ - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) diff --git a/src/Mvc/Mvc.Localization/ref/Microsoft.AspNetCore.Mvc.Localization.csproj b/src/Mvc/Mvc.Localization/ref/Microsoft.AspNetCore.Mvc.Localization.csproj index 1021609ed3..5d537ec630 100644 --- a/src/Mvc/Mvc.Localization/ref/Microsoft.AspNetCore.Mvc.Localization.csproj +++ b/src/Mvc/Mvc.Localization/ref/Microsoft.AspNetCore.Mvc.Localization.csproj @@ -1,10 +1,10 @@ - netcoreapp3.0 + netcoreapp5.0 - - + + diff --git a/src/Mvc/Mvc.Localization/ref/Microsoft.AspNetCore.Mvc.Localization.netcoreapp3.0.cs b/src/Mvc/Mvc.Localization/ref/Microsoft.AspNetCore.Mvc.Localization.netcoreapp.cs similarity index 100% rename from src/Mvc/Mvc.Localization/ref/Microsoft.AspNetCore.Mvc.Localization.netcoreapp3.0.cs rename to src/Mvc/Mvc.Localization/ref/Microsoft.AspNetCore.Mvc.Localization.netcoreapp.cs 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 6e0c7e0044..b89285d1c6 100644 --- a/src/Mvc/Mvc.Localization/src/Microsoft.AspNetCore.Mvc.Localization.csproj +++ b/src/Mvc/Mvc.Localization/src/Microsoft.AspNetCore.Mvc.Localization.csproj @@ -5,7 +5,7 @@ Commonly used types: Microsoft.AspNetCore.Mvc.Localization.IHtmlLocalizer<TResource> Microsoft.AspNetCore.Mvc.Localization.IViewLocalizer - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) true true aspnetcore;aspnetcoremvc;localization diff --git a/src/Mvc/Mvc.Localization/test/Microsoft.AspNetCore.Mvc.Localization.Test.csproj b/src/Mvc/Mvc.Localization/test/Microsoft.AspNetCore.Mvc.Localization.Test.csproj index db22eeedb5..5cb5f0b274 100644 --- a/src/Mvc/Mvc.Localization/test/Microsoft.AspNetCore.Mvc.Localization.Test.csproj +++ b/src/Mvc/Mvc.Localization/test/Microsoft.AspNetCore.Mvc.Localization.Test.csproj @@ -1,7 +1,7 @@ - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) diff --git a/src/Mvc/Mvc.NewtonsoftJson/ref/Microsoft.AspNetCore.Mvc.NewtonsoftJson.csproj b/src/Mvc/Mvc.NewtonsoftJson/ref/Microsoft.AspNetCore.Mvc.NewtonsoftJson.csproj index f8ff2e9fee..68fbd12a8a 100644 --- a/src/Mvc/Mvc.NewtonsoftJson/ref/Microsoft.AspNetCore.Mvc.NewtonsoftJson.csproj +++ b/src/Mvc/Mvc.NewtonsoftJson/ref/Microsoft.AspNetCore.Mvc.NewtonsoftJson.csproj @@ -1,10 +1,10 @@ - netcoreapp3.0 + netcoreapp5.0 - - + + diff --git a/src/Mvc/Mvc.NewtonsoftJson/ref/Microsoft.AspNetCore.Mvc.NewtonsoftJson.netcoreapp3.0.cs b/src/Mvc/Mvc.NewtonsoftJson/ref/Microsoft.AspNetCore.Mvc.NewtonsoftJson.netcoreapp.cs similarity index 100% rename from src/Mvc/Mvc.NewtonsoftJson/ref/Microsoft.AspNetCore.Mvc.NewtonsoftJson.netcoreapp3.0.cs rename to src/Mvc/Mvc.NewtonsoftJson/ref/Microsoft.AspNetCore.Mvc.NewtonsoftJson.netcoreapp.cs 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 2c81323847..c8739145a9 100644 --- a/src/Mvc/Mvc.NewtonsoftJson/src/Microsoft.AspNetCore.Mvc.NewtonsoftJson.csproj +++ b/src/Mvc/Mvc.NewtonsoftJson/src/Microsoft.AspNetCore.Mvc.NewtonsoftJson.csproj @@ -2,7 +2,7 @@ ASP.NET Core MVC features that use Newtonsoft.Json. Includes input and output formatters for JSON and JSON PATCH. - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) true aspnetcore;aspnetcoremvc;json true 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 0cf127eac9..d2812fe0f5 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 @@ -1,7 +1,7 @@  - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) diff --git a/src/Mvc/Mvc.Razor.RuntimeCompilation/ref/Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation.csproj b/src/Mvc/Mvc.Razor.RuntimeCompilation/ref/Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation.csproj index 0f66178b6d..9d73454d5e 100644 --- a/src/Mvc/Mvc.Razor.RuntimeCompilation/ref/Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation.csproj +++ b/src/Mvc/Mvc.Razor.RuntimeCompilation/ref/Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation.csproj @@ -1,10 +1,10 @@ - netcoreapp3.0 + netcoreapp5.0 - - + + diff --git a/src/Mvc/Mvc.Razor.RuntimeCompilation/ref/Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation.netcoreapp3.0.cs b/src/Mvc/Mvc.Razor.RuntimeCompilation/ref/Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation.netcoreapp.cs similarity index 100% rename from src/Mvc/Mvc.Razor.RuntimeCompilation/ref/Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation.netcoreapp3.0.cs rename to src/Mvc/Mvc.Razor.RuntimeCompilation/ref/Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation.netcoreapp.cs 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 b75277126a..5d40de9229 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 @@ -2,7 +2,7 @@ Runtime compilation support for Razor views and Razor Pages in ASP.NET Core MVC. - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) $(NoWarn);CS1591 true aspnetcore;aspnetcoremvc;razor @@ -23,6 +23,6 @@ - + diff --git a/src/Mvc/Mvc.Razor.RuntimeCompilation/src/build/netcoreapp3.0/Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation.targets b/src/Mvc/Mvc.Razor.RuntimeCompilation/src/build/netcoreapp5.0/Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation.targets similarity index 100% rename from src/Mvc/Mvc.Razor.RuntimeCompilation/src/build/netcoreapp3.0/Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation.targets rename to src/Mvc/Mvc.Razor.RuntimeCompilation/src/build/netcoreapp5.0/Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation.targets diff --git a/src/Mvc/Mvc.Razor.RuntimeCompilation/test/Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation.Test.csproj b/src/Mvc/Mvc.Razor.RuntimeCompilation/test/Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation.Test.csproj index 734825c240..c0b0db296e 100644 --- a/src/Mvc/Mvc.Razor.RuntimeCompilation/test/Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation.Test.csproj +++ b/src/Mvc/Mvc.Razor.RuntimeCompilation/test/Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation.Test.csproj @@ -1,7 +1,7 @@  - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) true diff --git a/src/Mvc/Mvc.Razor/ref/Microsoft.AspNetCore.Mvc.Razor.csproj b/src/Mvc/Mvc.Razor/ref/Microsoft.AspNetCore.Mvc.Razor.csproj index eb432ae8ad..18f0eb17fb 100644 --- a/src/Mvc/Mvc.Razor/ref/Microsoft.AspNetCore.Mvc.Razor.csproj +++ b/src/Mvc/Mvc.Razor/ref/Microsoft.AspNetCore.Mvc.Razor.csproj @@ -1,10 +1,10 @@ - netcoreapp3.0 + netcoreapp5.0 - - + + diff --git a/src/Mvc/Mvc.Razor/ref/Microsoft.AspNetCore.Mvc.Razor.netcoreapp3.0.cs b/src/Mvc/Mvc.Razor/ref/Microsoft.AspNetCore.Mvc.Razor.netcoreapp.cs similarity index 100% rename from src/Mvc/Mvc.Razor/ref/Microsoft.AspNetCore.Mvc.Razor.netcoreapp3.0.cs rename to src/Mvc/Mvc.Razor/ref/Microsoft.AspNetCore.Mvc.Razor.netcoreapp.cs 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 a6561e544a..b244c18fd4 100644 --- a/src/Mvc/Mvc.Razor/src/Microsoft.AspNetCore.Mvc.Razor.csproj +++ b/src/Mvc/Mvc.Razor/src/Microsoft.AspNetCore.Mvc.Razor.csproj @@ -2,7 +2,7 @@ ASP.NET Core MVC Razor view engine for CSHTML files. - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) true $(NoWarn);CS1591 true 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 0a8a4e0fc1..5844f355ce 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 @@ -1,7 +1,7 @@ - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) true $(DefineConstants);SOME_TEST_DEFINE diff --git a/src/Mvc/Mvc.RazorPages/ref/Directory.Build.props b/src/Mvc/Mvc.RazorPages/ref/Directory.Build.props index db0125b36c..6cab2bf950 100644 --- a/src/Mvc/Mvc.RazorPages/ref/Directory.Build.props +++ b/src/Mvc/Mvc.RazorPages/ref/Directory.Build.props @@ -3,7 +3,7 @@ - + diff --git a/src/Mvc/Mvc.RazorPages/ref/Microsoft.AspNetCore.Mvc.RazorPages.csproj b/src/Mvc/Mvc.RazorPages/ref/Microsoft.AspNetCore.Mvc.RazorPages.csproj index 8928351fd2..7883b2a2a0 100644 --- a/src/Mvc/Mvc.RazorPages/ref/Microsoft.AspNetCore.Mvc.RazorPages.csproj +++ b/src/Mvc/Mvc.RazorPages/ref/Microsoft.AspNetCore.Mvc.RazorPages.csproj @@ -1,10 +1,10 @@ - netcoreapp3.0 + netcoreapp5.0 - - + + diff --git a/src/Mvc/Mvc.RazorPages/ref/Microsoft.AspNetCore.Mvc.RazorPages.netcoreapp3.0.cs b/src/Mvc/Mvc.RazorPages/ref/Microsoft.AspNetCore.Mvc.RazorPages.netcoreapp.cs similarity index 100% rename from src/Mvc/Mvc.RazorPages/ref/Microsoft.AspNetCore.Mvc.RazorPages.netcoreapp3.0.cs rename to src/Mvc/Mvc.RazorPages/ref/Microsoft.AspNetCore.Mvc.RazorPages.netcoreapp.cs diff --git a/src/Mvc/Mvc.RazorPages/ref/Microsoft.AspNetCore.Mvc.RazorPages.netcoreapp3.0.Manual.cs b/src/Mvc/Mvc.RazorPages/ref/Microsoft.AspNetCore.Mvc.RazorPages.netcoreapp5.0.Manual.cs similarity index 100% rename from src/Mvc/Mvc.RazorPages/ref/Microsoft.AspNetCore.Mvc.RazorPages.netcoreapp3.0.Manual.cs rename to src/Mvc/Mvc.RazorPages/ref/Microsoft.AspNetCore.Mvc.RazorPages.netcoreapp5.0.Manual.cs 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 3e2db552aa..a3db847315 100644 --- a/src/Mvc/Mvc.RazorPages/src/Microsoft.AspNetCore.Mvc.RazorPages.csproj +++ b/src/Mvc/Mvc.RazorPages/src/Microsoft.AspNetCore.Mvc.RazorPages.csproj @@ -2,7 +2,7 @@ ASP.NET Core MVC Razor Pages. - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) true $(NoWarn);CS1591 true 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 3b4c6d6e73..4f34ad686b 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 @@ -1,7 +1,7 @@  - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) diff --git a/src/Mvc/Mvc.TagHelpers/ref/Microsoft.AspNetCore.Mvc.TagHelpers.csproj b/src/Mvc/Mvc.TagHelpers/ref/Microsoft.AspNetCore.Mvc.TagHelpers.csproj index 2c0acec9fc..f0375ab31c 100644 --- a/src/Mvc/Mvc.TagHelpers/ref/Microsoft.AspNetCore.Mvc.TagHelpers.csproj +++ b/src/Mvc/Mvc.TagHelpers/ref/Microsoft.AspNetCore.Mvc.TagHelpers.csproj @@ -1,10 +1,10 @@ - netcoreapp3.0 + netcoreapp5.0 - - + + diff --git a/src/Mvc/Mvc.TagHelpers/ref/Microsoft.AspNetCore.Mvc.TagHelpers.netcoreapp3.0.cs b/src/Mvc/Mvc.TagHelpers/ref/Microsoft.AspNetCore.Mvc.TagHelpers.netcoreapp.cs similarity index 100% rename from src/Mvc/Mvc.TagHelpers/ref/Microsoft.AspNetCore.Mvc.TagHelpers.netcoreapp3.0.cs rename to src/Mvc/Mvc.TagHelpers/ref/Microsoft.AspNetCore.Mvc.TagHelpers.netcoreapp.cs diff --git a/src/Mvc/Mvc.TagHelpers/src/InputTagHelper.cs b/src/Mvc/Mvc.TagHelpers/src/InputTagHelper.cs index d3df4d963d..3ce7506e08 100644 --- a/src/Mvc/Mvc.TagHelpers/src/InputTagHelper.cs +++ b/src/Mvc/Mvc.TagHelpers/src/InputTagHelper.cs @@ -309,29 +309,32 @@ namespace Microsoft.AspNetCore.Mvc.TagHelpers "checkbox")); } - // hiddenForCheckboxTag always rendered after the returned element - var hiddenForCheckboxTag = Generator.GenerateHiddenForCheckbox(ViewContext, modelExplorer, For.Name); - if (hiddenForCheckboxTag != null) + if (ViewContext.CheckBoxHiddenInputRenderMode != CheckBoxHiddenInputRenderMode.None) { - var renderingMode = - output.TagMode == TagMode.SelfClosing ? TagRenderMode.SelfClosing : TagRenderMode.StartTag; - hiddenForCheckboxTag.TagRenderMode = renderingMode; - if (!hiddenForCheckboxTag.Attributes.ContainsKey("name") && - !string.IsNullOrEmpty(Name)) + // hiddenForCheckboxTag always rendered after the returned element + var hiddenForCheckboxTag = Generator.GenerateHiddenForCheckbox(ViewContext, modelExplorer, For.Name); + if (hiddenForCheckboxTag != null) { - // The checkbox and hidden elements should have the same name attribute value. Attributes will - // match if both are present because both have a generated value. Reach here in the special case - // where user provided a non-empty fallback name. - hiddenForCheckboxTag.MergeAttribute("name", Name); - } + var renderingMode = + output.TagMode == TagMode.SelfClosing ? TagRenderMode.SelfClosing : TagRenderMode.StartTag; + hiddenForCheckboxTag.TagRenderMode = renderingMode; + if (!hiddenForCheckboxTag.Attributes.ContainsKey("name") && + !string.IsNullOrEmpty(Name)) + { + // The checkbox and hidden elements should have the same name attribute value. Attributes will + // match if both are present because both have a generated value. Reach here in the special case + // where user provided a non-empty fallback name. + hiddenForCheckboxTag.MergeAttribute("name", Name); + } - if (ViewContext.FormContext.CanRenderAtEndOfForm) - { - ViewContext.FormContext.EndOfFormContent.Add(hiddenForCheckboxTag); - } - else - { - output.PostElement.AppendHtml(hiddenForCheckboxTag); + if (ViewContext.CheckBoxHiddenInputRenderMode == CheckBoxHiddenInputRenderMode.EndOfForm && ViewContext.FormContext.CanRenderAtEndOfForm) + { + ViewContext.FormContext.EndOfFormContent.Add(hiddenForCheckboxTag); + } + else + { + output.PostElement.AppendHtml(hiddenForCheckboxTag); + } } } 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 494bda2166..bfa9bc62fd 100644 --- a/src/Mvc/Mvc.TagHelpers/src/Microsoft.AspNetCore.Mvc.TagHelpers.csproj +++ b/src/Mvc/Mvc.TagHelpers/src/Microsoft.AspNetCore.Mvc.TagHelpers.csproj @@ -2,7 +2,7 @@ ASP.NET Core MVC default tag helpers. Contains tag helpers for anchor tags, HTML input elements, caching, scripts, links (for CSS), and more. - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) true aspnetcore;aspnetcoremvc;taghelper;taghelpers true diff --git a/src/Mvc/Mvc.TagHelpers/test/InputTagHelperTest.cs b/src/Mvc/Mvc.TagHelpers/test/InputTagHelperTest.cs index 265ecde1f0..557454892b 100644 --- a/src/Mvc/Mvc.TagHelpers/test/InputTagHelperTest.cs +++ b/src/Mvc/Mvc.TagHelpers/test/InputTagHelperTest.cs @@ -838,6 +838,243 @@ namespace Microsoft.AspNetCore.Mvc.TagHelpers Assert.Equal(expectedTagName, output.TagName); } + [Fact] + public async Task ProcessAsync_GenerateCheckBox_WithHiddenInputRenderModeNone() + { + var propertyName = "-expression-"; + var expectedTagName = "input"; + var inputTypeName = "checkbox"; + var expectedAttributes = new TagHelperAttributeList + { + { "name", propertyName }, + { "type", inputTypeName }, + { "value", "true" }, + }; + + var metadataProvider = new EmptyModelMetadataProvider(); + var htmlGenerator = new TestableHtmlGenerator(metadataProvider); + var model = false; + var modelExplorer = metadataProvider.GetModelExplorerForType(typeof(bool), model); + var modelExpression = new ModelExpression(name: string.Empty, modelExplorer: modelExplorer); + var viewContext = TestableHtmlGenerator.GetViewContext(model, htmlGenerator, metadataProvider); + + viewContext.CheckBoxHiddenInputRenderMode = CheckBoxHiddenInputRenderMode.None; + + var tagHelper = new InputTagHelper(htmlGenerator) + { + For = modelExpression, + InputTypeName = inputTypeName, + Name = propertyName, + ViewContext = viewContext, + }; + + var attributes = new TagHelperAttributeList + { + { "name", propertyName }, + { "type", inputTypeName }, + }; + + var context = new TagHelperContext(attributes, new Dictionary(), "test"); + var output = new TagHelperOutput( + expectedTagName, + new TagHelperAttributeList(), + getChildContentAsync: (useCachedResult, encoder) => Task.FromResult(result: null)) + { + TagMode = TagMode.SelfClosing, + }; + + // Act + await tagHelper.ProcessAsync(context, output); + + // Assert + Assert.Equal(expectedAttributes, output.Attributes); + Assert.False(output.IsContentModified); + Assert.Equal(expectedTagName, output.TagName); + + Assert.False(viewContext.FormContext.HasEndOfFormContent); + Assert.True(string.IsNullOrEmpty(HtmlContentUtilities.HtmlContentToString(output.PostElement))); + } + + [Fact] + public async Task ProcessAsync_GenerateCheckBox_WithHiddenInputRenderModeInline() + { + var propertyName = "-expression-"; + var expectedTagName = "input"; + var expectedPostElementContent = $""; + var inputTypeName = "checkbox"; + var expectedAttributes = new TagHelperAttributeList + { + { "name", propertyName }, + { "type", inputTypeName }, + { "value", "true" }, + }; + + var metadataProvider = new EmptyModelMetadataProvider(); + var htmlGenerator = new TestableHtmlGenerator(metadataProvider); + var model = false; + var modelExplorer = metadataProvider.GetModelExplorerForType(typeof(bool), model); + var modelExpression = new ModelExpression(name: string.Empty, modelExplorer: modelExplorer); + var viewContext = TestableHtmlGenerator.GetViewContext(model, htmlGenerator, metadataProvider); + + viewContext.FormContext.CanRenderAtEndOfForm = true; + viewContext.CheckBoxHiddenInputRenderMode = CheckBoxHiddenInputRenderMode.Inline; + + var tagHelper = new InputTagHelper(htmlGenerator) + { + For = modelExpression, + InputTypeName = inputTypeName, + Name = propertyName, + ViewContext = viewContext, + }; + + var attributes = new TagHelperAttributeList + { + { "name", propertyName }, + { "type", inputTypeName }, + }; + + var context = new TagHelperContext(attributes, new Dictionary(), "test"); + var output = new TagHelperOutput( + expectedTagName, + new TagHelperAttributeList(), + getChildContentAsync: (useCachedResult, encoder) => Task.FromResult(result: null)) + { + TagMode = TagMode.SelfClosing, + }; + + // Act + await tagHelper.ProcessAsync(context, output); + + // Assert + Assert.Equal(expectedAttributes, output.Attributes); + Assert.False(output.IsContentModified); + Assert.Equal(expectedTagName, output.TagName); + + Assert.False(viewContext.FormContext.HasEndOfFormContent); + Assert.Equal(expectedPostElementContent, HtmlContentUtilities.HtmlContentToString(output.PostElement)); + } + + [Fact] + public async Task ProcessAsync_GenerateCheckBox_WithHiddenInputRenderModeEndOfForm() + { + var propertyName = "-expression-"; + var expectedTagName = "input"; + var expectedEndOfFormContent = $""; + var inputTypeName = "checkbox"; + var expectedAttributes = new TagHelperAttributeList + { + { "name", propertyName }, + { "type", inputTypeName }, + { "value", "true" }, + }; + + var metadataProvider = new EmptyModelMetadataProvider(); + var htmlGenerator = new TestableHtmlGenerator(metadataProvider); + var model = false; + var modelExplorer = metadataProvider.GetModelExplorerForType(typeof(bool), model); + var modelExpression = new ModelExpression(name: string.Empty, modelExplorer: modelExplorer); + var viewContext = TestableHtmlGenerator.GetViewContext(model, htmlGenerator, metadataProvider); + + viewContext.FormContext.CanRenderAtEndOfForm = true; + viewContext.CheckBoxHiddenInputRenderMode = CheckBoxHiddenInputRenderMode.EndOfForm; + + var tagHelper = new InputTagHelper(htmlGenerator) + { + For = modelExpression, + InputTypeName = inputTypeName, + Name = propertyName, + ViewContext = viewContext, + }; + + var attributes = new TagHelperAttributeList + { + { "name", propertyName }, + { "type", inputTypeName }, + }; + + var context = new TagHelperContext(attributes, new Dictionary(), "test"); + var output = new TagHelperOutput( + expectedTagName, + new TagHelperAttributeList(), + getChildContentAsync: (useCachedResult, encoder) => Task.FromResult(result: null)) + { + TagMode = TagMode.SelfClosing, + }; + + // Act + await tagHelper.ProcessAsync(context, output); + + // Assert + Assert.Equal(expectedAttributes, output.Attributes); + Assert.False(output.IsContentModified); + Assert.Equal(expectedTagName, output.TagName); + + Assert.Equal(expectedEndOfFormContent, string.Join("", viewContext.FormContext.EndOfFormContent.Select(html => HtmlContentUtilities.HtmlContentToString(html)))); + Assert.True(string.IsNullOrEmpty(HtmlContentUtilities.HtmlContentToString(output.PostElement))); + } + + [Fact] + public async Task ProcessAsync_GenerateCheckBox_WithHiddenInputRenderModeEndOfForm_AndCanRenderAtEndOfFormNotSet() + { + var propertyName = "-expression-"; + var expectedTagName = "input"; + var expectedPostElementContent = $""; + var inputTypeName = "checkbox"; + var expectedAttributes = new TagHelperAttributeList + { + { "name", propertyName }, + { "type", inputTypeName }, + { "value", "true" }, + }; + + var metadataProvider = new EmptyModelMetadataProvider(); + var htmlGenerator = new TestableHtmlGenerator(metadataProvider); + var model = false; + var modelExplorer = metadataProvider.GetModelExplorerForType(typeof(bool), model); + var modelExpression = new ModelExpression(name: string.Empty, modelExplorer: modelExplorer); + var viewContext = TestableHtmlGenerator.GetViewContext(model, htmlGenerator, metadataProvider); + + viewContext.FormContext.CanRenderAtEndOfForm = false; + viewContext.CheckBoxHiddenInputRenderMode = CheckBoxHiddenInputRenderMode.EndOfForm; + + var tagHelper = new InputTagHelper(htmlGenerator) + { + For = modelExpression, + InputTypeName = inputTypeName, + Name = propertyName, + ViewContext = viewContext, + }; + + var attributes = new TagHelperAttributeList + { + { "name", propertyName }, + { "type", inputTypeName }, + }; + + var context = new TagHelperContext(attributes, new Dictionary(), "test"); + var output = new TagHelperOutput( + expectedTagName, + new TagHelperAttributeList(), + getChildContentAsync: (useCachedResult, encoder) => Task.FromResult(result: null)) + { + TagMode = TagMode.SelfClosing, + }; + + // Act + await tagHelper.ProcessAsync(context, output); + + // Assert + Assert.Equal(expectedAttributes, output.Attributes); + Assert.False(output.IsContentModified); + Assert.Equal(expectedTagName, output.TagName); + + Assert.False(viewContext.FormContext.HasEndOfFormContent); + Assert.Equal(expectedPostElementContent, HtmlContentUtilities.HtmlContentToString(output.PostElement)); + } + [Fact] public async Task ProcessAsync_CallsGenerateCheckBox_WithExpectedParameters() { diff --git a/src/Mvc/Mvc.TagHelpers/test/Microsoft.AspNetCore.Mvc.TagHelpers.Test.csproj b/src/Mvc/Mvc.TagHelpers/test/Microsoft.AspNetCore.Mvc.TagHelpers.Test.csproj index 32e1fe2107..59e65074fd 100644 --- a/src/Mvc/Mvc.TagHelpers/test/Microsoft.AspNetCore.Mvc.TagHelpers.Test.csproj +++ b/src/Mvc/Mvc.TagHelpers/test/Microsoft.AspNetCore.Mvc.TagHelpers.Test.csproj @@ -1,7 +1,7 @@ - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) diff --git a/src/Mvc/Mvc.Testing/ref/Microsoft.AspNetCore.Mvc.Testing.csproj b/src/Mvc/Mvc.Testing/ref/Microsoft.AspNetCore.Mvc.Testing.csproj index b5e0c8a5df..155d335a7e 100644 --- a/src/Mvc/Mvc.Testing/ref/Microsoft.AspNetCore.Mvc.Testing.csproj +++ b/src/Mvc/Mvc.Testing/ref/Microsoft.AspNetCore.Mvc.Testing.csproj @@ -1,10 +1,10 @@ - netcoreapp3.0 + netcoreapp5.0 - - + + diff --git a/src/Mvc/Mvc.Testing/ref/Microsoft.AspNetCore.Mvc.Testing.netcoreapp3.0.cs b/src/Mvc/Mvc.Testing/ref/Microsoft.AspNetCore.Mvc.Testing.netcoreapp.cs similarity index 100% rename from src/Mvc/Mvc.Testing/ref/Microsoft.AspNetCore.Mvc.Testing.netcoreapp3.0.cs rename to src/Mvc/Mvc.Testing/ref/Microsoft.AspNetCore.Mvc.Testing.netcoreapp.cs 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 649663aaf7..0df3b51ffa 100644 --- a/src/Mvc/Mvc.Testing/src/Microsoft.AspNetCore.Mvc.Testing.csproj +++ b/src/Mvc/Mvc.Testing/src/Microsoft.AspNetCore.Mvc.Testing.csproj @@ -2,7 +2,7 @@ Support for writing functional tests for MVC applications. - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) $(NoWarn);CS1591 true aspnetcore;aspnetcoremvc;aspnetcoremvctesting diff --git a/src/Mvc/Mvc.ViewFeatures/ref/Microsoft.AspNetCore.Mvc.ViewFeatures.csproj b/src/Mvc/Mvc.ViewFeatures/ref/Microsoft.AspNetCore.Mvc.ViewFeatures.csproj index ede007ec0c..1ef61c6f2f 100644 --- a/src/Mvc/Mvc.ViewFeatures/ref/Microsoft.AspNetCore.Mvc.ViewFeatures.csproj +++ b/src/Mvc/Mvc.ViewFeatures/ref/Microsoft.AspNetCore.Mvc.ViewFeatures.csproj @@ -1,10 +1,10 @@ - netcoreapp3.0 + netcoreapp5.0 - - + + diff --git a/src/Mvc/Mvc.ViewFeatures/ref/Microsoft.AspNetCore.Mvc.ViewFeatures.netcoreapp3.0.cs b/src/Mvc/Mvc.ViewFeatures/ref/Microsoft.AspNetCore.Mvc.ViewFeatures.netcoreapp.cs similarity index 99% rename from src/Mvc/Mvc.ViewFeatures/ref/Microsoft.AspNetCore.Mvc.ViewFeatures.netcoreapp3.0.cs rename to src/Mvc/Mvc.ViewFeatures/ref/Microsoft.AspNetCore.Mvc.ViewFeatures.netcoreapp.cs index e9618a4842..d607693165 100644 --- a/src/Mvc/Mvc.ViewFeatures/ref/Microsoft.AspNetCore.Mvc.ViewFeatures.netcoreapp3.0.cs +++ b/src/Mvc/Mvc.ViewFeatures/ref/Microsoft.AspNetCore.Mvc.ViewFeatures.netcoreapp.cs @@ -312,6 +312,12 @@ namespace Microsoft.AspNetCore.Mvc.ModelBinding } namespace Microsoft.AspNetCore.Mvc.Rendering { + public enum CheckBoxHiddenInputRenderMode + { + None = 0, + Inline = 1, + EndOfForm = 2, + } public enum FormMethod { Get = 0, @@ -684,6 +690,7 @@ namespace Microsoft.AspNetCore.Mvc.Rendering public ViewContext() { } public ViewContext(Microsoft.AspNetCore.Mvc.ActionContext actionContext, Microsoft.AspNetCore.Mvc.ViewEngines.IView view, Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionary viewData, Microsoft.AspNetCore.Mvc.ViewFeatures.ITempDataDictionary tempData, System.IO.TextWriter writer, Microsoft.AspNetCore.Mvc.ViewFeatures.HtmlHelperOptions htmlHelperOptions) { } public ViewContext(Microsoft.AspNetCore.Mvc.Rendering.ViewContext viewContext, Microsoft.AspNetCore.Mvc.ViewEngines.IView view, Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionary viewData, System.IO.TextWriter writer) { } + public Microsoft.AspNetCore.Mvc.Rendering.CheckBoxHiddenInputRenderMode CheckBoxHiddenInputRenderMode { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } public bool ClientValidationEnabled { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } public string ExecutingFilePath { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } public virtual Microsoft.AspNetCore.Mvc.ViewFeatures.FormContext FormContext { get { throw null; } set { } } @@ -1068,6 +1075,7 @@ namespace Microsoft.AspNetCore.Mvc.ViewFeatures public partial class HtmlHelperOptions { public HtmlHelperOptions() { } + public Microsoft.AspNetCore.Mvc.Rendering.CheckBoxHiddenInputRenderMode CheckBoxHiddenInputRenderMode { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } public bool ClientValidationEnabled { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } public Microsoft.AspNetCore.Mvc.Rendering.Html5DateRenderingMode Html5DateRenderingMode { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } public string IdAttributeDotReplacement { get { throw null; } set { } } diff --git a/src/Mvc/Mvc.ViewFeatures/src/HtmlHelper.cs b/src/Mvc/Mvc.ViewFeatures/src/HtmlHelper.cs index 016246f4a4..cf8ee07fd9 100644 --- a/src/Mvc/Mvc.ViewFeatures/src/HtmlHelper.cs +++ b/src/Mvc/Mvc.ViewFeatures/src/HtmlHelper.cs @@ -721,8 +721,18 @@ namespace Microsoft.AspNetCore.Mvc.ViewFeatures isChecked, htmlAttributes); + if (checkbox == null) + { + return HtmlString.Empty; + } + + if (ViewContext.CheckBoxHiddenInputRenderMode == CheckBoxHiddenInputRenderMode.None) + { + return checkbox; + } + var hiddenForCheckbox = _htmlGenerator.GenerateHiddenForCheckbox(ViewContext, modelExplorer, expression); - if (checkbox == null || hiddenForCheckbox == null) + if (hiddenForCheckbox == null) { return HtmlString.Empty; } @@ -736,7 +746,7 @@ namespace Microsoft.AspNetCore.Mvc.ViewFeatures hiddenForCheckbox.MergeAttribute("name", name); } - if (ViewContext.FormContext.CanRenderAtEndOfForm) + if (ViewContext.CheckBoxHiddenInputRenderMode == CheckBoxHiddenInputRenderMode.EndOfForm && ViewContext.FormContext.CanRenderAtEndOfForm) { ViewContext.FormContext.EndOfFormContent.Add(hiddenForCheckbox); return checkbox; diff --git a/src/Mvc/Mvc.ViewFeatures/src/HtmlHelperOptions.cs b/src/Mvc/Mvc.ViewFeatures/src/HtmlHelperOptions.cs index 952bc7b4d9..f40bdf93f6 100644 --- a/src/Mvc/Mvc.ViewFeatures/src/HtmlHelperOptions.cs +++ b/src/Mvc/Mvc.ViewFeatures/src/HtmlHelperOptions.cs @@ -56,5 +56,10 @@ namespace Microsoft.AspNetCore.Mvc.ViewFeatures /// and other overloads. /// public string ValidationSummaryMessageElement { get; set; } = "span"; + + /// + /// Gets or sets the way hidden inputs are rendered for checkbox tag helpers and html helpers. + /// + public CheckBoxHiddenInputRenderMode CheckBoxHiddenInputRenderMode { get; set; } = CheckBoxHiddenInputRenderMode.EndOfForm; } } 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 328776d18f..c2e56ea415 100644 --- a/src/Mvc/Mvc.ViewFeatures/src/Microsoft.AspNetCore.Mvc.ViewFeatures.csproj +++ b/src/Mvc/Mvc.ViewFeatures/src/Microsoft.AspNetCore.Mvc.ViewFeatures.csproj @@ -8,7 +8,7 @@ Microsoft.AspNetCore.Mvc.ValidateAntiForgeryTokenAttribute Microsoft.AspNetCore.Mvc.ViewComponent - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) $(NoWarn);CS1591 true true diff --git a/src/Mvc/Mvc.ViewFeatures/src/Rendering/CheckBoxHiddenInputRenderMode.cs b/src/Mvc/Mvc.ViewFeatures/src/Rendering/CheckBoxHiddenInputRenderMode.cs new file mode 100644 index 0000000000..3d89c44d80 --- /dev/null +++ b/src/Mvc/Mvc.ViewFeatures/src/Rendering/CheckBoxHiddenInputRenderMode.cs @@ -0,0 +1,27 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +namespace Microsoft.AspNetCore.Mvc.Rendering +{ + /// + /// Controls the rendering of hidden input fields when using CheckBox tag helpers or html helpers. + /// + public enum CheckBoxHiddenInputRenderMode + { + /// + /// Hidden input fields will not be automatically rendered. If checkbox is not checked, no value will be posted. + /// + None = 0, + + /// + /// Hidden input fields will be rendered inline with each checkbox. Use this for legacy ASP.NET MVC behavior. + /// + Inline = 1, + + /// + /// Hidden input fields will be rendered for each checkbox at the bottom of the form element. This is the preferred render method and default MVC behavior. + /// If is false, will fall back on . + /// + EndOfForm = 2 + } +} diff --git a/src/Mvc/Mvc.ViewFeatures/src/Rendering/ViewContext.cs b/src/Mvc/Mvc.ViewFeatures/src/Rendering/ViewContext.cs index 0604cfc26e..ac2d6c48c9 100644 --- a/src/Mvc/Mvc.ViewFeatures/src/Rendering/ViewContext.cs +++ b/src/Mvc/Mvc.ViewFeatures/src/Rendering/ViewContext.cs @@ -89,6 +89,7 @@ namespace Microsoft.AspNetCore.Mvc.Rendering Html5DateRenderingMode = htmlHelperOptions.Html5DateRenderingMode; ValidationSummaryMessageElement = htmlHelperOptions.ValidationSummaryMessageElement; ValidationMessageElement = htmlHelperOptions.ValidationMessageElement; + CheckBoxHiddenInputRenderMode = htmlHelperOptions.CheckBoxHiddenInputRenderMode; } /// @@ -131,6 +132,8 @@ namespace Microsoft.AspNetCore.Mvc.Rendering Html5DateRenderingMode = viewContext.Html5DateRenderingMode; ValidationSummaryMessageElement = viewContext.ValidationSummaryMessageElement; ValidationMessageElement = viewContext.ValidationMessageElement; + CheckBoxHiddenInputRenderMode = viewContext.CheckBoxHiddenInputRenderMode; + ExecutingFilePath = viewContext.ExecutingFilePath; View = view; ViewData = viewData; @@ -184,6 +187,11 @@ namespace Microsoft.AspNetCore.Mvc.Rendering /// public string ValidationMessageElement { get; set; } + /// + /// Gets or sets the way hidden inputs are rendered for checkbox tag helpers and html helpers. + /// + public CheckBoxHiddenInputRenderMode CheckBoxHiddenInputRenderMode { get; set; } + /// /// Gets the dynamic view bag. /// diff --git a/src/Mvc/Mvc.ViewFeatures/test/Microsoft.AspNetCore.Mvc.ViewFeatures.Test.csproj b/src/Mvc/Mvc.ViewFeatures/test/Microsoft.AspNetCore.Mvc.ViewFeatures.Test.csproj index 5cfbdb8ff4..7c1b6055a0 100644 --- a/src/Mvc/Mvc.ViewFeatures/test/Microsoft.AspNetCore.Mvc.ViewFeatures.Test.csproj +++ b/src/Mvc/Mvc.ViewFeatures/test/Microsoft.AspNetCore.Mvc.ViewFeatures.Test.csproj @@ -1,7 +1,7 @@  - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) diff --git a/src/Mvc/Mvc.ViewFeatures/test/Rendering/HtmlHelperCheckboxTest.cs b/src/Mvc/Mvc.ViewFeatures/test/Rendering/HtmlHelperCheckboxTest.cs index 67cfb7f64e..ab35762255 100644 --- a/src/Mvc/Mvc.ViewFeatures/test/Rendering/HtmlHelperCheckboxTest.cs +++ b/src/Mvc/Mvc.ViewFeatures/test/Rendering/HtmlHelperCheckboxTest.cs @@ -169,6 +169,93 @@ namespace Microsoft.AspNetCore.Mvc.Rendering writer.ToString()); } + [Fact] + public void CheckBox_WithHiddenInputRenderModeNone_DoesNotGenerateHiddenInput() + { + // Arrange + var requiredMessage = ValidationAttributeUtil.GetRequiredErrorMessage("Boolean"); + var expected = @""; + var helper = DefaultTemplatesUtilities.GetHtmlHelper(GetTestModelViewData()); + helper.ViewContext.CheckBoxHiddenInputRenderMode = CheckBoxHiddenInputRenderMode.None; + + // Act + var html = helper.CheckBox("Property1", isChecked: true, htmlAttributes: null); + + // Assert + Assert.False(helper.ViewContext.FormContext.HasEndOfFormContent); + Assert.Equal(expected, HtmlContentUtilities.HtmlContentToString(html)); + } + + [Fact] + public void CheckBox_WithHiddenInputRenderModeInline_GeneratesHiddenInput() + { + // Arrange + var requiredMessage = ValidationAttributeUtil.GetRequiredErrorMessage("Boolean"); + var expected = @""; + var helper = DefaultTemplatesUtilities.GetHtmlHelper(GetTestModelViewData()); + helper.ViewContext.FormContext.CanRenderAtEndOfForm = true; + helper.ViewContext.CheckBoxHiddenInputRenderMode = CheckBoxHiddenInputRenderMode.Inline; + + // Act + var html = helper.CheckBox("Property1", isChecked: true, htmlAttributes: null); + + // Assert + Assert.Equal(expected, HtmlContentUtilities.HtmlContentToString(html)); + } + + [Fact] + public void CheckBox_WithHiddenInputRenderModeEndOfForm_GeneratesHiddenInput() + { + // Arrange + var requiredMessage = ValidationAttributeUtil.GetRequiredErrorMessage("Boolean"); + var expected = @""; + var helper = DefaultTemplatesUtilities.GetHtmlHelper(GetTestModelViewData()); + helper.ViewContext.FormContext.CanRenderAtEndOfForm = true; + helper.ViewContext.CheckBoxHiddenInputRenderMode = CheckBoxHiddenInputRenderMode.EndOfForm; + + // Act + var html = helper.CheckBox("Property1", isChecked: true, htmlAttributes: null); + + // Assert + Assert.True(helper.ViewContext.FormContext.HasEndOfFormContent); + Assert.Equal(expected, HtmlContentUtilities.HtmlContentToString(html)); + var writer = new StringWriter(); + var hiddenTag = Assert.Single(helper.ViewContext.FormContext.EndOfFormContent); + hiddenTag.WriteTo(writer, new HtmlTestEncoder()); + Assert.Equal("", + writer.ToString()); + } + + [Fact] + public void CheckBox_WithHiddenInputRenderModeEndOfForm_WithCanRenderAtEndOfFormNotSet_GeneratesHiddenInput() + { + // Arrange + var requiredMessage = ValidationAttributeUtil.GetRequiredErrorMessage("Boolean"); + var expected = @""; + var helper = DefaultTemplatesUtilities.GetHtmlHelper(GetTestModelViewData()); + helper.ViewContext.FormContext.CanRenderAtEndOfForm = false; + helper.ViewContext.CheckBoxHiddenInputRenderMode = CheckBoxHiddenInputRenderMode.EndOfForm; + + // Act + var html = helper.CheckBox("Property1", isChecked: true, htmlAttributes: null); + + // Assert + Assert.False(helper.ViewContext.FormContext.HasEndOfFormContent); + Assert.Equal(expected, HtmlContentUtilities.HtmlContentToString(html)); + } + [Fact] public void CheckBoxUsesAttemptedValueFromModelState() { diff --git a/src/Mvc/Mvc/ref/Microsoft.AspNetCore.Mvc.csproj b/src/Mvc/Mvc/ref/Microsoft.AspNetCore.Mvc.csproj index 0bd19fa8af..777c827bab 100644 --- a/src/Mvc/Mvc/ref/Microsoft.AspNetCore.Mvc.csproj +++ b/src/Mvc/Mvc/ref/Microsoft.AspNetCore.Mvc.csproj @@ -1,10 +1,10 @@ - netcoreapp3.0 + netcoreapp5.0 - - + + diff --git a/src/Mvc/Mvc/ref/Microsoft.AspNetCore.Mvc.netcoreapp3.0.cs b/src/Mvc/Mvc/ref/Microsoft.AspNetCore.Mvc.netcoreapp.cs similarity index 100% rename from src/Mvc/Mvc/ref/Microsoft.AspNetCore.Mvc.netcoreapp3.0.cs rename to src/Mvc/Mvc/ref/Microsoft.AspNetCore.Mvc.netcoreapp.cs diff --git a/src/Mvc/Mvc/src/Microsoft.AspNetCore.Mvc.csproj b/src/Mvc/Mvc/src/Microsoft.AspNetCore.Mvc.csproj index fd3087cb95..f0737a4743 100644 --- a/src/Mvc/Mvc/src/Microsoft.AspNetCore.Mvc.csproj +++ b/src/Mvc/Mvc/src/Microsoft.AspNetCore.Mvc.csproj @@ -2,7 +2,7 @@ ASP.NET Core MVC is a web framework that gives you a powerful, patterns-based way to build dynamic websites and web APIs. ASP.NET Core MVC enables a clean separation of concerns and gives you full control over markup. - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) true aspnetcore;aspnetcoremvc true diff --git a/src/Mvc/Mvc/test/Microsoft.AspNetCore.Mvc.Test.csproj b/src/Mvc/Mvc/test/Microsoft.AspNetCore.Mvc.Test.csproj index c1b0ad0c05..8cc541a4ae 100644 --- a/src/Mvc/Mvc/test/Microsoft.AspNetCore.Mvc.Test.csproj +++ b/src/Mvc/Mvc/test/Microsoft.AspNetCore.Mvc.Test.csproj @@ -1,7 +1,7 @@ - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) true diff --git a/src/Mvc/benchmarkapps/BasicApi/BasicApi.csproj b/src/Mvc/benchmarkapps/BasicApi/BasicApi.csproj index ed0f550ce1..f92709260c 100644 --- a/src/Mvc/benchmarkapps/BasicApi/BasicApi.csproj +++ b/src/Mvc/benchmarkapps/BasicApi/BasicApi.csproj @@ -1,6 +1,6 @@ - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) $(BenchmarksTargetFramework) $(DefineConstants);GENERATE_SQL_SCRIPTS diff --git a/src/Mvc/benchmarkapps/BasicViews/BasicViews.csproj b/src/Mvc/benchmarkapps/BasicViews/BasicViews.csproj index 359adaace7..31d09a0c1c 100644 --- a/src/Mvc/benchmarkapps/BasicViews/BasicViews.csproj +++ b/src/Mvc/benchmarkapps/BasicViews/BasicViews.csproj @@ -1,6 +1,6 @@  - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) $(BenchmarksTargetFramework) $(DefineConstants);GENERATE_SQL_SCRIPTS diff --git a/src/Mvc/benchmarkapps/RazorRendering/RazorRendering.csproj b/src/Mvc/benchmarkapps/RazorRendering/RazorRendering.csproj index 29819095ee..704906abe2 100644 --- a/src/Mvc/benchmarkapps/RazorRendering/RazorRendering.csproj +++ b/src/Mvc/benchmarkapps/RazorRendering/RazorRendering.csproj @@ -1,6 +1,6 @@  - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) $(BenchmarksTargetFramework) true diff --git a/src/Mvc/benchmarks/Microsoft.AspNetCore.Mvc.Performance.Views/Microsoft.AspNetCore.Mvc.Performance.Views.csproj b/src/Mvc/benchmarks/Microsoft.AspNetCore.Mvc.Performance.Views/Microsoft.AspNetCore.Mvc.Performance.Views.csproj index cdce92f5a8..ec384adc46 100644 --- a/src/Mvc/benchmarks/Microsoft.AspNetCore.Mvc.Performance.Views/Microsoft.AspNetCore.Mvc.Performance.Views.csproj +++ b/src/Mvc/benchmarks/Microsoft.AspNetCore.Mvc.Performance.Views/Microsoft.AspNetCore.Mvc.Performance.Views.csproj @@ -1,7 +1,7 @@  - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) false true diff --git a/src/Mvc/benchmarks/Microsoft.AspNetCore.Mvc.Performance/Microsoft.AspNetCore.Mvc.Performance.csproj b/src/Mvc/benchmarks/Microsoft.AspNetCore.Mvc.Performance/Microsoft.AspNetCore.Mvc.Performance.csproj index 2a032bf856..e2a5cad37a 100644 --- a/src/Mvc/benchmarks/Microsoft.AspNetCore.Mvc.Performance/Microsoft.AspNetCore.Mvc.Performance.csproj +++ b/src/Mvc/benchmarks/Microsoft.AspNetCore.Mvc.Performance/Microsoft.AspNetCore.Mvc.Performance.csproj @@ -1,7 +1,7 @@ - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) Exe true true diff --git a/src/Mvc/samples/MvcSandbox/MvcSandbox.csproj b/src/Mvc/samples/MvcSandbox/MvcSandbox.csproj index be7dd8158c..4e23fd98be 100644 --- a/src/Mvc/samples/MvcSandbox/MvcSandbox.csproj +++ b/src/Mvc/samples/MvcSandbox/MvcSandbox.csproj @@ -1,7 +1,7 @@  - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) 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 15827f9a0e..7cccae2323 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 @@ -1,7 +1,7 @@ - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) true diff --git a/src/Mvc/shared/Mvc.TestDiagnosticListener/Microsoft.AspNetCore.Mvc.TestDiagnosticListener.csproj b/src/Mvc/shared/Mvc.TestDiagnosticListener/Microsoft.AspNetCore.Mvc.TestDiagnosticListener.csproj index 4b0e759a67..f54cba0d94 100644 --- a/src/Mvc/shared/Mvc.TestDiagnosticListener/Microsoft.AspNetCore.Mvc.TestDiagnosticListener.csproj +++ b/src/Mvc/shared/Mvc.TestDiagnosticListener/Microsoft.AspNetCore.Mvc.TestDiagnosticListener.csproj @@ -1,7 +1,7 @@ - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) true diff --git a/src/Mvc/shared/Mvc.Views.TestCommon/Microsoft.AspNetCore.Mvc.Views.TestCommon.csproj b/src/Mvc/shared/Mvc.Views.TestCommon/Microsoft.AspNetCore.Mvc.Views.TestCommon.csproj index 14d8694a65..b6b38f18bb 100644 --- a/src/Mvc/shared/Mvc.Views.TestCommon/Microsoft.AspNetCore.Mvc.Views.TestCommon.csproj +++ b/src/Mvc/shared/Mvc.Views.TestCommon/Microsoft.AspNetCore.Mvc.Views.TestCommon.csproj @@ -1,7 +1,7 @@  - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) true 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 09fbc8c5dc..38b8d99c54 100644 --- a/src/Mvc/test/Mvc.FunctionalTests/Microsoft.AspNetCore.Mvc.FunctionalTests.csproj +++ b/src/Mvc/test/Mvc.FunctionalTests/Microsoft.AspNetCore.Mvc.FunctionalTests.csproj @@ -2,7 +2,7 @@ - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) $(DefineConstants);GENERATE_BASELINES $(DefineConstants);__RemoveThisBitTo__GENERATE_BASELINES 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 0e33905acc..219c486911 100644 --- a/src/Mvc/test/Mvc.IntegrationTests/Microsoft.AspNetCore.Mvc.IntegrationTests.csproj +++ b/src/Mvc/test/Mvc.IntegrationTests/Microsoft.AspNetCore.Mvc.IntegrationTests.csproj @@ -1,7 +1,7 @@ - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) false diff --git a/src/Mvc/test/WebSites/ApiExplorerWebSite/ApiExplorerWebSite.csproj b/src/Mvc/test/WebSites/ApiExplorerWebSite/ApiExplorerWebSite.csproj index 3dd0c5179c..8ae9c29e7a 100644 --- a/src/Mvc/test/WebSites/ApiExplorerWebSite/ApiExplorerWebSite.csproj +++ b/src/Mvc/test/WebSites/ApiExplorerWebSite/ApiExplorerWebSite.csproj @@ -1,7 +1,7 @@ - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) true diff --git a/src/Mvc/test/WebSites/ApplicationModelWebSite/ApplicationModelWebSite.csproj b/src/Mvc/test/WebSites/ApplicationModelWebSite/ApplicationModelWebSite.csproj index 7efc319231..4561f10201 100644 --- a/src/Mvc/test/WebSites/ApplicationModelWebSite/ApplicationModelWebSite.csproj +++ b/src/Mvc/test/WebSites/ApplicationModelWebSite/ApplicationModelWebSite.csproj @@ -1,7 +1,7 @@  - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) true diff --git a/src/Mvc/test/WebSites/BasicWebSite/BasicWebSite.csproj b/src/Mvc/test/WebSites/BasicWebSite/BasicWebSite.csproj index 0003f20eb0..f8ef3662b2 100644 --- a/src/Mvc/test/WebSites/BasicWebSite/BasicWebSite.csproj +++ b/src/Mvc/test/WebSites/BasicWebSite/BasicWebSite.csproj @@ -1,7 +1,7 @@  - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) true diff --git a/src/Mvc/test/WebSites/ControllersFromServicesClassLibrary/ControllersFromServicesClassLibrary.csproj b/src/Mvc/test/WebSites/ControllersFromServicesClassLibrary/ControllersFromServicesClassLibrary.csproj index f9d04186ee..8a12e89e84 100644 --- a/src/Mvc/test/WebSites/ControllersFromServicesClassLibrary/ControllersFromServicesClassLibrary.csproj +++ b/src/Mvc/test/WebSites/ControllersFromServicesClassLibrary/ControllersFromServicesClassLibrary.csproj @@ -1,7 +1,7 @@ - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) true true diff --git a/src/Mvc/test/WebSites/ControllersFromServicesWebSite/ControllersFromServicesWebSite.csproj b/src/Mvc/test/WebSites/ControllersFromServicesWebSite/ControllersFromServicesWebSite.csproj index e409e9764b..65f6c14c62 100644 --- a/src/Mvc/test/WebSites/ControllersFromServicesWebSite/ControllersFromServicesWebSite.csproj +++ b/src/Mvc/test/WebSites/ControllersFromServicesWebSite/ControllersFromServicesWebSite.csproj @@ -1,7 +1,7 @@ - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) true diff --git a/src/Mvc/test/WebSites/CorsWebSite/CorsWebSite.csproj b/src/Mvc/test/WebSites/CorsWebSite/CorsWebSite.csproj index 87070b5059..9811da4a16 100644 --- a/src/Mvc/test/WebSites/CorsWebSite/CorsWebSite.csproj +++ b/src/Mvc/test/WebSites/CorsWebSite/CorsWebSite.csproj @@ -1,7 +1,7 @@  - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) true diff --git a/src/Mvc/test/WebSites/ErrorPageMiddlewareWebSite/ErrorPageMiddlewareWebSite.csproj b/src/Mvc/test/WebSites/ErrorPageMiddlewareWebSite/ErrorPageMiddlewareWebSite.csproj index 7f98eb7afe..e5d9f2e414 100644 --- a/src/Mvc/test/WebSites/ErrorPageMiddlewareWebSite/ErrorPageMiddlewareWebSite.csproj +++ b/src/Mvc/test/WebSites/ErrorPageMiddlewareWebSite/ErrorPageMiddlewareWebSite.csproj @@ -1,7 +1,7 @@ - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) false true diff --git a/src/Mvc/test/WebSites/FilesWebSite/FilesWebSite.csproj b/src/Mvc/test/WebSites/FilesWebSite/FilesWebSite.csproj index 4a40597815..bac3e46213 100644 --- a/src/Mvc/test/WebSites/FilesWebSite/FilesWebSite.csproj +++ b/src/Mvc/test/WebSites/FilesWebSite/FilesWebSite.csproj @@ -1,7 +1,7 @@ - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) true diff --git a/src/Mvc/test/WebSites/FormatterWebSite/FormatterWebSite.csproj b/src/Mvc/test/WebSites/FormatterWebSite/FormatterWebSite.csproj index 7eddbaa68c..0c9ebba1fd 100644 --- a/src/Mvc/test/WebSites/FormatterWebSite/FormatterWebSite.csproj +++ b/src/Mvc/test/WebSites/FormatterWebSite/FormatterWebSite.csproj @@ -1,7 +1,7 @@  - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) true diff --git a/src/Mvc/test/WebSites/GenericHostWebSite/GenericHostWebSite.csproj b/src/Mvc/test/WebSites/GenericHostWebSite/GenericHostWebSite.csproj index dfb9a568e0..fbdd74a34b 100644 --- a/src/Mvc/test/WebSites/GenericHostWebSite/GenericHostWebSite.csproj +++ b/src/Mvc/test/WebSites/GenericHostWebSite/GenericHostWebSite.csproj @@ -1,7 +1,7 @@  - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) true diff --git a/src/Mvc/test/WebSites/HtmlGenerationWebSite/HtmlGenerationWebSite.csproj b/src/Mvc/test/WebSites/HtmlGenerationWebSite/HtmlGenerationWebSite.csproj index 3cdd1f61c7..cd499d6edd 100644 --- a/src/Mvc/test/WebSites/HtmlGenerationWebSite/HtmlGenerationWebSite.csproj +++ b/src/Mvc/test/WebSites/HtmlGenerationWebSite/HtmlGenerationWebSite.csproj @@ -1,7 +1,7 @@  - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) true diff --git a/src/Mvc/test/WebSites/RazorBuildWebSite.PrecompiledViews/RazorBuildWebSite.PrecompiledViews.csproj b/src/Mvc/test/WebSites/RazorBuildWebSite.PrecompiledViews/RazorBuildWebSite.PrecompiledViews.csproj index 4524b5338f..6aa3b0ea19 100644 --- a/src/Mvc/test/WebSites/RazorBuildWebSite.PrecompiledViews/RazorBuildWebSite.PrecompiledViews.csproj +++ b/src/Mvc/test/WebSites/RazorBuildWebSite.PrecompiledViews/RazorBuildWebSite.PrecompiledViews.csproj @@ -1,7 +1,7 @@ - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) $(DefineConstants) true diff --git a/src/Mvc/test/WebSites/RazorBuildWebSite.Views/RazorBuildWebSite.Views.csproj b/src/Mvc/test/WebSites/RazorBuildWebSite.Views/RazorBuildWebSite.Views.csproj index 4524b5338f..6aa3b0ea19 100644 --- a/src/Mvc/test/WebSites/RazorBuildWebSite.Views/RazorBuildWebSite.Views.csproj +++ b/src/Mvc/test/WebSites/RazorBuildWebSite.Views/RazorBuildWebSite.Views.csproj @@ -1,7 +1,7 @@ - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) $(DefineConstants) true diff --git a/src/Mvc/test/WebSites/RazorBuildWebSite/RazorBuildWebSite.csproj b/src/Mvc/test/WebSites/RazorBuildWebSite/RazorBuildWebSite.csproj index 2f74444d93..6f9e357218 100644 --- a/src/Mvc/test/WebSites/RazorBuildWebSite/RazorBuildWebSite.csproj +++ b/src/Mvc/test/WebSites/RazorBuildWebSite/RazorBuildWebSite.csproj @@ -1,7 +1,7 @@  - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) $(DefineConstants) false diff --git a/src/Mvc/test/WebSites/RazorPagesClassLibrary/RazorPagesClassLibrary.csproj b/src/Mvc/test/WebSites/RazorPagesClassLibrary/RazorPagesClassLibrary.csproj index 8fb3530b46..252fd7e3e2 100644 --- a/src/Mvc/test/WebSites/RazorPagesClassLibrary/RazorPagesClassLibrary.csproj +++ b/src/Mvc/test/WebSites/RazorPagesClassLibrary/RazorPagesClassLibrary.csproj @@ -1,7 +1,7 @@  - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) true true diff --git a/src/Mvc/test/WebSites/RazorPagesWebSite/RazorPagesWebSite.csproj b/src/Mvc/test/WebSites/RazorPagesWebSite/RazorPagesWebSite.csproj index 09754c80c3..8dc95aaf16 100644 --- a/src/Mvc/test/WebSites/RazorPagesWebSite/RazorPagesWebSite.csproj +++ b/src/Mvc/test/WebSites/RazorPagesWebSite/RazorPagesWebSite.csproj @@ -1,7 +1,7 @@  - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) true diff --git a/src/Mvc/test/WebSites/RazorWebSite/RazorWebSite.csproj b/src/Mvc/test/WebSites/RazorWebSite/RazorWebSite.csproj index f6b24e30ec..0204151543 100644 --- a/src/Mvc/test/WebSites/RazorWebSite/RazorWebSite.csproj +++ b/src/Mvc/test/WebSites/RazorWebSite/RazorWebSite.csproj @@ -1,7 +1,7 @@  - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) $(DefineConstants);NETCOREAPP2_0_CUSTOM_DEFINE true diff --git a/src/Mvc/test/WebSites/RoutingWebSite/Mvc.RoutingWebSite.csproj b/src/Mvc/test/WebSites/RoutingWebSite/Mvc.RoutingWebSite.csproj index 4954023a67..312f53cdd3 100644 --- a/src/Mvc/test/WebSites/RoutingWebSite/Mvc.RoutingWebSite.csproj +++ b/src/Mvc/test/WebSites/RoutingWebSite/Mvc.RoutingWebSite.csproj @@ -1,7 +1,7 @@  - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) true diff --git a/src/Mvc/test/WebSites/SecurityWebSite/SecurityWebSite.csproj b/src/Mvc/test/WebSites/SecurityWebSite/SecurityWebSite.csproj index fa377f657a..6f65269cd8 100644 --- a/src/Mvc/test/WebSites/SecurityWebSite/SecurityWebSite.csproj +++ b/src/Mvc/test/WebSites/SecurityWebSite/SecurityWebSite.csproj @@ -1,7 +1,7 @@  - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) true diff --git a/src/Mvc/test/WebSites/SimpleWebSite/SimpleWebSite.csproj b/src/Mvc/test/WebSites/SimpleWebSite/SimpleWebSite.csproj index 5c0fd935f9..2535d4f562 100644 --- a/src/Mvc/test/WebSites/SimpleWebSite/SimpleWebSite.csproj +++ b/src/Mvc/test/WebSites/SimpleWebSite/SimpleWebSite.csproj @@ -1,7 +1,7 @@ - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) true diff --git a/src/Mvc/test/WebSites/TagHelpersWebSite/TagHelpersWebSite.csproj b/src/Mvc/test/WebSites/TagHelpersWebSite/TagHelpersWebSite.csproj index 35ca43b4bb..38cfcb61aa 100644 --- a/src/Mvc/test/WebSites/TagHelpersWebSite/TagHelpersWebSite.csproj +++ b/src/Mvc/test/WebSites/TagHelpersWebSite/TagHelpersWebSite.csproj @@ -1,7 +1,7 @@  - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) true true diff --git a/src/Mvc/test/WebSites/VersioningWebSite/VersioningWebSite.csproj b/src/Mvc/test/WebSites/VersioningWebSite/VersioningWebSite.csproj index 6525a4ed39..589cfd9fa9 100644 --- a/src/Mvc/test/WebSites/VersioningWebSite/VersioningWebSite.csproj +++ b/src/Mvc/test/WebSites/VersioningWebSite/VersioningWebSite.csproj @@ -1,7 +1,7 @@ - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) true diff --git a/src/Mvc/test/WebSites/XmlFormattersWebSite/XmlFormattersWebSite.csproj b/src/Mvc/test/WebSites/XmlFormattersWebSite/XmlFormattersWebSite.csproj index 97692293c1..56abcc28c8 100644 --- a/src/Mvc/test/WebSites/XmlFormattersWebSite/XmlFormattersWebSite.csproj +++ b/src/Mvc/test/WebSites/XmlFormattersWebSite/XmlFormattersWebSite.csproj @@ -1,6 +1,6 @@ - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) true diff --git a/src/ProjectTemplates/Web.Client.ItemTemplates/Microsoft.DotNet.Web.Client.ItemTemplates.csproj b/src/ProjectTemplates/Web.Client.ItemTemplates/Microsoft.DotNet.Web.Client.ItemTemplates.csproj index 52eb42650a..27842cb73b 100644 --- a/src/ProjectTemplates/Web.Client.ItemTemplates/Microsoft.DotNet.Web.Client.ItemTemplates.csproj +++ b/src/ProjectTemplates/Web.Client.ItemTemplates/Microsoft.DotNet.Web.Client.ItemTemplates.csproj @@ -1,7 +1,7 @@ - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) Web Client-Side File Templates for Microsoft Template Engine true diff --git a/src/ProjectTemplates/Web.ItemTemplates/Microsoft.DotNet.Web.ItemTemplates.csproj b/src/ProjectTemplates/Web.ItemTemplates/Microsoft.DotNet.Web.ItemTemplates.csproj index 4a62d6306b..a1f51b94f5 100644 --- a/src/ProjectTemplates/Web.ItemTemplates/Microsoft.DotNet.Web.ItemTemplates.csproj +++ b/src/ProjectTemplates/Web.ItemTemplates/Microsoft.DotNet.Web.ItemTemplates.csproj @@ -1,7 +1,7 @@ - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) Web File Templates for Microsoft Template Engine. true diff --git a/src/ProjectTemplates/Web.ProjectTemplates/BlazorServerWeb-CSharp.csproj.in b/src/ProjectTemplates/Web.ProjectTemplates/BlazorServerWeb-CSharp.csproj.in index fd683b4b20..34f8880205 100644 --- a/src/ProjectTemplates/Web.ProjectTemplates/BlazorServerWeb-CSharp.csproj.in +++ b/src/ProjectTemplates/Web.ProjectTemplates/BlazorServerWeb-CSharp.csproj.in @@ -1,7 +1,7 @@ - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) aspnet-BlazorServerWeb_CSharp-53bc9b9d-9d6a-45d4-8429-2a2761773502 0 1 diff --git a/src/ProjectTemplates/Web.ProjectTemplates/EmptyWeb-CSharp.csproj.in b/src/ProjectTemplates/Web.ProjectTemplates/EmptyWeb-CSharp.csproj.in index 1a00211608..57d248b353 100644 --- a/src/ProjectTemplates/Web.ProjectTemplates/EmptyWeb-CSharp.csproj.in +++ b/src/ProjectTemplates/Web.ProjectTemplates/EmptyWeb-CSharp.csproj.in @@ -1,7 +1,7 @@  - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) True Company.WebApplication1 diff --git a/src/ProjectTemplates/Web.ProjectTemplates/EmptyWeb-FSharp.fsproj.in b/src/ProjectTemplates/Web.ProjectTemplates/EmptyWeb-FSharp.fsproj.in index 75b7c9f84a..0207f21188 100644 --- a/src/ProjectTemplates/Web.ProjectTemplates/EmptyWeb-FSharp.fsproj.in +++ b/src/ProjectTemplates/Web.ProjectTemplates/EmptyWeb-FSharp.fsproj.in @@ -1,7 +1,7 @@  - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) True Company.WebApplication1 diff --git a/src/ProjectTemplates/Web.ProjectTemplates/GrpcService-CSharp.csproj.in b/src/ProjectTemplates/Web.ProjectTemplates/GrpcService-CSharp.csproj.in index 25593b00b5..219779fedc 100644 --- a/src/ProjectTemplates/Web.ProjectTemplates/GrpcService-CSharp.csproj.in +++ b/src/ProjectTemplates/Web.ProjectTemplates/GrpcService-CSharp.csproj.in @@ -1,7 +1,7 @@ - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) diff --git a/src/ProjectTemplates/Web.ProjectTemplates/Microsoft.DotNet.Web.ProjectTemplates.csproj b/src/ProjectTemplates/Web.ProjectTemplates/Microsoft.DotNet.Web.ProjectTemplates.csproj index 1feb6f2a3d..1edd2c6202 100644 --- a/src/ProjectTemplates/Web.ProjectTemplates/Microsoft.DotNet.Web.ProjectTemplates.csproj +++ b/src/ProjectTemplates/Web.ProjectTemplates/Microsoft.DotNet.Web.ProjectTemplates.csproj @@ -1,7 +1,7 @@ - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) Microsoft.DotNet.Web.ProjectTemplates.$(AspNetCoreMajorVersion).$(AspNetCoreMinorVersion) ASP.NET Core Web Template Pack for Microsoft Template Engine true diff --git a/src/ProjectTemplates/Web.ProjectTemplates/RazorClassLibrary-CSharp.csproj.in b/src/ProjectTemplates/Web.ProjectTemplates/RazorClassLibrary-CSharp.csproj.in index 84d28722d2..9df8eb3d99 100644 --- a/src/ProjectTemplates/Web.ProjectTemplates/RazorClassLibrary-CSharp.csproj.in +++ b/src/ProjectTemplates/Web.ProjectTemplates/RazorClassLibrary-CSharp.csproj.in @@ -1,7 +1,7 @@ - netcoreapp3.0 + netcoreapp5.0 netstandard2.0 3.0 true diff --git a/src/ProjectTemplates/Web.ProjectTemplates/RazorPagesWeb-CSharp.csproj.in b/src/ProjectTemplates/Web.ProjectTemplates/RazorPagesWeb-CSharp.csproj.in index 3e14a0a1e0..583df61028 100644 --- a/src/ProjectTemplates/Web.ProjectTemplates/RazorPagesWeb-CSharp.csproj.in +++ b/src/ProjectTemplates/Web.ProjectTemplates/RazorPagesWeb-CSharp.csproj.in @@ -1,7 +1,7 @@ - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) aspnet-Company.WebApplication1-0ce56475-d1db-490f-8af1-a881ea4fcd2d 0 1 diff --git a/src/ProjectTemplates/Web.ProjectTemplates/StarterWeb-CSharp.csproj.in b/src/ProjectTemplates/Web.ProjectTemplates/StarterWeb-CSharp.csproj.in index 563b2c2927..ebb5bcea7a 100644 --- a/src/ProjectTemplates/Web.ProjectTemplates/StarterWeb-CSharp.csproj.in +++ b/src/ProjectTemplates/Web.ProjectTemplates/StarterWeb-CSharp.csproj.in @@ -1,7 +1,7 @@ - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) aspnet-Company.WebApplication1-53bc9b9d-9d6a-45d4-8429-2a2761773502 0 1 diff --git a/src/ProjectTemplates/Web.ProjectTemplates/StarterWeb-FSharp.fsproj.in b/src/ProjectTemplates/Web.ProjectTemplates/StarterWeb-FSharp.fsproj.in index 4192478d05..a6195f707a 100644 --- a/src/ProjectTemplates/Web.ProjectTemplates/StarterWeb-FSharp.fsproj.in +++ b/src/ProjectTemplates/Web.ProjectTemplates/StarterWeb-FSharp.fsproj.in @@ -1,7 +1,7 @@  - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) True Company.WebApplication1 diff --git a/src/ProjectTemplates/Web.ProjectTemplates/WebApi-CSharp.csproj.in b/src/ProjectTemplates/Web.ProjectTemplates/WebApi-CSharp.csproj.in index e146f8753d..56eba69b2d 100644 --- a/src/ProjectTemplates/Web.ProjectTemplates/WebApi-CSharp.csproj.in +++ b/src/ProjectTemplates/Web.ProjectTemplates/WebApi-CSharp.csproj.in @@ -1,7 +1,7 @@  - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) aspnet-Company.WebApplication1-53bc9b9d-9d6a-45d4-8429-2a2761773502 0 1 diff --git a/src/ProjectTemplates/Web.ProjectTemplates/WebApi-FSharp.fsproj.in b/src/ProjectTemplates/Web.ProjectTemplates/WebApi-FSharp.fsproj.in index 714aa82b2e..7bb70a4ffc 100644 --- a/src/ProjectTemplates/Web.ProjectTemplates/WebApi-FSharp.fsproj.in +++ b/src/ProjectTemplates/Web.ProjectTemplates/WebApi-FSharp.fsproj.in @@ -1,7 +1,7 @@  - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) True Company.WebApplication1 diff --git a/src/ProjectTemplates/Web.ProjectTemplates/Worker-CSharp.csproj.in b/src/ProjectTemplates/Web.ProjectTemplates/Worker-CSharp.csproj.in index e490281998..ea86dafef3 100644 --- a/src/ProjectTemplates/Web.ProjectTemplates/Worker-CSharp.csproj.in +++ b/src/ProjectTemplates/Web.ProjectTemplates/Worker-CSharp.csproj.in @@ -1,7 +1,7 @@ - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) dotnet-Company.Application1-53bc9b9d-9d6a-45d4-8429-2a2761773502 True Company.Application1 diff --git a/src/ProjectTemplates/Web.ProjectTemplates/content/BlazorServerWeb-CSharp/.template.config/template.json b/src/ProjectTemplates/Web.ProjectTemplates/content/BlazorServerWeb-CSharp/.template.config/template.json index a23ddddb85..9c2c9d2ed6 100644 --- a/src/ProjectTemplates/Web.ProjectTemplates/content/BlazorServerWeb-CSharp/.template.config/template.json +++ b/src/ProjectTemplates/Web.ProjectTemplates/content/BlazorServerWeb-CSharp/.template.config/template.json @@ -337,12 +337,12 @@ "datatype": "choice", "choices": [ { - "choice": "netcoreapp3.0", - "description": "Target netcoreapp3.0" + "choice": "netcoreapp5.0", + "description": "Target netcoreapp5.0" } ], - "replaces": "netcoreapp3.0", - "defaultValue": "netcoreapp3.0" + "replaces": "netcoreapp5.0", + "defaultValue": "netcoreapp5.0" }, "copyrightYear": { "type": "generated", diff --git a/src/ProjectTemplates/Web.ProjectTemplates/content/BlazorServerWeb-CSharp/Shared/MainLayout.Auth.razor b/src/ProjectTemplates/Web.ProjectTemplates/content/BlazorServerWeb-CSharp/Shared/MainLayout.Auth.razor index f2f9098007..842ef1f6bc 100644 --- a/src/ProjectTemplates/Web.ProjectTemplates/content/BlazorServerWeb-CSharp/Shared/MainLayout.Auth.razor +++ b/src/ProjectTemplates/Web.ProjectTemplates/content/BlazorServerWeb-CSharp/Shared/MainLayout.Auth.razor @@ -7,7 +7,7 @@
- About + About
diff --git a/src/ProjectTemplates/Web.ProjectTemplates/content/BlazorServerWeb-CSharp/Shared/MainLayout.NoAuth.razor b/src/ProjectTemplates/Web.ProjectTemplates/content/BlazorServerWeb-CSharp/Shared/MainLayout.NoAuth.razor index 9b5407d03b..74820a0b75 100644 --- a/src/ProjectTemplates/Web.ProjectTemplates/content/BlazorServerWeb-CSharp/Shared/MainLayout.NoAuth.razor +++ b/src/ProjectTemplates/Web.ProjectTemplates/content/BlazorServerWeb-CSharp/Shared/MainLayout.NoAuth.razor @@ -6,7 +6,7 @@
- About + About
diff --git a/src/ProjectTemplates/Web.ProjectTemplates/content/EmptyWeb-CSharp/.template.config/template.json b/src/ProjectTemplates/Web.ProjectTemplates/content/EmptyWeb-CSharp/.template.config/template.json index 89093fb922..32039a6734 100644 --- a/src/ProjectTemplates/Web.ProjectTemplates/content/EmptyWeb-CSharp/.template.config/template.json +++ b/src/ProjectTemplates/Web.ProjectTemplates/content/EmptyWeb-CSharp/.template.config/template.json @@ -86,12 +86,12 @@ "datatype": "choice", "choices": [ { - "choice": "netcoreapp3.0", - "description": "Target netcoreapp3.0" + "choice": "netcoreapp5.0", + "description": "Target netcoreapp5.0" } ], - "replaces": "netcoreapp3.0", - "defaultValue": "netcoreapp3.0" + "replaces": "netcoreapp5.0", + "defaultValue": "netcoreapp5.0" }, "copyrightYear": { "type": "generated", diff --git a/src/ProjectTemplates/Web.ProjectTemplates/content/EmptyWeb-FSharp/.template.config/template.json b/src/ProjectTemplates/Web.ProjectTemplates/content/EmptyWeb-FSharp/.template.config/template.json index f473dd1c1d..0ebccbad52 100644 --- a/src/ProjectTemplates/Web.ProjectTemplates/content/EmptyWeb-FSharp/.template.config/template.json +++ b/src/ProjectTemplates/Web.ProjectTemplates/content/EmptyWeb-FSharp/.template.config/template.json @@ -82,12 +82,12 @@ "datatype": "choice", "choices": [ { - "choice": "netcoreapp3.0", - "description": "Target netcoreapp3.0" + "choice": "netcoreapp5.0", + "description": "Target netcoreapp5.0" } ], - "replaces": "netcoreapp3.0", - "defaultValue": "netcoreapp3.0" + "replaces": "netcoreapp5.0", + "defaultValue": "netcoreapp5.0" }, "copyrightYear": { "type": "generated", diff --git a/src/ProjectTemplates/Web.ProjectTemplates/content/GrpcService-CSharp/.template.config/template.json b/src/ProjectTemplates/Web.ProjectTemplates/content/GrpcService-CSharp/.template.config/template.json index 22b7e8a4bb..462630dbbd 100644 --- a/src/ProjectTemplates/Web.ProjectTemplates/content/GrpcService-CSharp/.template.config/template.json +++ b/src/ProjectTemplates/Web.ProjectTemplates/content/GrpcService-CSharp/.template.config/template.json @@ -41,11 +41,11 @@ "datatype": "choice", "choices": [ { - "choice": "netcoreapp3.0", - "description": "Target netcoreapp3.0" + "choice": "netcoreapp5.0", + "description": "Target netcoreapp5.0" } ], - "defaultValue": "netcoreapp3.0" + "defaultValue": "netcoreapp5.0" }, "ExcludeLaunchSettings": { "type": "parameter", 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 7ce49de8a3..d99bc528b9 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 @@ -4,8 +4,7 @@ "classifications": [ "Web", "Razor", - "Library", - "Razor Class Library" + "Library" ], "name": "Razor Class Library", "generatorVersions": "[1.0.0.0-*)", @@ -48,11 +47,11 @@ "datatype": "choice", "choices": [ { - "choice": "netcoreapp3.0", - "description": "Target netcoreapp3.0" + "choice": "netcoreapp5.0", + "description": "Target netcoreapp5.0" } ], - "defaultValue": "netcoreapp3.0" + "defaultValue": "netcoreapp5.0" }, "HostIdentifier": { "type": "bind", diff --git a/src/ProjectTemplates/Web.ProjectTemplates/content/RazorPagesWeb-CSharp/.template.config/template.json b/src/ProjectTemplates/Web.ProjectTemplates/content/RazorPagesWeb-CSharp/.template.config/template.json index b4a55fb3a6..82977b366b 100644 --- a/src/ProjectTemplates/Web.ProjectTemplates/content/RazorPagesWeb-CSharp/.template.config/template.json +++ b/src/ProjectTemplates/Web.ProjectTemplates/content/RazorPagesWeb-CSharp/.template.config/template.json @@ -310,12 +310,12 @@ "datatype": "choice", "choices": [ { - "choice": "netcoreapp3.0", - "description": "Target netcoreapp3.0" + "choice": "netcoreapp5.0", + "description": "Target netcoreapp5.0" } ], - "replaces": "netcoreapp3.0", - "defaultValue": "netcoreapp3.0" + "replaces": "netcoreapp5.0", + "defaultValue": "netcoreapp5.0" }, "copyrightYear": { "type": "generated", diff --git a/src/ProjectTemplates/Web.ProjectTemplates/content/RazorPagesWeb-CSharp/wwwroot/js/site.js b/src/ProjectTemplates/Web.ProjectTemplates/content/RazorPagesWeb-CSharp/wwwroot/js/site.js index 3c76e6dc45..ac49c18641 100644 --- a/src/ProjectTemplates/Web.ProjectTemplates/content/RazorPagesWeb-CSharp/wwwroot/js/site.js +++ b/src/ProjectTemplates/Web.ProjectTemplates/content/RazorPagesWeb-CSharp/wwwroot/js/site.js @@ -1,4 +1,4 @@ // Please see documentation at https://docs.microsoft.com/aspnet/core/client-side/bundling-and-minification // for details on configuring this project to bundle and minify static web assets. -// Write your Javascript code. +// Write your JavaScript code. diff --git a/src/ProjectTemplates/Web.ProjectTemplates/content/StarterWeb-CSharp/.template.config/template.json b/src/ProjectTemplates/Web.ProjectTemplates/content/StarterWeb-CSharp/.template.config/template.json index a4547cfc23..06954164c1 100644 --- a/src/ProjectTemplates/Web.ProjectTemplates/content/StarterWeb-CSharp/.template.config/template.json +++ b/src/ProjectTemplates/Web.ProjectTemplates/content/StarterWeb-CSharp/.template.config/template.json @@ -300,12 +300,12 @@ "datatype": "choice", "choices": [ { - "choice": "netcoreapp3.0", - "description": "Target netcoreapp3.0" + "choice": "netcoreapp5.0", + "description": "Target netcoreapp5.0" } ], - "replaces": "netcoreapp3.0", - "defaultValue": "netcoreapp3.0" + "replaces": "netcoreapp5.0", + "defaultValue": "netcoreapp5.0" }, "copyrightYear": { "type": "generated", diff --git a/src/ProjectTemplates/Web.ProjectTemplates/content/StarterWeb-FSharp/.template.config/template.json b/src/ProjectTemplates/Web.ProjectTemplates/content/StarterWeb-FSharp/.template.config/template.json index 041e0a3f84..d72e90aaff 100644 --- a/src/ProjectTemplates/Web.ProjectTemplates/content/StarterWeb-FSharp/.template.config/template.json +++ b/src/ProjectTemplates/Web.ProjectTemplates/content/StarterWeb-FSharp/.template.config/template.json @@ -87,12 +87,12 @@ "datatype": "choice", "choices": [ { - "choice": "netcoreapp3.0", - "description": "Target netcoreapp3.0" + "choice": "netcoreapp5.0", + "description": "Target netcoreapp5.0" } ], - "replaces": "netcoreapp3.0", - "defaultValue": "netcoreapp3.0" + "replaces": "netcoreapp5.0", + "defaultValue": "netcoreapp5.0" }, "copyrightYear": { "type": "generated", diff --git a/src/ProjectTemplates/Web.ProjectTemplates/content/StarterWeb-FSharp/wwwroot/js/site.js b/src/ProjectTemplates/Web.ProjectTemplates/content/StarterWeb-FSharp/wwwroot/js/site.js index 3c76e6dc45..ac49c18641 100644 --- a/src/ProjectTemplates/Web.ProjectTemplates/content/StarterWeb-FSharp/wwwroot/js/site.js +++ b/src/ProjectTemplates/Web.ProjectTemplates/content/StarterWeb-FSharp/wwwroot/js/site.js @@ -1,4 +1,4 @@ // Please see documentation at https://docs.microsoft.com/aspnet/core/client-side/bundling-and-minification // for details on configuring this project to bundle and minify static web assets. -// Write your Javascript code. +// Write your JavaScript code. diff --git a/src/ProjectTemplates/Web.ProjectTemplates/content/WebApi-CSharp/.template.config/template.json b/src/ProjectTemplates/Web.ProjectTemplates/content/WebApi-CSharp/.template.config/template.json index f28b7ec67a..a6e465575e 100644 --- a/src/ProjectTemplates/Web.ProjectTemplates/content/WebApi-CSharp/.template.config/template.json +++ b/src/ProjectTemplates/Web.ProjectTemplates/content/WebApi-CSharp/.template.config/template.json @@ -209,12 +209,12 @@ "datatype": "choice", "choices": [ { - "choice": "netcoreapp3.0", - "description": "Target netcoreapp3.0" + "choice": "netcoreapp5.0", + "description": "Target netcoreapp5.0" } ], - "replaces": "netcoreapp3.0", - "defaultValue": "netcoreapp3.0" + "replaces": "netcoreapp5.0", + "defaultValue": "netcoreapp5.0" }, "copyrightYear": { "type": "generated", diff --git a/src/ProjectTemplates/Web.ProjectTemplates/content/WebApi-FSharp/.template.config/template.json b/src/ProjectTemplates/Web.ProjectTemplates/content/WebApi-FSharp/.template.config/template.json index d97f14303d..20f31e8bcd 100644 --- a/src/ProjectTemplates/Web.ProjectTemplates/content/WebApi-FSharp/.template.config/template.json +++ b/src/ProjectTemplates/Web.ProjectTemplates/content/WebApi-FSharp/.template.config/template.json @@ -82,12 +82,12 @@ "datatype": "choice", "choices": [ { - "choice": "netcoreapp3.0", - "description": "Target netcoreapp3.0" + "choice": "netcoreapp5.0", + "description": "Target netcoreapp5.0" } ], - "replaces": "netcoreapp3.0", - "defaultValue": "netcoreapp3.0" + "replaces": "netcoreapp5.0", + "defaultValue": "netcoreapp5.0" }, "copyrightYear": { "type": "generated", diff --git a/src/ProjectTemplates/Web.ProjectTemplates/content/Worker-CSharp/.template.config/template.json b/src/ProjectTemplates/Web.ProjectTemplates/content/Worker-CSharp/.template.config/template.json index ad1aa67138..f0428fa74f 100644 --- a/src/ProjectTemplates/Web.ProjectTemplates/content/Worker-CSharp/.template.config/template.json +++ b/src/ProjectTemplates/Web.ProjectTemplates/content/Worker-CSharp/.template.config/template.json @@ -47,12 +47,12 @@ "datatype": "choice", "choices": [ { - "choice": "netcoreapp3.0", - "description": "Target netcoreapp3.0" + "choice": "netcoreapp5.0", + "description": "Target netcoreapp5.0" } ], - "replaces": "netcoreapp3.0", - "defaultValue": "netcoreapp3.0" + "replaces": "netcoreapp5.0", + "defaultValue": "netcoreapp5.0" }, "copyrightYear": { "type": "generated", diff --git a/src/ProjectTemplates/Web.Spa.ProjectTemplates/Angular-CSharp.csproj.in b/src/ProjectTemplates/Web.Spa.ProjectTemplates/Angular-CSharp.csproj.in index 09d68a25ee..ab27fa4dbb 100644 --- a/src/ProjectTemplates/Web.Spa.ProjectTemplates/Angular-CSharp.csproj.in +++ b/src/ProjectTemplates/Web.Spa.ProjectTemplates/Angular-CSharp.csproj.in @@ -1,7 +1,7 @@ - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) true Latest false diff --git a/src/ProjectTemplates/Web.Spa.ProjectTemplates/Microsoft.DotNet.Web.Spa.ProjectTemplates.csproj b/src/ProjectTemplates/Web.Spa.ProjectTemplates/Microsoft.DotNet.Web.Spa.ProjectTemplates.csproj index 28df34bc4f..f49aad670b 100644 --- a/src/ProjectTemplates/Web.Spa.ProjectTemplates/Microsoft.DotNet.Web.Spa.ProjectTemplates.csproj +++ b/src/ProjectTemplates/Web.Spa.ProjectTemplates/Microsoft.DotNet.Web.Spa.ProjectTemplates.csproj @@ -1,7 +1,7 @@ - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) Microsoft.DotNet.Web.Spa.ProjectTemplates.$(AspNetCoreMajorVersion).$(AspNetCoreMinorVersion) Single Page Application templates for ASP.NET Core $(PackageTags);spa diff --git a/src/ProjectTemplates/Web.Spa.ProjectTemplates/React-CSharp.csproj.in b/src/ProjectTemplates/Web.Spa.ProjectTemplates/React-CSharp.csproj.in index 8e4a8b80e4..c8d87d8b09 100644 --- a/src/ProjectTemplates/Web.Spa.ProjectTemplates/React-CSharp.csproj.in +++ b/src/ProjectTemplates/Web.Spa.ProjectTemplates/React-CSharp.csproj.in @@ -1,7 +1,7 @@ - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) true Latest false diff --git a/src/ProjectTemplates/Web.Spa.ProjectTemplates/ReactRedux-CSharp.csproj.in b/src/ProjectTemplates/Web.Spa.ProjectTemplates/ReactRedux-CSharp.csproj.in index 71a0a80686..a71779d5bd 100644 --- a/src/ProjectTemplates/Web.Spa.ProjectTemplates/ReactRedux-CSharp.csproj.in +++ b/src/ProjectTemplates/Web.Spa.ProjectTemplates/ReactRedux-CSharp.csproj.in @@ -1,7 +1,7 @@ - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) true Latest false diff --git a/src/ProjectTemplates/Web.Spa.ProjectTemplates/content/Angular-CSharp/.template.config/template.json b/src/ProjectTemplates/Web.Spa.ProjectTemplates/content/Angular-CSharp/.template.config/template.json index f919655bd8..6bf8ed94b4 100644 --- a/src/ProjectTemplates/Web.Spa.ProjectTemplates/content/Angular-CSharp/.template.config/template.json +++ b/src/ProjectTemplates/Web.Spa.ProjectTemplates/content/Angular-CSharp/.template.config/template.json @@ -177,12 +177,12 @@ "datatype": "choice", "choices": [ { - "choice": "netcoreapp3.0", - "description": "Target netcoreapp3.0" + "choice": "netcoreapp5.0", + "description": "Target netcoreapp5.0" } ], - "replaces": "netcoreapp3.0", - "defaultValue": "netcoreapp3.0" + "replaces": "netcoreapp5.0", + "defaultValue": "netcoreapp5.0" }, "HostIdentifier": { "type": "bind", diff --git a/src/ProjectTemplates/Web.Spa.ProjectTemplates/content/Angular-CSharp/ClientApp/angular.json b/src/ProjectTemplates/Web.Spa.ProjectTemplates/content/Angular-CSharp/ClientApp/angular.json index 56f93675c6..ce5929d3f1 100644 --- a/src/ProjectTemplates/Web.Spa.ProjectTemplates/content/Angular-CSharp/ClientApp/angular.json +++ b/src/ProjectTemplates/Web.Spa.ProjectTemplates/content/Angular-CSharp/ClientApp/angular.json @@ -71,7 +71,7 @@ "polyfills": "src/polyfills.ts", "tsConfig": "src/tsconfig.spec.json", "karmaConfig": "src/karma.conf.js", - "styles": ["styles.css"], + "styles": ["src/styles.css"], "scripts": [], "assets": ["src/assets"] } diff --git a/src/ProjectTemplates/Web.Spa.ProjectTemplates/content/Angular-CSharp/Controllers/OidcConfigurationController.cs b/src/ProjectTemplates/Web.Spa.ProjectTemplates/content/Angular-CSharp/Controllers/OidcConfigurationController.cs index 75e26da4e9..cdcc89182a 100644 --- a/src/ProjectTemplates/Web.Spa.ProjectTemplates/content/Angular-CSharp/Controllers/OidcConfigurationController.cs +++ b/src/ProjectTemplates/Web.Spa.ProjectTemplates/content/Angular-CSharp/Controllers/OidcConfigurationController.cs @@ -6,12 +6,12 @@ namespace Company.WebApplication1.Controllers { public class OidcConfigurationController : Controller { - private readonly ILogger logger; + private readonly ILogger _logger; - public OidcConfigurationController(IClientRequestParametersProvider clientRequestParametersProvider, ILogger _logger) + public OidcConfigurationController(IClientRequestParametersProvider clientRequestParametersProvider, ILogger logger) { ClientRequestParametersProvider = clientRequestParametersProvider; - logger = _logger; + _logger = logger; } public IClientRequestParametersProvider ClientRequestParametersProvider { get; } diff --git a/src/ProjectTemplates/Web.Spa.ProjectTemplates/content/React-CSharp/.template.config/template.json b/src/ProjectTemplates/Web.Spa.ProjectTemplates/content/React-CSharp/.template.config/template.json index 3c4b69d0b9..d1add605c5 100644 --- a/src/ProjectTemplates/Web.Spa.ProjectTemplates/content/React-CSharp/.template.config/template.json +++ b/src/ProjectTemplates/Web.Spa.ProjectTemplates/content/React-CSharp/.template.config/template.json @@ -178,12 +178,12 @@ "datatype": "choice", "choices": [ { - "choice": "netcoreapp3.0", - "description": "Target netcoreapp3.0" + "choice": "netcoreapp5.0", + "description": "Target netcoreapp5.0" } ], - "replaces": "netcoreapp3.0", - "defaultValue": "netcoreapp3.0" + "replaces": "netcoreapp5.0", + "defaultValue": "netcoreapp5.0" }, "HostIdentifier": { "type": "bind", diff --git a/src/ProjectTemplates/Web.Spa.ProjectTemplates/content/ReactRedux-CSharp/.template.config/template.json b/src/ProjectTemplates/Web.Spa.ProjectTemplates/content/ReactRedux-CSharp/.template.config/template.json index 264061a004..0f85d08a4d 100644 --- a/src/ProjectTemplates/Web.Spa.ProjectTemplates/content/ReactRedux-CSharp/.template.config/template.json +++ b/src/ProjectTemplates/Web.Spa.ProjectTemplates/content/ReactRedux-CSharp/.template.config/template.json @@ -87,12 +87,12 @@ "datatype": "choice", "choices": [ { - "choice": "netcoreapp3.0", - "description": "Target netcoreapp3.0" + "choice": "netcoreapp5.0", + "description": "Target netcoreapp5.0" } ], - "replaces": "netcoreapp3.0", - "defaultValue": "netcoreapp3.0" + "replaces": "netcoreapp5.0", + "defaultValue": "netcoreapp5.0" }, "HostIdentifier": { "type": "bind", diff --git a/src/ProjectTemplates/scripts/Run-Angular-Locally.ps1 b/src/ProjectTemplates/scripts/Run-Angular-Locally.ps1 index a807e5260c..ec8993da7e 100644 --- a/src/ProjectTemplates/scripts/Run-Angular-Locally.ps1 +++ b/src/ProjectTemplates/scripts/Run-Angular-Locally.ps1 @@ -9,4 +9,4 @@ $ErrorActionPreference = 'Stop' . $PSScriptRoot\Test-Template.ps1 -Test-Template "angular" "angular" "Microsoft.DotNet.Web.Spa.ProjectTemplates.3.0.3.0.0-dev.nupkg" $true +Test-Template "angular" "angular" "Microsoft.DotNet.Web.Spa.ProjectTemplates.5.0.5.0.0-dev.nupkg" $true diff --git a/src/ProjectTemplates/scripts/Run-Blazor-Locally.ps1 b/src/ProjectTemplates/scripts/Run-Blazor-Locally.ps1 index a7062f82a5..575036e9c7 100644 --- a/src/ProjectTemplates/scripts/Run-Blazor-Locally.ps1 +++ b/src/ProjectTemplates/scripts/Run-Blazor-Locally.ps1 @@ -10,4 +10,4 @@ $ErrorActionPreference = 'Stop' . $PSScriptRoot\Test-Template.ps1 -Test-Template "blazorserver" "blazorserver" "Microsoft.DotNet.Web.ProjectTemplates.3.0.3.0.0-dev.nupkg" $false +Test-Template "blazorserver" "blazorserver" "Microsoft.DotNet.Web.ProjectTemplates.5.0.5.0.0-dev.nupkg" $false diff --git a/src/ProjectTemplates/scripts/Run-EmptyWeb-Locally.ps1 b/src/ProjectTemplates/scripts/Run-EmptyWeb-Locally.ps1 index b5684535cc..d6859c6f72 100644 --- a/src/ProjectTemplates/scripts/Run-EmptyWeb-Locally.ps1 +++ b/src/ProjectTemplates/scripts/Run-EmptyWeb-Locally.ps1 @@ -9,4 +9,4 @@ $ErrorActionPreference = 'Stop' . $PSScriptRoot\Test-Template.ps1 -Test-Template "web" "web" "Microsoft.DotNet.Web.ProjectTemplates.3.0.3.0.0-dev.nupkg" $false +Test-Template "web" "web" "Microsoft.DotNet.Web.ProjectTemplates.5.0.5.0.0-dev.nupkg" $false diff --git a/src/ProjectTemplates/scripts/Run-Razor-Locally.ps1 b/src/ProjectTemplates/scripts/Run-Razor-Locally.ps1 index 72f84ad9cc..ecba4fbd8f 100644 --- a/src/ProjectTemplates/scripts/Run-Razor-Locally.ps1 +++ b/src/ProjectTemplates/scripts/Run-Razor-Locally.ps1 @@ -6,4 +6,4 @@ param() . $PSScriptRoot\Test-Template.ps1 -Test-Template "webapp" "webapp -au Individual" "Microsoft.DotNet.Web.ProjectTemplates.3.0.3.0.0-dev.nupkg" $false +Test-Template "webapp" "webapp -au Individual" "Microsoft.DotNet.Web.ProjectTemplates.5.0.5.0.0-dev.nupkg" $false diff --git a/src/ProjectTemplates/scripts/Run-React-Locally.ps1 b/src/ProjectTemplates/scripts/Run-React-Locally.ps1 index 28bca93b11..8308860edc 100644 --- a/src/ProjectTemplates/scripts/Run-React-Locally.ps1 +++ b/src/ProjectTemplates/scripts/Run-React-Locally.ps1 @@ -9,4 +9,4 @@ $ErrorActionPreference = 'Stop' . $PSScriptRoot\Test-Template.ps1 -Test-Template "react" "react" "Microsoft.DotNet.Web.Spa.ProjectTemplates.3.0.3.0.0-dev.nupkg" $true +Test-Template "react" "react" "Microsoft.DotNet.Web.Spa.ProjectTemplates.5.0.5.0.0-dev.nupkg" $true diff --git a/src/ProjectTemplates/scripts/Run-ReactRedux-Locally.ps1 b/src/ProjectTemplates/scripts/Run-ReactRedux-Locally.ps1 index 19c1621dde..6100d7cacd 100644 --- a/src/ProjectTemplates/scripts/Run-ReactRedux-Locally.ps1 +++ b/src/ProjectTemplates/scripts/Run-ReactRedux-Locally.ps1 @@ -9,4 +9,4 @@ $ErrorActionPreference = 'Stop' . $PSScriptRoot\Test-Template.ps1 -Test-Template "reactredux" "reactredux" "Microsoft.DotNet.Web.Spa.ProjectTemplates.3.0.3.0.0-dev.nupkg" $true +Test-Template "reactredux" "reactredux" "Microsoft.DotNet.Web.Spa.ProjectTemplates.5.0.5.0.0-dev.nupkg" $true diff --git a/src/ProjectTemplates/scripts/Run-Starterweb-Locally.ps1 b/src/ProjectTemplates/scripts/Run-Starterweb-Locally.ps1 index c7adbbbf24..61ad47fbdc 100644 --- a/src/ProjectTemplates/scripts/Run-Starterweb-Locally.ps1 +++ b/src/ProjectTemplates/scripts/Run-Starterweb-Locally.ps1 @@ -9,4 +9,4 @@ $ErrorActionPreference = 'Stop' . $PSScriptRoot\Test-Template.ps1 -Test-Template "mvc" "mvc -au Individual" "Microsoft.DotNet.Web.ProjectTemplates.3.0.3.0.0-dev.nupkg" $false +Test-Template "mvc" "mvc -au Individual" "Microsoft.DotNet.Web.ProjectTemplates.5.0.5.0.0-dev.nupkg" $false diff --git a/src/ProjectTemplates/scripts/Run-Worker-Locally.ps1 b/src/ProjectTemplates/scripts/Run-Worker-Locally.ps1 index 867750b6e9..e6ff856e7e 100644 --- a/src/ProjectTemplates/scripts/Run-Worker-Locally.ps1 +++ b/src/ProjectTemplates/scripts/Run-Worker-Locally.ps1 @@ -9,4 +9,4 @@ $ErrorActionPreference = 'Stop' . $PSScriptRoot\Test-Template.ps1 -Test-Template "worker" "worker" "Microsoft.DotNet.Web.ProjectTemplates.3.0.3.0.0-dev.nupkg" $false +Test-Template "worker" "worker" "Microsoft.DotNet.Web.ProjectTemplates.5.0.5.0.0-dev.nupkg" $false diff --git a/src/ProjectTemplates/scripts/Test-Template.ps1 b/src/ProjectTemplates/scripts/Test-Template.ps1 index af199993f8..5ad25a16d6 100644 --- a/src/ProjectTemplates/scripts/Test-Template.ps1 +++ b/src/ProjectTemplates/scripts/Test-Template.ps1 @@ -32,7 +32,7 @@ function Test-Template($templateName, $templateArgs, $templateNupkg, $isSPA) { $proj = "$tmpDir/$templateName.$extension" $projContent = Get-Content -Path $proj -Raw $projContent = $projContent -replace ('', " - + @@ -42,7 +42,7 @@ function Test-Template($templateName, $templateArgs, $templateNupkg, $isSPA) { $projContent | Set-Content $proj dotnet.exe ef migrations add mvc dotnet.exe publish --configuration Release - dotnet.exe bin\Release\netcoreapp3.0\publish\$templateName.dll + dotnet.exe bin\Release\netcoreapp5.0\publish\$templateName.dll } finally { Pop-Location diff --git a/src/ProjectTemplates/test/BlazorServerTemplateTest.cs b/src/ProjectTemplates/test/BlazorServerTemplateTest.cs index 61c3eb20b8..a0b8f6cc60 100644 --- a/src/ProjectTemplates/test/BlazorServerTemplateTest.cs +++ b/src/ProjectTemplates/test/BlazorServerTemplateTest.cs @@ -36,7 +36,7 @@ namespace Templates.Test Assert.True(0 == publishResult.ExitCode, ErrorMessages.GetFailedProcessMessage("publish", Project, publishResult)); // Run dotnet build after publish. The reason is that one uses Config = Debug and the other uses Config = Release - // The output from publish will go into bin/Release/netcoreapp3.0/publish and won't be affected by calling build + // The output from publish will go into bin/Release/netcoreapp5.0/publish and won't be affected by calling build // later, while the opposite is not true. var buildResult = await Project.RunDotNetBuildAsync(); @@ -93,7 +93,7 @@ namespace Templates.Test Assert.True(0 == publishResult.ExitCode, ErrorMessages.GetFailedProcessMessage("publish", Project, publishResult)); // Run dotnet build after publish. The reason is that one uses Config = Debug and the other uses Config = Release - // The output from publish will go into bin/Release/netcoreapp3.0/publish and won't be affected by calling build + // The output from publish will go into bin/Release/netcoreapp5.0/publish and won't be affected by calling build // later, while the opposite is not true. var buildResult = await Project.RunDotNetBuildAsync(); diff --git a/src/ProjectTemplates/test/EmptyWebTemplateTest.cs b/src/ProjectTemplates/test/EmptyWebTemplateTest.cs index 3f71d38b65..a290d8e34d 100644 --- a/src/ProjectTemplates/test/EmptyWebTemplateTest.cs +++ b/src/ProjectTemplates/test/EmptyWebTemplateTest.cs @@ -36,7 +36,7 @@ namespace Templates.Test Assert.True(0 == publishResult.ExitCode, ErrorMessages.GetFailedProcessMessage("publish", Project, publishResult)); // Run dotnet build after publish. The reason is that one uses Config = Debug and the other uses Config = Release - // The output from publish will go into bin/Release/netcoreapp3.0/publish and won't be affected by calling build + // The output from publish will go into bin/Release/netcoreapp5.0/publish and won't be affected by calling build // later, while the opposite is not true. var buildResult = await Project.RunDotNetBuildAsync(); diff --git a/src/ProjectTemplates/test/Helpers/Project.cs b/src/ProjectTemplates/test/Helpers/Project.cs index 8331772bf3..d82e9cc2b2 100644 --- a/src/ProjectTemplates/test/Helpers/Project.cs +++ b/src/ProjectTemplates/test/Helpers/Project.cs @@ -22,7 +22,7 @@ namespace Templates.Test.Helpers { private const string _urls = "http://127.0.0.1:0;https://127.0.0.1:0"; - public const string DefaultFramework = "netcoreapp3.0"; + public const string DefaultFramework = "netcoreapp5.0"; public static bool IsCIEnvironment => typeof(Project).Assembly.GetCustomAttributes() .Any(a => a.Key == "ContinuousIntegrationBuild"); diff --git a/src/ProjectTemplates/test/Helpers/TemplatePackageInstaller.cs b/src/ProjectTemplates/test/Helpers/TemplatePackageInstaller.cs index c36a9d5dda..b87cdf0897 100644 --- a/src/ProjectTemplates/test/Helpers/TemplatePackageInstaller.cs +++ b/src/ProjectTemplates/test/Helpers/TemplatePackageInstaller.cs @@ -31,9 +31,11 @@ namespace Templates.Test.Helpers "Microsoft.DotNet.Web.ProjectTemplates.2.1", "Microsoft.DotNet.Web.ProjectTemplates.2.2", "Microsoft.DotNet.Web.ProjectTemplates.3.0", + "Microsoft.DotNet.Web.ProjectTemplates.5.0", "Microsoft.DotNet.Web.Spa.ProjectTemplates.2.1", "Microsoft.DotNet.Web.Spa.ProjectTemplates.2.2", "Microsoft.DotNet.Web.Spa.ProjectTemplates.3.0", + "Microsoft.DotNet.Web.Spa.ProjectTemplates.5.0", "Microsoft.DotNet.Web.Spa.ProjectTemplates" }; @@ -88,7 +90,7 @@ namespace Templates.Test.Helpers /* * The templates are indexed by path, for example: - &USERPROFILE%\.templateengine\dotnetcli\v3.0.100-preview7-012821\packages\nunit3.dotnetnew.template.1.6.1.nupkg + &USERPROFILE%\.templateengine\dotnetcli\v5.0.100-alpha1-013788\packages\nunit3.dotnetnew.template.1.6.1.nupkg Templates: NUnit 3 Test Project (nunit) C# NUnit 3 Test Item (nunit-test) C# @@ -97,7 +99,7 @@ namespace Templates.Test.Helpers NUnit 3 Test Project (nunit) VB NUnit 3 Test Item (nunit-test) VB Uninstall Command: - dotnet new -u &USERPROFILE%\.templateengine\dotnetcli\v3.0.100-preview7-012821\packages\nunit3.dotnetnew.template.1.6.1.nupkg + dotnet new -u &USERPROFILE%\.templateengine\dotnetcli\v5.0.100-alpha1-013788\packages\nunit3.dotnetnew.template.1.6.1.nupkg * We don't want to construct this path so we'll rely on dotnet new --uninstall --help to construct the uninstall command. */ diff --git a/src/ProjectTemplates/test/IdentityUIPackageTest.cs b/src/ProjectTemplates/test/IdentityUIPackageTest.cs index 2620a5dc4c..80f5768c79 100644 --- a/src/ProjectTemplates/test/IdentityUIPackageTest.cs +++ b/src/ProjectTemplates/test/IdentityUIPackageTest.cs @@ -134,7 +134,7 @@ namespace Templates.Test Assert.True(0 == publishResult.ExitCode, ErrorMessages.GetFailedProcessMessage("publish", Project, publishResult)); // Run dotnet build after publish. The reason is that one uses Config = Debug and the other uses Config = Release - // The output from publish will go into bin/Release/netcoreapp3.0/publish and won't be affected by calling build + // The output from publish will go into bin/Release/netcoreapp5.0/publish and won't be affected by calling build // later, while the opposite is not true. var buildResult = await Project.RunDotNetBuildAsync(packageOptions: packageOptions); diff --git a/src/ProjectTemplates/test/Infrastructure/Directory.Build.props.in b/src/ProjectTemplates/test/Infrastructure/Directory.Build.props.in index 6186fc2f15..9990532b1d 100644 --- a/src/ProjectTemplates/test/Infrastructure/Directory.Build.props.in +++ b/src/ProjectTemplates/test/Infrastructure/Directory.Build.props.in @@ -1,3 +1,6 @@ + + netcoreapp5.0 + diff --git a/src/ProjectTemplates/test/Infrastructure/TemplateTests.props.in b/src/ProjectTemplates/test/Infrastructure/TemplateTests.props.in index b10d74b52b..b89536fd4f 100644 --- a/src/ProjectTemplates/test/Infrastructure/TemplateTests.props.in +++ b/src/ProjectTemplates/test/Infrastructure/TemplateTests.props.in @@ -5,8 +5,6 @@ $(MSBuildThisFileDirectory)runtimeconfig.norollforward.json - - ${MicrosoftNETCorePlatformsPackageVersion} diff --git a/src/ProjectTemplates/test/MvcTemplateTest.cs b/src/ProjectTemplates/test/MvcTemplateTest.cs index 3acd6e804c..3384fc65e0 100644 --- a/src/ProjectTemplates/test/MvcTemplateTest.cs +++ b/src/ProjectTemplates/test/MvcTemplateTest.cs @@ -48,7 +48,7 @@ namespace Templates.Test Assert.True(0 == publishResult.ExitCode, ErrorMessages.GetFailedProcessMessage("publish", Project, publishResult)); // Run dotnet build after publish. The reason is that one uses Config = Debug and the other uses Config = Release - // The output from publish will go into bin/Release/netcoreapp3.0/publish and won't be affected by calling build + // The output from publish will go into bin/Release/netcoreapp5.0/publish and won't be affected by calling build // later, while the opposite is not true. var buildResult = await Project.RunDotNetBuildAsync(); @@ -116,7 +116,7 @@ namespace Templates.Test Assert.True(0 == publishResult.ExitCode, ErrorMessages.GetFailedProcessMessage("publish", Project, publishResult)); // Run dotnet build after publish. The reason is that one uses Config = Debug and the other uses Config = Release - // The output from publish will go into bin/Release/netcoreapp3.0/publish and won't be affected by calling build + // The output from publish will go into bin/Release/netcoreapp5.0/publish and won't be affected by calling build // later, while the opposite is not true. var buildResult = await Project.RunDotNetBuildAsync(); diff --git a/src/ProjectTemplates/test/ProjectTemplates.Tests.csproj b/src/ProjectTemplates/test/ProjectTemplates.Tests.csproj index 7b26d044d2..4fe834129a 100644 --- a/src/ProjectTemplates/test/ProjectTemplates.Tests.csproj +++ b/src/ProjectTemplates/test/ProjectTemplates.Tests.csproj @@ -4,12 +4,14 @@ - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) ProjectTemplates.E2ETests $(DefineConstants);XPLAT true - true + + true + @@ -51,7 +53,7 @@ <_Parameter1>DotNetEfFullPath - <_Parameter2>$([MSBuild]::EnsureTrailingSlash('$(NuGetPackageRoot)'))dotnet-ef/$(DotnetEfPackageVersion)/tools/netcoreapp3.0/any/dotnet-ef.dll + <_Parameter2>$([MSBuild]::EnsureTrailingSlash('$(NuGetPackageRoot)'))dotnet-ef/$(DotnetEfPackageVersion)/tools/netcoreapp5.0/any/dotnet-ef.dll <_Parameter1>TestPackageRestorePath @@ -62,7 +64,7 @@ <_Parameter2>true - + $([MSBuild]::NormalizePath('$(OutputPath)$(TestTemplateCreationFolder)')) diff --git a/src/ProjectTemplates/test/RazorClassLibraryTemplateTest.cs b/src/ProjectTemplates/test/RazorClassLibraryTemplateTest.cs index 69fe97ef60..8a044fed5d 100644 --- a/src/ProjectTemplates/test/RazorClassLibraryTemplateTest.cs +++ b/src/ProjectTemplates/test/RazorClassLibraryTemplateTest.cs @@ -33,7 +33,7 @@ namespace Templates.Test Assert.True(0 == publishResult.ExitCode, ErrorMessages.GetFailedProcessMessage("publish", Project, publishResult)); // Run dotnet build after publish. The reason is that one uses Config = Debug and the other uses Config = Release - // The output from publish will go into bin/Release/netcoreapp3.0/publish and won't be affected by calling build + // The output from publish will go into bin/Release/netcoreapp5.0/publish and won't be affected by calling build // later, while the opposite is not true. var buildResult = await Project.RunDotNetBuildAsync(); @@ -52,7 +52,7 @@ namespace Templates.Test Assert.True(0 == publishResult.ExitCode, ErrorMessages.GetFailedProcessMessage("publish", Project, publishResult)); // Run dotnet build after publish. The reason is that one uses Config = Debug and the other uses Config = Release - // The output from publish will go into bin/Release/netcoreapp3.0/publish and won't be affected by calling build + // The output from publish will go into bin/Release/netcoreapp5.0/publish and won't be affected by calling build // later, while the opposite is not true. var buildResult = await Project.RunDotNetBuildAsync(); diff --git a/src/ProjectTemplates/test/RazorPagesTemplateTest.cs b/src/ProjectTemplates/test/RazorPagesTemplateTest.cs index 69076fc55b..d2e36aa31a 100644 --- a/src/ProjectTemplates/test/RazorPagesTemplateTest.cs +++ b/src/ProjectTemplates/test/RazorPagesTemplateTest.cs @@ -45,7 +45,7 @@ namespace Templates.Test Assert.True(0 == publishResult.ExitCode, ErrorMessages.GetFailedProcessMessage("publish", Project, createResult)); // Run dotnet build after publish. The reason is that one uses Config = Debug and the other uses Config = Release - // The output from publish will go into bin/Release/netcoreapp3.0/publish and won't be affected by calling build + // The output from publish will go into bin/Release/netcoreapp5.0/publish and won't be affected by calling build // later, while the opposite is not true. var buildResult = await Project.RunDotNetBuildAsync(); @@ -115,7 +115,7 @@ namespace Templates.Test Assert.True(0 == publishResult.ExitCode, ErrorMessages.GetFailedProcessMessage("publish", Project, publishResult)); // Run dotnet build after publish. The reason is that one uses Config = Debug and the other uses Config = Release - // The output from publish will go into bin/Release/netcoreapp3.0/publish and won't be affected by calling build + // The output from publish will go into bin/Release/netcoreapp5.0/publish and won't be affected by calling build // later, while the opposite is not true. var buildResult = await Project.RunDotNetBuildAsync(); diff --git a/src/ProjectTemplates/test/SpaTemplateTest/SpaTemplateTestBase.cs b/src/ProjectTemplates/test/SpaTemplateTest/SpaTemplateTestBase.cs index 0c0b37a4b8..74a67f1d2c 100644 --- a/src/ProjectTemplates/test/SpaTemplateTest/SpaTemplateTestBase.cs +++ b/src/ProjectTemplates/test/SpaTemplateTest/SpaTemplateTestBase.cs @@ -67,17 +67,14 @@ namespace Templates.Test.SpaTemplateTest using var lintResult = await ProcessEx.RunViaShellAsync(Output, clientAppSubdirPath, "npm run lint"); Assert.True(0 == lintResult.ExitCode, ErrorMessages.GetFailedProcessMessage("npm run lint", Project, lintResult)); - if (template == "react" || template == "reactredux") - { - using var testResult = await ProcessEx.RunViaShellAsync(Output, clientAppSubdirPath, "npm run test"); - Assert.True(0 == testResult.ExitCode, ErrorMessages.GetFailedProcessMessage("npm run test", Project, testResult)); - } + var testResult = await ProcessEx.RunViaShellAsync(Output, clientAppSubdirPath, "npm run test"); + Assert.True(0 == testResult.ExitCode, ErrorMessages.GetFailedProcessMessage("npm run test", Project, testResult)); using var publishResult = await Project.RunDotNetPublishAsync(); Assert.True(0 == publishResult.ExitCode, ErrorMessages.GetFailedProcessMessage("publish", Project, publishResult)); // Run dotnet build after publish. The reason is that one uses Config = Debug and the other uses Config = Release - // The output from publish will go into bin/Release/netcoreapp3.0/publish and won't be affected by calling build + // The output from publish will go into bin/Release/netcoreapp5.0/publish and won't be affected by calling build // later, while the opposite is not true. using var buildResult = await Project.RunDotNetBuildAsync(); diff --git a/src/ProjectTemplates/test/WebApiTemplateTest.cs b/src/ProjectTemplates/test/WebApiTemplateTest.cs index 4a761a4214..c41aeec946 100644 --- a/src/ProjectTemplates/test/WebApiTemplateTest.cs +++ b/src/ProjectTemplates/test/WebApiTemplateTest.cs @@ -36,7 +36,7 @@ namespace Templates.Test Assert.True(0 == publishResult.ExitCode, ErrorMessages.GetFailedProcessMessage("publish", Project, publishResult)); // Run dotnet build after publish. The reason is that one uses Config = Debug and the other uses Config = Release - // The output from publish will go into bin/Release/netcoreapp3.0/publish and won't be affected by calling build + // The output from publish will go into bin/Release/netcoreapp5.0/publish and won't be affected by calling build // later, while the opposite is not true. var buildResult = await Project.RunDotNetBuildAsync(); diff --git a/src/ProjectTemplates/test/WorkerTemplateTest.cs b/src/ProjectTemplates/test/WorkerTemplateTest.cs index 57473127ba..f4016a76af 100644 --- a/src/ProjectTemplates/test/WorkerTemplateTest.cs +++ b/src/ProjectTemplates/test/WorkerTemplateTest.cs @@ -32,7 +32,7 @@ namespace Templates.Test Assert.True(0 == publishResult.ExitCode, ErrorMessages.GetFailedProcessMessage("publish", Project, publishResult)); // Run dotnet build after publish. The reason is that one uses Config = Debug and the other uses Config = Release - // The output from publish will go into bin/Release/netcoreapp3.0/publish and won't be affected by calling build + // The output from publish will go into bin/Release/netcoreapp5.0/publish and won't be affected by calling build // later, while the opposite is not true. var buildResult = await Project.RunDotNetBuildAsync(); diff --git a/src/ProjectTemplates/testassets/DotNetToolsInstaller/DotNetToolsInstaller.csproj b/src/ProjectTemplates/testassets/DotNetToolsInstaller/DotNetToolsInstaller.csproj index def9d56018..b8a12824f4 100644 --- a/src/ProjectTemplates/testassets/DotNetToolsInstaller/DotNetToolsInstaller.csproj +++ b/src/ProjectTemplates/testassets/DotNetToolsInstaller/DotNetToolsInstaller.csproj @@ -4,7 +4,7 @@ - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) DotnetToolReference diff --git a/src/Razor/Razor.Runtime/ref/Microsoft.AspNetCore.Razor.Runtime.csproj b/src/Razor/Razor.Runtime/ref/Microsoft.AspNetCore.Razor.Runtime.csproj index 54f42c224a..34574e5248 100644 --- a/src/Razor/Razor.Runtime/ref/Microsoft.AspNetCore.Razor.Runtime.csproj +++ b/src/Razor/Razor.Runtime/ref/Microsoft.AspNetCore.Razor.Runtime.csproj @@ -1,10 +1,10 @@ - netcoreapp3.0 + netcoreapp5.0 - - + + diff --git a/src/Razor/Razor.Runtime/ref/Microsoft.AspNetCore.Razor.Runtime.netcoreapp3.0.cs b/src/Razor/Razor.Runtime/ref/Microsoft.AspNetCore.Razor.Runtime.netcoreapp.cs similarity index 100% rename from src/Razor/Razor.Runtime/ref/Microsoft.AspNetCore.Razor.Runtime.netcoreapp3.0.cs rename to src/Razor/Razor.Runtime/ref/Microsoft.AspNetCore.Razor.Runtime.netcoreapp.cs diff --git a/src/Razor/Razor.Runtime/src/Microsoft.AspNetCore.Razor.Runtime.csproj b/src/Razor/Razor.Runtime/src/Microsoft.AspNetCore.Razor.Runtime.csproj index 7e0dc09187..aaf94ca265 100644 --- a/src/Razor/Razor.Runtime/src/Microsoft.AspNetCore.Razor.Runtime.csproj +++ b/src/Razor/Razor.Runtime/src/Microsoft.AspNetCore.Razor.Runtime.csproj @@ -2,7 +2,7 @@ Runtime infrastructure for rendering Razor pages and tag helpers. - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) true true $(PackageTags);taghelper;taghelpers diff --git a/src/Razor/Razor.Runtime/test/Microsoft.AspNetCore.Razor.Runtime.Test.csproj b/src/Razor/Razor.Runtime/test/Microsoft.AspNetCore.Razor.Runtime.Test.csproj index dbfd938638..c5785368ee 100644 --- a/src/Razor/Razor.Runtime/test/Microsoft.AspNetCore.Razor.Runtime.Test.csproj +++ b/src/Razor/Razor.Runtime/test/Microsoft.AspNetCore.Razor.Runtime.Test.csproj @@ -1,7 +1,7 @@ - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) $(DefaultItemExcludes);TestFiles\**\* diff --git a/src/Razor/Razor/ref/Microsoft.AspNetCore.Razor.csproj b/src/Razor/Razor/ref/Microsoft.AspNetCore.Razor.csproj index c4c063edb8..fa9b7386f8 100644 --- a/src/Razor/Razor/ref/Microsoft.AspNetCore.Razor.csproj +++ b/src/Razor/Razor/ref/Microsoft.AspNetCore.Razor.csproj @@ -1,10 +1,10 @@ - netcoreapp3.0 + netcoreapp5.0 - - + + diff --git a/src/Razor/Razor/ref/Microsoft.AspNetCore.Razor.netcoreapp3.0.cs b/src/Razor/Razor/ref/Microsoft.AspNetCore.Razor.netcoreapp.cs similarity index 100% rename from src/Razor/Razor/ref/Microsoft.AspNetCore.Razor.netcoreapp3.0.cs rename to src/Razor/Razor/ref/Microsoft.AspNetCore.Razor.netcoreapp.cs diff --git a/src/Razor/Razor/src/Microsoft.AspNetCore.Razor.csproj b/src/Razor/Razor/src/Microsoft.AspNetCore.Razor.csproj index 3a299450b1..8f75abdc0e 100644 --- a/src/Razor/Razor/src/Microsoft.AspNetCore.Razor.csproj +++ b/src/Razor/Razor/src/Microsoft.AspNetCore.Razor.csproj @@ -8,7 +8,7 @@ Commonly used types: Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeNameAttribute Microsoft.AspNetCore.Razor.TagHelpers.HtmlTargetElementAttribute Microsoft.AspNetCore.Razor.TagHelpers.ITagHelper - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) true true $(PackageTags);taghelper;taghelpers diff --git a/src/Razor/Razor/test/Microsoft.AspNetCore.Razor.Test.csproj b/src/Razor/Razor/test/Microsoft.AspNetCore.Razor.Test.csproj index 5415074ada..fa16707e2e 100644 --- a/src/Razor/Razor/test/Microsoft.AspNetCore.Razor.Test.csproj +++ b/src/Razor/Razor/test/Microsoft.AspNetCore.Razor.Test.csproj @@ -1,7 +1,7 @@ - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) $(DefaultItemExcludes);TestFiles\**\* diff --git a/src/Security/Authentication/Certificate/ref/Microsoft.AspNetCore.Authentication.Certificate.csproj b/src/Security/Authentication/Certificate/ref/Microsoft.AspNetCore.Authentication.Certificate.csproj index 3cf6d51079..90cc5219ea 100644 --- a/src/Security/Authentication/Certificate/ref/Microsoft.AspNetCore.Authentication.Certificate.csproj +++ b/src/Security/Authentication/Certificate/ref/Microsoft.AspNetCore.Authentication.Certificate.csproj @@ -1,10 +1,10 @@ - netcoreapp3.0 + netcoreapp5.0 - - + + diff --git a/src/Security/Authentication/Certificate/ref/Microsoft.AspNetCore.Authentication.Certificate.netcoreapp3.0.cs b/src/Security/Authentication/Certificate/ref/Microsoft.AspNetCore.Authentication.Certificate.netcoreapp.cs similarity index 100% rename from src/Security/Authentication/Certificate/ref/Microsoft.AspNetCore.Authentication.Certificate.netcoreapp3.0.cs rename to src/Security/Authentication/Certificate/ref/Microsoft.AspNetCore.Authentication.Certificate.netcoreapp.cs 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 338ec69518..86d4f1fb51 100644 --- a/src/Security/Authentication/Certificate/samples/Certificate.Sample/Certificate.Sample.csproj +++ b/src/Security/Authentication/Certificate/samples/Certificate.Sample/Certificate.Sample.csproj @@ -1,7 +1,7 @@  - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) OutOfProcess 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 1795d68877..cffabda435 100644 --- a/src/Security/Authentication/Certificate/src/Microsoft.AspNetCore.Authentication.Certificate.csproj +++ b/src/Security/Authentication/Certificate/src/Microsoft.AspNetCore.Authentication.Certificate.csproj @@ -2,7 +2,7 @@ ASP.NET Core middleware that enables an application to support certificate authentication. - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) $(DefineConstants);SECURITY true aspnetcore;authentication;security;x509;certificate diff --git a/src/Security/Authentication/Certificate/src/README.md b/src/Security/Authentication/Certificate/src/README.md index 542131fdf1..b5654819e6 100644 --- a/src/Security/Authentication/Certificate/src/README.md +++ b/src/Security/Authentication/Certificate/src/README.md @@ -1,31 +1,22 @@ # Microsoft.AspNetCore.Authentication.Certificate -This project sort of contains an implementation of [Certificate Authentication](https://tools.ietf.org/html/rfc5246#section-7.4.4) for ASP.NET Core. -Certificate authentication happens at the TLS level, long before it ever gets to ASP.NET Core, so, more accurately this is an authentication handler -that validates the certificate and then gives you an event where you can resolve that certificate to a ClaimsPrincipal. +This project sort of contains an implementation of [Certificate Authentication](https://tools.ietf.org/html/rfc5246#section-7.4.4) for ASP.NET Core. Certificate authentication happens at the TLS level, long before it ever gets to ASP.NET Core, so, more accurately this is an authentication handler that validates the certificate and then gives you an event where you can resolve that certificate to a ClaimsPrincipal. -You **must** [configure your host](#hostConfiguration) for certificate authentication, be it IIS, Kestrel, Azure Web Applications or whatever else you're using. +You **must** [configure your host](#configuring-your-host-to-require-certificates) for certificate authentication, be it IIS, Kestrel, Azure Web Applications or whatever else you're using. ## Getting started -First acquire an HTTPS certificate, apply it and then [configure your host](#hostConfiguration) to require certificates. +First acquire an HTTPS certificate, apply it and then [configure your host](#configuring-your-host-to-require-certificates) to require certificates. -In your web application add a reference to the package, then in the `ConfigureServices` method in `startup.cs` call -`app.AddAuthentication(CertificateAuthenticationDefaults.AuthenticationScheme).UseCertificateAuthentication(...);` with your options, -providing a delegate for `OnValidateCertificate` to validate the client certificate sent with requests and turn that information -into an `ClaimsPrincipal`, set it on the `context.Principal` property and call `context.Success()`. +In your web application add a reference to the package, then in the `ConfigureServices` method in `startup.cs` call `app.AddAuthentication(CertificateAuthenticationDefaults.AuthenticationScheme).UseCertificateAuthentication(...);` with your options, providing a delegate for `OnValidateCertificate` to validate the client certificate sent with requests and turn that information into an `ClaimsPrincipal`, set it on the `context.Principal` property and call `context.Success()`. -If you change your scheme name in the options for the authentication handler you need to change the scheme name in -`AddAuthentication()` to ensure it's used on every request which ends in an endpoint that requires authorization. +If you change your scheme name in the options for the authentication handler you need to change the scheme name in `AddAuthentication()` to ensure it's used on every request which ends in an endpoint that requires authorization. -If authentication fails this handler will return a `403 (Forbidden)` response rather a `401 (Unauthorized)` as you -might expect - this is because the authentication should happen during the initial TLS connection - by the time it -reaches the handler it's too late, and there's no way to actually upgrade the connection from an anonymous connection -to one with a certificate. +If authentication fails this handler will return a `403 (Forbidden)` response rather a `401 (Unauthorized)` as you might expect - this is because the authentication should happen during the initial TLS connection - by the time it reaches the handler it's too late, and there's no way to actually upgrade the connection from an anonymous connection to one with a certificate. You must also add `app.UseAuthentication();` in the `Configure` method, otherwise nothing will ever get called. -For example; +For example: ```c# public void ConfigureServices(IServiceCollection services) @@ -47,25 +38,19 @@ In the sample above you can see the default way to add certificate authenticatio ## Configuring Certificate Validation -The `CertificateAuthenticationOptions` handler has some built in validations that are the minimium validations you should perform on -a certificate. Each of these settings are turned on by default. +The `CertificateAuthenticationOptions` handler has some built in validations that are the minimum validations you should perform on a certificate. Each of these settings are turned on by default. ### ValidateCertificateChain -This check validates that the issuer for the certificate is trusted by the application host OS. If -you are going to accept self-signed certificates you must disable this check. +This check validates that the issuer for the certificate is trusted by the application host OS. If you are going to accept self-signed certificates you must disable this check. ### ValidateCertificateUse -This check validates that the certificate presented by the client has the Client Authentication -extended key use, or no EKUs at all (as the specifications say if no EKU is specified then all EKUs -are valid). +This check validates that the certificate presented by the client has the Client Authentication extended key use, or no EKUs at all (as the specifications say if no EKU is specified then all EKUs are valid). ### ValidateValidityPeriod -This check validates that the certificate is within its validity period. As the handler runs on every -request this ensures that a certificate that was valid when it was presented has not expired during -its current session. +This check validates that the certificate is within its validity period. As the handler runs on every request this ensures that a certificate that was valid when it was presented has not expired during its current session. ### RevocationFlag @@ -73,24 +58,21 @@ A flag which specifies which certificates in the chain are checked for revocatio Revocation checks are only performed when the certificate is chained to a root certificate. -### RevocationMode +### RevocationMode A flag which specifies how revocation checks are performed. + Specifying an on-line check can result in a long delay while the certificate authority is contacted. Revocation checks are only performed when the certificate is chained to a root certificate. ### Can I configure my application to require a certificate only on certain paths? -Not possible, remember the certificate exchange is done that the start of the HTTPS conversation, -it's done by the host, not the application. Kestrel, IIS, Azure Web Apps don't have any configuration for -this sort of thing. +Not possible, remember the certificate exchange is done that the start of the HTTPS conversation, it's done by the host, not the application. Kestrel, IIS, Azure Web Apps don't have any configuration for this sort of thing. -# Handler events +## Handler events -The handler has two events, `OnAuthenticationFailed()`, which is called if an exception happens during authentication and allows you to react, and `OnValidateCertificate()` which is -called after certificate has been validated, passed validation, abut before the default principal has been created. This allows you to perform your own validation, for example -checking if the certificate is one your services knows about, and to construct your own principal. For example, +The handler has two events, `OnAuthenticationFailed()`, which is called if an exception happens during authentication and allows you to react, and `OnValidateCertificate()` which is called after certificate has been validated, passed validation, abut before the default principal has been created. This allows you to perform your own validation, for example checking if the certificate is one your services knows about, and to construct your own principal. For example: ```c# services.AddAuthentication(CertificateAuthenticationDefaults.AuthenticationScheme) @@ -117,8 +99,7 @@ services.AddAuthentication(CertificateAuthenticationDefaults.AuthenticationSchem If you find the inbound certificate doesn't meet your extra validation call `context.Fail("failure Reason")` with a failure reason. -For real functionality you will probably want to call a service registered in DI which talks to a database or other type of -user store. You can grab your service by using the context passed into your delegates, like so +For real functionality you will probably want to call a service registered in DI which talks to a database or other type of user store. You can grab your service by using the context passed into your delegates, like so ```c# services.AddAuthentication(CertificateAuthenticationDefaults.AuthenticationScheme) @@ -130,7 +111,7 @@ services.AddAuthentication(CertificateAuthenticationDefaults.AuthenticationSchem { var validationService = context.HttpContext.RequestServices.GetService(); - + if (validationService.ValidateCertificate(context.ClientCertificate)) { var claims = new[] @@ -141,17 +122,18 @@ services.AddAuthentication(CertificateAuthenticationDefaults.AuthenticationSchem context.Principal = new ClaimsPrincipal(new ClaimsIdentity(claims, context.Scheme.Name)); context.Success(); - } + } return Task.CompletedTask; } }; }); ``` + Note that conceptually the validation of the certification is an authorization concern, and putting a check on, for example, an issuer or thumbprint in an authorization policy rather than inside OnCertificateValidated() is perfectly acceptable. -## Configuring your host to require certificates +## Configuring your host to require certificates ### Kestrel @@ -170,12 +152,12 @@ public static IWebHost BuildWebHost(string[] args) }) .Build(); ``` -You must set the `ClientCertificateValidation` delegate to `CertificateValidator.DisableChannelValidation` in order to stop Kestrel using the default OS certificate validation routine and, -instead, letting the authentication handler perform the validation. + +You must set the `ClientCertificateValidation` delegate to `CertificateValidator.DisableChannelValidation` in order to stop Kestrel using the default OS certificate validation routine and, instead, letting the authentication handler perform the validation. ### IIS -In the IIS Manager +In the IIS Manager: 1. Select your Site in the Connections tab. 2. Double click the SSL Settings in the Features View window. @@ -185,9 +167,7 @@ In the IIS Manager ### Azure -See the [Azure documentation](https://docs.microsoft.com/en-us/azure/app-service/app-service-web-configure-tls-mutual-auth) -to configure Azure Web Apps then add the following to your application startup method, `Configure(IApplicationBuilder app)` add the -following line before the call to `app.UseAuthentication();` +See the [Azure documentation](https://docs.microsoft.com/azure/app-service/app-service-web-configure-tls-mutual-auth) to configure Azure Web Apps then add the following to your application startup method, `Configure(IApplicationBuilder app)` add the following line before the call to `app.UseAuthentication();`: ```c# app.UseCertificateHeaderForwarding(); @@ -195,18 +175,13 @@ app.UseCertificateHeaderForwarding(); ### Random custom web proxies -If you're using a proxy which isn't IIS or Azure's Web Apps Application Request Routing you will need to configure your proxy -to forward the certificate it received in an HTTP header. -In your application startup method, `Configure(IApplicationBuilder app)`, add the -following line before the call to `app.UseAuthentication();` +If you're using a proxy which isn't IIS or Azure's Web Apps Application Request Routing you will need to configure your proxy to forward the certificate it received in an HTTP header. In your application startup method, `Configure(IApplicationBuilder app)`, add the following line before the call to `app.UseAuthentication();`: ```c# app.UseCertificateForwarding(); ``` -You will also need to configure the Certificate Forwarding middleware to specify the header name. -In your service configuration method, `ConfigureServices(IServiceCollection services)` add -the following code to configure the header the forwarding middleware will build a certificate from; +You will also need to configure the Certificate Forwarding middleware to specify the header name. In your service configuration method, `ConfigureServices(IServiceCollection services)` add the following code to configure the header the forwarding middleware will build a certificate from: ```c# services.AddCertificateForwarding(options => @@ -215,9 +190,7 @@ services.AddCertificateForwarding(options => }); ``` -Finally, if your proxy is doing something weird to pass the header on, rather than base 64 encoding it -(looking at you nginx (╯°□°)╯︵ ┻━┻) you can override the converter option to be a func that will -perform the optional conversion, for example +Finally, if your proxy is doing something weird to pass the header on, rather than base 64 encoding it (looking at you nginx (╯°□°)╯︵ ┻━┻) you can override the converter option to be a func that will perform the optional conversion, for example ```c# services.AddCertificateForwarding(options => @@ -231,4 +204,3 @@ services.AddCertificateForwarding(options => } }); ``` - diff --git a/src/Security/Authentication/Cookies/ref/Microsoft.AspNetCore.Authentication.Cookies.csproj b/src/Security/Authentication/Cookies/ref/Microsoft.AspNetCore.Authentication.Cookies.csproj index c6b74638d1..2fe7e7097b 100644 --- a/src/Security/Authentication/Cookies/ref/Microsoft.AspNetCore.Authentication.Cookies.csproj +++ b/src/Security/Authentication/Cookies/ref/Microsoft.AspNetCore.Authentication.Cookies.csproj @@ -1,10 +1,10 @@ - netcoreapp3.0 + netcoreapp5.0 - - + + diff --git a/src/Security/Authentication/Cookies/ref/Microsoft.AspNetCore.Authentication.Cookies.netcoreapp3.0.cs b/src/Security/Authentication/Cookies/ref/Microsoft.AspNetCore.Authentication.Cookies.netcoreapp.cs similarity index 100% rename from src/Security/Authentication/Cookies/ref/Microsoft.AspNetCore.Authentication.Cookies.netcoreapp3.0.cs rename to src/Security/Authentication/Cookies/ref/Microsoft.AspNetCore.Authentication.Cookies.netcoreapp.cs diff --git a/src/Security/Authentication/Cookies/samples/CookieSample/CookieSample.csproj b/src/Security/Authentication/Cookies/samples/CookieSample/CookieSample.csproj index ef22d9fea4..12f4f7fd0b 100644 --- a/src/Security/Authentication/Cookies/samples/CookieSample/CookieSample.csproj +++ b/src/Security/Authentication/Cookies/samples/CookieSample/CookieSample.csproj @@ -1,7 +1,7 @@  - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) OutOfProcess diff --git a/src/Security/Authentication/Cookies/samples/CookieSessionSample/CookieSessionSample.csproj b/src/Security/Authentication/Cookies/samples/CookieSessionSample/CookieSessionSample.csproj index dbfab1d0e7..4a00306838 100644 --- a/src/Security/Authentication/Cookies/samples/CookieSessionSample/CookieSessionSample.csproj +++ b/src/Security/Authentication/Cookies/samples/CookieSessionSample/CookieSessionSample.csproj @@ -1,7 +1,7 @@  - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) OutOfProcess 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 c86d9b94ac..37571e123e 100644 --- a/src/Security/Authentication/Cookies/src/Microsoft.AspNetCore.Authentication.Cookies.csproj +++ b/src/Security/Authentication/Cookies/src/Microsoft.AspNetCore.Authentication.Cookies.csproj @@ -2,7 +2,7 @@ ASP.NET Core middleware that enables an application to use cookie based authentication. - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) true $(DefineConstants);SECURITY $(NoWarn);CS1591 diff --git a/src/Security/Authentication/Core/ref/Microsoft.AspNetCore.Authentication.csproj b/src/Security/Authentication/Core/ref/Microsoft.AspNetCore.Authentication.csproj index 0f53ab690a..852f666262 100644 --- a/src/Security/Authentication/Core/ref/Microsoft.AspNetCore.Authentication.csproj +++ b/src/Security/Authentication/Core/ref/Microsoft.AspNetCore.Authentication.csproj @@ -1,10 +1,10 @@ - netcoreapp3.0 + netcoreapp5.0 - - + + diff --git a/src/Security/Authentication/Core/ref/Microsoft.AspNetCore.Authentication.netcoreapp3.0.cs b/src/Security/Authentication/Core/ref/Microsoft.AspNetCore.Authentication.netcoreapp.cs similarity index 100% rename from src/Security/Authentication/Core/ref/Microsoft.AspNetCore.Authentication.netcoreapp3.0.cs rename to src/Security/Authentication/Core/ref/Microsoft.AspNetCore.Authentication.netcoreapp.cs diff --git a/src/Security/Authentication/Core/src/Microsoft.AspNetCore.Authentication.csproj b/src/Security/Authentication/Core/src/Microsoft.AspNetCore.Authentication.csproj index f4b26c9968..7bd241a9e0 100644 --- a/src/Security/Authentication/Core/src/Microsoft.AspNetCore.Authentication.csproj +++ b/src/Security/Authentication/Core/src/Microsoft.AspNetCore.Authentication.csproj @@ -2,7 +2,7 @@ ASP.NET Core common types used by the various authentication middleware components. - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) true $(NoWarn);CS1591 true diff --git a/src/Security/Authentication/Facebook/ref/Microsoft.AspNetCore.Authentication.Facebook.csproj b/src/Security/Authentication/Facebook/ref/Microsoft.AspNetCore.Authentication.Facebook.csproj index 1ca1d64597..932097a36e 100644 --- a/src/Security/Authentication/Facebook/ref/Microsoft.AspNetCore.Authentication.Facebook.csproj +++ b/src/Security/Authentication/Facebook/ref/Microsoft.AspNetCore.Authentication.Facebook.csproj @@ -1,10 +1,10 @@ - netcoreapp3.0 + netcoreapp5.0 - - + + diff --git a/src/Security/Authentication/Facebook/ref/Microsoft.AspNetCore.Authentication.Facebook.netcoreapp3.0.cs b/src/Security/Authentication/Facebook/ref/Microsoft.AspNetCore.Authentication.Facebook.netcoreapp.cs similarity index 100% rename from src/Security/Authentication/Facebook/ref/Microsoft.AspNetCore.Authentication.Facebook.netcoreapp3.0.cs rename to src/Security/Authentication/Facebook/ref/Microsoft.AspNetCore.Authentication.Facebook.netcoreapp.cs 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 ae327e6ab7..19fbb851d7 100644 --- a/src/Security/Authentication/Facebook/src/Microsoft.AspNetCore.Authentication.Facebook.csproj +++ b/src/Security/Authentication/Facebook/src/Microsoft.AspNetCore.Authentication.Facebook.csproj @@ -2,7 +2,7 @@ ASP.NET Core middleware that enables an application to support Facebook's OAuth 2.0 authentication workflow. - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) $(NoWarn);CS1591 true aspnetcore;authentication;security diff --git a/src/Security/Authentication/Google/ref/Microsoft.AspNetCore.Authentication.Google.csproj b/src/Security/Authentication/Google/ref/Microsoft.AspNetCore.Authentication.Google.csproj index 117e3a54ed..0dfa4e891c 100644 --- a/src/Security/Authentication/Google/ref/Microsoft.AspNetCore.Authentication.Google.csproj +++ b/src/Security/Authentication/Google/ref/Microsoft.AspNetCore.Authentication.Google.csproj @@ -1,10 +1,10 @@ - netcoreapp3.0 + netcoreapp5.0 - - + + diff --git a/src/Security/Authentication/Google/ref/Microsoft.AspNetCore.Authentication.Google.netcoreapp3.0.cs b/src/Security/Authentication/Google/ref/Microsoft.AspNetCore.Authentication.Google.netcoreapp.cs similarity index 100% rename from src/Security/Authentication/Google/ref/Microsoft.AspNetCore.Authentication.Google.netcoreapp3.0.cs rename to src/Security/Authentication/Google/ref/Microsoft.AspNetCore.Authentication.Google.netcoreapp.cs 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 55ea3b2ec9..96bc1b8b33 100644 --- a/src/Security/Authentication/Google/src/Microsoft.AspNetCore.Authentication.Google.csproj +++ b/src/Security/Authentication/Google/src/Microsoft.AspNetCore.Authentication.Google.csproj @@ -2,7 +2,7 @@ ASP.NET Core contains middleware to support Google's OpenId and OAuth 2.0 authentication workflows. - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) $(NoWarn);CS1591 true aspnetcore;authentication;security diff --git a/src/Security/Authentication/JwtBearer/ref/Microsoft.AspNetCore.Authentication.JwtBearer.csproj b/src/Security/Authentication/JwtBearer/ref/Microsoft.AspNetCore.Authentication.JwtBearer.csproj index f42ba44fe1..61d2165939 100644 --- a/src/Security/Authentication/JwtBearer/ref/Microsoft.AspNetCore.Authentication.JwtBearer.csproj +++ b/src/Security/Authentication/JwtBearer/ref/Microsoft.AspNetCore.Authentication.JwtBearer.csproj @@ -1,10 +1,10 @@ - netcoreapp3.0 + netcoreapp5.0 - - + + diff --git a/src/Security/Authentication/JwtBearer/ref/Microsoft.AspNetCore.Authentication.JwtBearer.netcoreapp3.0.cs b/src/Security/Authentication/JwtBearer/ref/Microsoft.AspNetCore.Authentication.JwtBearer.netcoreapp.cs similarity index 100% rename from src/Security/Authentication/JwtBearer/ref/Microsoft.AspNetCore.Authentication.JwtBearer.netcoreapp3.0.cs rename to src/Security/Authentication/JwtBearer/ref/Microsoft.AspNetCore.Authentication.JwtBearer.netcoreapp.cs diff --git a/src/Security/Authentication/JwtBearer/samples/JwtBearerSample/JwtBearerSample.csproj b/src/Security/Authentication/JwtBearer/samples/JwtBearerSample/JwtBearerSample.csproj index 502a017762..9f1096e8c5 100644 --- a/src/Security/Authentication/JwtBearer/samples/JwtBearerSample/JwtBearerSample.csproj +++ b/src/Security/Authentication/JwtBearer/samples/JwtBearerSample/JwtBearerSample.csproj @@ -1,7 +1,7 @@  - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) aspnet5-JwtBearerSample-20151210102827 OutOfProcess 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 b0c6cde4c8..45391ac2db 100644 --- a/src/Security/Authentication/JwtBearer/src/Microsoft.AspNetCore.Authentication.JwtBearer.csproj +++ b/src/Security/Authentication/JwtBearer/src/Microsoft.AspNetCore.Authentication.JwtBearer.csproj @@ -2,7 +2,7 @@ ASP.NET Core middleware that enables an application to receive an OpenID Connect bearer token. - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) $(NoWarn);CS1591 true aspnetcore;authentication;security diff --git a/src/Security/Authentication/MicrosoftAccount/ref/Microsoft.AspNetCore.Authentication.MicrosoftAccount.csproj b/src/Security/Authentication/MicrosoftAccount/ref/Microsoft.AspNetCore.Authentication.MicrosoftAccount.csproj index 335dce5f91..9268beba51 100644 --- a/src/Security/Authentication/MicrosoftAccount/ref/Microsoft.AspNetCore.Authentication.MicrosoftAccount.csproj +++ b/src/Security/Authentication/MicrosoftAccount/ref/Microsoft.AspNetCore.Authentication.MicrosoftAccount.csproj @@ -1,10 +1,10 @@ - netcoreapp3.0 + netcoreapp5.0 - - + + diff --git a/src/Security/Authentication/MicrosoftAccount/ref/Microsoft.AspNetCore.Authentication.MicrosoftAccount.netcoreapp3.0.cs b/src/Security/Authentication/MicrosoftAccount/ref/Microsoft.AspNetCore.Authentication.MicrosoftAccount.netcoreapp.cs similarity index 100% rename from src/Security/Authentication/MicrosoftAccount/ref/Microsoft.AspNetCore.Authentication.MicrosoftAccount.netcoreapp3.0.cs rename to src/Security/Authentication/MicrosoftAccount/ref/Microsoft.AspNetCore.Authentication.MicrosoftAccount.netcoreapp.cs 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 1678826d97..8f7ee4dc44 100644 --- a/src/Security/Authentication/MicrosoftAccount/src/Microsoft.AspNetCore.Authentication.MicrosoftAccount.csproj +++ b/src/Security/Authentication/MicrosoftAccount/src/Microsoft.AspNetCore.Authentication.MicrosoftAccount.csproj @@ -2,7 +2,7 @@ ASP.NET Core middleware that enables an application to support the Microsoft Account authentication workflow. - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) $(NoWarn);CS1591 true aspnetcore;authentication;security diff --git a/src/Security/Authentication/MicrosoftAccount/src/MicrosoftChallengeProperties.cs b/src/Security/Authentication/MicrosoftAccount/src/MicrosoftChallengeProperties.cs index 8625e3f093..4e9737b509 100644 --- a/src/Security/Authentication/MicrosoftAccount/src/MicrosoftChallengeProperties.cs +++ b/src/Security/Authentication/MicrosoftAccount/src/MicrosoftChallengeProperties.cs @@ -4,7 +4,7 @@ using Microsoft.AspNetCore.Authentication.OAuth; namespace Microsoft.AspNetCore.Authentication.MicrosoftAccount { /// - /// See https://docs.microsoft.com/en-us/azure/active-directory/develop/v2-oauth2-auth-code-flow#request-an-authorization-code for reference + /// See https://docs.microsoft.com/azure/active-directory/develop/v2-oauth2-auth-code-flow#request-an-authorization-code for reference /// public class MicrosoftChallengeProperties : OAuthChallengeProperties { diff --git a/src/Security/Authentication/Negotiate/ref/Microsoft.AspNetCore.Authentication.Negotiate.csproj b/src/Security/Authentication/Negotiate/ref/Microsoft.AspNetCore.Authentication.Negotiate.csproj index 9aae0adc89..d10001bd30 100644 --- a/src/Security/Authentication/Negotiate/ref/Microsoft.AspNetCore.Authentication.Negotiate.csproj +++ b/src/Security/Authentication/Negotiate/ref/Microsoft.AspNetCore.Authentication.Negotiate.csproj @@ -1,10 +1,10 @@ - netcoreapp3.0 + netcoreapp5.0 - - + + diff --git a/src/Security/Authentication/Negotiate/ref/Microsoft.AspNetCore.Authentication.Negotiate.netcoreapp3.0.cs b/src/Security/Authentication/Negotiate/ref/Microsoft.AspNetCore.Authentication.Negotiate.netcoreapp.cs similarity index 100% rename from src/Security/Authentication/Negotiate/ref/Microsoft.AspNetCore.Authentication.Negotiate.netcoreapp3.0.cs rename to src/Security/Authentication/Negotiate/ref/Microsoft.AspNetCore.Authentication.Negotiate.netcoreapp.cs diff --git a/src/Security/Authentication/Negotiate/samples/NegotiateAuthSample/NegotiateAuthSample.csproj b/src/Security/Authentication/Negotiate/samples/NegotiateAuthSample/NegotiateAuthSample.csproj index 9df9e8a9ec..aee2213438 100644 --- a/src/Security/Authentication/Negotiate/samples/NegotiateAuthSample/NegotiateAuthSample.csproj +++ b/src/Security/Authentication/Negotiate/samples/NegotiateAuthSample/NegotiateAuthSample.csproj @@ -1,7 +1,7 @@  - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) OutOfProcess 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 d337c88445..cd7ef7ef55 100644 --- a/src/Security/Authentication/Negotiate/src/Microsoft.AspNetCore.Authentication.Negotiate.csproj +++ b/src/Security/Authentication/Negotiate/src/Microsoft.AspNetCore.Authentication.Negotiate.csproj @@ -2,7 +2,7 @@ ASP.NET Core authentication handler used to authenticate requests using Negotiate, Kerberos, or NTLM. - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) true aspnetcore;authentication;security true diff --git a/src/Security/Authentication/Negotiate/test/Negotiate.FunctionalTest/CrossMachineReadMe.md b/src/Security/Authentication/Negotiate/test/Negotiate.FunctionalTest/CrossMachineReadMe.md index e263a2c5f7..ec83949331 100644 --- a/src/Security/Authentication/Negotiate/test/Negotiate.FunctionalTest/CrossMachineReadMe.md +++ b/src/Security/Authentication/Negotiate/test/Negotiate.FunctionalTest/CrossMachineReadMe.md @@ -1,24 +1,24 @@ Cross Machine Tests -Kerberos can only be tested in a multi-machine environment. On localhost it always falls back to NTLM which has different requirements. Multi-machine is also neccisary for interop testing across OSs. Kerberos also requires domain controler SPN configuration so we can't test it on arbitrary test boxes. +Kerberos can only be tested in a multi-machine environment. On localhost it always falls back to NTLM which has different requirements. Multi-machine is also necessary for interop testing across OSs. Kerberos also requires domain controller SPN configuration so we can't test it on arbitrary test boxes. Test structure: - A remote test server with various endpoints with different authentication restrictions. -- A remote test client with endpoints that execute specific scenarios. The input for these endpoints is theory data. The output is either 200Ok, or a failure code and desciption. +- A remote test client with endpoints that execute specific scenarios. The input for these endpoints is theory data. The output is either 200Ok, or a failure code and description. - The CrossMachineTest class that drives the tests. It invokes the client app with the theory data and confirms the results. -We use these three components beceause it allows us to run the tests from a dev machine or CI agent that is not part of the dedicated test domain/environment. +We use these three components because it allows us to run the tests from a dev machine or CI agent that is not part of the dedicated test domain/environment. (Static) Environment Setup: - Warning, this environment can take a day to set up. That's why we want a static test environment that we can re-use. - Create a Windows server running DNS and Active Directory. Promote it to a domain controller. - Create an SPN on this machine for Windows -> Windows testing. `setspn -S "http/chrross-dc.crkerberos.com" -U administrator` - Future: Can we replace the domain controller with an AAD instance? We'd still want a second windows machine for Windows -> Windows testing, but AAD might be easier to configure. - - https://docs.microsoft.com/en-us/azure/active-directory-domain-services/active-directory-ds-getting-started - - https://docs.microsoft.com/en-us/azure/active-directory-domain-services/active-directory-ds-join-ubuntu-linux-vm - - https://docs.microsoft.com/en-us/azure/active-directory-domain-services/active-directory-ds-enable-kcd + - https://docs.microsoft.com/azure/active-directory-domain-services/active-directory-ds-getting-started + - https://docs.microsoft.com/azure/active-directory-domain-services/active-directory-ds-join-ubuntu-linux-vm + - https://docs.microsoft.com/azure/active-directory-domain-services/active-directory-ds-enable-kcd - Create another Windows machine and join it to the test domain. -- Create a Linux machine and joing it to the domain. Ubuntu 18.04 has been used in the past. +- Create a Linux machine and joining it to the domain. Ubuntu 18.04 has been used in the past. - https://www.safesquid.com/content-filtering/integrating-linux-host-windows-ad-kerberos-sso-authentication - Include an HTTP SPN 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 514a3187c9..d0c7e5a9a2 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 @@ -1,7 +1,7 @@ - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) true 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 f0f681cda4..7af38dfa4a 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 @@ -1,7 +1,7 @@ - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) 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 55a22b834d..2e68725650 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 @@ -1,7 +1,7 @@  - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) OutOfProcess 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 627f54bc35..5cec84f52f 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 @@ -1,7 +1,7 @@  - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) OutOfProcess diff --git a/src/Security/Authentication/OAuth/ref/Microsoft.AspNetCore.Authentication.OAuth.csproj b/src/Security/Authentication/OAuth/ref/Microsoft.AspNetCore.Authentication.OAuth.csproj index 748ac04e8a..7bab2200f0 100644 --- a/src/Security/Authentication/OAuth/ref/Microsoft.AspNetCore.Authentication.OAuth.csproj +++ b/src/Security/Authentication/OAuth/ref/Microsoft.AspNetCore.Authentication.OAuth.csproj @@ -1,10 +1,10 @@ - netcoreapp3.0 + netcoreapp5.0 - - + + diff --git a/src/Security/Authentication/OAuth/ref/Microsoft.AspNetCore.Authentication.OAuth.netcoreapp3.0.cs b/src/Security/Authentication/OAuth/ref/Microsoft.AspNetCore.Authentication.OAuth.netcoreapp.cs similarity index 100% rename from src/Security/Authentication/OAuth/ref/Microsoft.AspNetCore.Authentication.OAuth.netcoreapp3.0.cs rename to src/Security/Authentication/OAuth/ref/Microsoft.AspNetCore.Authentication.OAuth.netcoreapp.cs 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 29137840ff..5ad9aa6804 100644 --- a/src/Security/Authentication/OAuth/src/Microsoft.AspNetCore.Authentication.OAuth.csproj +++ b/src/Security/Authentication/OAuth/src/Microsoft.AspNetCore.Authentication.OAuth.csproj @@ -2,7 +2,7 @@ ASP.NET Core middleware that enables an application to support any standard OAuth 2.0 authentication workflow. - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) true $(NoWarn);CS1591 true diff --git a/src/Security/Authentication/OpenIdConnect/ref/Microsoft.AspNetCore.Authentication.OpenIdConnect.csproj b/src/Security/Authentication/OpenIdConnect/ref/Microsoft.AspNetCore.Authentication.OpenIdConnect.csproj index 40acfd4743..3049f5ee73 100644 --- a/src/Security/Authentication/OpenIdConnect/ref/Microsoft.AspNetCore.Authentication.OpenIdConnect.csproj +++ b/src/Security/Authentication/OpenIdConnect/ref/Microsoft.AspNetCore.Authentication.OpenIdConnect.csproj @@ -1,10 +1,10 @@ - netcoreapp3.0 + netcoreapp5.0 - - + + diff --git a/src/Security/Authentication/OpenIdConnect/ref/Microsoft.AspNetCore.Authentication.OpenIdConnect.netcoreapp3.0.cs b/src/Security/Authentication/OpenIdConnect/ref/Microsoft.AspNetCore.Authentication.OpenIdConnect.netcoreapp.cs similarity index 100% rename from src/Security/Authentication/OpenIdConnect/ref/Microsoft.AspNetCore.Authentication.OpenIdConnect.netcoreapp3.0.cs rename to src/Security/Authentication/OpenIdConnect/ref/Microsoft.AspNetCore.Authentication.OpenIdConnect.netcoreapp.cs diff --git a/src/Security/Authentication/OpenIdConnect/samples/OpenIdConnect.AzureAdSample/OpenIdConnect.AzureAdSample.csproj b/src/Security/Authentication/OpenIdConnect/samples/OpenIdConnect.AzureAdSample/OpenIdConnect.AzureAdSample.csproj index 8189040bab..28c163ceee 100644 --- a/src/Security/Authentication/OpenIdConnect/samples/OpenIdConnect.AzureAdSample/OpenIdConnect.AzureAdSample.csproj +++ b/src/Security/Authentication/OpenIdConnect/samples/OpenIdConnect.AzureAdSample/OpenIdConnect.AzureAdSample.csproj @@ -1,7 +1,7 @@  - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) aspnet5-OpenIdConnectSample-20151210110318 OutOfProcess diff --git a/src/Security/Authentication/OpenIdConnect/samples/OpenIdConnectSample/OpenIdConnectSample.csproj b/src/Security/Authentication/OpenIdConnect/samples/OpenIdConnectSample/OpenIdConnectSample.csproj index 18db419418..5f5dbaccc2 100644 --- a/src/Security/Authentication/OpenIdConnect/samples/OpenIdConnectSample/OpenIdConnectSample.csproj +++ b/src/Security/Authentication/OpenIdConnect/samples/OpenIdConnectSample/OpenIdConnectSample.csproj @@ -1,7 +1,7 @@  - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) aspnet5-OpenIdConnectSample-20151210110318 OutOfProcess 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 eb0ef01568..79b6de0fbf 100644 --- a/src/Security/Authentication/OpenIdConnect/src/Microsoft.AspNetCore.Authentication.OpenIdConnect.csproj +++ b/src/Security/Authentication/OpenIdConnect/src/Microsoft.AspNetCore.Authentication.OpenIdConnect.csproj @@ -2,7 +2,7 @@ ASP.NET Core middleware that enables an application to support the OpenID Connect authentication workflow. - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) $(NoWarn);CS1591 true aspnetcore;authentication;security diff --git a/src/Security/Authentication/Twitter/ref/Microsoft.AspNetCore.Authentication.Twitter.csproj b/src/Security/Authentication/Twitter/ref/Microsoft.AspNetCore.Authentication.Twitter.csproj index aed02b9723..94f128a796 100644 --- a/src/Security/Authentication/Twitter/ref/Microsoft.AspNetCore.Authentication.Twitter.csproj +++ b/src/Security/Authentication/Twitter/ref/Microsoft.AspNetCore.Authentication.Twitter.csproj @@ -1,10 +1,10 @@ - netcoreapp3.0 + netcoreapp5.0 - - + + diff --git a/src/Security/Authentication/Twitter/ref/Microsoft.AspNetCore.Authentication.Twitter.netcoreapp3.0.cs b/src/Security/Authentication/Twitter/ref/Microsoft.AspNetCore.Authentication.Twitter.netcoreapp.cs similarity index 100% rename from src/Security/Authentication/Twitter/ref/Microsoft.AspNetCore.Authentication.Twitter.netcoreapp3.0.cs rename to src/Security/Authentication/Twitter/ref/Microsoft.AspNetCore.Authentication.Twitter.netcoreapp.cs 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 2dbb515a4a..51f01cbd3f 100644 --- a/src/Security/Authentication/Twitter/src/Microsoft.AspNetCore.Authentication.Twitter.csproj +++ b/src/Security/Authentication/Twitter/src/Microsoft.AspNetCore.Authentication.Twitter.csproj @@ -2,7 +2,7 @@ ASP.NET Core middleware that enables an application to support Twitter's OAuth 1.0 authentication workflow. - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) $(NoWarn);CS1591 true aspnetcore;authentication;security diff --git a/src/Security/Authentication/WsFederation/ref/Microsoft.AspNetCore.Authentication.WsFederation.csproj b/src/Security/Authentication/WsFederation/ref/Microsoft.AspNetCore.Authentication.WsFederation.csproj index a71b3d432d..de9634120b 100644 --- a/src/Security/Authentication/WsFederation/ref/Microsoft.AspNetCore.Authentication.WsFederation.csproj +++ b/src/Security/Authentication/WsFederation/ref/Microsoft.AspNetCore.Authentication.WsFederation.csproj @@ -1,10 +1,10 @@ - netcoreapp3.0 + netcoreapp5.0 - - + + diff --git a/src/Security/Authentication/WsFederation/ref/Microsoft.AspNetCore.Authentication.WsFederation.netcoreapp3.0.cs b/src/Security/Authentication/WsFederation/ref/Microsoft.AspNetCore.Authentication.WsFederation.netcoreapp.cs similarity index 100% rename from src/Security/Authentication/WsFederation/ref/Microsoft.AspNetCore.Authentication.WsFederation.netcoreapp3.0.cs rename to src/Security/Authentication/WsFederation/ref/Microsoft.AspNetCore.Authentication.WsFederation.netcoreapp.cs diff --git a/src/Security/Authentication/WsFederation/samples/WsFedSample/WsFedSample.csproj b/src/Security/Authentication/WsFederation/samples/WsFedSample/WsFedSample.csproj index 5a2186f3df..0d6734f909 100644 --- a/src/Security/Authentication/WsFederation/samples/WsFedSample/WsFedSample.csproj +++ b/src/Security/Authentication/WsFederation/samples/WsFedSample/WsFedSample.csproj @@ -1,7 +1,7 @@ - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) 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 1e864c5662..79ea913ae1 100644 --- a/src/Security/Authentication/WsFederation/src/Microsoft.AspNetCore.Authentication.WsFederation.csproj +++ b/src/Security/Authentication/WsFederation/src/Microsoft.AspNetCore.Authentication.WsFederation.csproj @@ -2,7 +2,7 @@ ASP.NET Core middleware that enables an application to support the WsFederation authentication workflow. - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) true aspnetcore;authentication;security true diff --git a/src/Security/Authentication/samples/SocialSample/SocialSample.csproj b/src/Security/Authentication/samples/SocialSample/SocialSample.csproj index 8aef9e3bf9..db27558599 100644 --- a/src/Security/Authentication/samples/SocialSample/SocialSample.csproj +++ b/src/Security/Authentication/samples/SocialSample/SocialSample.csproj @@ -1,7 +1,7 @@ - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) aspnet5-SocialSample-20151210111056 OutOfProcess diff --git a/src/Security/Authentication/test/Microsoft.AspNetCore.Authentication.Test.csproj b/src/Security/Authentication/test/Microsoft.AspNetCore.Authentication.Test.csproj index fd033a9169..ad03f0bea6 100644 --- a/src/Security/Authentication/test/Microsoft.AspNetCore.Authentication.Test.csproj +++ b/src/Security/Authentication/test/Microsoft.AspNetCore.Authentication.Test.csproj @@ -1,7 +1,7 @@ - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) diff --git a/src/Security/Authorization/Core/ref/Microsoft.AspNetCore.Authorization.csproj b/src/Security/Authorization/Core/ref/Microsoft.AspNetCore.Authorization.csproj index 64c2d6f679..eb018686c2 100644 --- a/src/Security/Authorization/Core/ref/Microsoft.AspNetCore.Authorization.csproj +++ b/src/Security/Authorization/Core/ref/Microsoft.AspNetCore.Authorization.csproj @@ -1,7 +1,7 @@ - netstandard2.0;netcoreapp3.0 + netstandard2.0;netcoreapp5.0 @@ -9,8 +9,8 @@ - - + + diff --git a/src/Security/Authorization/Core/ref/Microsoft.AspNetCore.Authorization.netcoreapp3.0.cs b/src/Security/Authorization/Core/ref/Microsoft.AspNetCore.Authorization.netcoreapp.cs similarity index 100% rename from src/Security/Authorization/Core/ref/Microsoft.AspNetCore.Authorization.netcoreapp3.0.cs rename to src/Security/Authorization/Core/ref/Microsoft.AspNetCore.Authorization.netcoreapp.cs diff --git a/src/Security/Authorization/Core/src/Microsoft.AspNetCore.Authorization.csproj b/src/Security/Authorization/Core/src/Microsoft.AspNetCore.Authorization.csproj index 4f3a07755f..b6f1f89e70 100644 --- a/src/Security/Authorization/Core/src/Microsoft.AspNetCore.Authorization.csproj +++ b/src/Security/Authorization/Core/src/Microsoft.AspNetCore.Authorization.csproj @@ -5,8 +5,8 @@ Commonly used types: Microsoft.AspNetCore.Authorization.AllowAnonymousAttribute Microsoft.AspNetCore.Authorization.AuthorizeAttribute - netstandard2.0;netcoreapp3.0 - netcoreapp3.0 + netstandard2.0;$(DefaultNetCoreTargetFramework) + $(DefaultNetCoreTargetFramework) true true $(NoWarn);CS1591 diff --git a/src/Security/Authorization/Policy/ref/Microsoft.AspNetCore.Authorization.Policy.csproj b/src/Security/Authorization/Policy/ref/Microsoft.AspNetCore.Authorization.Policy.csproj index 2abea2d038..c72a3cb11d 100644 --- a/src/Security/Authorization/Policy/ref/Microsoft.AspNetCore.Authorization.Policy.csproj +++ b/src/Security/Authorization/Policy/ref/Microsoft.AspNetCore.Authorization.Policy.csproj @@ -1,10 +1,10 @@ - netcoreapp3.0 + netcoreapp5.0 - - + + diff --git a/src/Security/Authorization/Policy/ref/Microsoft.AspNetCore.Authorization.Policy.netcoreapp3.0.cs b/src/Security/Authorization/Policy/ref/Microsoft.AspNetCore.Authorization.Policy.netcoreapp.cs similarity index 100% rename from src/Security/Authorization/Policy/ref/Microsoft.AspNetCore.Authorization.Policy.netcoreapp3.0.cs rename to src/Security/Authorization/Policy/ref/Microsoft.AspNetCore.Authorization.Policy.netcoreapp.cs 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 07078e7ea2..9dd43caf4f 100644 --- a/src/Security/Authorization/Policy/src/Microsoft.AspNetCore.Authorization.Policy.csproj +++ b/src/Security/Authorization/Policy/src/Microsoft.AspNetCore.Authorization.Policy.csproj @@ -2,7 +2,7 @@ ASP.NET Core authorization policy helper classes. - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) true $(NoWarn);CS1591 true diff --git a/src/Security/Authorization/test/Microsoft.AspNetCore.Authorization.Test.csproj b/src/Security/Authorization/test/Microsoft.AspNetCore.Authorization.Test.csproj index 2c439fdd22..c0f0e508b6 100644 --- a/src/Security/Authorization/test/Microsoft.AspNetCore.Authorization.Test.csproj +++ b/src/Security/Authorization/test/Microsoft.AspNetCore.Authorization.Test.csproj @@ -1,7 +1,7 @@ - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) diff --git a/src/Security/CookiePolicy/ref/Microsoft.AspNetCore.CookiePolicy.csproj b/src/Security/CookiePolicy/ref/Microsoft.AspNetCore.CookiePolicy.csproj index be94f37e47..844ef2d238 100644 --- a/src/Security/CookiePolicy/ref/Microsoft.AspNetCore.CookiePolicy.csproj +++ b/src/Security/CookiePolicy/ref/Microsoft.AspNetCore.CookiePolicy.csproj @@ -1,10 +1,10 @@ - netcoreapp3.0 + netcoreapp5.0 - - + + diff --git a/src/Security/CookiePolicy/ref/Microsoft.AspNetCore.CookiePolicy.netcoreapp3.0.cs b/src/Security/CookiePolicy/ref/Microsoft.AspNetCore.CookiePolicy.netcoreapp.cs similarity index 100% rename from src/Security/CookiePolicy/ref/Microsoft.AspNetCore.CookiePolicy.netcoreapp3.0.cs rename to src/Security/CookiePolicy/ref/Microsoft.AspNetCore.CookiePolicy.netcoreapp.cs diff --git a/src/Security/CookiePolicy/samples/CookiePolicySample/CookiePolicySample.csproj b/src/Security/CookiePolicy/samples/CookiePolicySample/CookiePolicySample.csproj index ee3e7bbf0a..9afabc0b4a 100644 --- a/src/Security/CookiePolicy/samples/CookiePolicySample/CookiePolicySample.csproj +++ b/src/Security/CookiePolicy/samples/CookiePolicySample/CookiePolicySample.csproj @@ -1,7 +1,7 @@ - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) diff --git a/src/Security/CookiePolicy/src/Microsoft.AspNetCore.CookiePolicy.csproj b/src/Security/CookiePolicy/src/Microsoft.AspNetCore.CookiePolicy.csproj index f4b039bcb9..ed9566288c 100644 --- a/src/Security/CookiePolicy/src/Microsoft.AspNetCore.CookiePolicy.csproj +++ b/src/Security/CookiePolicy/src/Microsoft.AspNetCore.CookiePolicy.csproj @@ -2,7 +2,7 @@ ASP.NET Core cookie policy classes to control the behavior of cookies. - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) true $(NoWarn);CS1591 true diff --git a/src/Security/CookiePolicy/test/Microsoft.AspNetCore.CookiePolicy.Test.csproj b/src/Security/CookiePolicy/test/Microsoft.AspNetCore.CookiePolicy.Test.csproj index 4da143d92f..efeb4acb3b 100644 --- a/src/Security/CookiePolicy/test/Microsoft.AspNetCore.CookiePolicy.Test.csproj +++ b/src/Security/CookiePolicy/test/Microsoft.AspNetCore.CookiePolicy.Test.csproj @@ -1,7 +1,7 @@ - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) diff --git a/src/Security/README.md b/src/Security/README.md index 0ba28c1e97..5ed702c4f2 100644 --- a/src/Security/README.md +++ b/src/Security/README.md @@ -3,9 +3,9 @@ ASP.NET Core Security Contains the security and authorization middlewares for ASP.NET Core. -A list of community projects related to authentication and security for ASP.NET Core are listed in the [documentation](https://docs.microsoft.com/en-us/aspnet/core/security/authentication/community). +A list of community projects related to authentication and security for ASP.NET Core are listed in the [documentation](https://docs.microsoft.com/aspnet/core/security/authentication/community). -See the [ASP.NET Core security documentation](https://docs.microsoft.com/en-us/aspnet/core/security/). +See the [ASP.NET Core security documentation](https://docs.microsoft.com/aspnet/core/security/). ### Notes diff --git a/src/Security/benchmarks/Microsoft.AspNetCore.Security.Performance/Microsoft.AspNetCore.Security.Performance.csproj b/src/Security/benchmarks/Microsoft.AspNetCore.Security.Performance/Microsoft.AspNetCore.Security.Performance.csproj index cb6b5ead53..c6bb271536 100644 --- a/src/Security/benchmarks/Microsoft.AspNetCore.Security.Performance/Microsoft.AspNetCore.Security.Performance.csproj +++ b/src/Security/benchmarks/Microsoft.AspNetCore.Security.Performance/Microsoft.AspNetCore.Security.Performance.csproj @@ -1,7 +1,7 @@ - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) Exe true true diff --git a/src/Security/samples/ClaimsTransformation/ClaimsTransformation.csproj b/src/Security/samples/ClaimsTransformation/ClaimsTransformation.csproj index 356b19430d..067f0add45 100644 --- a/src/Security/samples/ClaimsTransformation/ClaimsTransformation.csproj +++ b/src/Security/samples/ClaimsTransformation/ClaimsTransformation.csproj @@ -1,7 +1,7 @@  - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) true diff --git a/src/Security/samples/Cookies/Cookies.csproj b/src/Security/samples/Cookies/Cookies.csproj index 356b19430d..067f0add45 100644 --- a/src/Security/samples/Cookies/Cookies.csproj +++ b/src/Security/samples/Cookies/Cookies.csproj @@ -1,7 +1,7 @@  - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) true diff --git a/src/Security/samples/CustomPolicyProvider/CustomPolicyProvider.csproj b/src/Security/samples/CustomPolicyProvider/CustomPolicyProvider.csproj index f0608927d2..d7219e687d 100644 --- a/src/Security/samples/CustomPolicyProvider/CustomPolicyProvider.csproj +++ b/src/Security/samples/CustomPolicyProvider/CustomPolicyProvider.csproj @@ -1,7 +1,7 @@  - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) true diff --git a/src/Security/samples/DynamicSchemes/DynamicSchemes.csproj b/src/Security/samples/DynamicSchemes/DynamicSchemes.csproj index d72d814671..0ccbed38af 100644 --- a/src/Security/samples/DynamicSchemes/DynamicSchemes.csproj +++ b/src/Security/samples/DynamicSchemes/DynamicSchemes.csproj @@ -1,6 +1,6 @@  - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) true diff --git a/src/Security/samples/Identity.ExternalClaims/Identity.ExternalClaims.csproj b/src/Security/samples/Identity.ExternalClaims/Identity.ExternalClaims.csproj index fc5f7fded5..693cd9388b 100644 --- a/src/Security/samples/Identity.ExternalClaims/Identity.ExternalClaims.csproj +++ b/src/Security/samples/Identity.ExternalClaims/Identity.ExternalClaims.csproj @@ -1,6 +1,6 @@  - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) aspnet-Identity.ExternalClaims-E95BE154-CB1B-4633-A2E0-B2DF12FE8BD3 true diff --git a/src/Security/samples/Identity.ExternalClaims/README.md b/src/Security/samples/Identity.ExternalClaims/README.md index 7a9141075d..70205c0367 100644 --- a/src/Security/samples/Identity.ExternalClaims/README.md +++ b/src/Security/samples/Identity.ExternalClaims/README.md @@ -4,7 +4,7 @@ AuthSamples.Identity.ExternalClaims Sample demonstrating copying over static and dynamic external claims from Google authentication during login: Steps: -1. Configure a google OAuth2 project. See https://docs.microsoft.com/en-us/aspnet/core/security/authentication/social/google-logins?tabs=aspnetcore2x for basic setup using google logins. +1. Configure a google OAuth2 project. See https://docs.microsoft.com/aspnet/core/security/authentication/social/google-logins for basic setup using google logins. 2. Update Startup.cs AddGoogle()'s options with ClientId and ClientSecret for your google app. 3. Run the app and click on the MyClaims tab, this should trigger a redirect to login. 4. Login via the Google button, this should redirect you to google. diff --git a/src/Security/samples/PathSchemeSelection/PathSchemeSelection.csproj b/src/Security/samples/PathSchemeSelection/PathSchemeSelection.csproj index 356b19430d..067f0add45 100644 --- a/src/Security/samples/PathSchemeSelection/PathSchemeSelection.csproj +++ b/src/Security/samples/PathSchemeSelection/PathSchemeSelection.csproj @@ -1,7 +1,7 @@  - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) true diff --git a/src/Security/samples/StaticFilesAuth/StaticFilesAuth.csproj b/src/Security/samples/StaticFilesAuth/StaticFilesAuth.csproj index 5061fcb022..871a361b56 100644 --- a/src/Security/samples/StaticFilesAuth/StaticFilesAuth.csproj +++ b/src/Security/samples/StaticFilesAuth/StaticFilesAuth.csproj @@ -1,7 +1,7 @@  - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) aspnet-StaticFilesAuth-AFE2BD9D-1575-4C3E-BE32-3F15C5BC9947 true diff --git a/src/Security/test/AuthSamples.FunctionalTests/AuthSamples.FunctionalTests.csproj b/src/Security/test/AuthSamples.FunctionalTests/AuthSamples.FunctionalTests.csproj index a0055c58bc..0e9238388a 100644 --- a/src/Security/test/AuthSamples.FunctionalTests/AuthSamples.FunctionalTests.csproj +++ b/src/Security/test/AuthSamples.FunctionalTests/AuthSamples.FunctionalTests.csproj @@ -1,7 +1,7 @@ - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) false AnyCPU @@ -31,13 +31,13 @@ - <_PublishFiles Include="$(ArtifactsBinDir)ClaimsTransformation\$(Configuration)\netcoreapp3.0\ClaimsTransformation.deps.json" /> - <_PublishFiles Include="$(ArtifactsBinDir)Cookies\$(Configuration)\netcoreapp3.0\Cookies.deps.json" /> - <_PublishFiles Include="$(ArtifactsBinDir)CustomPolicyProvider\$(Configuration)\netcoreapp3.0\CustomPolicyProvider.deps.json" /> - <_PublishFiles Include="$(ArtifactsBinDir)DynamicSchemes\$(Configuration)\netcoreapp3.0\DynamicSchemes.deps.json" /> - <_PublishFiles Include="$(ArtifactsBinDir)Identity.ExternalClaims\$(Configuration)\netcoreapp3.0\Identity.ExternalClaims.deps.json" /> - <_PublishFiles Include="$(ArtifactsBinDir)PathSchemeSelection\$(Configuration)\netcoreapp3.0\PathSchemeSelection.deps.json" /> - <_PublishFiles Include="$(ArtifactsBinDir)StaticFilesAuth\$(Configuration)\netcoreapp3.0\StaticFilesAuth.deps.json" /> + <_PublishFiles Include="$(ArtifactsBinDir)ClaimsTransformation\$(Configuration)\$(DefaultNetCoreTargetFramework)\ClaimsTransformation.deps.json" /> + <_PublishFiles Include="$(ArtifactsBinDir)Cookies\$(Configuration)\$(DefaultNetCoreTargetFramework)\Cookies.deps.json" /> + <_PublishFiles Include="$(ArtifactsBinDir)CustomPolicyProvider\$(Configuration)\$(DefaultNetCoreTargetFramework)\CustomPolicyProvider.deps.json" /> + <_PublishFiles Include="$(ArtifactsBinDir)DynamicSchemes\$(Configuration)\$(DefaultNetCoreTargetFramework)\DynamicSchemes.deps.json" /> + <_PublishFiles Include="$(ArtifactsBinDir)Identity.ExternalClaims\$(Configuration)\$(DefaultNetCoreTargetFramework)\Identity.ExternalClaims.deps.json" /> + <_PublishFiles Include="$(ArtifactsBinDir)PathSchemeSelection\$(Configuration)\$(DefaultNetCoreTargetFramework)\PathSchemeSelection.deps.json" /> + <_PublishFiles Include="$(ArtifactsBinDir)StaticFilesAuth\$(Configuration)\$(DefaultNetCoreTargetFramework)\StaticFilesAuth.deps.json" /> <_claimsWwwrootFiles Include="$(MSBuildThisFileDirectory)..\..\samples\ClaimsTransformation\wwwroot\**\*.*" /> <_cookiesWwwrootFiles Include="$(MSBuildThisFileDirectory)..\..\samples\Cookies\wwwroot\**\*.*" /> <_customProviderFiles Include="$(MSBuildThisFileDirectory)..\..\samples\CustomPolicyProvider\**\*.*" /> diff --git a/src/Servers/Connections.Abstractions/ref/Microsoft.AspNetCore.Connections.Abstractions.csproj b/src/Servers/Connections.Abstractions/ref/Microsoft.AspNetCore.Connections.Abstractions.csproj index a3f3f48546..5117931738 100644 --- a/src/Servers/Connections.Abstractions/ref/Microsoft.AspNetCore.Connections.Abstractions.csproj +++ b/src/Servers/Connections.Abstractions/ref/Microsoft.AspNetCore.Connections.Abstractions.csproj @@ -1,7 +1,7 @@ - netstandard2.0;netstandard2.1;netcoreapp3.0 + netstandard2.0;netstandard2.1;netcoreapp5.0 @@ -16,8 +16,8 @@ - - + + diff --git a/src/Servers/Connections.Abstractions/ref/Microsoft.AspNetCore.Connections.Abstractions.netcoreapp3.0.cs b/src/Servers/Connections.Abstractions/ref/Microsoft.AspNetCore.Connections.Abstractions.netcoreapp.cs similarity index 100% rename from src/Servers/Connections.Abstractions/ref/Microsoft.AspNetCore.Connections.Abstractions.netcoreapp3.0.cs rename to src/Servers/Connections.Abstractions/ref/Microsoft.AspNetCore.Connections.Abstractions.netcoreapp.cs diff --git a/src/Servers/Connections.Abstractions/src/Microsoft.AspNetCore.Connections.Abstractions.csproj b/src/Servers/Connections.Abstractions/src/Microsoft.AspNetCore.Connections.Abstractions.csproj index 71c228d23f..43f6d4b574 100644 --- a/src/Servers/Connections.Abstractions/src/Microsoft.AspNetCore.Connections.Abstractions.csproj +++ b/src/Servers/Connections.Abstractions/src/Microsoft.AspNetCore.Connections.Abstractions.csproj @@ -2,8 +2,8 @@ Core components of ASP.NET Core networking protocol stack. - netstandard2.0;netstandard2.1;netcoreapp3.0 - netcoreapp3.0 + netstandard2.0;netstandard2.1;$(DefaultNetCoreTargetFramework) + $(DefaultNetCoreTargetFramework) true true aspnetcore diff --git a/src/Servers/HttpSys/ref/Microsoft.AspNetCore.Server.HttpSys.csproj b/src/Servers/HttpSys/ref/Microsoft.AspNetCore.Server.HttpSys.csproj index 5735d7254d..7145bd5c23 100644 --- a/src/Servers/HttpSys/ref/Microsoft.AspNetCore.Server.HttpSys.csproj +++ b/src/Servers/HttpSys/ref/Microsoft.AspNetCore.Server.HttpSys.csproj @@ -1,10 +1,10 @@ - netcoreapp3.0 + netcoreapp5.0 - - + + diff --git a/src/Servers/HttpSys/ref/Microsoft.AspNetCore.Server.HttpSys.netcoreapp3.0.cs b/src/Servers/HttpSys/ref/Microsoft.AspNetCore.Server.HttpSys.netcoreapp.cs similarity index 100% rename from src/Servers/HttpSys/ref/Microsoft.AspNetCore.Server.HttpSys.netcoreapp3.0.cs rename to src/Servers/HttpSys/ref/Microsoft.AspNetCore.Server.HttpSys.netcoreapp.cs diff --git a/src/Servers/HttpSys/samples/HotAddSample/HotAddSample.csproj b/src/Servers/HttpSys/samples/HotAddSample/HotAddSample.csproj index 60cad7d163..cf4b7f8a96 100644 --- a/src/Servers/HttpSys/samples/HotAddSample/HotAddSample.csproj +++ b/src/Servers/HttpSys/samples/HotAddSample/HotAddSample.csproj @@ -1,7 +1,7 @@  - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) Exe true diff --git a/src/Servers/HttpSys/samples/SelfHostServer/SelfHostServer.csproj b/src/Servers/HttpSys/samples/SelfHostServer/SelfHostServer.csproj index 60cad7d163..cf4b7f8a96 100644 --- a/src/Servers/HttpSys/samples/SelfHostServer/SelfHostServer.csproj +++ b/src/Servers/HttpSys/samples/SelfHostServer/SelfHostServer.csproj @@ -1,7 +1,7 @@  - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) Exe true diff --git a/src/Servers/HttpSys/src/Microsoft.AspNetCore.Server.HttpSys.csproj b/src/Servers/HttpSys/src/Microsoft.AspNetCore.Server.HttpSys.csproj index 2ccf8af84c..869a3c727c 100644 --- a/src/Servers/HttpSys/src/Microsoft.AspNetCore.Server.HttpSys.csproj +++ b/src/Servers/HttpSys/src/Microsoft.AspNetCore.Server.HttpSys.csproj @@ -2,7 +2,7 @@ ASP.NET Core HTTP server that uses the Windows HTTP Server API. - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) true $(NoWarn);CS1591 true diff --git a/src/Servers/HttpSys/src/RequestProcessing/Request.cs b/src/Servers/HttpSys/src/RequestProcessing/Request.cs index 9112dfaca9..3f2fe439ba 100644 --- a/src/Servers/HttpSys/src/RequestProcessing/Request.cs +++ b/src/Servers/HttpSys/src/RequestProcessing/Request.cs @@ -259,7 +259,7 @@ namespace Microsoft.AspNetCore.Server.HttpSys Protocol = handshake.Protocol; // The OS considers client and server TLS as different enum values. SslProtocols choose to combine those for some reason. // We need to fill in the client bits so the enum shows the expected protocol. - // https://docs.microsoft.com/en-us/windows/desktop/api/schannel/ns-schannel-_secpkgcontext_connectioninfo + // https://docs.microsoft.com/windows/desktop/api/schannel/ns-schannel-_secpkgcontext_connectioninfo // Compare to https://referencesource.microsoft.com/#System/net/System/Net/SecureProtocols/_SslState.cs,8905d1bf17729de3 #pragma warning disable CS0618 // Type or member is obsolete if ((Protocol & SslProtocols.Ssl2) != 0) 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 afa3ec8934..36a36cdc08 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 @@ -1,7 +1,7 @@  - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) HttpSys.FunctionalTests 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 4bbe0bbbf3..65c6317a8b 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 @@ -1,7 +1,7 @@  - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) diff --git a/src/Servers/IIS/AspNetCoreModuleV2/Symbols/Microsoft.AspNetCore.ANCMSymbols.csproj b/src/Servers/IIS/AspNetCoreModuleV2/Symbols/Microsoft.AspNetCore.ANCMSymbols.csproj index 5516441567..f3426f8935 100644 --- a/src/Servers/IIS/AspNetCoreModuleV2/Symbols/Microsoft.AspNetCore.ANCMSymbols.csproj +++ b/src/Servers/IIS/AspNetCoreModuleV2/Symbols/Microsoft.AspNetCore.ANCMSymbols.csproj @@ -3,7 +3,7 @@ - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) $(MSBuildProjectName).$(TargetRuntimeIdentifier) true $(PackNativeAssets) diff --git a/src/Servers/IIS/IIS/benchmarks/IIS.Performance/IIS.Performance.csproj b/src/Servers/IIS/IIS/benchmarks/IIS.Performance/IIS.Performance.csproj index 44c1a66221..9435906632 100644 --- a/src/Servers/IIS/IIS/benchmarks/IIS.Performance/IIS.Performance.csproj +++ b/src/Servers/IIS/IIS/benchmarks/IIS.Performance/IIS.Performance.csproj @@ -4,7 +4,7 @@ IIS.Performance Microsoft.AspNetCore.Server.IIS.Performance - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) Exe true true diff --git a/src/Servers/IIS/IIS/ref/Microsoft.AspNetCore.Server.IIS.csproj b/src/Servers/IIS/IIS/ref/Microsoft.AspNetCore.Server.IIS.csproj index 72d9c85999..6820d5cccb 100644 --- a/src/Servers/IIS/IIS/ref/Microsoft.AspNetCore.Server.IIS.csproj +++ b/src/Servers/IIS/IIS/ref/Microsoft.AspNetCore.Server.IIS.csproj @@ -1,10 +1,10 @@ - netcoreapp3.0 + netcoreapp5.0 - - + + diff --git a/src/Servers/IIS/IIS/ref/Microsoft.AspNetCore.Server.IIS.netcoreapp3.0.cs b/src/Servers/IIS/IIS/ref/Microsoft.AspNetCore.Server.IIS.netcoreapp.cs similarity index 100% rename from src/Servers/IIS/IIS/ref/Microsoft.AspNetCore.Server.IIS.netcoreapp3.0.cs rename to src/Servers/IIS/IIS/ref/Microsoft.AspNetCore.Server.IIS.netcoreapp.cs diff --git a/src/Servers/IIS/IIS/samples/NativeIISSample/NativeIISSample.csproj b/src/Servers/IIS/IIS/samples/NativeIISSample/NativeIISSample.csproj index 7bc7433b75..fa97a75dd5 100644 --- a/src/Servers/IIS/IIS/samples/NativeIISSample/NativeIISSample.csproj +++ b/src/Servers/IIS/IIS/samples/NativeIISSample/NativeIISSample.csproj @@ -3,7 +3,7 @@ - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) true 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 c4a57c8afd..16232f469b 100644 --- a/src/Servers/IIS/IIS/src/Microsoft.AspNetCore.Server.IIS.csproj +++ b/src/Servers/IIS/IIS/src/Microsoft.AspNetCore.Server.IIS.csproj @@ -1,7 +1,7 @@ - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) true Microsoft.AspNetCore.Server.IIS Provides support for hosting ASP.NET Core in IIS using the AspNetCoreModule. @@ -9,7 +9,7 @@ true aspnetcore;iis true - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) diff --git a/src/Servers/IIS/IIS/test/Common.FunctionalTests/BasicAuthTests.cs b/src/Servers/IIS/IIS/test/Common.FunctionalTests/BasicAuthTests.cs index bbef662784..36520369a6 100644 --- a/src/Servers/IIS/IIS/test/Common.FunctionalTests/BasicAuthTests.cs +++ b/src/Servers/IIS/IIS/test/Common.FunctionalTests/BasicAuthTests.cs @@ -23,7 +23,7 @@ namespace Microsoft.AspNetCore.Server.IIS.FunctionalTests public static TestMatrix TestVariants => TestMatrix.ForServers(DeployerSelector.ServerType) - .WithTfms(Tfm.NetCoreApp30) + .WithTfms(Tfm.NetCoreApp50) .WithApplicationTypes(ApplicationType.Portable) .WithAllHostingModels(); diff --git a/src/Servers/IIS/IIS/test/Common.FunctionalTests/ClientCertificateTests.cs b/src/Servers/IIS/IIS/test/Common.FunctionalTests/ClientCertificateTests.cs index e02a459695..6d39a56921 100644 --- a/src/Servers/IIS/IIS/test/Common.FunctionalTests/ClientCertificateTests.cs +++ b/src/Servers/IIS/IIS/test/Common.FunctionalTests/ClientCertificateTests.cs @@ -29,7 +29,7 @@ namespace Microsoft.AspNetCore.Server.IIS.FunctionalTests public static TestMatrix TestVariants => TestMatrix.ForServers(DeployerSelector.ServerType) - .WithTfms(Tfm.NetCoreApp30) + .WithTfms(Tfm.NetCoreApp50) .WithAllApplicationTypes() .WithAllHostingModels(); diff --git a/src/Servers/IIS/IIS/test/Common.FunctionalTests/CommonStartupTests.cs b/src/Servers/IIS/IIS/test/Common.FunctionalTests/CommonStartupTests.cs index e437782eef..38f4dae818 100644 --- a/src/Servers/IIS/IIS/test/Common.FunctionalTests/CommonStartupTests.cs +++ b/src/Servers/IIS/IIS/test/Common.FunctionalTests/CommonStartupTests.cs @@ -19,7 +19,7 @@ namespace Microsoft.AspNetCore.Server.IIS.FunctionalTests public static TestMatrix TestVariants => TestMatrix.ForServers(DeployerSelector.ServerType) - .WithTfms(Tfm.NetCoreApp30) + .WithTfms(Tfm.NetCoreApp50) .WithAllApplicationTypes() .WithAllHostingModels(); diff --git a/src/Servers/IIS/IIS/test/Common.FunctionalTests/HttpsTests.cs b/src/Servers/IIS/IIS/test/Common.FunctionalTests/HttpsTests.cs index f0000fb681..8e3251570b 100644 --- a/src/Servers/IIS/IIS/test/Common.FunctionalTests/HttpsTests.cs +++ b/src/Servers/IIS/IIS/test/Common.FunctionalTests/HttpsTests.cs @@ -25,7 +25,7 @@ namespace Microsoft.AspNetCore.Server.IIS.FunctionalTests public static TestMatrix TestVariants => TestMatrix.ForServers(DeployerSelector.ServerType) - .WithTfms(Tfm.NetCoreApp30) + .WithTfms(Tfm.NetCoreApp50) .WithAllApplicationTypes() .WithAllHostingModels(); diff --git a/src/Servers/IIS/IIS/test/Common.FunctionalTests/Inprocess/StartupTests.cs b/src/Servers/IIS/IIS/test/Common.FunctionalTests/Inprocess/StartupTests.cs index 25a752fa80..d3aecfc29c 100644 --- a/src/Servers/IIS/IIS/test/Common.FunctionalTests/Inprocess/StartupTests.cs +++ b/src/Servers/IIS/IIS/test/Common.FunctionalTests/Inprocess/StartupTests.cs @@ -172,7 +172,7 @@ namespace Microsoft.AspNetCore.Server.IIS.FunctionalTests.InProcess public static TestMatrix TestVariants => TestMatrix.ForServers(DeployerSelector.ServerType) - .WithTfms(Tfm.NetCoreApp30) + .WithTfms(Tfm.NetCoreApp50) .WithAllApplicationTypes() .WithAncmV2InProcess(); diff --git a/src/Servers/IIS/IIS/test/Common.FunctionalTests/LogFileTests.cs b/src/Servers/IIS/IIS/test/Common.FunctionalTests/LogFileTests.cs index 690dfb328d..ffde811027 100644 --- a/src/Servers/IIS/IIS/test/Common.FunctionalTests/LogFileTests.cs +++ b/src/Servers/IIS/IIS/test/Common.FunctionalTests/LogFileTests.cs @@ -21,7 +21,7 @@ namespace Microsoft.AspNetCore.Server.IIS.FunctionalTests public static TestMatrix TestVariants => TestMatrix.ForServers(DeployerSelector.ServerType) - .WithTfms(Tfm.NetCoreApp30) + .WithTfms(Tfm.NetCoreApp50) .WithAllApplicationTypes() .WithAllHostingModels(); diff --git a/src/Servers/IIS/IIS/test/Common.FunctionalTests/OutOfProcess/AspNetCorePortTests.cs b/src/Servers/IIS/IIS/test/Common.FunctionalTests/OutOfProcess/AspNetCorePortTests.cs index 30e0fb2e27..df160cb44c 100644 --- a/src/Servers/IIS/IIS/test/Common.FunctionalTests/OutOfProcess/AspNetCorePortTests.cs +++ b/src/Servers/IIS/IIS/test/Common.FunctionalTests/OutOfProcess/AspNetCorePortTests.cs @@ -29,7 +29,7 @@ namespace Microsoft.AspNetCore.Server.IIS.FunctionalTests.OutOfProcess public static TestMatrix TestVariants => TestMatrix.ForServers(DeployerSelector.ServerType) - .WithTfms(Tfm.NetCoreApp30) + .WithTfms(Tfm.NetCoreApp50) .WithApplicationTypes(ApplicationType.Portable); public static IEnumerable InvalidTestVariants diff --git a/src/Servers/IIS/IIS/test/Common.FunctionalTests/OutOfProcess/HelloWorldTest.cs b/src/Servers/IIS/IIS/test/Common.FunctionalTests/OutOfProcess/HelloWorldTest.cs index a454403f64..2054011422 100644 --- a/src/Servers/IIS/IIS/test/Common.FunctionalTests/OutOfProcess/HelloWorldTest.cs +++ b/src/Servers/IIS/IIS/test/Common.FunctionalTests/OutOfProcess/HelloWorldTest.cs @@ -23,7 +23,7 @@ namespace Microsoft.AspNetCore.Server.IIS.FunctionalTests.OutOfProcess public static TestMatrix TestVariants => TestMatrix.ForServers(DeployerSelector.ServerType) - .WithTfms(Tfm.NetCoreApp30) + .WithTfms(Tfm.NetCoreApp50) .WithAllApplicationTypes(); [ConditionalTheory] diff --git a/src/Servers/IIS/IIS/test/Common.FunctionalTests/PublishedSitesFixture.cs b/src/Servers/IIS/IIS/test/Common.FunctionalTests/PublishedSitesFixture.cs index 2e03292ca4..70a7606e31 100644 --- a/src/Servers/IIS/IIS/test/Common.FunctionalTests/PublishedSitesFixture.cs +++ b/src/Servers/IIS/IIS/test/Common.FunctionalTests/PublishedSitesFixture.cs @@ -48,7 +48,7 @@ namespace Microsoft.AspNetCore.Server.IIS.FunctionalTests RuntimeFlavor = RuntimeFlavor.CoreClr, RuntimeArchitecture = RuntimeArchitecture.x64, HostingModel = hostingModel, - TargetFramework = Tfm.NetCoreApp30 + TargetFramework = Tfm.NetCoreApp50 }); } diff --git a/src/Servers/IIS/IIS/test/Common.FunctionalTests/Utilities/IISTestSiteFixture.cs b/src/Servers/IIS/IIS/test/Common.FunctionalTests/Utilities/IISTestSiteFixture.cs index b4fe5ee552..29d6f9c80c 100644 --- a/src/Servers/IIS/IIS/test/Common.FunctionalTests/Utilities/IISTestSiteFixture.cs +++ b/src/Servers/IIS/IIS/test/Common.FunctionalTests/Utilities/IISTestSiteFixture.cs @@ -85,7 +85,7 @@ namespace Microsoft.AspNetCore.Server.IIS.FunctionalTests { RuntimeArchitecture = RuntimeArchitecture.x64, RuntimeFlavor = RuntimeFlavor.CoreClr, - TargetFramework = Tfm.NetCoreApp30, + TargetFramework = Tfm.NetCoreApp50, HostingModel = HostingModel.InProcess, PublishApplicationBeforeDeployment = true, ApplicationPublisher = new PublishedApplicationPublisher(Helpers.GetInProcessTestSitesName()), diff --git a/src/Servers/IIS/IIS/test/Common.FunctionalTests/WindowsAuthTests.cs b/src/Servers/IIS/IIS/test/Common.FunctionalTests/WindowsAuthTests.cs index 60920bc036..e22f96dadc 100644 --- a/src/Servers/IIS/IIS/test/Common.FunctionalTests/WindowsAuthTests.cs +++ b/src/Servers/IIS/IIS/test/Common.FunctionalTests/WindowsAuthTests.cs @@ -21,7 +21,7 @@ namespace Microsoft.AspNetCore.Server.IIS.FunctionalTests public static TestMatrix TestVariants => TestMatrix.ForServers(DeployerSelector.ServerType) - .WithTfms(Tfm.NetCoreApp30) + .WithTfms(Tfm.NetCoreApp50) .WithApplicationTypes(ApplicationType.Portable) .WithAllHostingModels(); 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 d7d6ba4fc5..a7858c63b2 100644 --- a/src/Servers/IIS/IIS/test/IIS.FunctionalTests/IIS.FunctionalTests.csproj +++ b/src/Servers/IIS/IIS/test/IIS.FunctionalTests/IIS.FunctionalTests.csproj @@ -2,7 +2,7 @@ - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) IIS.FunctionalTests True true 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 8720dcd37c..9a74ecd31d 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 @@ -1,7 +1,7 @@  - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) IISNewHandler.FunctionalTests True true 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 67b66fdea0..03adce1d09 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 @@ -1,7 +1,7 @@  - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) IISNewShim.FunctionalTests True true 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 cb9fc52dc1..dda87b811a 100644 --- a/src/Servers/IIS/IIS/test/IIS.Tests/IIS.Tests.csproj +++ b/src/Servers/IIS/IIS/test/IIS.Tests/IIS.Tests.csproj @@ -3,7 +3,7 @@ - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) true 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 77d557ad87..23a5ecdf71 100644 --- a/src/Servers/IIS/IIS/test/IISExpress.FunctionalTests/IISExpress.FunctionalTests.csproj +++ b/src/Servers/IIS/IIS/test/IISExpress.FunctionalTests/IISExpress.FunctionalTests.csproj @@ -3,7 +3,7 @@ - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) True IISExpress.FunctionalTests true diff --git a/src/Servers/IIS/IIS/test/IISExpress.FunctionalTests/OutOfProcess/NtlmAuthentationTest.cs b/src/Servers/IIS/IIS/test/IISExpress.FunctionalTests/OutOfProcess/NtlmAuthentationTest.cs index 271bb18033..c63c777c80 100644 --- a/src/Servers/IIS/IIS/test/IISExpress.FunctionalTests/OutOfProcess/NtlmAuthentationTest.cs +++ b/src/Servers/IIS/IIS/test/IISExpress.FunctionalTests/OutOfProcess/NtlmAuthentationTest.cs @@ -27,7 +27,7 @@ namespace Microsoft.AspNetCore.Server.IIS.FunctionalTests public static TestMatrix TestVariants => TestMatrix.ForServers(DeployerSelector.ServerType) - .WithTfms(Tfm.NetCoreApp30); + .WithTfms(Tfm.NetCoreApp50); [ConditionalTheory] [RequiresIIS(IISCapability.WindowsAuthentication)] diff --git a/src/Servers/IIS/IIS/test/testassets/IIS.Common.TestLib/IIS.Common.TestLib.csproj b/src/Servers/IIS/IIS/test/testassets/IIS.Common.TestLib/IIS.Common.TestLib.csproj index 593ef0fbed..ced51607d8 100644 --- a/src/Servers/IIS/IIS/test/testassets/IIS.Common.TestLib/IIS.Common.TestLib.csproj +++ b/src/Servers/IIS/IIS/test/testassets/IIS.Common.TestLib/IIS.Common.TestLib.csproj @@ -1,7 +1,7 @@ - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) diff --git a/src/Servers/IIS/IIS/test/testassets/InProcessNewShimWebSite/InProcessNewShimWebSite.csproj b/src/Servers/IIS/IIS/test/testassets/InProcessNewShimWebSite/InProcessNewShimWebSite.csproj index a27cd396a8..24d13908b3 100644 --- a/src/Servers/IIS/IIS/test/testassets/InProcessNewShimWebSite/InProcessNewShimWebSite.csproj +++ b/src/Servers/IIS/IIS/test/testassets/InProcessNewShimWebSite/InProcessNewShimWebSite.csproj @@ -3,14 +3,14 @@ - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) InProcessWebSite InProcessNewShimWebSite FORWARDCOMPAT - + diff --git a/src/Servers/IIS/IIS/test/testassets/InProcessWebSite/InProcessWebSite.csproj b/src/Servers/IIS/IIS/test/testassets/InProcessWebSite/InProcessWebSite.csproj index 8c80a84b62..16e8d28d90 100644 --- a/src/Servers/IIS/IIS/test/testassets/InProcessWebSite/InProcessWebSite.csproj +++ b/src/Servers/IIS/IIS/test/testassets/InProcessWebSite/InProcessWebSite.csproj @@ -3,12 +3,12 @@ - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) true - + diff --git a/src/Servers/IIS/IIS/test/testassets/TestTasks/TestTasks.csproj b/src/Servers/IIS/IIS/test/testassets/TestTasks/TestTasks.csproj index 6d17b83b83..3a1adb6341 100644 --- a/src/Servers/IIS/IIS/test/testassets/TestTasks/TestTasks.csproj +++ b/src/Servers/IIS/IIS/test/testassets/TestTasks/TestTasks.csproj @@ -2,7 +2,7 @@ Exe - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) win-x64;linux-x64;osx-x64 diff --git a/src/Servers/IIS/IISIntegration/ref/Microsoft.AspNetCore.Server.IISIntegration.csproj b/src/Servers/IIS/IISIntegration/ref/Microsoft.AspNetCore.Server.IISIntegration.csproj index e5054cf688..372a927923 100644 --- a/src/Servers/IIS/IISIntegration/ref/Microsoft.AspNetCore.Server.IISIntegration.csproj +++ b/src/Servers/IIS/IISIntegration/ref/Microsoft.AspNetCore.Server.IISIntegration.csproj @@ -1,10 +1,10 @@ - netcoreapp3.0 + netcoreapp5.0 - - + + diff --git a/src/Servers/IIS/IISIntegration/ref/Microsoft.AspNetCore.Server.IISIntegration.netcoreapp3.0.cs b/src/Servers/IIS/IISIntegration/ref/Microsoft.AspNetCore.Server.IISIntegration.netcoreapp.cs similarity index 100% rename from src/Servers/IIS/IISIntegration/ref/Microsoft.AspNetCore.Server.IISIntegration.netcoreapp3.0.cs rename to src/Servers/IIS/IISIntegration/ref/Microsoft.AspNetCore.Server.IISIntegration.netcoreapp.cs diff --git a/src/Servers/IIS/IISIntegration/samples/IISSample/IISSample.csproj b/src/Servers/IIS/IISIntegration/samples/IISSample/IISSample.csproj index d81acf6d7e..44323fdee6 100644 --- a/src/Servers/IIS/IISIntegration/samples/IISSample/IISSample.csproj +++ b/src/Servers/IIS/IISIntegration/samples/IISSample/IISSample.csproj @@ -1,7 +1,7 @@  - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) 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 441768e93c..f900f823e9 100644 --- a/src/Servers/IIS/IISIntegration/src/Microsoft.AspNetCore.Server.IISIntegration.csproj +++ b/src/Servers/IIS/IISIntegration/src/Microsoft.AspNetCore.Server.IISIntegration.csproj @@ -2,7 +2,7 @@ ASP.NET Core components for working with the IIS AspNetCoreModule. - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) true $(NoWarn);CS1591 true 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 38b1c6fecb..6db521fff1 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 @@ -1,7 +1,7 @@ - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) diff --git a/src/Servers/IIS/IntegrationTesting.IIS/src/IISExpressDeployer.cs b/src/Servers/IIS/IntegrationTesting.IIS/src/IISExpressDeployer.cs index acac067a25..288c11a278 100644 --- a/src/Servers/IIS/IntegrationTesting.IIS/src/IISExpressDeployer.cs +++ b/src/Servers/IIS/IntegrationTesting.IIS/src/IISExpressDeployer.cs @@ -51,7 +51,7 @@ namespace Microsoft.AspNetCore.Server.IntegrationTesting.IIS // Start timer StartTimer(); - // For an unpublished application the dllroot points pre-built dlls like projectdir/bin/debug/netcoreapp3.0/ + // For an unpublished application the dllroot points pre-built dlls like projectdir/bin/debug/netcoreapp5.0/ // and contentRoot points to the project directory so you get things like static assets. // For a published app both point to the publish directory. var dllRoot = CheckIfPublishIsRequired(); diff --git a/src/Servers/IIS/IntegrationTesting.IIS/src/Microsoft.AspNetCore.Server.IntegrationTesting.IIS.csproj b/src/Servers/IIS/IntegrationTesting.IIS/src/Microsoft.AspNetCore.Server.IntegrationTesting.IIS.csproj index 151796a365..d012b5212a 100644 --- a/src/Servers/IIS/IntegrationTesting.IIS/src/Microsoft.AspNetCore.Server.IntegrationTesting.IIS.csproj +++ b/src/Servers/IIS/IntegrationTesting.IIS/src/Microsoft.AspNetCore.Server.IntegrationTesting.IIS.csproj @@ -1,7 +1,7 @@  - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) Microsoft.AspNetCore.Server.IntegrationTesting.IIS Provides support for integration testing using IIS based servers. $(NoWarn);CS1591 diff --git a/src/Servers/Kestrel/Core/ref/Microsoft.AspNetCore.Server.Kestrel.Core.csproj b/src/Servers/Kestrel/Core/ref/Microsoft.AspNetCore.Server.Kestrel.Core.csproj index 367e32ffec..45109ddb79 100644 --- a/src/Servers/Kestrel/Core/ref/Microsoft.AspNetCore.Server.Kestrel.Core.csproj +++ b/src/Servers/Kestrel/Core/ref/Microsoft.AspNetCore.Server.Kestrel.Core.csproj @@ -1,10 +1,10 @@ - netcoreapp3.0 + netcoreapp5.0 - - + + diff --git a/src/Servers/Kestrel/Core/ref/Microsoft.AspNetCore.Server.Kestrel.Core.netcoreapp3.0.cs b/src/Servers/Kestrel/Core/ref/Microsoft.AspNetCore.Server.Kestrel.Core.netcoreapp.cs similarity index 100% rename from src/Servers/Kestrel/Core/ref/Microsoft.AspNetCore.Server.Kestrel.Core.netcoreapp3.0.cs rename to src/Servers/Kestrel/Core/ref/Microsoft.AspNetCore.Server.Kestrel.Core.netcoreapp.cs diff --git a/src/Servers/Kestrel/Core/src/BadHttpRequestException.cs b/src/Servers/Kestrel/Core/src/BadHttpRequestException.cs index 929a408778..16f7ab0fce 100644 --- a/src/Servers/Kestrel/Core/src/BadHttpRequestException.cs +++ b/src/Servers/Kestrel/Core/src/BadHttpRequestException.cs @@ -139,6 +139,9 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Core BadHttpRequestException ex; switch (reason) { + case RequestRejectionReason.TlsOverHttpError: + ex = new BadHttpRequestException(CoreStrings.HttpParserTlsOverHttpError, StatusCodes.Status400BadRequest, reason); + break; case RequestRejectionReason.InvalidRequestLine: ex = new BadHttpRequestException(CoreStrings.FormatBadRequest_InvalidRequestLine_Detail(detail), StatusCodes.Status400BadRequest, reason); break; diff --git a/src/Servers/Kestrel/Core/src/CoreStrings.resx b/src/Servers/Kestrel/Core/src/CoreStrings.resx index 0f49dedc81..20af4f4a9c 100644 --- a/src/Servers/Kestrel/Core/src/CoreStrings.resx +++ b/src/Servers/Kestrel/Core/src/CoreStrings.resx @@ -617,4 +617,7 @@ For more information on configuring HTTPS see https://go.microsoft.com/fwlink/?l A new stream was refused because this connection has too many streams that haven't finished processing. This may happen if many streams are aborted but not yet cleaned up. - + + Detected a TLS handshake to an endpoint that does not have TLS enabled. + + \ No newline at end of file diff --git a/src/Servers/Kestrel/Core/src/Internal/Http/HttpParser.cs b/src/Servers/Kestrel/Core/src/Internal/Http/HttpParser.cs index 2fe5dfdb36..ce63ec989f 100644 --- a/src/Servers/Kestrel/Core/src/Internal/Http/HttpParser.cs +++ b/src/Servers/Kestrel/Core/src/Internal/Http/HttpParser.cs @@ -31,6 +31,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http private const byte ByteTab = (byte)'\t'; private const byte ByteQuestionMark = (byte)'?'; private const byte BytePercentage = (byte)'%'; + private const int MinTlsRequestSize = 1; // We need at least 1 byte to check for a proper TLS request line public unsafe bool ParseRequestLine(TRequestHandler handler, in ReadOnlySequence buffer, out SequencePosition consumed, out SequencePosition examined) { @@ -415,9 +416,29 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http return new Span(data, methodLength); } + private unsafe bool IsTlsHandshake(byte* data, int length) + { + const byte SslRecordTypeHandshake = (byte)0x16; + + // Make sure we can check at least for the existence of a TLS handshake - we check the first byte + // See https://serializethoughts.com/2014/07/27/dissecting-tls-client-hello-message/ + + return (length >= MinTlsRequestSize && data[0] == SslRecordTypeHandshake); + } + [StackTraceHidden] private unsafe void RejectRequestLine(byte* requestLine, int length) - => throw GetInvalidRequestException(RequestRejectionReason.InvalidRequestLine, requestLine, length); + { + // Check for incoming TLS handshake over HTTP + if (IsTlsHandshake(requestLine, length)) + { + throw GetInvalidRequestException(RequestRejectionReason.TlsOverHttpError, requestLine, length); + } + else + { + throw GetInvalidRequestException(RequestRejectionReason.InvalidRequestLine, requestLine, length); + } + } [StackTraceHidden] private unsafe void RejectRequestHeader(byte* headerLine, int length) diff --git a/src/Servers/Kestrel/Core/src/Internal/Http/RequestRejectionReason.cs b/src/Servers/Kestrel/Core/src/Internal/Http/RequestRejectionReason.cs index fce21b6210..23dc6c67c6 100644 --- a/src/Servers/Kestrel/Core/src/Internal/Http/RequestRejectionReason.cs +++ b/src/Servers/Kestrel/Core/src/Internal/Http/RequestRejectionReason.cs @@ -1,10 +1,11 @@ -// Copyright (c) .NET Foundation. All rights reserved. +// Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. namespace Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http { internal enum RequestRejectionReason { + TlsOverHttpError, UnrecognizedHTTPVersion, InvalidRequestLine, InvalidRequestHeader, 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 8161334613..4cb67c9a97 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 @@ -2,7 +2,7 @@ Core components of ASP.NET Core Kestrel cross-platform web server. - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) true true aspnetcore;kestrel diff --git a/src/Servers/Kestrel/Core/test/HttpParserTests.cs b/src/Servers/Kestrel/Core/test/HttpParserTests.cs index 7ce8587743..82d69d8b4d 100644 --- a/src/Servers/Kestrel/Core/test/HttpParserTests.cs +++ b/src/Servers/Kestrel/Core/test/HttpParserTests.cs @@ -1,4 +1,4 @@ -// Copyright (c) .NET Foundation. All rights reserved. +// Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System; @@ -394,6 +394,23 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Core.Tests Assert.Equal(buffer.End, examined); } + [Fact] + public void ParseRequestLineTlsOverHttp() + { + var parser = CreateParser(_nullTrace); + var buffer = ReadOnlySequenceFactory.CreateSegments(new byte[] { 0x16, 0x03, 0x01, 0x02, 0x00, 0x01, 0x00, 0xfc, 0x03, 0x03, 0x03, 0xca, 0xe0, 0xfd, 0x0a }); + + var requestHandler = new RequestHandler(); + + var badHttpRequestException = Assert.Throws(() => + { + parser.ParseRequestLine(requestHandler, buffer, out var consumed, out var examined); + }); + + Assert.Equal(badHttpRequestException.StatusCode, StatusCodes.Status400BadRequest); + Assert.Equal(RequestRejectionReason.TlsOverHttpError, badHttpRequestException.Reason); + } + [Fact] public void ParseHeadersWithGratuitouslySplitBuffers() { 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 52f05d352c..969bdcd0e3 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 @@ -1,7 +1,7 @@ - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) true Kestrel.Core.Tests diff --git a/src/Servers/Kestrel/Kestrel/ref/Microsoft.AspNetCore.Server.Kestrel.csproj b/src/Servers/Kestrel/Kestrel/ref/Microsoft.AspNetCore.Server.Kestrel.csproj index 4773f25252..c0fd870f11 100644 --- a/src/Servers/Kestrel/Kestrel/ref/Microsoft.AspNetCore.Server.Kestrel.csproj +++ b/src/Servers/Kestrel/Kestrel/ref/Microsoft.AspNetCore.Server.Kestrel.csproj @@ -1,10 +1,10 @@ - netcoreapp3.0 + netcoreapp5.0 - - + + diff --git a/src/Servers/Kestrel/Kestrel/ref/Microsoft.AspNetCore.Server.Kestrel.netcoreapp3.0.cs b/src/Servers/Kestrel/Kestrel/ref/Microsoft.AspNetCore.Server.Kestrel.netcoreapp.cs similarity index 100% rename from src/Servers/Kestrel/Kestrel/ref/Microsoft.AspNetCore.Server.Kestrel.netcoreapp3.0.cs rename to src/Servers/Kestrel/Kestrel/ref/Microsoft.AspNetCore.Server.Kestrel.netcoreapp.cs 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 c7a721311c..f15a71dfcc 100644 --- a/src/Servers/Kestrel/Kestrel/src/Microsoft.AspNetCore.Server.Kestrel.csproj +++ b/src/Servers/Kestrel/Kestrel/src/Microsoft.AspNetCore.Server.Kestrel.csproj @@ -2,7 +2,7 @@ ASP.NET Core Kestrel cross-platform web server. - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) true true aspnetcore;kestrel 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 2a9f55cd6f..cade793bc2 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 @@ -1,7 +1,7 @@ - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) diff --git a/src/Servers/Kestrel/Transport.Libuv/ref/Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.csproj b/src/Servers/Kestrel/Transport.Libuv/ref/Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.csproj index ad0383f2be..e12c2ffe68 100644 --- a/src/Servers/Kestrel/Transport.Libuv/ref/Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.csproj +++ b/src/Servers/Kestrel/Transport.Libuv/ref/Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.csproj @@ -1,10 +1,10 @@ - netcoreapp3.0 + netcoreapp5.0 - - + + diff --git a/src/Servers/Kestrel/Transport.Libuv/ref/Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.netcoreapp3.0.cs b/src/Servers/Kestrel/Transport.Libuv/ref/Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.netcoreapp.cs similarity index 100% rename from src/Servers/Kestrel/Transport.Libuv/ref/Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.netcoreapp3.0.cs rename to src/Servers/Kestrel/Transport.Libuv/ref/Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.netcoreapp.cs diff --git a/src/Servers/Kestrel/Transport.Libuv/src/Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.csproj b/src/Servers/Kestrel/Transport.Libuv/src/Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.csproj index 01e94867f2..3fc89b9e9f 100644 --- a/src/Servers/Kestrel/Transport.Libuv/src/Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.csproj +++ b/src/Servers/Kestrel/Transport.Libuv/src/Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.csproj @@ -2,7 +2,7 @@ Libuv transport for the ASP.NET Core Kestrel cross-platform web server. - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) true aspnetcore;kestrel true diff --git a/src/Servers/Kestrel/Transport.Libuv/test/Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Tests.csproj b/src/Servers/Kestrel/Transport.Libuv/test/Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Tests.csproj index bb263e89a3..d84804c6a2 100644 --- a/src/Servers/Kestrel/Transport.Libuv/test/Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Tests.csproj +++ b/src/Servers/Kestrel/Transport.Libuv/test/Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Tests.csproj @@ -1,7 +1,7 @@  - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) true true diff --git a/src/Servers/Kestrel/Transport.Sockets/ref/Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.csproj b/src/Servers/Kestrel/Transport.Sockets/ref/Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.csproj index d5f1350fec..6247c3ba83 100644 --- a/src/Servers/Kestrel/Transport.Sockets/ref/Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.csproj +++ b/src/Servers/Kestrel/Transport.Sockets/ref/Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.csproj @@ -1,10 +1,10 @@ - netcoreapp3.0 + netcoreapp5.0 - - + + diff --git a/src/Servers/Kestrel/Transport.Sockets/ref/Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.netcoreapp3.0.cs b/src/Servers/Kestrel/Transport.Sockets/ref/Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.netcoreapp.cs similarity index 100% rename from src/Servers/Kestrel/Transport.Sockets/ref/Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.netcoreapp3.0.cs rename to src/Servers/Kestrel/Transport.Sockets/ref/Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.netcoreapp.cs diff --git a/src/Servers/Kestrel/Transport.Sockets/src/Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.csproj b/src/Servers/Kestrel/Transport.Sockets/src/Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.csproj index 278396fc1c..24e3b52e02 100644 --- a/src/Servers/Kestrel/Transport.Sockets/src/Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.csproj +++ b/src/Servers/Kestrel/Transport.Sockets/src/Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.csproj @@ -2,7 +2,7 @@ Managed socket transport for the ASP.NET Core Kestrel cross-platform web server. - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) true true aspnetcore;kestrel diff --git a/src/Servers/Kestrel/Transport.Sockets/src/SocketConnectionListener.cs b/src/Servers/Kestrel/Transport.Sockets/src/SocketConnectionListener.cs index ccdb774674..600d674d98 100644 --- a/src/Servers/Kestrel/Transport.Sockets/src/SocketConnectionListener.cs +++ b/src/Servers/Kestrel/Transport.Sockets/src/SocketConnectionListener.cs @@ -62,6 +62,13 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets throw new InvalidOperationException(SocketsStrings.TransportAlreadyBound); } + // Check if EndPoint is a FileHandleEndpoint before attempting to access EndPoint.AddressFamily + // since that will throw an NotImplementedException. + if (EndPoint is FileHandleEndPoint) + { + throw new NotSupportedException(SocketsStrings.FileHandleEndPointNotSupported); + } + Socket listenSocket; // Unix domain sockets are unspecified diff --git a/src/Servers/Kestrel/Transport.Sockets/src/SocketsStrings.resx b/src/Servers/Kestrel/Transport.Sockets/src/SocketsStrings.resx index 52b26c66bc..5f1475a1cf 100644 --- a/src/Servers/Kestrel/Transport.Sockets/src/SocketsStrings.resx +++ b/src/Servers/Kestrel/Transport.Sockets/src/SocketsStrings.resx @@ -117,10 +117,13 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + The Socket transport does not support binding to file handles. Consider using the libuv transport instead. + Only ListenType.IPEndPoint is supported by the Socket Transport. https://go.microsoft.com/fwlink/?linkid=874850 Transport is already bound. - \ No newline at end of file + diff --git a/src/Servers/Kestrel/perf/Kestrel.Performance/Microsoft.AspNetCore.Server.Kestrel.Performance.csproj b/src/Servers/Kestrel/perf/Kestrel.Performance/Microsoft.AspNetCore.Server.Kestrel.Performance.csproj index 21200ecc81..61d180a73c 100644 --- a/src/Servers/Kestrel/perf/Kestrel.Performance/Microsoft.AspNetCore.Server.Kestrel.Performance.csproj +++ b/src/Servers/Kestrel/perf/Kestrel.Performance/Microsoft.AspNetCore.Server.Kestrel.Performance.csproj @@ -1,7 +1,7 @@ - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) Exe true true diff --git a/src/Servers/Kestrel/perf/PlatformBenchmarks/BenchmarkApplication.HttpConnection.cs b/src/Servers/Kestrel/perf/PlatformBenchmarks/BenchmarkApplication.HttpConnection.cs index 556e83066c..969272d548 100644 --- a/src/Servers/Kestrel/perf/PlatformBenchmarks/BenchmarkApplication.HttpConnection.cs +++ b/src/Servers/Kestrel/perf/PlatformBenchmarks/BenchmarkApplication.HttpConnection.cs @@ -191,8 +191,8 @@ namespace PlatformBenchmarks public void OnHeadersComplete() => RequestHandler.OnHeadersComplete(); -#if !NETCOREAPP3_0 -#error This is a .NET Core 3.0 application and needs to be compiled for netcoreapp3.0 +#if !NETCOREAPP +#error This is a .NET Core 3.0 application and needs to be compiled for $(DefaultNetCoreTargetFramework) #endif } } diff --git a/src/Servers/Kestrel/perf/PlatformBenchmarks/PlatformBenchmarks.csproj b/src/Servers/Kestrel/perf/PlatformBenchmarks/PlatformBenchmarks.csproj index 4a9e6c3750..5ac7ed26d2 100644 --- a/src/Servers/Kestrel/perf/PlatformBenchmarks/PlatformBenchmarks.csproj +++ b/src/Servers/Kestrel/perf/PlatformBenchmarks/PlatformBenchmarks.csproj @@ -1,7 +1,7 @@ - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) $(BenchmarksTargetFramework) Exe latest diff --git a/src/Servers/Kestrel/samples/Http2SampleApp/Http2SampleApp.csproj b/src/Servers/Kestrel/samples/Http2SampleApp/Http2SampleApp.csproj index 78b907bd80..f039c4208a 100644 --- a/src/Servers/Kestrel/samples/Http2SampleApp/Http2SampleApp.csproj +++ b/src/Servers/Kestrel/samples/Http2SampleApp/Http2SampleApp.csproj @@ -1,7 +1,7 @@  - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) false true false diff --git a/src/Servers/Kestrel/samples/LargeResponseApp/LargeResponseApp.csproj b/src/Servers/Kestrel/samples/LargeResponseApp/LargeResponseApp.csproj index 86fd68771b..d042d83830 100644 --- a/src/Servers/Kestrel/samples/LargeResponseApp/LargeResponseApp.csproj +++ b/src/Servers/Kestrel/samples/LargeResponseApp/LargeResponseApp.csproj @@ -1,7 +1,7 @@  - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) false true false diff --git a/src/Servers/Kestrel/samples/PlaintextApp/PlaintextApp.csproj b/src/Servers/Kestrel/samples/PlaintextApp/PlaintextApp.csproj index 8b48f958a9..4256e8df7c 100644 --- a/src/Servers/Kestrel/samples/PlaintextApp/PlaintextApp.csproj +++ b/src/Servers/Kestrel/samples/PlaintextApp/PlaintextApp.csproj @@ -1,7 +1,7 @@ - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) false true false diff --git a/src/Servers/Kestrel/samples/SampleApp/Kestrel.SampleApp.csproj b/src/Servers/Kestrel/samples/SampleApp/Kestrel.SampleApp.csproj index 10bf6d8d09..8670c5935b 100644 --- a/src/Servers/Kestrel/samples/SampleApp/Kestrel.SampleApp.csproj +++ b/src/Servers/Kestrel/samples/SampleApp/Kestrel.SampleApp.csproj @@ -1,7 +1,7 @@  - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) false true false diff --git a/src/Servers/Kestrel/samples/SystemdTestApp/SystemdTestApp.csproj b/src/Servers/Kestrel/samples/SystemdTestApp/SystemdTestApp.csproj index 114c9b5fed..5e87dbdb38 100644 --- a/src/Servers/Kestrel/samples/SystemdTestApp/SystemdTestApp.csproj +++ b/src/Servers/Kestrel/samples/SystemdTestApp/SystemdTestApp.csproj @@ -1,7 +1,7 @@  - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) false true false diff --git a/src/Servers/Kestrel/stress/HttpStress.csproj b/src/Servers/Kestrel/stress/HttpStress.csproj index 78400e8c3c..838c5287ec 100644 --- a/src/Servers/Kestrel/stress/HttpStress.csproj +++ b/src/Servers/Kestrel/stress/HttpStress.csproj @@ -1,7 +1,7 @@  - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) preview OutOfProcess true diff --git a/src/Servers/Kestrel/test/FunctionalTests/Http2/ShutdownTests.cs b/src/Servers/Kestrel/test/FunctionalTests/Http2/ShutdownTests.cs index 7ddb4deb26..47e3288be5 100644 --- a/src/Servers/Kestrel/test/FunctionalTests/Http2/ShutdownTests.cs +++ b/src/Servers/Kestrel/test/FunctionalTests/Http2/ShutdownTests.cs @@ -95,7 +95,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.FunctionalTests.Http2 await stopTask.DefaultTimeout(); } - Assert.Contains(TestApplicationErrorLogger.Messages, m => m.Message.Contains("Request finished in")); + Assert.Contains(TestApplicationErrorLogger.Messages, m => m.Message.Contains("Request finished ")); Assert.Contains(TestApplicationErrorLogger.Messages, m => m.Message.Contains("is closing.")); Assert.Contains(TestApplicationErrorLogger.Messages, m => m.Message.Contains("is closed. The last processed stream ID was 1.")); } diff --git a/src/Servers/Kestrel/test/InMemory.FunctionalTests/InMemory.FunctionalTests.csproj b/src/Servers/Kestrel/test/InMemory.FunctionalTests/InMemory.FunctionalTests.csproj index c00165c4d4..bab7248341 100644 --- a/src/Servers/Kestrel/test/InMemory.FunctionalTests/InMemory.FunctionalTests.csproj +++ b/src/Servers/Kestrel/test/InMemory.FunctionalTests/InMemory.FunctionalTests.csproj @@ -1,7 +1,7 @@ - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) true InMemory.FunctionalTests true diff --git a/src/Servers/Kestrel/test/Interop.FunctionalTests/Interop.FunctionalTests.csproj b/src/Servers/Kestrel/test/Interop.FunctionalTests/Interop.FunctionalTests.csproj index 31162c203e..3a1b3e7670 100644 --- a/src/Servers/Kestrel/test/Interop.FunctionalTests/Interop.FunctionalTests.csproj +++ b/src/Servers/Kestrel/test/Interop.FunctionalTests/Interop.FunctionalTests.csproj @@ -1,7 +1,7 @@  - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) true Interop.FunctionalTests diff --git a/src/Servers/Kestrel/test/Libuv.BindTests/Libuv.BindTests.csproj b/src/Servers/Kestrel/test/Libuv.BindTests/Libuv.BindTests.csproj index 9019aa904b..1dfd62a8a6 100644 --- a/src/Servers/Kestrel/test/Libuv.BindTests/Libuv.BindTests.csproj +++ b/src/Servers/Kestrel/test/Libuv.BindTests/Libuv.BindTests.csproj @@ -1,7 +1,7 @@  - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) true Libuv.BindTests diff --git a/src/Servers/Kestrel/test/Libuv.FunctionalTests/Libuv.FunctionalTests.csproj b/src/Servers/Kestrel/test/Libuv.FunctionalTests/Libuv.FunctionalTests.csproj index e0f40be150..d9ee70e3fc 100644 --- a/src/Servers/Kestrel/test/Libuv.FunctionalTests/Libuv.FunctionalTests.csproj +++ b/src/Servers/Kestrel/test/Libuv.FunctionalTests/Libuv.FunctionalTests.csproj @@ -1,7 +1,7 @@ - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) $(DefineConstants);MACOS $(DefineConstants);LIBUV true diff --git a/src/Servers/Kestrel/test/Sockets.BindTests/SocketTransportFactoryTests.cs b/src/Servers/Kestrel/test/Sockets.BindTests/SocketTransportFactoryTests.cs new file mode 100644 index 0000000000..2ff92f497f --- /dev/null +++ b/src/Servers/Kestrel/test/Sockets.BindTests/SocketTransportFactoryTests.cs @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. + +using System; +using System.Threading.Tasks; +using Microsoft.AspNetCore.Connections; +using Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets; +using Microsoft.Extensions.Logging; +using Microsoft.Extensions.Options; +using Moq; +using Xunit; + +namespace Sockets.BindTests +{ + public class SocketTransportFactoryTests + { + [Fact] + public async Task ThrowsNotSupportedExceptionWhenBindingToFileHandleEndPoint() + { + var socketTransportFactory = new SocketTransportFactory(Options.Create(new SocketTransportOptions()), Mock.Of()); + await Assert.ThrowsAsync(async () => await socketTransportFactory.BindAsync(new FileHandleEndPoint(0, FileHandleType.Auto))); + } + } +} + diff --git a/src/Servers/Kestrel/test/Sockets.BindTests/Sockets.BindTests.csproj b/src/Servers/Kestrel/test/Sockets.BindTests/Sockets.BindTests.csproj index cf9e6cfaef..3ad3eb297a 100644 --- a/src/Servers/Kestrel/test/Sockets.BindTests/Sockets.BindTests.csproj +++ b/src/Servers/Kestrel/test/Sockets.BindTests/Sockets.BindTests.csproj @@ -1,7 +1,7 @@  - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) true Sockets.BindTests diff --git a/src/Servers/Kestrel/test/Sockets.FunctionalTests/Sockets.FunctionalTests.csproj b/src/Servers/Kestrel/test/Sockets.FunctionalTests/Sockets.FunctionalTests.csproj index 98752a3776..4bc4f8fbdf 100644 --- a/src/Servers/Kestrel/test/Sockets.FunctionalTests/Sockets.FunctionalTests.csproj +++ b/src/Servers/Kestrel/test/Sockets.FunctionalTests/Sockets.FunctionalTests.csproj @@ -1,7 +1,7 @@ - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) $(DefineConstants);MACOS true Sockets.FunctionalTests diff --git a/src/Servers/Kestrel/tools/CodeGenerator/CodeGenerator.csproj b/src/Servers/Kestrel/tools/CodeGenerator/CodeGenerator.csproj index f7d150d7d8..1f18f71256 100644 --- a/src/Servers/Kestrel/tools/CodeGenerator/CodeGenerator.csproj +++ b/src/Servers/Kestrel/tools/CodeGenerator/CodeGenerator.csproj @@ -1,7 +1,7 @@  - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) Exe true true diff --git a/src/Servers/test/FunctionalTests/HelloWorldTest.cs b/src/Servers/test/FunctionalTests/HelloWorldTest.cs index 99a72dcba9..cf20b9d617 100644 --- a/src/Servers/test/FunctionalTests/HelloWorldTest.cs +++ b/src/Servers/test/FunctionalTests/HelloWorldTest.cs @@ -21,7 +21,7 @@ namespace ServerComparison.FunctionalTests public static TestMatrix TestVariants => TestMatrix.ForServers(ServerType.IISExpress, ServerType.Kestrel, ServerType.Nginx, ServerType.HttpSys) - .WithTfms(Tfm.NetCoreApp30) + .WithTfms(Tfm.NetCoreApp50) .WithApplicationTypes(ApplicationType.Portable) .WithAllHostingModels() .WithAllArchitectures(); diff --git a/src/Servers/test/FunctionalTests/NtlmAuthenticationTest.cs b/src/Servers/test/FunctionalTests/NtlmAuthenticationTest.cs index 297794e50b..75ef46207a 100644 --- a/src/Servers/test/FunctionalTests/NtlmAuthenticationTest.cs +++ b/src/Servers/test/FunctionalTests/NtlmAuthenticationTest.cs @@ -22,7 +22,7 @@ namespace ServerComparison.FunctionalTests public static TestMatrix TestVariants => TestMatrix.ForServers(ServerType.IISExpress, ServerType.HttpSys, ServerType.Kestrel) - .WithTfms(Tfm.NetCoreApp30) + .WithTfms(Tfm.NetCoreApp50) .WithAllHostingModels(); [ConditionalTheory] diff --git a/src/Servers/test/FunctionalTests/ResponseCompressionTests.cs b/src/Servers/test/FunctionalTests/ResponseCompressionTests.cs index c64218a6b2..e441343521 100644 --- a/src/Servers/test/FunctionalTests/ResponseCompressionTests.cs +++ b/src/Servers/test/FunctionalTests/ResponseCompressionTests.cs @@ -33,7 +33,7 @@ namespace ServerComparison.FunctionalTests public static TestMatrix NoCompressionTestVariants => TestMatrix.ForServers(ServerType.IISExpress, ServerType.Kestrel, ServerType.Nginx, ServerType.HttpSys) - .WithTfms(Tfm.NetCoreApp30) + .WithTfms(Tfm.NetCoreApp50) .WithAllHostingModels(); [ConditionalTheory] @@ -45,7 +45,7 @@ namespace ServerComparison.FunctionalTests public static TestMatrix HostCompressionTestVariants => TestMatrix.ForServers(ServerType.IISExpress, ServerType.Nginx) - .WithTfms(Tfm.NetCoreApp30) + .WithTfms(Tfm.NetCoreApp50) .WithAllHostingModels(); [ConditionalTheory] @@ -57,7 +57,7 @@ namespace ServerComparison.FunctionalTests public static TestMatrix AppCompressionTestVariants => TestMatrix.ForServers(ServerType.IISExpress, ServerType.Kestrel, ServerType.HttpSys) // No pass-through compression for nginx - .WithTfms(Tfm.NetCoreApp30) + .WithTfms(Tfm.NetCoreApp50) .WithAllHostingModels(); [ConditionalTheory] @@ -69,7 +69,7 @@ namespace ServerComparison.FunctionalTests public static TestMatrix HostAndAppCompressionTestVariants => TestMatrix.ForServers(ServerType.IISExpress, ServerType.Kestrel, ServerType.Nginx, ServerType.HttpSys) - .WithTfms(Tfm.NetCoreApp30) + .WithTfms(Tfm.NetCoreApp50) .WithAllHostingModels(); [ConditionalTheory] diff --git a/src/Servers/test/FunctionalTests/ResponseTests.cs b/src/Servers/test/FunctionalTests/ResponseTests.cs index 94748bcd9d..904ec52b7a 100644 --- a/src/Servers/test/FunctionalTests/ResponseTests.cs +++ b/src/Servers/test/FunctionalTests/ResponseTests.cs @@ -26,7 +26,7 @@ namespace ServerComparison.FunctionalTests public static TestMatrix TestVariants => TestMatrix.ForServers(/* ServerType.IISExpress, https://github.com/aspnet/AspNetCore/issues/6168, */ ServerType.Kestrel, ServerType.Nginx, ServerType.HttpSys) - .WithTfms(Tfm.NetCoreApp30) + .WithTfms(Tfm.NetCoreApp50) .WithAllHostingModels(); [ConditionalTheory] @@ -52,7 +52,7 @@ namespace ServerComparison.FunctionalTests public static TestMatrix SelfhostTestVariants => TestMatrix.ForServers(ServerType.Kestrel, ServerType.HttpSys) - .WithTfms(Tfm.NetCoreApp30); + .WithTfms(Tfm.NetCoreApp50); // Connection Close tests do not work through reverse proxies [ConditionalTheory] diff --git a/src/Servers/test/FunctionalTests/ServerComparison.FunctionalTests.csproj b/src/Servers/test/FunctionalTests/ServerComparison.FunctionalTests.csproj index 49e4b3a9a7..4dd2e88fd4 100644 --- a/src/Servers/test/FunctionalTests/ServerComparison.FunctionalTests.csproj +++ b/src/Servers/test/FunctionalTests/ServerComparison.FunctionalTests.csproj @@ -1,7 +1,7 @@  - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) false diff --git a/src/Servers/testassets/ServerComparison.TestSites/ServerComparison.TestSites.csproj b/src/Servers/testassets/ServerComparison.TestSites/ServerComparison.TestSites.csproj index eb8d5f9d98..22affe2f74 100644 --- a/src/Servers/testassets/ServerComparison.TestSites/ServerComparison.TestSites.csproj +++ b/src/Servers/testassets/ServerComparison.TestSites/ServerComparison.TestSites.csproj @@ -3,7 +3,7 @@ - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) win-x86;win-x64;linux-x64;osx-x64 true diff --git a/src/Shared/ErrorPage/GeneratePage.ps1 b/src/Shared/ErrorPage/GeneratePage.ps1 index 344b424fc2..94e6746169 100644 --- a/src/Shared/ErrorPage/GeneratePage.ps1 +++ b/src/Shared/ErrorPage/GeneratePage.ps1 @@ -2,7 +2,7 @@ param( [Parameter(Mandatory = $true)][string]$ToolingRepoPath ) -$ToolPath = Join-Path $ToolingRepoPath "artifacts\bin\RazorPageGenerator\Debug\netcoreapp3.0\dotnet-razorpagegenerator.exe" +$ToolPath = Join-Path $ToolingRepoPath "artifacts\bin\RazorPageGenerator\Debug\netcoreapp5.0\dotnet-razorpagegenerator.exe" if (!(Test-Path $ToolPath)) { throw "Unable to find razor page generator tool at $ToolPath" diff --git a/src/Shared/WebEncoders/WebEncoders.cs b/src/Shared/WebEncoders/WebEncoders.cs index 6ccec330c7..9287a5c56d 100644 --- a/src/Shared/WebEncoders/WebEncoders.cs +++ b/src/Shared/WebEncoders/WebEncoders.cs @@ -2,7 +2,7 @@ // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System; -#if NETCOREAPP3_0 +#if NETCOREAPP using System.Buffers; #endif using System.Diagnostics; @@ -223,7 +223,7 @@ namespace Microsoft.Extensions.Internal ValidateParameters(input.Length, nameof(input), offset, count); -#if NETCOREAPP3_0 +#if NETCOREAPP return Base64UrlEncode(input.AsSpan(offset, count)); #else // Special-case empty input @@ -287,7 +287,7 @@ namespace Microsoft.Extensions.Internal nameof(count)); } -#if NETCOREAPP3_0 +#if NETCOREAPP return Base64UrlEncode(input.AsSpan(offset, count), output.AsSpan(outputOffset)); #else // Special-case empty input. @@ -338,7 +338,7 @@ namespace Microsoft.Extensions.Internal return checked(numWholeOrPartialInputBlocks * 4); } -#if NETCOREAPP3_0 +#if NETCOREAPP /// /// Encodes using base64url encoding. /// 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 620aff13d7..83fe4babb7 100644 --- a/src/Shared/test/Shared.Tests/Microsoft.AspNetCore.Shared.Tests.csproj +++ b/src/Shared/test/Shared.Tests/Microsoft.AspNetCore.Shared.Tests.csproj @@ -1,7 +1,7 @@  - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) portable true diff --git a/src/SignalR/README.md b/src/SignalR/README.md index 084b5fbf71..80a69f98e7 100644 --- a/src/SignalR/README.md +++ b/src/SignalR/README.md @@ -7,7 +7,7 @@ You can watch an introductory presentation here - [ASP.NET Core SignalR: Build 2 ## Documentation -Documentation for ASP.NET Core SignalR can be found in the [Real-time Apps](https://docs.microsoft.com/en-us/aspnet/core/signalr/introduction?view=aspnetcore-2.1) section of the ASP.NET Core Documentation site. +Documentation for ASP.NET Core SignalR can be found in the [Real-time Apps](https://docs.microsoft.com/aspnet/core/signalr/introduction) section of the ASP.NET Core Documentation site. ## TypeScript Version diff --git a/src/SignalR/clients/csharp/Client.Core/ref/Microsoft.AspNetCore.SignalR.Client.Core.netcoreapp3.0.cs b/src/SignalR/clients/csharp/Client.Core/ref/Microsoft.AspNetCore.SignalR.Client.Core.netcoreapp.cs similarity index 100% rename from src/SignalR/clients/csharp/Client.Core/ref/Microsoft.AspNetCore.SignalR.Client.Core.netcoreapp3.0.cs rename to src/SignalR/clients/csharp/Client.Core/ref/Microsoft.AspNetCore.SignalR.Client.Core.netcoreapp.cs diff --git a/src/SignalR/clients/csharp/Client.Core/ref/Microsoft.AspNetCore.SignalR.Client.Core.netstandard2.0.cs b/src/SignalR/clients/csharp/Client.Core/ref/Microsoft.AspNetCore.SignalR.Client.Core.netstandard2.0.cs index a361a4ed03..0635cd850a 100644 --- a/src/SignalR/clients/csharp/Client.Core/ref/Microsoft.AspNetCore.SignalR.Client.Core.netstandard2.0.cs +++ b/src/SignalR/clients/csharp/Client.Core/ref/Microsoft.AspNetCore.SignalR.Client.Core.netstandard2.0.cs @@ -3,7 +3,7 @@ namespace Microsoft.AspNetCore.SignalR.Client { - public partial class HubConnection + public partial class HubConnection : System.IAsyncDisposable { public static readonly System.TimeSpan DefaultHandshakeTimeout; public static readonly System.TimeSpan DefaultKeepAliveInterval; @@ -19,7 +19,7 @@ namespace Microsoft.AspNetCore.SignalR.Client public event System.Func Reconnected { add { } remove { } } public event System.Func Reconnecting { add { } remove { } } [System.Diagnostics.DebuggerStepThroughAttribute] - public System.Threading.Tasks.Task DisposeAsync() { throw null; } + public System.Threading.Tasks.ValueTask DisposeAsync() { throw null; } [System.Diagnostics.DebuggerStepThroughAttribute] public System.Threading.Tasks.Task InvokeCoreAsync(string methodName, System.Type returnType, object[] args, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public System.IDisposable On(string methodName, System.Type[] parameterTypes, System.Func handler, object state) { throw null; } diff --git a/src/SignalR/clients/csharp/Client.Core/ref/Microsoft.AspNetCore.SignalR.Client.Core.netstandard2.1.cs b/src/SignalR/clients/csharp/Client.Core/ref/Microsoft.AspNetCore.SignalR.Client.Core.netstandard2.1.cs index a361a4ed03..0635cd850a 100644 --- a/src/SignalR/clients/csharp/Client.Core/ref/Microsoft.AspNetCore.SignalR.Client.Core.netstandard2.1.cs +++ b/src/SignalR/clients/csharp/Client.Core/ref/Microsoft.AspNetCore.SignalR.Client.Core.netstandard2.1.cs @@ -3,7 +3,7 @@ namespace Microsoft.AspNetCore.SignalR.Client { - public partial class HubConnection + public partial class HubConnection : System.IAsyncDisposable { public static readonly System.TimeSpan DefaultHandshakeTimeout; public static readonly System.TimeSpan DefaultKeepAliveInterval; @@ -19,7 +19,7 @@ namespace Microsoft.AspNetCore.SignalR.Client public event System.Func Reconnected { add { } remove { } } public event System.Func Reconnecting { add { } remove { } } [System.Diagnostics.DebuggerStepThroughAttribute] - public System.Threading.Tasks.Task DisposeAsync() { throw null; } + public System.Threading.Tasks.ValueTask DisposeAsync() { throw null; } [System.Diagnostics.DebuggerStepThroughAttribute] public System.Threading.Tasks.Task InvokeCoreAsync(string methodName, System.Type returnType, object[] args, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public System.IDisposable On(string methodName, System.Type[] parameterTypes, System.Func handler, object state) { throw null; } diff --git a/src/SignalR/clients/csharp/Client.Core/src/HubConnection.cs b/src/SignalR/clients/csharp/Client.Core/src/HubConnection.cs index 5e04bd309a..61a3aceb55 100644 --- a/src/SignalR/clients/csharp/Client.Core/src/HubConnection.cs +++ b/src/SignalR/clients/csharp/Client.Core/src/HubConnection.cs @@ -22,7 +22,6 @@ using Microsoft.AspNetCore.SignalR.Internal; using Microsoft.AspNetCore.SignalR.Protocol; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging.Abstractions; -using Microsoft.Extensions.Options; namespace Microsoft.AspNetCore.SignalR.Client { @@ -34,7 +33,7 @@ namespace Microsoft.AspNetCore.SignalR.Client /// Before hub methods can be invoked the connection must be started using . /// Clean up a connection using or . /// - public partial class HubConnection + public partial class HubConnection : IAsyncDisposable { public static readonly TimeSpan DefaultServerTimeout = TimeSpan.FromSeconds(30); // Server ping rate is 15 sec, this is 2 times that. public static readonly TimeSpan DefaultHandshakeTimeout = TimeSpan.FromSeconds(15); @@ -292,8 +291,8 @@ namespace Microsoft.AspNetCore.SignalR.Client /// /// Disposes the . /// - /// A that represents the asynchronous dispose. - public async Task DisposeAsync() + /// A that represents the asynchronous dispose. + public async ValueTask DisposeAsync() { if (!_disposed) { @@ -504,8 +503,16 @@ namespace Microsoft.AspNetCore.SignalR.Client if (disposing) { - (_serviceProvider as IDisposable)?.Dispose(); + // Must set this before calling DisposeAsync because the service provider has a reference to the HubConnection and will try to dispose it again _disposed = true; + if (_serviceProvider is IAsyncDisposable asyncDispose) + { + await asyncDispose.DisposeAsync(); + } + else + { + (_serviceProvider as IDisposable)?.Dispose(); + } } } finally diff --git a/src/SignalR/clients/csharp/Client.Core/src/Microsoft.AspNetCore.SignalR.Client.Core.csproj b/src/SignalR/clients/csharp/Client.Core/src/Microsoft.AspNetCore.SignalR.Client.Core.csproj index 736295fb4c..e287d4c869 100644 --- a/src/SignalR/clients/csharp/Client.Core/src/Microsoft.AspNetCore.SignalR.Client.Core.csproj +++ b/src/SignalR/clients/csharp/Client.Core/src/Microsoft.AspNetCore.SignalR.Client.Core.csproj @@ -32,7 +32,7 @@ - + diff --git a/src/SignalR/clients/csharp/Client/test/FunctionalTests/HubConnectionTests.cs b/src/SignalR/clients/csharp/Client/test/FunctionalTests/HubConnectionTests.cs index 14e9d78e5b..42922423a1 100644 --- a/src/SignalR/clients/csharp/Client/test/FunctionalTests/HubConnectionTests.cs +++ b/src/SignalR/clients/csharp/Client/test/FunctionalTests/HubConnectionTests.cs @@ -1414,6 +1414,118 @@ namespace Microsoft.AspNetCore.SignalR.Client.FunctionalTests } } + [Fact] + public async Task UserAgentIsSet() + { + using (StartServer(out var server)) + { + var hubConnection = new HubConnectionBuilder() + .WithLoggerFactory(LoggerFactory) + .WithUrl(server.Url + "/default", HttpTransportType.LongPolling, options => + { + options.Headers["X-test"] = "42"; + options.Headers["X-42"] = "test"; + }) + .Build(); + try + { + await hubConnection.StartAsync().OrTimeout(); + var headerValues = await hubConnection.InvokeAsync(nameof(TestHub.GetHeaderValues), new[] { "User-Agent" }).OrTimeout(); + Assert.NotNull(headerValues); + Assert.Single(headerValues); + + var userAgent = headerValues[0]; + + Assert.StartsWith("Microsoft SignalR/", userAgent); + + var majorVersion = typeof(HttpConnection).Assembly.GetName().Version.Major; + var minorVersion = typeof(HttpConnection).Assembly.GetName().Version.Minor; + + Assert.Contains($"{majorVersion}.{minorVersion}", userAgent); + + } + catch (Exception ex) + { + LoggerFactory.CreateLogger().LogError(ex, "{ExceptionType} from test", ex.GetType().FullName); + throw; + } + finally + { + await hubConnection.DisposeAsync().OrTimeout(); + } + } + } + + [Fact] + public async Task UserAgentCanBeCleared() + { + using (StartServer(out var server)) + { + var hubConnection = new HubConnectionBuilder() + .WithLoggerFactory(LoggerFactory) + .WithUrl(server.Url + "/default", HttpTransportType.LongPolling, options => + { + options.Headers["User-Agent"] = ""; + }) + .Build(); + try + { + await hubConnection.StartAsync().OrTimeout(); + var headerValues = await hubConnection.InvokeAsync(nameof(TestHub.GetHeaderValues), new[] { "User-Agent" }).OrTimeout(); + Assert.NotNull(headerValues); + Assert.Single(headerValues); + + var userAgent = headerValues[0]; + + Assert.Null(userAgent); + } + catch (Exception ex) + { + LoggerFactory.CreateLogger().LogError(ex, "{ExceptionType} from test", ex.GetType().FullName); + throw; + } + finally + { + await hubConnection.DisposeAsync().OrTimeout(); + } + } + } + + [Fact] + public async Task UserAgentCanBeSet() + { + using (StartServer(out var server)) + { + var hubConnection = new HubConnectionBuilder() + .WithLoggerFactory(LoggerFactory) + .WithUrl(server.Url + "/default", HttpTransportType.LongPolling, options => + { + options.Headers["User-Agent"] = "User Value"; + }) + .Build(); + try + { + await hubConnection.StartAsync().OrTimeout(); + var headerValues = await hubConnection.InvokeAsync(nameof(TestHub.GetHeaderValues), new[] { "User-Agent" }).OrTimeout(); + Assert.NotNull(headerValues); + Assert.Single(headerValues); + + var userAgent = headerValues[0]; + + Assert.Equal("User Value", userAgent); + } + catch (Exception ex) + { + LoggerFactory.CreateLogger().LogError(ex, "{ExceptionType} from test", ex.GetType().FullName); + throw; + } + finally + { + await hubConnection.DisposeAsync().OrTimeout(); + } + } + } + [ConditionalFact] [WebSocketsSupportedCondition] public async Task WebSocketOptionsAreApplied() diff --git a/src/SignalR/clients/csharp/Client/test/FunctionalTests/Microsoft.AspNetCore.SignalR.Client.FunctionalTests.csproj b/src/SignalR/clients/csharp/Client/test/FunctionalTests/Microsoft.AspNetCore.SignalR.Client.FunctionalTests.csproj index 8280917fc7..083a6a141a 100644 --- a/src/SignalR/clients/csharp/Client/test/FunctionalTests/Microsoft.AspNetCore.SignalR.Client.FunctionalTests.csproj +++ b/src/SignalR/clients/csharp/Client/test/FunctionalTests/Microsoft.AspNetCore.SignalR.Client.FunctionalTests.csproj @@ -1,7 +1,7 @@  - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) diff --git a/src/SignalR/clients/csharp/Client/test/UnitTests/HttpConnectionTests.Transport.cs b/src/SignalR/clients/csharp/Client/test/UnitTests/HttpConnectionTests.Transport.cs index 142e40546c..0244af0afd 100644 --- a/src/SignalR/clients/csharp/Client/test/UnitTests/HttpConnectionTests.Transport.cs +++ b/src/SignalR/clients/csharp/Client/test/UnitTests/HttpConnectionTests.Transport.cs @@ -3,6 +3,7 @@ using System; using System.IO.Pipelines; +using System.Linq; using System.Net; using System.Net.Http; using System.Reflection; @@ -113,16 +114,17 @@ namespace Microsoft.AspNetCore.SignalR.Client.Tests testHttpHandler.OnRequest(async (request, next, token) => { - var userAgentHeaderCollection = request.Headers.UserAgent; - var userAgentHeader = Assert.Single(userAgentHeaderCollection); - Assert.Equal("Microsoft.AspNetCore.Http.Connections.Client", userAgentHeader.Product.Name); + var userAgentHeader = request.Headers.UserAgent.ToString(); + + Assert.NotNull(userAgentHeader); + Assert.StartsWith("Microsoft SignalR/", userAgentHeader); // user agent version should come from version embedded in assembly metadata var assemblyVersion = typeof(Constants) .Assembly .GetCustomAttribute(); - Assert.Equal(assemblyVersion.InformationalVersion, userAgentHeader.Product.Version); + Assert.Contains(assemblyVersion.InformationalVersion, userAgentHeader); requestsExecuted = true; diff --git a/src/SignalR/clients/csharp/Client/test/UnitTests/HubConnectionTests.cs b/src/SignalR/clients/csharp/Client/test/UnitTests/HubConnectionTests.cs index 2c9df93cb8..b303e71ddd 100644 --- a/src/SignalR/clients/csharp/Client/test/UnitTests/HubConnectionTests.cs +++ b/src/SignalR/clients/csharp/Client/test/UnitTests/HubConnectionTests.cs @@ -414,6 +414,17 @@ namespace Microsoft.AspNetCore.SignalR.Client.Tests } } + [Fact] + public async Task CanAwaitUsingHubConnection() + { + using (StartVerifiableLog()) + { + var connection = new TestConnection(); + await using var hubConnection = CreateHubConnection(connection, loggerFactory: LoggerFactory); + await hubConnection.StartAsync().OrTimeout(); + } + } + private class SampleObject { public SampleObject(string foo, int bar) 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 cc45556edd..7c584a84bc 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 @@ -1,7 +1,7 @@ - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) diff --git a/src/SignalR/clients/csharp/Http.Connections.Client/ref/Microsoft.AspNetCore.Http.Connections.Client.netcoreapp3.0.cs b/src/SignalR/clients/csharp/Http.Connections.Client/ref/Microsoft.AspNetCore.Http.Connections.Client.netcoreapp.cs similarity index 100% rename from src/SignalR/clients/csharp/Http.Connections.Client/ref/Microsoft.AspNetCore.Http.Connections.Client.netcoreapp3.0.cs rename to src/SignalR/clients/csharp/Http.Connections.Client/ref/Microsoft.AspNetCore.Http.Connections.Client.netcoreapp.cs diff --git a/src/SignalR/clients/csharp/Http.Connections.Client/src/HttpConnection.cs b/src/SignalR/clients/csharp/Http.Connections.Client/src/HttpConnection.cs index 852681d963..7fde2079dc 100644 --- a/src/SignalR/clients/csharp/Http.Connections.Client/src/HttpConnection.cs +++ b/src/SignalR/clients/csharp/Http.Connections.Client/src/HttpConnection.cs @@ -551,14 +551,34 @@ namespace Microsoft.AspNetCore.Http.Connections.Client httpClient.Timeout = HttpClientTimeout; // Start with the user agent header - httpClient.DefaultRequestHeaders.UserAgent.Add(Constants.UserAgentHeader); + httpClient.DefaultRequestHeaders.Add(Constants.UserAgent, Constants.UserAgentHeader); // Apply any headers configured on the HttpConnectionOptions if (_httpConnectionOptions?.Headers != null) { foreach (var header in _httpConnectionOptions.Headers) { - httpClient.DefaultRequestHeaders.Add(header.Key, header.Value); + // Check if the key is User-Agent and remove if empty string then replace if it exists. + if (string.Equals(header.Key, Constants.UserAgent, StringComparison.OrdinalIgnoreCase)) + { + if (string.IsNullOrEmpty(header.Value)) + { + httpClient.DefaultRequestHeaders.Remove(header.Key); + } + else if (httpClient.DefaultRequestHeaders.Contains(header.Key)) + { + httpClient.DefaultRequestHeaders.Remove(header.Key); + httpClient.DefaultRequestHeaders.Add(header.Key, header.Value); + } + else + { + httpClient.DefaultRequestHeaders.Add(header.Key, header.Value); + } + } + else + { + httpClient.DefaultRequestHeaders.Add(header.Key, header.Value); + } } } diff --git a/src/SignalR/clients/csharp/Http.Connections.Client/src/Internal/Constants.cs b/src/SignalR/clients/csharp/Http.Connections.Client/src/Internal/Constants.cs index 22b41d56f3..c99c7db1a0 100644 --- a/src/SignalR/clients/csharp/Http.Connections.Client/src/Internal/Constants.cs +++ b/src/SignalR/clients/csharp/Http.Connections.Client/src/Internal/Constants.cs @@ -3,19 +3,18 @@ using System.Diagnostics; using System.Linq; -using System.Net.Http.Headers; using System.Reflection; +using System.Runtime.InteropServices; namespace Microsoft.AspNetCore.Http.Connections.Client.Internal { internal static class Constants { - public static readonly ProductInfoHeaderValue UserAgentHeader; + public const string UserAgent = "User-Agent"; + public static readonly string UserAgentHeader; static Constants() { - var userAgent = "Microsoft.AspNetCore.Http.Connections.Client"; - var assemblyVersion = typeof(Constants) .Assembly .GetCustomAttributes() @@ -23,14 +22,22 @@ namespace Microsoft.AspNetCore.Http.Connections.Client.Internal Debug.Assert(assemblyVersion != null); + var majorVersion = typeof(Constants).Assembly.GetName().Version.Major; + var minorVersion = typeof(Constants).Assembly.GetName().Version.Minor; + var os = RuntimeInformation.OSDescription; + var runtime = ".NET"; + var runtimeVersion = RuntimeInformation.FrameworkDescription; + // assembly version attribute should always be present // but in case it isn't then don't include version in user-agent if (assemblyVersion != null) { - userAgent += "/" + assemblyVersion.InformationalVersion; + UserAgentHeader = $"Microsoft SignalR/{majorVersion}.{minorVersion} ({assemblyVersion.InformationalVersion}; {os}; {runtime}; {runtimeVersion})"; + } + else + { + UserAgentHeader = $"Microsoft SignalR/{majorVersion}.{minorVersion} ({os}; {runtime}; {runtimeVersion})"; } - - UserAgentHeader = ProductInfoHeaderValue.Parse(userAgent); } } } diff --git a/src/SignalR/clients/java/signalr/build.gradle b/src/SignalR/clients/java/signalr/build.gradle index 61b170a40d..8feab7b9b7 100644 --- a/src/SignalR/clients/java/signalr/build.gradle +++ b/src/SignalR/clients/java/signalr/build.gradle @@ -108,3 +108,27 @@ task generatePOM { } task createPackage(dependsOn: [jar,sourceJar,javadocJar,generatePOM]) + +task generateVersionClass { + inputs.property "version", project.version + outputs.dir "$buildDir/generated" + doFirst { + def versionFile = file("$buildDir/../src/main/java/com/microsoft/signalr/Version.java") + versionFile.parentFile.mkdirs() + versionFile.text = + """ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +package com.microsoft.signalr; + +class Version { + public static String getDetailedVersion() { + return "$project.version"; + } +} +""" + } +} + +compileJava.dependsOn generateVersionClass diff --git a/src/SignalR/clients/java/signalr/src/main/java/com/microsoft/signalr/HubConnection.java b/src/SignalR/clients/java/signalr/src/main/java/com/microsoft/signalr/HubConnection.java index aa333fb508..96ecd142c5 100644 --- a/src/SignalR/clients/java/signalr/src/main/java/com/microsoft/signalr/HubConnection.java +++ b/src/SignalR/clients/java/signalr/src/main/java/com/microsoft/signalr/HubConnection.java @@ -327,6 +327,7 @@ public class HubConnection { handshakeResponseSubject = CompletableSubject.create(); handshakeReceived = false; CompletableSubject tokenCompletable = CompletableSubject.create(); + localHeaders.put(UserAgentHelper.getUserAgentName(), UserAgentHelper.createUserAgentString()); if (headers != null) { this.localHeaders.putAll(headers); } diff --git a/src/SignalR/clients/java/signalr/src/main/java/com/microsoft/signalr/UserAgentHelper.java b/src/SignalR/clients/java/signalr/src/main/java/com/microsoft/signalr/UserAgentHelper.java new file mode 100644 index 0000000000..988da567f4 --- /dev/null +++ b/src/SignalR/clients/java/signalr/src/main/java/com/microsoft/signalr/UserAgentHelper.java @@ -0,0 +1,54 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +package com.microsoft.signalr; + +public class UserAgentHelper { + + private final static String USER_AGENT = "User-Agent"; + + public static String getUserAgentName() { + return USER_AGENT; + } + + public static String createUserAgentString() { + StringBuilder agentBuilder = new StringBuilder("Microsoft SignalR/"); + + // Parsing version numbers + String detailedVersion = Version.getDetailedVersion(); + agentBuilder.append(getVersion(detailedVersion)); + agentBuilder.append("; ("); + agentBuilder.append(detailedVersion); + agentBuilder.append("; "); + + // Getting the OS name + agentBuilder.append(getOS()); + agentBuilder.append("; Java; "); + + // Vendor and Version + agentBuilder.append(getJavaVersion()); + agentBuilder.append("; "); + agentBuilder.append(getJavaVendor()); + agentBuilder.append(")"); + + return agentBuilder.toString(); + } + + static String getVersion(String detailedVersion) { + // Getting the index of the second . so we can return just the major and minor version. + int shortVersionIndex = detailedVersion.indexOf(".", detailedVersion.indexOf(".") + 1); + return detailedVersion.substring(0, shortVersionIndex); + } + + static String getJavaVendor() { + return System.getProperty("java.vendor"); + } + + static String getJavaVersion() { + return System.getProperty("java.version"); + } + + static String getOS() { + return System.getProperty("os.name"); + } +} diff --git a/src/SignalR/clients/java/signalr/src/main/java/com/microsoft/signalr/Version.java b/src/SignalR/clients/java/signalr/src/main/java/com/microsoft/signalr/Version.java new file mode 100644 index 0000000000..4c73a498f6 --- /dev/null +++ b/src/SignalR/clients/java/signalr/src/main/java/com/microsoft/signalr/Version.java @@ -0,0 +1,11 @@ + +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +package com.microsoft.signalr; + +class Version { + public static String getDetailedVersion() { + return "99.99.99-dev"; + } +} diff --git a/src/SignalR/clients/java/signalr/src/test/java/com/microsoft/signalr/HubConnectionTest.java b/src/SignalR/clients/java/signalr/src/test/java/com/microsoft/signalr/HubConnectionTest.java index f28adf13e7..051b5fed83 100644 --- a/src/SignalR/clients/java/signalr/src/test/java/com/microsoft/signalr/HubConnectionTest.java +++ b/src/SignalR/clients/java/signalr/src/test/java/com/microsoft/signalr/HubConnectionTest.java @@ -2185,6 +2185,77 @@ class HubConnectionTest { } } + @Test + public void userAgentHeaderIsSet() { + AtomicReference header = new AtomicReference<>(); + TestHttpClient client = new TestHttpClient() + .on("POST", "http://example.com/negotiate", + (req) -> { + header.set(req.getHeaders().get("User-Agent")); + return Single.just(new HttpResponse(200, "", "{\"connectionId\":\"bVOiRPG8-6YiJ6d7ZcTOVQ\",\"" + + "availableTransports\":[{\"transport\":\"WebSockets\",\"transferFormats\":[\"Text\",\"Binary\"]}]}")); + }); + + MockTransport transport = new MockTransport(); + HubConnection hubConnection = HubConnectionBuilder.create("http://example.com") + .withTransportImplementation(transport) + .withHttpClient(client) + .build(); + + hubConnection.start().timeout(1, TimeUnit.SECONDS).blockingAwait(); + assertEquals(HubConnectionState.CONNECTED, hubConnection.getConnectionState()); + hubConnection.stop(); + + assertTrue(header.get().startsWith("Microsoft SignalR/")); + } + + @Test + public void userAgentHeaderCanBeOverwritten() { + AtomicReference header = new AtomicReference<>(); + TestHttpClient client = new TestHttpClient() + .on("POST", "http://example.com/negotiate", + (req) -> { + header.set(req.getHeaders().get("User-Agent")); + return Single.just(new HttpResponse(200, "", "{\"connectionId\":\"bVOiRPG8-6YiJ6d7ZcTOVQ\",\"" + + "availableTransports\":[{\"transport\":\"WebSockets\",\"transferFormats\":[\"Text\",\"Binary\"]}]}")); + }); + + MockTransport transport = new MockTransport(); + HubConnection hubConnection = HubConnectionBuilder.create("http://example.com") + .withTransportImplementation(transport) + .withHttpClient(client) + .withHeader("User-Agent", "Updated Value") + .build(); + + hubConnection.start().timeout(1, TimeUnit.SECONDS).blockingAwait(); + assertEquals(HubConnectionState.CONNECTED, hubConnection.getConnectionState()); + hubConnection.stop(); + assertEquals("Updated Value", header.get()); + } + + @Test + public void userAgentCanBeCleared() { + AtomicReference header = new AtomicReference<>(); + TestHttpClient client = new TestHttpClient() + .on("POST", "http://example.com/negotiate", + (req) -> { + header.set(req.getHeaders().get("User-Agent")); + return Single.just(new HttpResponse(200, "", "{\"connectionId\":\"bVOiRPG8-6YiJ6d7ZcTOVQ\",\"" + + "availableTransports\":[{\"transport\":\"WebSockets\",\"transferFormats\":[\"Text\",\"Binary\"]}]}")); + }); + + MockTransport transport = new MockTransport(); + HubConnection hubConnection = HubConnectionBuilder.create("http://example.com") + .withTransportImplementation(transport) + .withHttpClient(client) + .withHeader("User-Agent", "") + .build(); + + hubConnection.start().timeout(1, TimeUnit.SECONDS).blockingAwait(); + assertEquals(HubConnectionState.CONNECTED, hubConnection.getConnectionState()); + hubConnection.stop(); + assertEquals("", header.get()); + } @Test public void headersAreSetAndSentThroughBuilder() { AtomicReference header = new AtomicReference<>(); diff --git a/src/SignalR/clients/java/signalr/src/test/java/com/microsoft/signalr/UserAgentTest.java b/src/SignalR/clients/java/signalr/src/test/java/com/microsoft/signalr/UserAgentTest.java new file mode 100644 index 0000000000..59715223b9 --- /dev/null +++ b/src/SignalR/clients/java/signalr/src/test/java/com/microsoft/signalr/UserAgentTest.java @@ -0,0 +1,54 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +package com.microsoft.signalr; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; + +import java.util.stream.Stream; + +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.Arguments; +import org.junit.jupiter.params.provider.MethodSource; + +public class UserAgentTest { + + private static Stream Versions() { + return Stream.of( + Arguments.of("1.0.0", "1.0"), + Arguments.of("3.1.4-preview9-12345", "3.1"), + Arguments.of("3.1.4-preview9-12345-extrastuff", "3.1"), + Arguments.of("99.99.99-dev", "99.99")); + } + + @ParameterizedTest + @MethodSource("Versions") + public void getVersionFromDetailedVersion(String detailedVersion, String version) { + assertEquals(version, UserAgentHelper.getVersion(detailedVersion)); + } + + @Test + public void verifyJavaVendor(){ + assertEquals(System.getProperty("java.vendor"), UserAgentHelper.getJavaVendor()); + } + + @Test + public void verifyJavaVersion(){ + assertEquals(System.getProperty("java.version"), UserAgentHelper.getJavaVersion()); + } + + @Test + public void checkUserAgentString(){ + String userAgent = UserAgentHelper.createUserAgentString(); + assertNotNull(userAgent); + + String detailedVersion = Version.getDetailedVersion(); + String handMadeUserAgent = "Microsoft SignalR/" + UserAgentHelper.getVersion(detailedVersion) + + "; (" + detailedVersion + "; " + UserAgentHelper.getOS() + "; Java; " + + UserAgentHelper.getJavaVersion() + "; " + UserAgentHelper.getJavaVendor() + ")"; + + assertEquals(handMadeUserAgent, userAgent); + } +} diff --git a/src/SignalR/clients/ts/FunctionalTests/SignalR.Client.FunctionalTestApp.csproj b/src/SignalR/clients/ts/FunctionalTests/SignalR.Client.FunctionalTestApp.csproj index 64a4eb43ca..91fc9b870d 100644 --- a/src/SignalR/clients/ts/FunctionalTests/SignalR.Client.FunctionalTestApp.csproj +++ b/src/SignalR/clients/ts/FunctionalTests/SignalR.Client.FunctionalTestApp.csproj @@ -1,7 +1,7 @@  - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) True 2.8 diff --git a/src/SignalR/clients/ts/FunctionalTests/scripts/run-tests.ts b/src/SignalR/clients/ts/FunctionalTests/scripts/run-tests.ts index d2438525f0..ad6f65db08 100644 --- a/src/SignalR/clients/ts/FunctionalTests/scripts/run-tests.ts +++ b/src/SignalR/clients/ts/FunctionalTests/scripts/run-tests.ts @@ -245,7 +245,7 @@ function runJest(httpsUrl: string, httpUrl: string) { (async () => { try { - const serverPath = path.resolve(ARTIFACTS_DIR, "bin", "SignalR.Client.FunctionalTestApp", configuration, "netcoreapp3.0", "SignalR.Client.FunctionalTestApp.dll"); + const serverPath = path.resolve(ARTIFACTS_DIR, "bin", "SignalR.Client.FunctionalTestApp", configuration, "netcoreapp5.0", "SignalR.Client.FunctionalTestApp.dll"); debug(`Launching Functional Test Server: ${serverPath}`); let desiredServerUrl = "https://127.0.0.1:0;http://127.0.0.1:0"; diff --git a/src/SignalR/clients/ts/signalr-protocol-msgpack/README.md b/src/SignalR/clients/ts/signalr-protocol-msgpack/README.md index e840374319..00856c5496 100644 --- a/src/SignalR/clients/ts/signalr-protocol-msgpack/README.md +++ b/src/SignalR/clients/ts/signalr-protocol-msgpack/README.md @@ -12,7 +12,7 @@ yarn add @microsoft/signalr-protocol-msgpack ## Usage -See the [SignalR Documentation](https://docs.microsoft.com/en-us/aspnet/core/signalr) at docs.microsoft.com for documentation on the latest release. [API Reference Documentation](https://docs.microsoft.com/javascript/api/%40aspnet/signalr-protocol-msgpack/?view=signalr-js-latest) is also available on docs.microsoft.com. +See the [SignalR Documentation](https://docs.microsoft.com/aspnet/core/signalr) at docs.microsoft.com for documentation on the latest release. [API Reference Documentation](https://docs.microsoft.com/javascript/api/%40aspnet/signalr-protocol-msgpack/?view=signalr-js-latest) is also available on docs.microsoft.com. ### Browser diff --git a/src/SignalR/clients/ts/signalr-protocol-msgpack/package.json b/src/SignalR/clients/ts/signalr-protocol-msgpack/package.json index 3d262cc056..d53083aa27 100644 --- a/src/SignalR/clients/ts/signalr-protocol-msgpack/package.json +++ b/src/SignalR/clients/ts/signalr-protocol-msgpack/package.json @@ -1,6 +1,6 @@ { "name": "@microsoft/signalr-protocol-msgpack", - "version": "3.0.0-dev", + "version": "5.0.0-dev", "description": "MsgPack Protocol support for ASP.NET Core SignalR", "main": "./dist/cjs/index.js", "module": "./dist/esm/index.js", diff --git a/src/SignalR/clients/ts/signalr/README.md b/src/SignalR/clients/ts/signalr/README.md index ec8f34b227..0f1c6f705a 100644 --- a/src/SignalR/clients/ts/signalr/README.md +++ b/src/SignalR/clients/ts/signalr/README.md @@ -12,7 +12,7 @@ yarn add @microsoft/signalr ## Usage -See the [SignalR Documentation](https://docs.microsoft.com/en-us/aspnet/core/signalr) at docs.microsoft.com for documentation on the latest release. [API Reference Documentation](https://docs.microsoft.com/javascript/api/%40aspnet/signalr/?view=signalr-js-latest) is also available on docs.microsoft.com. +See the [SignalR Documentation](https://docs.microsoft.com/aspnet/core/signalr) at docs.microsoft.com for documentation on the latest release. [API Reference Documentation](https://docs.microsoft.com/javascript/api/%40aspnet/signalr/?view=signalr-js-latest) is also available on docs.microsoft.com. ### Browser diff --git a/src/SignalR/clients/ts/signalr/package.json b/src/SignalR/clients/ts/signalr/package.json index 6b50f24d35..7fcfc9fb29 100644 --- a/src/SignalR/clients/ts/signalr/package.json +++ b/src/SignalR/clients/ts/signalr/package.json @@ -1,6 +1,6 @@ { "name": "@microsoft/signalr", - "version": "3.0.0-dev", + "version": "5.0.0-dev", "description": "ASP.NET Core SignalR Client", "main": "./dist/cjs/index.js", "module": "./dist/esm/index.js", diff --git a/src/SignalR/clients/ts/signalr/src/HubConnectionBuilder.ts b/src/SignalR/clients/ts/signalr/src/HubConnectionBuilder.ts index 98a23a3b3d..fa5d7432b9 100644 --- a/src/SignalR/clients/ts/signalr/src/HubConnectionBuilder.ts +++ b/src/SignalR/clients/ts/signalr/src/HubConnectionBuilder.ts @@ -70,14 +70,14 @@ export class HubConnectionBuilder { /** Configures custom logging for the {@link @microsoft/signalr.HubConnection}. * * @param {string} logLevel A string representing a LogLevel setting a minimum level of messages to log. - * See {@link https://docs.microsoft.com/en-us/aspnet/core/signalr/configuration#configure-logging|the documentation for client logging configuration} for more details. + * See {@link https://docs.microsoft.com/aspnet/core/signalr/configuration#configure-logging|the documentation for client logging configuration} for more details. */ public configureLogging(logLevel: string): HubConnectionBuilder; /** Configures custom logging for the {@link @microsoft/signalr.HubConnection}. * * @param {LogLevel | string | ILogger} logging A {@link @microsoft/signalr.LogLevel}, a string representing a LogLevel, or an object implementing the {@link @microsoft/signalr.ILogger} interface. - * See {@link https://docs.microsoft.com/en-us/aspnet/core/signalr/configuration#configure-logging|the documentation for client logging configuration} for more details. + * See {@link https://docs.microsoft.com/aspnet/core/signalr/configuration#configure-logging|the documentation for client logging configuration} for more details. * @returns The {@link @microsoft/signalr.HubConnectionBuilder} instance, for chaining. */ public configureLogging(logging: LogLevel | string | ILogger): HubConnectionBuilder; diff --git a/src/SignalR/common/Http.Connections.Common/ref/Microsoft.AspNetCore.Http.Connections.Common.csproj b/src/SignalR/common/Http.Connections.Common/ref/Microsoft.AspNetCore.Http.Connections.Common.csproj index e7de246e93..9a0b4a2835 100644 --- a/src/SignalR/common/Http.Connections.Common/ref/Microsoft.AspNetCore.Http.Connections.Common.csproj +++ b/src/SignalR/common/Http.Connections.Common/ref/Microsoft.AspNetCore.Http.Connections.Common.csproj @@ -1,15 +1,15 @@ - netstandard2.0;netcoreapp3.0 + netstandard2.0;netcoreapp5.0 - - + + diff --git a/src/SignalR/common/Http.Connections.Common/ref/Microsoft.AspNetCore.Http.Connections.Common.netcoreapp3.0.cs b/src/SignalR/common/Http.Connections.Common/ref/Microsoft.AspNetCore.Http.Connections.Common.netcoreapp.cs similarity index 100% rename from src/SignalR/common/Http.Connections.Common/ref/Microsoft.AspNetCore.Http.Connections.Common.netcoreapp3.0.cs rename to src/SignalR/common/Http.Connections.Common/ref/Microsoft.AspNetCore.Http.Connections.Common.netcoreapp.cs diff --git a/src/SignalR/common/Http.Connections.Common/src/Microsoft.AspNetCore.Http.Connections.Common.csproj b/src/SignalR/common/Http.Connections.Common/src/Microsoft.AspNetCore.Http.Connections.Common.csproj index 2f2b3f3256..c40fa68e6d 100644 --- a/src/SignalR/common/Http.Connections.Common/src/Microsoft.AspNetCore.Http.Connections.Common.csproj +++ b/src/SignalR/common/Http.Connections.Common/src/Microsoft.AspNetCore.Http.Connections.Common.csproj @@ -2,8 +2,8 @@ Common primitives for ASP.NET Connection Handlers and clients - netstandard2.0;netcoreapp3.0 - netcoreapp3.0 + netstandard2.0;$(DefaultNetCoreTargetFramework) + $(DefaultNetCoreTargetFramework) true Microsoft.AspNetCore.Http.Connections true @@ -24,7 +24,7 @@ - + diff --git a/src/SignalR/common/Http.Connections.Common/src/NegotiateProtocol.cs b/src/SignalR/common/Http.Connections.Common/src/NegotiateProtocol.cs index a23a9d6c0b..93035f0613 100644 --- a/src/SignalR/common/Http.Connections.Common/src/NegotiateProtocol.cs +++ b/src/SignalR/common/Http.Connections.Common/src/NegotiateProtocol.cs @@ -222,13 +222,11 @@ namespace Microsoft.AspNetCore.Http.Connections switch (reader.TokenType) { case JsonTokenType.PropertyName: - var memberName = reader.ValueSpan; - - if (memberName.SequenceEqual(TransportPropertyNameBytes.EncodedUtf8Bytes)) + if (reader.ValueTextEquals(TransportPropertyNameBytes.EncodedUtf8Bytes)) { availableTransport.Transport = reader.ReadAsString(TransportPropertyName); } - else if (memberName.SequenceEqual(TransferFormatsPropertyNameBytes.EncodedUtf8Bytes)) + else if (reader.ValueTextEquals(TransferFormatsPropertyNameBytes.EncodedUtf8Bytes)) { reader.CheckRead(); reader.EnsureArrayStart(); diff --git a/src/SignalR/common/Http.Connections/ref/Microsoft.AspNetCore.Http.Connections.csproj b/src/SignalR/common/Http.Connections/ref/Microsoft.AspNetCore.Http.Connections.csproj index d22a24c9d7..17b66b83d9 100644 --- a/src/SignalR/common/Http.Connections/ref/Microsoft.AspNetCore.Http.Connections.csproj +++ b/src/SignalR/common/Http.Connections/ref/Microsoft.AspNetCore.Http.Connections.csproj @@ -1,10 +1,10 @@ - netcoreapp3.0 + netcoreapp5.0 - - + + diff --git a/src/SignalR/common/Http.Connections/ref/Microsoft.AspNetCore.Http.Connections.netcoreapp3.0.cs b/src/SignalR/common/Http.Connections/ref/Microsoft.AspNetCore.Http.Connections.netcoreapp.cs similarity index 100% rename from src/SignalR/common/Http.Connections/ref/Microsoft.AspNetCore.Http.Connections.netcoreapp3.0.cs rename to src/SignalR/common/Http.Connections/ref/Microsoft.AspNetCore.Http.Connections.netcoreapp.cs diff --git a/src/SignalR/common/Http.Connections/src/Internal/Transports/WebSocketsServerTransport.cs b/src/SignalR/common/Http.Connections/src/Internal/Transports/WebSocketsServerTransport.cs index b8a3be18ef..d815b25e54 100644 --- a/src/SignalR/common/Http.Connections/src/Internal/Transports/WebSocketsServerTransport.cs +++ b/src/SignalR/common/Http.Connections/src/Internal/Transports/WebSocketsServerTransport.cs @@ -155,7 +155,7 @@ namespace Microsoft.AspNetCore.Http.Connections.Internal.Transports var memory = _application.Output.GetMemory(); var receiveResult = await socket.ReceiveAsync(memory, token); - // Need to check again for netcoreapp3.0 because a close can happen between a 0-byte read and the actual read + // Need to check again for netcoreapp5.0 because a close can happen between a 0-byte read and the actual read if (receiveResult.MessageType == WebSocketMessageType.Close) { return; 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 1504fac39f..51bac14adb 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 @@ -2,7 +2,7 @@ Components for providing real-time bi-directional communication across the Web. - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) true 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 01f0769245..3bff69e902 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 @@ -1,7 +1,7 @@ - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) diff --git a/src/SignalR/common/Http.Connections/test/NegotiateProtocolTests.cs b/src/SignalR/common/Http.Connections/test/NegotiateProtocolTests.cs index e92d3c3b42..ed6a1d1a2d 100644 --- a/src/SignalR/common/Http.Connections/test/NegotiateProtocolTests.cs +++ b/src/SignalR/common/Http.Connections/test/NegotiateProtocolTests.cs @@ -18,6 +18,7 @@ namespace Microsoft.AspNetCore.Http.Connections.Tests [InlineData("{\"url\": \"http://foo.com/chat\"}", null, null, "http://foo.com/chat", null)] [InlineData("{\"url\": \"http://foo.com/chat\", \"accessToken\": \"token\"}", null, null, "http://foo.com/chat", "token")] [InlineData("{\"connectionId\":\"123\",\"availableTransports\":[{\"transport\":\"test\",\"transferFormats\":[]}]}", "123", new[] { "test" }, null, null)] + [InlineData("{\"connectionId\":\"123\",\"availableTransports\":[{\"\\u0074ransport\":\"test\",\"transferFormats\":[]}]}", "123", new[] { "test" }, null, null)] public void ParsingNegotiateResponseMessageSuccessForValid(string json, string connectionId, string[] availableTransports, string url, string accessToken) { var responseData = Encoding.UTF8.GetBytes(json); diff --git a/src/SignalR/common/Protocols.Json/ref/Microsoft.AspNetCore.SignalR.Protocols.Json.csproj b/src/SignalR/common/Protocols.Json/ref/Microsoft.AspNetCore.SignalR.Protocols.Json.csproj index 7e0ddcd3da..b974a09f76 100644 --- a/src/SignalR/common/Protocols.Json/ref/Microsoft.AspNetCore.SignalR.Protocols.Json.csproj +++ b/src/SignalR/common/Protocols.Json/ref/Microsoft.AspNetCore.SignalR.Protocols.Json.csproj @@ -1,14 +1,14 @@ - netstandard2.0;netcoreapp3.0 + netstandard2.0;netcoreapp5.0 - - + + diff --git a/src/SignalR/common/Protocols.Json/ref/Microsoft.AspNetCore.SignalR.Protocols.Json.netcoreapp3.0.cs b/src/SignalR/common/Protocols.Json/ref/Microsoft.AspNetCore.SignalR.Protocols.Json.netcoreapp.cs similarity index 100% rename from src/SignalR/common/Protocols.Json/ref/Microsoft.AspNetCore.SignalR.Protocols.Json.netcoreapp3.0.cs rename to src/SignalR/common/Protocols.Json/ref/Microsoft.AspNetCore.SignalR.Protocols.Json.netcoreapp.cs diff --git a/src/SignalR/common/Protocols.Json/src/Microsoft.AspNetCore.SignalR.Protocols.Json.csproj b/src/SignalR/common/Protocols.Json/src/Microsoft.AspNetCore.SignalR.Protocols.Json.csproj index 4c10f93b02..2dd22c44a5 100644 --- a/src/SignalR/common/Protocols.Json/src/Microsoft.AspNetCore.SignalR.Protocols.Json.csproj +++ b/src/SignalR/common/Protocols.Json/src/Microsoft.AspNetCore.SignalR.Protocols.Json.csproj @@ -2,8 +2,8 @@ Implements the SignalR Hub Protocol using System.Text.Json. - netstandard2.0;netcoreapp3.0 - netcoreapp3.0 + netstandard2.0;$(DefaultNetCoreTargetFramework) + $(DefaultNetCoreTargetFramework) true Microsoft.AspNetCore.SignalR true @@ -23,7 +23,7 @@ - + diff --git a/src/SignalR/common/Protocols.Json/src/Protocol/JsonHubProtocol.cs b/src/SignalR/common/Protocols.Json/src/Protocol/JsonHubProtocol.cs index 884e427b68..28596c6210 100644 --- a/src/SignalR/common/Protocols.Json/src/Protocol/JsonHubProtocol.cs +++ b/src/SignalR/common/Protocols.Json/src/Protocol/JsonHubProtocol.cs @@ -7,6 +7,7 @@ using System.Collections.Generic; using System.Diagnostics; using System.IO; using System.Runtime.ExceptionServices; +using System.Text.Encodings.Web; using System.Text.Json; using Microsoft.AspNetCore.Connections; using Microsoft.AspNetCore.Internal; @@ -551,19 +552,7 @@ namespace Microsoft.AspNetCore.SignalR.Protocol writer.WriteStartArray(ArgumentsPropertyNameBytes); foreach (var argument in arguments) { - var type = argument?.GetType(); - if (type == typeof(DateTime)) - { - writer.WriteStringValue((DateTime)argument); - } - else if (type == typeof(DateTimeOffset)) - { - writer.WriteStringValue((DateTimeOffset)argument); - } - else - { - JsonSerializer.Serialize(writer, argument, type, _payloadSerializerOptions); - } + JsonSerializer.Serialize(writer, argument, argument?.GetType(), _payloadSerializerOptions); } writer.WriteEndArray(); } @@ -746,19 +735,20 @@ namespace Microsoft.AspNetCore.SignalR.Protocol internal static JsonSerializerOptions CreateDefaultSerializerSettings() { - var options = new JsonSerializerOptions(); - options.WriteIndented = false; - options.ReadCommentHandling = JsonCommentHandling.Disallow; - options.AllowTrailingCommas = false; - options.IgnoreNullValues = false; - options.IgnoreReadOnlyProperties = false; - options.PropertyNamingPolicy = JsonNamingPolicy.CamelCase; - options.PropertyNameCaseInsensitive = true; - options.MaxDepth = 64; - options.DictionaryKeyPolicy = null; - options.DefaultBufferSize = 16 * 1024; - - return options; + return new JsonSerializerOptions() + { + WriteIndented = false, + ReadCommentHandling = JsonCommentHandling.Disallow, + AllowTrailingCommas = false, + IgnoreNullValues = false, + IgnoreReadOnlyProperties = false, + PropertyNamingPolicy = JsonNamingPolicy.CamelCase, + PropertyNameCaseInsensitive = true, + MaxDepth = 64, + DictionaryKeyPolicy = null, + DefaultBufferSize = 16 * 1024, + Encoder = JavaScriptEncoder.UnsafeRelaxedJsonEscaping, + }; } } } diff --git a/src/SignalR/common/Shared/AsyncEnumerableAdapters.cs b/src/SignalR/common/Shared/AsyncEnumerableAdapters.cs index 4ae3809e5b..5dfbffacd9 100644 --- a/src/SignalR/common/Shared/AsyncEnumerableAdapters.cs +++ b/src/SignalR/common/Shared/AsyncEnumerableAdapters.cs @@ -23,7 +23,7 @@ namespace Microsoft.AspNetCore.SignalR.Internal return new CancelableTypedAsyncEnumerable(asyncEnumerable, cts); } -#if NETCOREAPP3_0 +#if NETCOREAPP public static async IAsyncEnumerable MakeAsyncEnumerableFromChannel(ChannelReader channel, [EnumeratorCancellation] CancellationToken cancellationToken = default) { await foreach (var item in channel.ReadAllAsync(cancellationToken)) diff --git a/src/SignalR/common/Shared/MemoryBufferWriter.cs b/src/SignalR/common/Shared/MemoryBufferWriter.cs index 95d3e2f375..1ccb745df4 100644 --- a/src/SignalR/common/Shared/MemoryBufferWriter.cs +++ b/src/SignalR/common/Shared/MemoryBufferWriter.cs @@ -293,7 +293,7 @@ namespace Microsoft.AspNetCore.Internal } } -#if NETCOREAPP3_0 +#if NETCOREAPP public override void Write(ReadOnlySpan span) { if (_currentSegment != null && span.TryCopyTo(_currentSegment.AsSpan(_position))) diff --git a/src/SignalR/common/Shared/PipeWriterStream.cs b/src/SignalR/common/Shared/PipeWriterStream.cs index c569d09ed2..ddb7960b63 100644 --- a/src/SignalR/common/Shared/PipeWriterStream.cs +++ b/src/SignalR/common/Shared/PipeWriterStream.cs @@ -61,7 +61,7 @@ namespace System.IO.Pipelines return WriteCoreAsync(buffer.AsMemory(offset, count), cancellationToken).AsTask(); } -#if NETCOREAPP3_0 +#if NETCOREAPP public override ValueTask WriteAsync(ReadOnlyMemory source, CancellationToken cancellationToken = default) { return WriteCoreAsync(source, cancellationToken); diff --git a/src/SignalR/common/Shared/ReusableUtf8JsonWriter.cs b/src/SignalR/common/Shared/ReusableUtf8JsonWriter.cs index 1dc980d750..c05c0397e6 100644 --- a/src/SignalR/common/Shared/ReusableUtf8JsonWriter.cs +++ b/src/SignalR/common/Shared/ReusableUtf8JsonWriter.cs @@ -3,6 +3,7 @@ using System; using System.Buffers; +using System.Text.Encodings.Web; using System.Text.Json; namespace Microsoft.AspNetCore.Internal @@ -20,7 +21,13 @@ namespace Microsoft.AspNetCore.Internal public ReusableUtf8JsonWriter(IBufferWriter stream) { - _writer = new Utf8JsonWriter(stream, new JsonWriterOptions() { SkipValidation = true }); + _writer = new Utf8JsonWriter(stream, new JsonWriterOptions() + { +#if !DEBUG + SkipValidation = true, +#endif + Encoder = JavaScriptEncoder.UnsafeRelaxedJsonEscaping + }); } public static ReusableUtf8JsonWriter Get(IBufferWriter stream) diff --git a/src/SignalR/common/Shared/StreamExtensions.cs b/src/SignalR/common/Shared/StreamExtensions.cs index 9601fc2add..6c2174dde4 100644 --- a/src/SignalR/common/Shared/StreamExtensions.cs +++ b/src/SignalR/common/Shared/StreamExtensions.cs @@ -15,7 +15,7 @@ namespace System.IO { if (buffer.IsSingleSegment) { -#if NETCOREAPP3_0 +#if NETCOREAPP return stream.WriteAsync(buffer.First, cancellationToken); #else var isArray = MemoryMarshal.TryGetArray(buffer.First, out var arraySegment); @@ -33,7 +33,7 @@ namespace System.IO var position = buffer.Start; while (buffer.TryGet(ref position, out var segment)) { -#if NETCOREAPP3_0 +#if NETCOREAPP await stream.WriteAsync(segment, cancellationToken); #else var isArray = MemoryMarshal.TryGetArray(segment, out var arraySegment); diff --git a/src/SignalR/common/Shared/Utf8BufferTextReader.cs b/src/SignalR/common/Shared/Utf8BufferTextReader.cs index 66af65c237..0acb774c00 100644 --- a/src/SignalR/common/Shared/Utf8BufferTextReader.cs +++ b/src/SignalR/common/Shared/Utf8BufferTextReader.cs @@ -72,7 +72,7 @@ namespace Microsoft.AspNetCore.SignalR.Internal var source = _utf8Buffer.First.Span; var bytesUsed = 0; var charsUsed = 0; -#if NETCOREAPP3_0 +#if NETCOREAPP var destination = new Span(buffer, index, count); _decoder.Convert(source, destination, false, out bytesUsed, out charsUsed, out var completed); #else diff --git a/src/SignalR/common/Shared/Utf8BufferTextWriter.cs b/src/SignalR/common/Shared/Utf8BufferTextWriter.cs index d60caf3bda..e2db2c7877 100644 --- a/src/SignalR/common/Shared/Utf8BufferTextWriter.cs +++ b/src/SignalR/common/Shared/Utf8BufferTextWriter.cs @@ -111,7 +111,7 @@ namespace Microsoft.AspNetCore.Internal // this should be an exceptional case var bytesUsed = 0; var charsUsed = 0; -#if NETCOREAPP3_0 +#if NETCOREAPP _encoder.Convert(new Span(&value, 1), destination, false, out charsUsed, out bytesUsed, out _); #else fixed (byte* destinationBytes = &MemoryMarshal.GetReference(destination)) @@ -167,7 +167,7 @@ namespace Microsoft.AspNetCore.Internal var bytesUsed = 0; var charsUsed = 0; -#if NETCOREAPP3_0 +#if NETCOREAPP _encoder.Convert(buffer, destination, false, out charsUsed, out bytesUsed, out _); #else unsafe diff --git a/src/SignalR/common/Shared/WebSocketExtensions.cs b/src/SignalR/common/Shared/WebSocketExtensions.cs index fedb954296..44233036ec 100644 --- a/src/SignalR/common/Shared/WebSocketExtensions.cs +++ b/src/SignalR/common/Shared/WebSocketExtensions.cs @@ -13,7 +13,7 @@ namespace System.Net.WebSockets { public static ValueTask SendAsync(this WebSocket webSocket, ReadOnlySequence buffer, WebSocketMessageType webSocketMessageType, CancellationToken cancellationToken = default) { -#if NETCOREAPP3_0 +#if NETCOREAPP if (buffer.IsSingleSegment) { return webSocket.SendAsync(buffer.First, webSocketMessageType, endOfMessage: true, cancellationToken); @@ -44,7 +44,7 @@ namespace System.Net.WebSockets buffer.TryGet(ref position, out var prevSegment); while (buffer.TryGet(ref position, out var segment)) { -#if NETCOREAPP3_0 +#if NETCOREAPP await webSocket.SendAsync(prevSegment, webSocketMessageType, endOfMessage: false, cancellationToken); #else var isArray = MemoryMarshal.TryGetArray(prevSegment, out var arraySegment); @@ -55,7 +55,7 @@ namespace System.Net.WebSockets } // End of message frame -#if NETCOREAPP3_0 +#if NETCOREAPP await webSocket.SendAsync(prevSegment, webSocketMessageType, endOfMessage: true, cancellationToken); #else var isArrayEnd = MemoryMarshal.TryGetArray(prevSegment, out var arraySegmentEnd); diff --git a/src/SignalR/common/SignalR.Common/ref/Microsoft.AspNetCore.SignalR.Common.csproj b/src/SignalR/common/SignalR.Common/ref/Microsoft.AspNetCore.SignalR.Common.csproj index e1fb26d63e..943122a62f 100644 --- a/src/SignalR/common/SignalR.Common/ref/Microsoft.AspNetCore.SignalR.Common.csproj +++ b/src/SignalR/common/SignalR.Common/ref/Microsoft.AspNetCore.SignalR.Common.csproj @@ -1,7 +1,7 @@ - netstandard2.0;netcoreapp3.0 + netstandard2.0;netcoreapp5.0 @@ -9,8 +9,8 @@ - - + + diff --git a/src/SignalR/common/SignalR.Common/ref/Microsoft.AspNetCore.SignalR.Common.netcoreapp3.0.cs b/src/SignalR/common/SignalR.Common/ref/Microsoft.AspNetCore.SignalR.Common.netcoreapp.cs similarity index 100% rename from src/SignalR/common/SignalR.Common/ref/Microsoft.AspNetCore.SignalR.Common.netcoreapp3.0.cs rename to src/SignalR/common/SignalR.Common/ref/Microsoft.AspNetCore.SignalR.Common.netcoreapp.cs diff --git a/src/SignalR/common/SignalR.Common/src/Microsoft.AspNetCore.SignalR.Common.csproj b/src/SignalR/common/SignalR.Common/src/Microsoft.AspNetCore.SignalR.Common.csproj index 7a50628e44..eab77e2bf1 100644 --- a/src/SignalR/common/SignalR.Common/src/Microsoft.AspNetCore.SignalR.Common.csproj +++ b/src/SignalR/common/SignalR.Common/src/Microsoft.AspNetCore.SignalR.Common.csproj @@ -2,8 +2,8 @@ Common serialiation primitives for SignalR Clients Servers - netstandard2.0;netcoreapp3.0 - netcoreapp3.0 + netstandard2.0;$(DefaultNetCoreTargetFramework) + $(DefaultNetCoreTargetFramework) true Microsoft.AspNetCore.SignalR true @@ -29,7 +29,7 @@ - + diff --git a/src/SignalR/common/SignalR.Common/test/Internal/Protocol/HandshakeProtocolTests.cs b/src/SignalR/common/SignalR.Common/test/Internal/Protocol/HandshakeProtocolTests.cs index 27560c502a..9a88d32a57 100644 --- a/src/SignalR/common/SignalR.Common/test/Internal/Protocol/HandshakeProtocolTests.cs +++ b/src/SignalR/common/SignalR.Common/test/Internal/Protocol/HandshakeProtocolTests.cs @@ -15,6 +15,12 @@ namespace Microsoft.AspNetCore.SignalR.Common.Tests.Internal.Protocol [InlineData("{\"protocol\":\"dummy\",\"version\":1}\u001e", "dummy", 1)] [InlineData("{\"protocol\":\"\",\"version\":10}\u001e", "", 10)] [InlineData("{\"protocol\":\"\",\"version\":10,\"unknown\":null}\u001e", "", 10)] + [InlineData("{\"protocol\":\"firstProtocol\",\"protocol\":\"secondProtocol\",\"version\":1}\u001e", "secondProtocol", 1)] + [InlineData("{\"protocol\":\"firstProtocol\",\"protocol\":\"secondProtocol\",\"version\":1,\"version\":75}\u001e", "secondProtocol", 75)] + [InlineData("{\"protocol\":\"dummy\",\"version\":1,\"ignoredField\":99}\u001e", "dummy", 1)] + [InlineData("{\"protocol\":\"dummy\",\"version\":1}{\"protocol\":\"wrong\",\"version\":99}\u001e", "dummy", 1)] + [InlineData("{\"protocol\":\"\\u0064ummy\",\"version\":1}\u001e", "dummy", 1)] + [InlineData("{\"\\u0070rotoco\\u006c\":\"\\u0064ummy\",\"version\":1}\u001e", "dummy", 1)] public void ParsingHandshakeRequestMessageSuccessForValidMessages(string json, string protocol, int version) { var message = new ReadOnlySequence(Encoding.UTF8.GetBytes(json)); diff --git a/src/SignalR/common/SignalR.Common/test/Internal/Protocol/JsonHubProtocolTests.cs b/src/SignalR/common/SignalR.Common/test/Internal/Protocol/JsonHubProtocolTests.cs index a2f696ab17..6f9ba5cb60 100644 --- a/src/SignalR/common/SignalR.Common/test/Internal/Protocol/JsonHubProtocolTests.cs +++ b/src/SignalR/common/SignalR.Common/test/Internal/Protocol/JsonHubProtocolTests.cs @@ -7,6 +7,7 @@ using System.Collections.Generic; using System.IO; using System.Linq; using System.Text; +using System.Text.Encodings.Web; using System.Text.Json; using Microsoft.AspNetCore.Internal; using Microsoft.AspNetCore.SignalR.Protocol; @@ -28,7 +29,8 @@ namespace Microsoft.AspNetCore.SignalR.Common.Tests.Internal.Protocol PayloadSerializerOptions = new JsonSerializerOptions() { IgnoreNullValues = ignoreNullValues, - PropertyNamingPolicy = useCamelCase ? JsonNamingPolicy.CamelCase : null + PropertyNamingPolicy = useCamelCase ? JsonNamingPolicy.CamelCase : null, + Encoder = JavaScriptEncoder.UnsafeRelaxedJsonEscaping, } }; @@ -39,6 +41,7 @@ namespace Microsoft.AspNetCore.SignalR.Common.Tests.Internal.Protocol [InlineData("", "Error reading JSON.")] [InlineData("42", "Unexpected JSON Token Type 'Number'. Expected a JSON Object.")] [InlineData("{\"type\":\"foo\"}", "Expected 'type' to be of type Number.")] + [InlineData("{\"type\":3,\"invocationId\":\"42\",\"result\":true", "Error reading JSON.")] public void CustomInvalidMessages(string input, string expectedMessage) { input = Frame(input); @@ -101,98 +104,18 @@ namespace Microsoft.AspNetCore.SignalR.Common.Tests.Internal.Protocol Assert.Equal(expectedMessage, message); } - [Fact] - public void ReadCaseInsensitivePropertiesByDefault() - { - var input = Frame("{\"type\":2,\"invocationId\":\"123\",\"item\":{\"StrIngProp\":\"test\",\"DoublePrOp\":3.14159,\"IntProp\":43,\"DateTimeProp\":\"2019-06-03T22:00:00\",\"NuLLProp\":null,\"ByteARRProp\":\"AgQG\"}}"); - - var binder = new TestBinder(null, typeof(TemporaryCustomObject)); - var data = new ReadOnlySequence(Encoding.UTF8.GetBytes(input)); - JsonHubProtocol.TryParseMessage(ref data, binder, out var message); - - var streamItemMessage = Assert.IsType(message); - Assert.Equal(new TemporaryCustomObject() - { - ByteArrProp = new byte[] { 2, 4, 6 }, - IntProp = 43, - DoubleProp = 3.14159, - StringProp = "test", - DateTimeProp = DateTime.Parse("6/3/2019 10:00:00 PM") - }, streamItemMessage.Item); - } - public static IDictionary CustomProtocolTestData => new[] { new JsonProtocolTestData("InvocationMessage_HasFloatArgument", new InvocationMessage(null, "Target", new object[] { 1, "Foo", 2.0f }), true, true, "{\"type\":1,\"target\":\"Target\",\"arguments\":[1,\"Foo\",2]}"), - new JsonProtocolTestData("InvocationMessage_StringIsoDateArgument", new InvocationMessage("Method", new object[] { "2016-05-10T13:51:20+12:34" }), true, true, "{\"type\":1,\"target\":\"Method\",\"arguments\":[\"2016-05-10T13:51:20\\u002B12:34\"]}"), - new JsonProtocolTestData("InvocationMessage_HasCustomArgumentWithNoCamelCase", new InvocationMessage(null, "Target", new object[] { new TemporaryCustomObject() { ByteArrProp = new byte[] { 1, 2, 3 } } }), false, true, "{\"type\":1,\"target\":\"Target\",\"arguments\":[{\"StringProp\":\"SignalR!\",\"DoubleProp\":6.2831853071,\"IntProp\":42,\"DateTimeProp\":\"2017-04-11T00:00:00Z\",\"ByteArrProp\":\"AQID\"}]}"), - new JsonProtocolTestData("InvocationMessage_HasCustomArgumentWithNullValueIgnore", new InvocationMessage(null, "Target", new object[] { new TemporaryCustomObject() { ByteArrProp = new byte[] { 1, 2, 3 } } }), true, true, "{\"type\":1,\"target\":\"Target\",\"arguments\":[{\"stringProp\":\"SignalR!\",\"doubleProp\":6.2831853071,\"intProp\":42,\"dateTimeProp\":\"2017-04-11T00:00:00Z\",\"byteArrProp\":\"AQID\"}]}"), - new JsonProtocolTestData("InvocationMessage_HasCustomArgumentWithNullValueIgnoreAndNoCamelCase", new InvocationMessage(null, "Target", new object[] { new TemporaryCustomObject() { ByteArrProp = new byte[] { 1, 2, 3 } } }), false, false, "{\"type\":1,\"target\":\"Target\",\"arguments\":[{\"StringProp\":\"SignalR!\",\"DoubleProp\":6.2831853071,\"IntProp\":42,\"DateTimeProp\":\"2017-04-11T00:00:00Z\",\"NullProp\":null,\"ByteArrProp\":\"AQID\"}]}"), - new JsonProtocolTestData("InvocationMessage_HasCustomArgumentWithNullValueInclude", new InvocationMessage(null, "Target", new object[] { new TemporaryCustomObject() { ByteArrProp = new byte[] { 1, 2, 3 } } }), true, false, "{\"type\":1,\"target\":\"Target\",\"arguments\":[{\"stringProp\":\"SignalR!\",\"doubleProp\":6.2831853071,\"intProp\":42,\"dateTimeProp\":\"2017-04-11T00:00:00Z\",\"nullProp\":null,\"byteArrProp\":\"AQID\"}]}"), new JsonProtocolTestData("InvocationMessage_HasHeaders", AddHeaders(TestHeaders, new InvocationMessage("123", "Target", new object[] { 1, "Foo", 2.0f })), true, true, "{\"type\":1," + SerializedHeaders + ",\"invocationId\":\"123\",\"target\":\"Target\",\"arguments\":[1,\"Foo\",2]}"), - new JsonProtocolTestData("StreamItemMessage_HasCustomItemWithNoCamelCase", new StreamItemMessage("123", new TemporaryCustomObject() { ByteArrProp = new byte[] { 1, 2, 3 } }), false, true, "{\"type\":2,\"invocationId\":\"123\",\"item\":{\"StringProp\":\"SignalR!\",\"DoubleProp\":6.2831853071,\"IntProp\":42,\"DateTimeProp\":\"2017-04-11T00:00:00Z\",\"ByteArrProp\":\"AQID\"}}"), - new JsonProtocolTestData("StreamItemMessage_HasCustomItemWithNullValueIgnore", new StreamItemMessage("123", new TemporaryCustomObject() { ByteArrProp = new byte[] { 1, 2, 3 } }), true, true, "{\"type\":2,\"invocationId\":\"123\",\"item\":{\"stringProp\":\"SignalR!\",\"doubleProp\":6.2831853071,\"intProp\":42,\"dateTimeProp\":\"2017-04-11T00:00:00Z\",\"byteArrProp\":\"AQID\"}}"), - new JsonProtocolTestData("StreamItemMessage_HasCustomItemWithNullValueIgnoreAndNoCamelCase", new StreamItemMessage("123", new TemporaryCustomObject() { ByteArrProp = new byte[] { 1, 2, 3 } }), false, false, "{\"type\":2,\"invocationId\":\"123\",\"item\":{\"StringProp\":\"SignalR!\",\"DoubleProp\":6.2831853071,\"IntProp\":42,\"DateTimeProp\":\"2017-04-11T00:00:00Z\",\"NullProp\":null,\"ByteArrProp\":\"AQID\"}}"), - new JsonProtocolTestData("StreamItemMessage_HasCustomItemWithNullValueInclude", new StreamItemMessage("123", new TemporaryCustomObject() { ByteArrProp = new byte[] { 1, 2, 3 } }), true, false, "{\"type\":2,\"invocationId\":\"123\",\"item\":{\"stringProp\":\"SignalR!\",\"doubleProp\":6.2831853071,\"intProp\":42,\"dateTimeProp\":\"2017-04-11T00:00:00Z\",\"nullProp\":null,\"byteArrProp\":\"AQID\"}}"), new JsonProtocolTestData("StreamItemMessage_HasFloatItem", new StreamItemMessage("123", 2.0f), true, true, "{\"type\":2,\"invocationId\":\"123\",\"item\":2}"), - new JsonProtocolTestData("StreamItemMessage_HasHeaders", AddHeaders(TestHeaders, new StreamItemMessage("123", new TemporaryCustomObject() { ByteArrProp = new byte[] { 1, 2, 3 } })), true, false, "{\"type\":2," + SerializedHeaders + ",\"invocationId\":\"123\",\"item\":{\"stringProp\":\"SignalR!\",\"doubleProp\":6.2831853071,\"intProp\":42,\"dateTimeProp\":\"2017-04-11T00:00:00Z\",\"nullProp\":null,\"byteArrProp\":\"AQID\"}}"), new JsonProtocolTestData("CompletionMessage_HasFloatResult", CompletionMessage.WithResult("123", 2.0f), true, true, "{\"type\":3,\"invocationId\":\"123\",\"result\":2}"), - new JsonProtocolTestData("CompletionMessage_HasCustomResultWithNoCamelCase", CompletionMessage.WithResult("123", new TemporaryCustomObject() { ByteArrProp = new byte[] { 1, 2, 3 } }), false, true, "{\"type\":3,\"invocationId\":\"123\",\"result\":{\"StringProp\":\"SignalR!\",\"DoubleProp\":6.2831853071,\"IntProp\":42,\"DateTimeProp\":\"2017-04-11T00:00:00Z\",\"ByteArrProp\":\"AQID\"}}"), - new JsonProtocolTestData("CompletionMessage_HasCustomResultWithNullValueIgnore", CompletionMessage.WithResult("123", new TemporaryCustomObject() { ByteArrProp = new byte[] { 1, 2, 3 } }), true, true, "{\"type\":3,\"invocationId\":\"123\",\"result\":{\"stringProp\":\"SignalR!\",\"doubleProp\":6.2831853071,\"intProp\":42,\"dateTimeProp\":\"2017-04-11T00:00:00Z\",\"byteArrProp\":\"AQID\"}}"), - new JsonProtocolTestData("CompletionMessage_HasCustomResultWithNullValueIncludeAndNoCamelCase", CompletionMessage.WithResult("123", new TemporaryCustomObject() { ByteArrProp = new byte[] { 1, 2, 3 } }), false, false, "{\"type\":3,\"invocationId\":\"123\",\"result\":{\"StringProp\":\"SignalR!\",\"DoubleProp\":6.2831853071,\"IntProp\":42,\"DateTimeProp\":\"2017-04-11T00:00:00Z\",\"NullProp\":null,\"ByteArrProp\":\"AQID\"}}"), - new JsonProtocolTestData("CompletionMessage_HasCustomResultWithNullValueInclude", CompletionMessage.WithResult("123", new TemporaryCustomObject() { ByteArrProp = new byte[] { 1, 2, 3 } }), true, false, "{\"type\":3,\"invocationId\":\"123\",\"result\":{\"stringProp\":\"SignalR!\",\"doubleProp\":6.2831853071,\"intProp\":42,\"dateTimeProp\":\"2017-04-11T00:00:00Z\",\"nullProp\":null,\"byteArrProp\":\"AQID\"}}"), - new JsonProtocolTestData("CompletionMessage_HasErrorAndCamelCase", CompletionMessage.Empty("123"), true, true, "{\"type\":3,\"invocationId\":\"123\"}"), - new JsonProtocolTestData("StreamInvocationMessage_HasCustomArgumentWithNoCamelCase", new StreamInvocationMessage("123", "Target", new object[] { new TemporaryCustomObject() { ByteArrProp = new byte[] { 1, 2, 3 } } }), false, true, "{\"type\":4,\"invocationId\":\"123\",\"target\":\"Target\",\"arguments\":[{\"StringProp\":\"SignalR!\",\"DoubleProp\":6.2831853071,\"IntProp\":42,\"DateTimeProp\":\"2017-04-11T00:00:00Z\",\"ByteArrProp\":\"AQID\"}]}"), - new JsonProtocolTestData("StreamInvocationMessage_HasCustomArgumentWithNullValueIgnore", new StreamInvocationMessage("123", "Target", new object[] { new TemporaryCustomObject() { ByteArrProp = new byte[] { 1, 2, 3 } } }), true, true, "{\"type\":4,\"invocationId\":\"123\",\"target\":\"Target\",\"arguments\":[{\"stringProp\":\"SignalR!\",\"doubleProp\":6.2831853071,\"intProp\":42,\"dateTimeProp\":\"2017-04-11T00:00:00Z\",\"byteArrProp\":\"AQID\"}]}"), - new JsonProtocolTestData("StreamInvocationMessage_HasCustomArgumentWithNullValueIgnoreAndNoCamelCase", new StreamInvocationMessage("123", "Target", new object[] { new TemporaryCustomObject() { ByteArrProp = new byte[] { 1, 2, 3 } } }), false, false, "{\"type\":4,\"invocationId\":\"123\",\"target\":\"Target\",\"arguments\":[{\"StringProp\":\"SignalR!\",\"DoubleProp\":6.2831853071,\"IntProp\":42,\"DateTimeProp\":\"2017-04-11T00:00:00Z\",\"NullProp\":null,\"ByteArrProp\":\"AQID\"}]}"), - new JsonProtocolTestData("StreamInvocationMessage_HasCustomArgumentWithNullValueInclude", new StreamInvocationMessage("123", "Target", new object[] { new TemporaryCustomObject() { ByteArrProp = new byte[] { 1, 2, 3 } } }), true, false, "{\"type\":4,\"invocationId\":\"123\",\"target\":\"Target\",\"arguments\":[{\"stringProp\":\"SignalR!\",\"doubleProp\":6.2831853071,\"intProp\":42,\"dateTimeProp\":\"2017-04-11T00:00:00Z\",\"nullProp\":null,\"byteArrProp\":\"AQID\"}]}"), new JsonProtocolTestData("StreamInvocationMessage_HasFloatArgument", new StreamInvocationMessage("123", "Target", new object[] { 1, "Foo", 2.0f }), true, true, "{\"type\":4,\"invocationId\":\"123\",\"target\":\"Target\",\"arguments\":[1,\"Foo\",2]}"), - new JsonProtocolTestData("StreamInvocationMessage_HasHeaders", AddHeaders(TestHeaders, new StreamInvocationMessage("123", "Target", new object[] { new TemporaryCustomObject() { ByteArrProp = new byte[] { 1, 2, 3 } } })), true, false, "{\"type\":4," + SerializedHeaders + ",\"invocationId\":\"123\",\"target\":\"Target\",\"arguments\":[{\"stringProp\":\"SignalR!\",\"doubleProp\":6.2831853071,\"intProp\":42,\"dateTimeProp\":\"2017-04-11T00:00:00Z\",\"nullProp\":null,\"byteArrProp\":\"AQID\"}]}"), }.ToDictionary(t => t.Name); public static IEnumerable CustomProtocolTestDataNames => CustomProtocolTestData.Keys.Select(name => new object[] { name }); } - - // Revert back to CustomObject when initial values on arrays are supported - // e.g. byte[] arr { get; set; } = byte[] { 1, 2, 3 }; - internal class TemporaryCustomObject : IEquatable - { - // Not intended to be a full set of things, just a smattering of sample serializations - public string StringProp { get; set; } = "SignalR!"; - - public double DoubleProp { get; set; } = 6.2831853071; - - public int IntProp { get; set; } = 42; - - public DateTime DateTimeProp { get; set; } = new DateTime(2017, 4, 11, 0, 0, 0, DateTimeKind.Utc); - - public object NullProp { get; set; } = null; - - public byte[] ByteArrProp { get; set; } - - public override bool Equals(object obj) - { - return obj is TemporaryCustomObject o && Equals(o); - } - - public override int GetHashCode() - { - // This is never used in a hash table - return 0; - } - - public bool Equals(TemporaryCustomObject right) - { - // This allows the comparer below to properly compare the object in the test. - return string.Equals(StringProp, right.StringProp, StringComparison.Ordinal) && - DoubleProp == right.DoubleProp && - IntProp == right.IntProp && - DateTime.Equals(DateTimeProp, right.DateTimeProp) && - NullProp == right.NullProp && - System.Linq.Enumerable.SequenceEqual(ByteArrProp, right.ByteArrProp); - } - } } diff --git a/src/SignalR/common/SignalR.Common/test/Internal/Protocol/JsonHubProtocolTestsBase.cs b/src/SignalR/common/SignalR.Common/test/Internal/Protocol/JsonHubProtocolTestsBase.cs index d0ef4a6e7f..1570b54462 100644 --- a/src/SignalR/common/SignalR.Common/test/Internal/Protocol/JsonHubProtocolTestsBase.cs +++ b/src/SignalR/common/SignalR.Common/test/Internal/Protocol/JsonHubProtocolTestsBase.cs @@ -40,12 +40,30 @@ namespace Microsoft.AspNetCore.SignalR.Common.Tests.Internal.Protocol new JsonProtocolTestData("InvocationMessage_HasStreamAndNormalArgument", new InvocationMessage(null, "Target", new object[] { 42 }, new string[] { "__test_id__" }), true, true, "{\"type\":1,\"target\":\"Target\",\"arguments\":[42],\"streamIds\":[\"__test_id__\"]}"), new JsonProtocolTestData("InvocationMessage_HasMultipleStreams", new InvocationMessage(null, "Target", Array.Empty(), new string[] { "__test_id__", "__test_id2__" }), true, true, "{\"type\":1,\"target\":\"Target\",\"arguments\":[],\"streamIds\":[\"__test_id__\",\"__test_id2__\"]}"), new JsonProtocolTestData("InvocationMessage_DateTimeOffsetArgument", new InvocationMessage("Method", new object[] { DateTimeOffset.Parse("2016-05-10T13:51:20+12:34") }), true, true, "{\"type\":1,\"target\":\"Method\",\"arguments\":[\"2016-05-10T13:51:20+12:34\"]}"), + new JsonProtocolTestData("InvocationMessage_StringIsoDateArgument", new InvocationMessage("Method", new object[] { "2016-05-10T13:51:20+12:34" }), true, true, "{\"type\":1,\"target\":\"Method\",\"arguments\":[\"2016-05-10T13:51:20+12:34\"]}"), + new JsonProtocolTestData("InvocationMessage_HasNonAsciiArgument", new InvocationMessage("Method", new object[] { "מחרוזת כלשהי" }), true, true, "{\"type\":1,\"target\":\"Method\",\"arguments\":[\"מחרוזת כלשהי\"]}"), + new JsonProtocolTestData("InvocationMessage_HasCustomArgumentWithNoCamelCase", new InvocationMessage(null, "Target", new object[] { new CustomObject() }), false, true, "{\"type\":1,\"target\":\"Target\",\"arguments\":[{\"StringProp\":\"SignalR!\",\"DoubleProp\":6.2831853071,\"IntProp\":42,\"DateTimeProp\":\"2017-04-11T00:00:00Z\",\"ByteArrProp\":\"AQID\"}]}"), + new JsonProtocolTestData("InvocationMessage_HasCustomArgumentWithNullValueIgnore", new InvocationMessage(null, "Target", new object[] { new CustomObject() }), true, true, "{\"type\":1,\"target\":\"Target\",\"arguments\":[{\"stringProp\":\"SignalR!\",\"doubleProp\":6.2831853071,\"intProp\":42,\"dateTimeProp\":\"2017-04-11T00:00:00Z\",\"byteArrProp\":\"AQID\"}]}"), + new JsonProtocolTestData("InvocationMessage_HasCustomArgumentWithNullValueIgnoreAndNoCamelCase", new InvocationMessage(null, "Target", new object[] { new CustomObject() }), false, false, "{\"type\":1,\"target\":\"Target\",\"arguments\":[{\"StringProp\":\"SignalR!\",\"DoubleProp\":6.2831853071,\"IntProp\":42,\"DateTimeProp\":\"2017-04-11T00:00:00Z\",\"NullProp\":null,\"ByteArrProp\":\"AQID\"}]}"), + new JsonProtocolTestData("InvocationMessage_HasCustomArgumentWithNullValueInclude", new InvocationMessage(null, "Target", new object[] { new CustomObject() }), true, false, "{\"type\":1,\"target\":\"Target\",\"arguments\":[{\"stringProp\":\"SignalR!\",\"doubleProp\":6.2831853071,\"intProp\":42,\"dateTimeProp\":\"2017-04-11T00:00:00Z\",\"nullProp\":null,\"byteArrProp\":\"AQID\"}]}"), + new JsonProtocolTestData("StreamItemMessage_HasHeaders", AddHeaders(TestHeaders, new StreamItemMessage("123", new CustomObject())), true, false, "{\"type\":2," + SerializedHeaders + ",\"invocationId\":\"123\",\"item\":{\"stringProp\":\"SignalR!\",\"doubleProp\":6.2831853071,\"intProp\":42,\"dateTimeProp\":\"2017-04-11T00:00:00Z\",\"nullProp\":null,\"byteArrProp\":\"AQID\"}}"), + new JsonProtocolTestData("StreamItemMessage_HasCustomItemWithNoCamelCase", new StreamItemMessage("123", new CustomObject()), false, true, "{\"type\":2,\"invocationId\":\"123\",\"item\":{\"StringProp\":\"SignalR!\",\"DoubleProp\":6.2831853071,\"IntProp\":42,\"DateTimeProp\":\"2017-04-11T00:00:00Z\",\"ByteArrProp\":\"AQID\"}}"), + new JsonProtocolTestData("StreamItemMessage_HasCustomItemWithNullValueIgnore", new StreamItemMessage("123", new CustomObject()), true, true, "{\"type\":2,\"invocationId\":\"123\",\"item\":{\"stringProp\":\"SignalR!\",\"doubleProp\":6.2831853071,\"intProp\":42,\"dateTimeProp\":\"2017-04-11T00:00:00Z\",\"byteArrProp\":\"AQID\"}}"), + new JsonProtocolTestData("StreamItemMessage_HasCustomItemWithNullValueIgnoreAndNoCamelCase", new StreamItemMessage("123", new CustomObject()), false, false, "{\"type\":2,\"invocationId\":\"123\",\"item\":{\"StringProp\":\"SignalR!\",\"DoubleProp\":6.2831853071,\"IntProp\":42,\"DateTimeProp\":\"2017-04-11T00:00:00Z\",\"NullProp\":null,\"ByteArrProp\":\"AQID\"}}"), + new JsonProtocolTestData("StreamItemMessage_HasCustomItemWithNullValueInclude", new StreamItemMessage("123", new CustomObject()), true, false, "{\"type\":2,\"invocationId\":\"123\",\"item\":{\"stringProp\":\"SignalR!\",\"doubleProp\":6.2831853071,\"intProp\":42,\"dateTimeProp\":\"2017-04-11T00:00:00Z\",\"nullProp\":null,\"byteArrProp\":\"AQID\"}}"), new JsonProtocolTestData("StreamItemMessage_HasIntegerItem", new StreamItemMessage("123", 1), true, true, "{\"type\":2,\"invocationId\":\"123\",\"item\":1}"), new JsonProtocolTestData("StreamItemMessage_HasStringItem", new StreamItemMessage("123", "Foo"), true, true, "{\"type\":2,\"invocationId\":\"123\",\"item\":\"Foo\"}"), new JsonProtocolTestData("StreamItemMessage_HasBoolItem", new StreamItemMessage("123", true), true, true, "{\"type\":2,\"invocationId\":\"123\",\"item\":true}"), new JsonProtocolTestData("StreamItemMessage_HasNullItem", new StreamItemMessage("123", null), true, true, "{\"type\":2,\"invocationId\":\"123\",\"item\":null}"), + new JsonProtocolTestData("CompletionMessage_HasCustomResultWithNoCamelCase", CompletionMessage.WithResult("123", new CustomObject()), false, true, "{\"type\":3,\"invocationId\":\"123\",\"result\":{\"StringProp\":\"SignalR!\",\"DoubleProp\":6.2831853071,\"IntProp\":42,\"DateTimeProp\":\"2017-04-11T00:00:00Z\",\"ByteArrProp\":\"AQID\"}}"), + new JsonProtocolTestData("CompletionMessage_HasCustomResultWithNullValueIgnore", CompletionMessage.WithResult("123", new CustomObject()), true, true, "{\"type\":3,\"invocationId\":\"123\",\"result\":{\"stringProp\":\"SignalR!\",\"doubleProp\":6.2831853071,\"intProp\":42,\"dateTimeProp\":\"2017-04-11T00:00:00Z\",\"byteArrProp\":\"AQID\"}}"), + new JsonProtocolTestData("CompletionMessage_HasCustomResultWithNullValueIncludeAndNoCamelCase", CompletionMessage.WithResult("123", new CustomObject()), false, false, "{\"type\":3,\"invocationId\":\"123\",\"result\":{\"StringProp\":\"SignalR!\",\"DoubleProp\":6.2831853071,\"IntProp\":42,\"DateTimeProp\":\"2017-04-11T00:00:00Z\",\"NullProp\":null,\"ByteArrProp\":\"AQID\"}}"), + new JsonProtocolTestData("CompletionMessage_HasCustomResultWithNullValueInclude", CompletionMessage.WithResult("123", new CustomObject()), true, false, "{\"type\":3,\"invocationId\":\"123\",\"result\":{\"stringProp\":\"SignalR!\",\"doubleProp\":6.2831853071,\"intProp\":42,\"dateTimeProp\":\"2017-04-11T00:00:00Z\",\"nullProp\":null,\"byteArrProp\":\"AQID\"}}"), + new JsonProtocolTestData("CompletionMessage_HasErrorAndCamelCase", CompletionMessage.Empty("123"), true, true, "{\"type\":3,\"invocationId\":\"123\"}"), + new JsonProtocolTestData("CompletionMessage_HasTestHeadersAndCustomItemResult", AddHeaders(TestHeaders, CompletionMessage.WithResult("123", new CustomObject())), true, false, "{\"type\":3," + SerializedHeaders + ",\"invocationId\":\"123\",\"result\":{\"stringProp\":\"SignalR!\",\"doubleProp\":6.2831853071,\"intProp\":42,\"dateTimeProp\":\"2017-04-11T00:00:00Z\",\"nullProp\":null,\"byteArrProp\":\"AQID\"}}"), + new JsonProtocolTestData("CompletionMessage_HasErrorAndHeadersAndCamelCase", AddHeaders(TestHeaders, CompletionMessage.Empty("123")), true, true, "{\"type\":3," + SerializedHeaders + ",\"invocationId\":\"123\"}"), new JsonProtocolTestData("CompletionMessage_HasIntegerResult", CompletionMessage.WithResult("123", 1), true, true, "{\"type\":3,\"invocationId\":\"123\",\"result\":1}"), new JsonProtocolTestData("CompletionMessage_HasStringResult", CompletionMessage.WithResult("123", "Foo"), true, true, "{\"type\":3,\"invocationId\":\"123\",\"result\":\"Foo\"}"), new JsonProtocolTestData("CompletionMessage_HasBoolResult", CompletionMessage.WithResult("123", true), true, true, "{\"type\":3,\"invocationId\":\"123\",\"result\":true}"), @@ -53,6 +71,11 @@ namespace Microsoft.AspNetCore.SignalR.Common.Tests.Internal.Protocol new JsonProtocolTestData("CompletionMessage_HasError", CompletionMessage.WithError("123", "Whoops!"), true, true, "{\"type\":3,\"invocationId\":\"123\",\"error\":\"Whoops!\"}"), new JsonProtocolTestData("CompletionMessage_HasErrorAndHeaders", AddHeaders(TestHeaders, CompletionMessage.WithError("123", "Whoops!")), true, true, "{\"type\":3," + SerializedHeaders + ",\"invocationId\":\"123\",\"error\":\"Whoops!\"}"), + new JsonProtocolTestData("StreamInvocationMessage_HasHeaders", AddHeaders(TestHeaders, new StreamInvocationMessage("123", "Target", new object[] { new CustomObject() })), true, false, "{\"type\":4," + SerializedHeaders + ",\"invocationId\":\"123\",\"target\":\"Target\",\"arguments\":[{\"stringProp\":\"SignalR!\",\"doubleProp\":6.2831853071,\"intProp\":42,\"dateTimeProp\":\"2017-04-11T00:00:00Z\",\"nullProp\":null,\"byteArrProp\":\"AQID\"}]}"), + new JsonProtocolTestData("StreamInvocationMessage_HasCustomArgumentWithNoCamelCase", new StreamInvocationMessage("123", "Target", new object[] { new CustomObject() }), false, true, "{\"type\":4,\"invocationId\":\"123\",\"target\":\"Target\",\"arguments\":[{\"StringProp\":\"SignalR!\",\"DoubleProp\":6.2831853071,\"IntProp\":42,\"DateTimeProp\":\"2017-04-11T00:00:00Z\",\"ByteArrProp\":\"AQID\"}]}"), + new JsonProtocolTestData("StreamInvocationMessage_HasCustomArgumentWithNullValueIgnore", new StreamInvocationMessage("123", "Target", new object[] { new CustomObject() }), true, true, "{\"type\":4,\"invocationId\":\"123\",\"target\":\"Target\",\"arguments\":[{\"stringProp\":\"SignalR!\",\"doubleProp\":6.2831853071,\"intProp\":42,\"dateTimeProp\":\"2017-04-11T00:00:00Z\",\"byteArrProp\":\"AQID\"}]}"), + new JsonProtocolTestData("StreamInvocationMessage_HasCustomArgumentWithNullValueIgnoreAndNoCamelCase", new StreamInvocationMessage("123", "Target", new object[] { new CustomObject() }), false, false, "{\"type\":4,\"invocationId\":\"123\",\"target\":\"Target\",\"arguments\":[{\"StringProp\":\"SignalR!\",\"DoubleProp\":6.2831853071,\"IntProp\":42,\"DateTimeProp\":\"2017-04-11T00:00:00Z\",\"NullProp\":null,\"ByteArrProp\":\"AQID\"}]}"), + new JsonProtocolTestData("StreamInvocationMessage_HasCustomArgumentWithNullValueInclude", new StreamInvocationMessage("123", "Target", new object[] { new CustomObject() }), true, false, "{\"type\":4,\"invocationId\":\"123\",\"target\":\"Target\",\"arguments\":[{\"stringProp\":\"SignalR!\",\"doubleProp\":6.2831853071,\"intProp\":42,\"dateTimeProp\":\"2017-04-11T00:00:00Z\",\"nullProp\":null,\"byteArrProp\":\"AQID\"}]}"), new JsonProtocolTestData("StreamInvocationMessage_HasInvocationId", new StreamInvocationMessage("123", "Target", new object[] { 1, "Foo" }), true, true, "{\"type\":4,\"invocationId\":\"123\",\"target\":\"Target\",\"arguments\":[1,\"Foo\"]}"), new JsonProtocolTestData("StreamInvocationMessage_HasBoolArgument", new StreamInvocationMessage("123", "Target", new object[] { true }), true, true, "{\"type\":4,\"invocationId\":\"123\",\"target\":\"Target\",\"arguments\":[true]}"), new JsonProtocolTestData("StreamInvocationMessage_HasNullArgument", new StreamInvocationMessage("123", "Target", new object[] { null }), true, true, "{\"type\":4,\"invocationId\":\"123\",\"target\":\"Target\",\"arguments\":[null]}"), @@ -156,8 +179,7 @@ namespace Microsoft.AspNetCore.SignalR.Common.Tests.Internal.Protocol [InlineData("{\"type\":4,\"invocationId\":\"42\",\"target\":\"foo\"}", "Missing required property 'arguments'.")] [InlineData("{\"type\":4,\"invocationId\":\"42\",\"target\":\"foo\",\"arguments\":{}}", "Expected 'arguments' to be of type Array.")] - //[InlineData("{\"type\":3,\"invocationId\":\"42\",\"error\":\"foo\",\"result\":true}", "The 'error' and 'result' properties are mutually exclusive.")] - //[InlineData("{\"type\":3,\"invocationId\":\"42\",\"result\":true", "Unexpected end when reading JSON.")] + [InlineData("{\"type\":3,\"invocationId\":\"42\",\"error\":\"foo\",\"result\":true}", "The 'error' and 'result' properties are mutually exclusive.")] public void InvalidMessages(string input, string expectedMessage) { input = Frame(input); @@ -270,6 +292,26 @@ namespace Microsoft.AspNetCore.SignalR.Common.Tests.Internal.Protocol Assert.Equal("foo", bindingFailure.Target); } + [Fact] + public void ReadCaseInsensitivePropertiesByDefault() + { + var input = Frame("{\"type\":2,\"invocationId\":\"123\",\"item\":{\"StrIngProp\":\"test\",\"DoublePrOp\":3.14159,\"IntProp\":43,\"DateTimeProp\":\"2019-06-03T22:00:00\",\"NuLLProp\":null,\"ByteARRProp\":\"AgQG\"}}"); + + var binder = new TestBinder(null, typeof(CustomObject)); + var data = new ReadOnlySequence(Encoding.UTF8.GetBytes(input)); + JsonHubProtocol.TryParseMessage(ref data, binder, out var message); + + var streamItemMessage = Assert.IsType(message); + Assert.Equal(new CustomObject() + { + ByteArrProp = new byte[] { 2, 4, 6 }, + IntProp = 43, + DoubleProp = 3.14159, + StringProp = "test", + DateTimeProp = DateTime.Parse("6/3/2019 10:00:00 PM") + }, streamItemMessage.Item); + } + public static string Frame(string input) { var data = Encoding.UTF8.GetBytes(input); diff --git a/src/SignalR/common/SignalR.Common/test/Internal/Protocol/MemoryBufferWriterTests.cs b/src/SignalR/common/SignalR.Common/test/Internal/Protocol/MemoryBufferWriterTests.cs index 7cd455a009..ded5c5cf63 100644 --- a/src/SignalR/common/SignalR.Common/test/Internal/Protocol/MemoryBufferWriterTests.cs +++ b/src/SignalR/common/SignalR.Common/test/Internal/Protocol/MemoryBufferWriterTests.cs @@ -358,7 +358,7 @@ namespace Microsoft.AspNetCore.SignalR.Common.Tests.Internal.Protocol } } -#if NETCOREAPP3_0 +#if NETCOREAPP [Fact] public void WriteSpanWorksAtNonZeroOffset() { diff --git a/src/SignalR/common/SignalR.Common/test/Internal/Protocol/NewtonsoftJsonHubProtocolTests.cs b/src/SignalR/common/SignalR.Common/test/Internal/Protocol/NewtonsoftJsonHubProtocolTests.cs index 255cdead83..de10b1dbf6 100644 --- a/src/SignalR/common/SignalR.Common/test/Internal/Protocol/NewtonsoftJsonHubProtocolTests.cs +++ b/src/SignalR/common/SignalR.Common/test/Internal/Protocol/NewtonsoftJsonHubProtocolTests.cs @@ -40,6 +40,7 @@ namespace Microsoft.AspNetCore.SignalR.Common.Tests.Internal.Protocol [InlineData("", "Unexpected end when reading JSON.")] [InlineData("42", "Unexpected JSON Token Type 'Integer'. Expected a JSON Object.")] [InlineData("{\"type\":\"foo\"}", "Expected 'type' to be of type Integer.")] + [InlineData("{\"type\":3,\"invocationId\":\"42\",\"result\":true", "Unexpected end when reading JSON.")] public void CustomInvalidMessages(string input, string expectedMessage) { input = Frame(input); @@ -93,35 +94,13 @@ namespace Microsoft.AspNetCore.SignalR.Common.Tests.Internal.Protocol public static IDictionary CustomProtocolTestData => new[] { new JsonProtocolTestData("InvocationMessage_HasFloatArgument", new InvocationMessage(null, "Target", new object[] { 1, "Foo", 2.0f }), true, true, "{\"type\":1,\"target\":\"Target\",\"arguments\":[1,\"Foo\",2.0]}"), - new JsonProtocolTestData("InvocationMessage_StringIsoDateArgument", new InvocationMessage("Method", new object[] { "2016-05-10T13:51:20+12:34" }), false, true, "{\"type\":1,\"target\":\"Method\",\"arguments\":[\"2016-05-10T13:51:20+12:34\"]}"), - new JsonProtocolTestData("InvocationMessage_HasCustomArgumentWithNoCamelCase", new InvocationMessage(null, "Target", new object[] { new CustomObject() }), false, true, "{\"type\":1,\"target\":\"Target\",\"arguments\":[{\"StringProp\":\"SignalR!\",\"DoubleProp\":6.2831853071,\"IntProp\":42,\"DateTimeProp\":\"2017-04-11T00:00:00Z\",\"ByteArrProp\":\"AQID\"}]}"), - new JsonProtocolTestData("InvocationMessage_HasCustomArgumentWithNullValueIgnore", new InvocationMessage(null, "Target", new object[] { new CustomObject() }), true, true, "{\"type\":1,\"target\":\"Target\",\"arguments\":[{\"stringProp\":\"SignalR!\",\"doubleProp\":6.2831853071,\"intProp\":42,\"dateTimeProp\":\"2017-04-11T00:00:00Z\",\"byteArrProp\":\"AQID\"}]}"), - new JsonProtocolTestData("InvocationMessage_HasCustomArgumentWithNullValueIgnoreAndNoCamelCase", new InvocationMessage(null, "Target", new object[] { new CustomObject() }), false, false, "{\"type\":1,\"target\":\"Target\",\"arguments\":[{\"StringProp\":\"SignalR!\",\"DoubleProp\":6.2831853071,\"IntProp\":42,\"DateTimeProp\":\"2017-04-11T00:00:00Z\",\"NullProp\":null,\"ByteArrProp\":\"AQID\"}]}"), - new JsonProtocolTestData("InvocationMessage_HasCustomArgumentWithNullValueInclude", new InvocationMessage(null, "Target", new object[] { new CustomObject() }), true, false, "{\"type\":1,\"target\":\"Target\",\"arguments\":[{\"stringProp\":\"SignalR!\",\"doubleProp\":6.2831853071,\"intProp\":42,\"dateTimeProp\":\"2017-04-11T00:00:00Z\",\"nullProp\":null,\"byteArrProp\":\"AQID\"}]}"), new JsonProtocolTestData("InvocationMessage_HasHeaders", AddHeaders(TestHeaders, new InvocationMessage("123", "Target", new object[] { 1, "Foo", 2.0f })), true, true, "{\"type\":1," + SerializedHeaders + ",\"invocationId\":\"123\",\"target\":\"Target\",\"arguments\":[1,\"Foo\",2.0]}"), new JsonProtocolTestData("StreamItemMessage_HasFloatItem", new StreamItemMessage("123", 2.0f), true, true, "{\"type\":2,\"invocationId\":\"123\",\"item\":2.0}"), - new JsonProtocolTestData("StreamItemMessage_HasCustomItemWithNoCamelCase", new StreamItemMessage("123", new CustomObject()), false, true, "{\"type\":2,\"invocationId\":\"123\",\"item\":{\"StringProp\":\"SignalR!\",\"DoubleProp\":6.2831853071,\"IntProp\":42,\"DateTimeProp\":\"2017-04-11T00:00:00Z\",\"ByteArrProp\":\"AQID\"}}"), - new JsonProtocolTestData("StreamItemMessage_HasCustomItemWithNullValueIgnore", new StreamItemMessage("123", new CustomObject()), true, true, "{\"type\":2,\"invocationId\":\"123\",\"item\":{\"stringProp\":\"SignalR!\",\"doubleProp\":6.2831853071,\"intProp\":42,\"dateTimeProp\":\"2017-04-11T00:00:00Z\",\"byteArrProp\":\"AQID\"}}"), - new JsonProtocolTestData("StreamItemMessage_HasCustomItemWithNullValueIgnoreAndNoCamelCase", new StreamItemMessage("123", new CustomObject()), false, false, "{\"type\":2,\"invocationId\":\"123\",\"item\":{\"StringProp\":\"SignalR!\",\"DoubleProp\":6.2831853071,\"IntProp\":42,\"DateTimeProp\":\"2017-04-11T00:00:00Z\",\"NullProp\":null,\"ByteArrProp\":\"AQID\"}}"), - new JsonProtocolTestData("StreamItemMessage_HasCustomItemWithNullValueInclude", new StreamItemMessage("123", new CustomObject()), true, false, "{\"type\":2,\"invocationId\":\"123\",\"item\":{\"stringProp\":\"SignalR!\",\"doubleProp\":6.2831853071,\"intProp\":42,\"dateTimeProp\":\"2017-04-11T00:00:00Z\",\"nullProp\":null,\"byteArrProp\":\"AQID\"}}"), - new JsonProtocolTestData("StreamItemMessage_HasHeaders", AddHeaders(TestHeaders, new StreamItemMessage("123", new CustomObject())), true, false, "{\"type\":2," + SerializedHeaders + ",\"invocationId\":\"123\",\"item\":{\"stringProp\":\"SignalR!\",\"doubleProp\":6.2831853071,\"intProp\":42,\"dateTimeProp\":\"2017-04-11T00:00:00Z\",\"nullProp\":null,\"byteArrProp\":\"AQID\"}}"), - new JsonProtocolTestData("CompletionMessage_HasCustomResultWithNoCamelCase", CompletionMessage.WithResult("123", new CustomObject()), false, true, "{\"type\":3,\"invocationId\":\"123\",\"result\":{\"StringProp\":\"SignalR!\",\"DoubleProp\":6.2831853071,\"IntProp\":42,\"DateTimeProp\":\"2017-04-11T00:00:00Z\",\"ByteArrProp\":\"AQID\"}}"), - new JsonProtocolTestData("CompletionMessage_HasCustomResultWithNullValueIgnore", CompletionMessage.WithResult("123", new CustomObject()), true, true, "{\"type\":3,\"invocationId\":\"123\",\"result\":{\"stringProp\":\"SignalR!\",\"doubleProp\":6.2831853071,\"intProp\":42,\"dateTimeProp\":\"2017-04-11T00:00:00Z\",\"byteArrProp\":\"AQID\"}}"), - new JsonProtocolTestData("CompletionMessage_HasCustomResultWithNullValueIncludeAndNoCamelCase", CompletionMessage.WithResult("123", new CustomObject()), false, false, "{\"type\":3,\"invocationId\":\"123\",\"result\":{\"StringProp\":\"SignalR!\",\"DoubleProp\":6.2831853071,\"IntProp\":42,\"DateTimeProp\":\"2017-04-11T00:00:00Z\",\"NullProp\":null,\"ByteArrProp\":\"AQID\"}}"), - new JsonProtocolTestData("CompletionMessage_HasCustomResultWithNullValueInclude", CompletionMessage.WithResult("123", new CustomObject()), true, false, "{\"type\":3,\"invocationId\":\"123\",\"result\":{\"stringProp\":\"SignalR!\",\"doubleProp\":6.2831853071,\"intProp\":42,\"dateTimeProp\":\"2017-04-11T00:00:00Z\",\"nullProp\":null,\"byteArrProp\":\"AQID\"}}"), - new JsonProtocolTestData("CompletionMessage_HasTestHeadersAndCustomItemResult", AddHeaders(TestHeaders, CompletionMessage.WithResult("123", new CustomObject())), true, false, "{\"type\":3," + SerializedHeaders + ",\"invocationId\":\"123\",\"result\":{\"stringProp\":\"SignalR!\",\"doubleProp\":6.2831853071,\"intProp\":42,\"dateTimeProp\":\"2017-04-11T00:00:00Z\",\"nullProp\":null,\"byteArrProp\":\"AQID\"}}"), - new JsonProtocolTestData("CompletionMessage_HasErrorAndCamelCase", CompletionMessage.Empty("123"), true, true, "{\"type\":3,\"invocationId\":\"123\"}"), - new JsonProtocolTestData("CompletionMessage_HasErrorAndHeadersAndCamelCase", AddHeaders(TestHeaders, CompletionMessage.Empty("123")), true, true, "{\"type\":3," + SerializedHeaders + ",\"invocationId\":\"123\"}"), new JsonProtocolTestData("CompletionMessage_HasFloatResult", CompletionMessage.WithResult("123", 2.0f), true, true, "{\"type\":3,\"invocationId\":\"123\",\"result\":2.0}"), new JsonProtocolTestData("StreamInvocationMessage_HasFloatArgument", new StreamInvocationMessage("123", "Target", new object[] { 1, "Foo", 2.0f }), true, true, "{\"type\":4,\"invocationId\":\"123\",\"target\":\"Target\",\"arguments\":[1,\"Foo\",2.0]}"), - new JsonProtocolTestData("StreamInvocationMessage_HasCustomArgumentWithNoCamelCase", new StreamInvocationMessage("123", "Target", new object[] { new CustomObject() }), false, true, "{\"type\":4,\"invocationId\":\"123\",\"target\":\"Target\",\"arguments\":[{\"StringProp\":\"SignalR!\",\"DoubleProp\":6.2831853071,\"IntProp\":42,\"DateTimeProp\":\"2017-04-11T00:00:00Z\",\"ByteArrProp\":\"AQID\"}]}"), - new JsonProtocolTestData("StreamInvocationMessage_HasCustomArgumentWithNullValueIgnore", new StreamInvocationMessage("123", "Target", new object[] { new CustomObject() }), true, true, "{\"type\":4,\"invocationId\":\"123\",\"target\":\"Target\",\"arguments\":[{\"stringProp\":\"SignalR!\",\"doubleProp\":6.2831853071,\"intProp\":42,\"dateTimeProp\":\"2017-04-11T00:00:00Z\",\"byteArrProp\":\"AQID\"}]}"), - new JsonProtocolTestData("StreamInvocationMessage_HasCustomArgumentWithNullValueIgnoreAndNoCamelCase", new StreamInvocationMessage("123", "Target", new object[] { new CustomObject() }), false, false, "{\"type\":4,\"invocationId\":\"123\",\"target\":\"Target\",\"arguments\":[{\"StringProp\":\"SignalR!\",\"DoubleProp\":6.2831853071,\"IntProp\":42,\"DateTimeProp\":\"2017-04-11T00:00:00Z\",\"NullProp\":null,\"ByteArrProp\":\"AQID\"}]}"), - new JsonProtocolTestData("StreamInvocationMessage_HasCustomArgumentWithNullValueInclude", new StreamInvocationMessage("123", "Target", new object[] { new CustomObject() }), true, false, "{\"type\":4,\"invocationId\":\"123\",\"target\":\"Target\",\"arguments\":[{\"stringProp\":\"SignalR!\",\"doubleProp\":6.2831853071,\"intProp\":42,\"dateTimeProp\":\"2017-04-11T00:00:00Z\",\"nullProp\":null,\"byteArrProp\":\"AQID\"}]}"), - new JsonProtocolTestData("StreamInvocationMessage_HasHeaders", AddHeaders(TestHeaders, new StreamInvocationMessage("123", "Target", new object[] { new CustomObject() })), true, false, "{\"type\":4," + SerializedHeaders + ",\"invocationId\":\"123\",\"target\":\"Target\",\"arguments\":[{\"stringProp\":\"SignalR!\",\"doubleProp\":6.2831853071,\"intProp\":42,\"dateTimeProp\":\"2017-04-11T00:00:00Z\",\"nullProp\":null,\"byteArrProp\":\"AQID\"}]}"), }.ToDictionary(t => t.Name); public static IEnumerable CustomProtocolTestDataNames => CustomProtocolTestData.Keys.Select(name => new object[] { name }); diff --git a/src/SignalR/common/SignalR.Common/test/Internal/Protocol/Utf8BufferTextWriterTests.cs b/src/SignalR/common/SignalR.Common/test/Internal/Protocol/Utf8BufferTextWriterTests.cs index b1fe8c76fb..6b7a5563d3 100644 --- a/src/SignalR/common/SignalR.Common/test/Internal/Protocol/Utf8BufferTextWriterTests.cs +++ b/src/SignalR/common/SignalR.Common/test/Internal/Protocol/Utf8BufferTextWriterTests.cs @@ -1,4 +1,4 @@ -// Copyright (c) .NET Foundation. All rights reserved. +// Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System; @@ -245,7 +245,7 @@ namespace Microsoft.AspNetCore.SignalR.Common.Tests.Internal.Protocol } [Fact] - private void WriteMultiByteCharactersToSmallBuffers() + public void WriteMultiByteCharactersToSmallBuffers() { // Test string breakdown (char => UTF-8 hex values): // a => 61 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 cfef1f1d74..1120424ee6 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 @@ -1,7 +1,7 @@ - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) 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 4330ae9b16..ce47db0ac8 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 @@ -1,7 +1,7 @@  - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) Microsoft.AspNetCore.SignalR.Tests $(DefineConstants);TESTUTILS diff --git a/src/SignalR/perf/Microbenchmarks/Microsoft.AspNetCore.SignalR.Microbenchmarks.csproj b/src/SignalR/perf/Microbenchmarks/Microsoft.AspNetCore.SignalR.Microbenchmarks.csproj index c007a68669..3f892a8cdf 100644 --- a/src/SignalR/perf/Microbenchmarks/Microsoft.AspNetCore.SignalR.Microbenchmarks.csproj +++ b/src/SignalR/perf/Microbenchmarks/Microsoft.AspNetCore.SignalR.Microbenchmarks.csproj @@ -2,7 +2,7 @@ Exe - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) diff --git a/src/SignalR/perf/benchmarkapps/Crankier/Commands/Defaults.cs b/src/SignalR/perf/benchmarkapps/Crankier/Commands/Defaults.cs index 732ccb6af3..84027fff16 100644 --- a/src/SignalR/perf/benchmarkapps/Crankier/Commands/Defaults.cs +++ b/src/SignalR/perf/benchmarkapps/Crankier/Commands/Defaults.cs @@ -2,6 +2,7 @@ // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using Microsoft.AspNetCore.Http.Connections; +using Microsoft.Extensions.Logging; namespace Microsoft.AspNetCore.SignalR.Crankier.Commands { @@ -11,5 +12,6 @@ namespace Microsoft.AspNetCore.SignalR.Crankier.Commands public static readonly int NumberOfConnections = 10_000; public static readonly int SendDurationInSeconds = 300; public static readonly HttpTransportType TransportType = HttpTransportType.WebSockets; + public static readonly LogLevel LogLevel = LogLevel.None; } } diff --git a/src/SignalR/perf/benchmarkapps/Crankier/Commands/ServerCommand.cs b/src/SignalR/perf/benchmarkapps/Crankier/Commands/ServerCommand.cs new file mode 100644 index 0000000000..cb1ef585b6 --- /dev/null +++ b/src/SignalR/perf/benchmarkapps/Crankier/Commands/ServerCommand.cs @@ -0,0 +1,60 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +using System; +using System.Threading.Tasks; +using Microsoft.AspNetCore.Http.Connections; +using Microsoft.Extensions.CommandLineUtils; +using static Microsoft.AspNetCore.SignalR.Crankier.Commands.CommandLineUtilities; +using System.Diagnostics; +using Microsoft.AspNetCore.Hosting; +using Microsoft.Extensions.Configuration; +using Microsoft.Extensions.Logging; +using Microsoft.AspNetCore.SignalR.Crankier.Server; + +namespace Microsoft.AspNetCore.SignalR.Crankier.Commands +{ + internal class ServerCommand + { + public static void Register(CommandLineApplication app) + { + app.Command("server", cmd => + { + var logLevelOption = cmd.Option("--log ", "The LogLevel to use.", CommandOptionType.SingleValue); + + cmd.OnExecute(() => + { + LogLevel logLevel = Defaults.LogLevel; + + if (logLevelOption.HasValue() && !Enum.TryParse(logLevelOption.Value(), out logLevel)) + { + return InvalidArg(logLevelOption); + } + return Execute(logLevel); + }); + }); + } + + private static int Execute(LogLevel logLevel) + { + Console.WriteLine($"Process ID: {Process.GetCurrentProcess().Id}"); + + var config = new ConfigurationBuilder() + .AddEnvironmentVariables(prefix: "ASPNETCORE_") + .Build(); + + var host = new WebHostBuilder() + .UseConfiguration(config) + .ConfigureLogging(loggerFactory => + { + loggerFactory.AddConsole().SetMinimumLevel(logLevel); + }) + .UseKestrel() + .UseStartup(); + + host.Build().Run(); + + return 0; + } + } +} diff --git a/src/SignalR/perf/benchmarkapps/Crankier/Crankier.csproj b/src/SignalR/perf/benchmarkapps/Crankier/Crankier.csproj index 82ae59f1ef..1bc1e98bd6 100644 --- a/src/SignalR/perf/benchmarkapps/Crankier/Crankier.csproj +++ b/src/SignalR/perf/benchmarkapps/Crankier/Crankier.csproj @@ -2,13 +2,18 @@ Exe - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) Microsoft.AspNetCore.SignalR.CranksRevenge + + + + + diff --git a/src/SignalR/perf/benchmarkapps/Crankier/Program.cs b/src/SignalR/perf/benchmarkapps/Crankier/Program.cs index a3443ecd94..93f53ea328 100644 --- a/src/SignalR/perf/benchmarkapps/Crankier/Program.cs +++ b/src/SignalR/perf/benchmarkapps/Crankier/Program.cs @@ -30,6 +30,7 @@ namespace Microsoft.AspNetCore.SignalR.Crankier LocalCommand.Register(app); AgentCommand.Register(app); WorkerCommand.Register(app); + ServerCommand.Register(app); app.Command("help", cmd => { diff --git a/src/SignalR/perf/benchmarkapps/Crankier/Server/ConnectionCounter.cs b/src/SignalR/perf/benchmarkapps/Crankier/Server/ConnectionCounter.cs new file mode 100644 index 0000000000..1ab6a25abc --- /dev/null +++ b/src/SignalR/perf/benchmarkapps/Crankier/Server/ConnectionCounter.cs @@ -0,0 +1,60 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +using System; + +namespace Microsoft.AspNetCore.SignalR.Crankier.Server +{ + public class ConnectionCounter + { + private int _totalConnectedCount; + private int _peakConnectedCount; + private int _totalDisconnectedCount; + private int _receivedCount; + + private readonly object _lock = new object(); + + public ConnectionSummary Summary + { + get + { + lock (_lock) + { + return new ConnectionSummary + { + CurrentConnections = _totalConnectedCount - _totalDisconnectedCount, + PeakConnections = _peakConnectedCount, + TotalConnected = _totalConnectedCount, + TotalDisconnected = _totalDisconnectedCount, + ReceivedCount = _receivedCount + }; + } + } + } + + public void Receive(string payload) + { + lock (_lock) + { + _receivedCount += payload.Length; + } + } + + public void Connected() + { + lock (_lock) + { + _totalConnectedCount++; + _peakConnectedCount = Math.Max(_totalConnectedCount - _totalDisconnectedCount, _peakConnectedCount); + } + } + + public void Disconnected() + { + lock (_lock) + { + _totalDisconnectedCount++; + } + } + } +} \ No newline at end of file diff --git a/src/SignalR/perf/benchmarkapps/Crankier/Server/ConnectionCounterHostedService.cs b/src/SignalR/perf/benchmarkapps/Crankier/Server/ConnectionCounterHostedService.cs new file mode 100644 index 0000000000..44b8bb26f2 --- /dev/null +++ b/src/SignalR/perf/benchmarkapps/Crankier/Server/ConnectionCounterHostedService.cs @@ -0,0 +1,79 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +using System; +using System.Diagnostics; +using System.Threading; +using System.Threading.Tasks; +using Microsoft.Extensions.Hosting; + +namespace Microsoft.AspNetCore.SignalR.Crankier.Server +{ + public class ConnectionCounterHostedService : IHostedService, IDisposable + { + private Stopwatch _timeSinceFirstConnection; + private readonly ConnectionCounter _counter; + private ConnectionSummary _lastSummary; + private Timer _timer; + private int _executingDoWork; + + public ConnectionCounterHostedService(ConnectionCounter counter) + { + _counter = counter; + _timeSinceFirstConnection = new Stopwatch(); + } + + public Task StartAsync(CancellationToken cancellationToken) + { + _timer = new Timer(DoWork, null, TimeSpan.Zero, TimeSpan.FromSeconds(1)); + + return Task.CompletedTask; + } + + private void DoWork(object state) + { + if (Interlocked.Exchange(ref _executingDoWork, 1) == 0) + { + var summary = _counter.Summary; + + if (summary.PeakConnections > 0) + { + if (_timeSinceFirstConnection.ElapsedTicks == 0) + { + _timeSinceFirstConnection.Start(); + } + + var elapsed = _timeSinceFirstConnection.Elapsed; + + if (_lastSummary != null) + { + Console.WriteLine(@"[{0:hh\:mm\:ss}] Current: {1}, peak: {2}, connected: {3}, disconnected: {4}, rate: {5}/s", + elapsed, + summary.CurrentConnections, + summary.PeakConnections, + summary.TotalConnected - _lastSummary.TotalConnected, + summary.TotalDisconnected - _lastSummary.TotalDisconnected, + summary.CurrentConnections - _lastSummary.CurrentConnections + ); + } + + _lastSummary = summary; + } + + Interlocked.Exchange(ref _executingDoWork, 0); + } + } + + public Task StopAsync(CancellationToken cancellationToken) + { + _timer?.Change(Timeout.Infinite, 0); + + return Task.CompletedTask; + } + + public void Dispose() + { + _timer?.Dispose(); + } + } +} \ No newline at end of file diff --git a/src/SignalR/perf/benchmarkapps/Crankier/Server/ConnectionSummary.cs b/src/SignalR/perf/benchmarkapps/Crankier/Server/ConnectionSummary.cs new file mode 100644 index 0000000000..83f38aaf62 --- /dev/null +++ b/src/SignalR/perf/benchmarkapps/Crankier/Server/ConnectionSummary.cs @@ -0,0 +1,18 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +namespace Microsoft.AspNetCore.SignalR.Crankier.Server +{ + public class ConnectionSummary + { + public int TotalConnected { get; set; } + + public int TotalDisconnected { get; set; } + + public int PeakConnections { get; set; } + + public int CurrentConnections { get; set; } + + public int ReceivedCount { get; set; } + } +} \ No newline at end of file diff --git a/src/SignalR/perf/benchmarkapps/Crankier/Server/EchoHub.cs b/src/SignalR/perf/benchmarkapps/Crankier/Server/EchoHub.cs new file mode 100644 index 0000000000..0b24b46e9b --- /dev/null +++ b/src/SignalR/perf/benchmarkapps/Crankier/Server/EchoHub.cs @@ -0,0 +1,72 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +using System; +using System.Threading; +using System.Threading.Tasks; +using Microsoft.AspNetCore.SignalR; + +namespace Microsoft.AspNetCore.SignalR.Crankier.Server +{ + public class EchoHub : Hub + { + private ConnectionCounter _counter; + + public EchoHub(ConnectionCounter counter) + { + _counter = counter; + } + + public async Task Broadcast(int duration) + { + var sent = 0; + try + { + var t = new CancellationTokenSource(); + t.CancelAfter(TimeSpan.FromSeconds(duration)); + while (!t.IsCancellationRequested && !Context.ConnectionAborted.IsCancellationRequested) + { + await Clients.All.SendAsync("send", DateTime.UtcNow); + sent++; + } + } + catch (Exception e) + { + Console.WriteLine(e); + } + Console.WriteLine("Broadcast exited: Sent {0} messages", sent); + } + + public override Task OnConnectedAsync() + { + _counter?.Connected(); + return Task.CompletedTask; + } + + public override Task OnDisconnectedAsync(Exception exception) + { + _counter?.Disconnected(); + return Task.CompletedTask; + } + + public DateTime Echo(DateTime time) + { + return time; + } + + public Task EchoAll(DateTime time) + { + return Clients.All.SendAsync("send", time); + } + + public void SendPayload(string payload) + { + _counter?.Receive(payload); + } + + public DateTime GetCurrentTime() + { + return DateTime.UtcNow; + } + } +} diff --git a/src/SignalR/perf/benchmarkapps/Crankier/Server/Startup.cs b/src/SignalR/perf/benchmarkapps/Crankier/Server/Startup.cs new file mode 100644 index 0000000000..d8d5efc5bf --- /dev/null +++ b/src/SignalR/perf/benchmarkapps/Crankier/Server/Startup.cs @@ -0,0 +1,39 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +using Microsoft.AspNetCore.Builder; +using Microsoft.AspNetCore.Hosting; +using Microsoft.Extensions.Configuration; +using Microsoft.Extensions.DependencyInjection; + +namespace Microsoft.AspNetCore.SignalR.Crankier.Server +{ + public class Startup + { + private readonly IConfiguration _config; + public Startup(IConfiguration configuration) + { + _config = configuration; + } + + public void ConfigureServices(IServiceCollection services) + { + var signalrBuilder = services.AddSignalR() + .AddMessagePackProtocol(); + + services.AddSingleton(); + + services.AddHostedService(); + } + + public void Configure(IApplicationBuilder app, IWebHostEnvironment env) + { + app.UseRouting(); + + app.UseEndpoints(endpoints => + { + endpoints.MapHub("/echo"); + }); + } + } +} diff --git a/src/SignalR/publish-apps.ps1 b/src/SignalR/publish-apps.ps1 index 112922b204..8c7b2de4a4 100644 --- a/src/SignalR/publish-apps.ps1 +++ b/src/SignalR/publish-apps.ps1 @@ -1,4 +1,4 @@ -param($RootDirectory = (Get-Location), $Framework = "netcoreapp3.0", $Runtime = "win-x64", $CommitHash, $BranchName, $BuildNumber) +param($RootDirectory = (Get-Location), $Framework = "netcoreapp5.0", $Runtime = "win-x64", $CommitHash, $BranchName, $BuildNumber) # De-Powershell the path $RootDirectory = (Convert-Path $RootDirectory) diff --git a/src/SignalR/samples/ClientSample/ClientSample.csproj b/src/SignalR/samples/ClientSample/ClientSample.csproj index 2ba102d8ae..4c8d780015 100644 --- a/src/SignalR/samples/ClientSample/ClientSample.csproj +++ b/src/SignalR/samples/ClientSample/ClientSample.csproj @@ -1,7 +1,7 @@  - netcoreapp3.0;net461 + $(DefaultNetCoreTargetFramework);net461 Exe diff --git a/src/SignalR/samples/ClientSample/Tcp/SocketReceiver.cs b/src/SignalR/samples/ClientSample/Tcp/SocketReceiver.cs index b5d664dbc9..f7b643e659 100644 --- a/src/SignalR/samples/ClientSample/Tcp/SocketReceiver.cs +++ b/src/SignalR/samples/ClientSample/Tcp/SocketReceiver.cs @@ -22,7 +22,7 @@ namespace ClientSample public SocketAwaitable ReceiveAsync(Memory buffer) { -#if NETCOREAPP3_0 +#if NETCOREAPP _eventArgs.SetBuffer(buffer); #else var segment = buffer.GetArray(); diff --git a/src/SignalR/samples/ClientSample/Tcp/SocketSender.cs b/src/SignalR/samples/ClientSample/Tcp/SocketSender.cs index 13bdbd1e5a..55e390841f 100644 --- a/src/SignalR/samples/ClientSample/Tcp/SocketSender.cs +++ b/src/SignalR/samples/ClientSample/Tcp/SocketSender.cs @@ -32,7 +32,7 @@ namespace ClientSample return SendAsync(buffers.First); } -#if NETCOREAPP3_0 +#if NETCOREAPP if (!_eventArgs.MemoryBuffer.Equals(Memory.Empty)) #else if (_eventArgs.Buffer != null) @@ -59,7 +59,7 @@ namespace ClientSample _eventArgs.BufferList = null; } -#if NETCOREAPP3_0 +#if NETCOREAPP _eventArgs.SetBuffer(MemoryMarshal.AsMemory(memory)); #else var segment = memory.GetArray(); diff --git a/src/SignalR/samples/JwtClientSample/JwtClientSample.csproj b/src/SignalR/samples/JwtClientSample/JwtClientSample.csproj index 726a267d4c..916907b46c 100644 --- a/src/SignalR/samples/JwtClientSample/JwtClientSample.csproj +++ b/src/SignalR/samples/JwtClientSample/JwtClientSample.csproj @@ -1,7 +1,7 @@ - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) Exe diff --git a/src/SignalR/samples/JwtSample/JwtSample.csproj b/src/SignalR/samples/JwtSample/JwtSample.csproj index 126fc1573f..552c9d63f2 100644 --- a/src/SignalR/samples/JwtSample/JwtSample.csproj +++ b/src/SignalR/samples/JwtSample/JwtSample.csproj @@ -1,7 +1,7 @@  - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) false diff --git a/src/SignalR/samples/SignalRSamples/SignalRSamples.csproj b/src/SignalR/samples/SignalRSamples/SignalRSamples.csproj index 64b4d62744..97bf72df88 100644 --- a/src/SignalR/samples/SignalRSamples/SignalRSamples.csproj +++ b/src/SignalR/samples/SignalRSamples/SignalRSamples.csproj @@ -1,7 +1,7 @@ - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) false diff --git a/src/SignalR/samples/SocialWeather/SocialWeather.csproj b/src/SignalR/samples/SocialWeather/SocialWeather.csproj index 17c1c0059d..ea9308fee5 100644 --- a/src/SignalR/samples/SocialWeather/SocialWeather.csproj +++ b/src/SignalR/samples/SocialWeather/SocialWeather.csproj @@ -1,7 +1,7 @@  - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) false diff --git a/src/SignalR/samples/WebSocketSample/WebSocketSample.csproj b/src/SignalR/samples/WebSocketSample/WebSocketSample.csproj index dee73a69a8..7320f41d3b 100644 --- a/src/SignalR/samples/WebSocketSample/WebSocketSample.csproj +++ b/src/SignalR/samples/WebSocketSample/WebSocketSample.csproj @@ -1,7 +1,7 @@  - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) Exe diff --git a/src/SignalR/server/Core/ref/Microsoft.AspNetCore.SignalR.Core.csproj b/src/SignalR/server/Core/ref/Microsoft.AspNetCore.SignalR.Core.csproj index 1681bddc30..df5def3916 100644 --- a/src/SignalR/server/Core/ref/Microsoft.AspNetCore.SignalR.Core.csproj +++ b/src/SignalR/server/Core/ref/Microsoft.AspNetCore.SignalR.Core.csproj @@ -1,10 +1,10 @@ - netcoreapp3.0 + netcoreapp5.0 - - + + diff --git a/src/SignalR/server/Core/ref/Microsoft.AspNetCore.SignalR.Core.netcoreapp3.0.cs b/src/SignalR/server/Core/ref/Microsoft.AspNetCore.SignalR.Core.netcoreapp.cs similarity index 100% rename from src/SignalR/server/Core/ref/Microsoft.AspNetCore.SignalR.Core.netcoreapp3.0.cs rename to src/SignalR/server/Core/ref/Microsoft.AspNetCore.SignalR.Core.netcoreapp.cs 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 e0c5505ef0..34d29d957b 100644 --- a/src/SignalR/server/Core/src/Microsoft.AspNetCore.SignalR.Core.csproj +++ b/src/SignalR/server/Core/src/Microsoft.AspNetCore.SignalR.Core.csproj @@ -2,7 +2,7 @@ Real-time communication framework for ASP.NET Core. - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) true Microsoft.AspNetCore.SignalR diff --git a/src/SignalR/server/SignalR/ref/Microsoft.AspNetCore.SignalR.csproj b/src/SignalR/server/SignalR/ref/Microsoft.AspNetCore.SignalR.csproj index 9f65eda535..02c1f062e2 100644 --- a/src/SignalR/server/SignalR/ref/Microsoft.AspNetCore.SignalR.csproj +++ b/src/SignalR/server/SignalR/ref/Microsoft.AspNetCore.SignalR.csproj @@ -1,10 +1,10 @@ - netcoreapp3.0 + netcoreapp5.0 - - + + diff --git a/src/SignalR/server/SignalR/ref/Microsoft.AspNetCore.SignalR.netcoreapp3.0.cs b/src/SignalR/server/SignalR/ref/Microsoft.AspNetCore.SignalR.netcoreapp.cs similarity index 100% rename from src/SignalR/server/SignalR/ref/Microsoft.AspNetCore.SignalR.netcoreapp3.0.cs rename to src/SignalR/server/SignalR/ref/Microsoft.AspNetCore.SignalR.netcoreapp.cs diff --git a/src/SignalR/server/SignalR/src/Microsoft.AspNetCore.SignalR.csproj b/src/SignalR/server/SignalR/src/Microsoft.AspNetCore.SignalR.csproj index 7614e387f4..c0c7c50dce 100644 --- a/src/SignalR/server/SignalR/src/Microsoft.AspNetCore.SignalR.csproj +++ b/src/SignalR/server/SignalR/src/Microsoft.AspNetCore.SignalR.csproj @@ -1,7 +1,7 @@ Components for providing real-time bi-directional communication across the Web. - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) true diff --git a/src/SignalR/server/SignalR/test/Microsoft.AspNetCore.SignalR.Tests.csproj b/src/SignalR/server/SignalR/test/Microsoft.AspNetCore.SignalR.Tests.csproj index 527ae19b19..ff9d0f1d01 100644 --- a/src/SignalR/server/SignalR/test/Microsoft.AspNetCore.SignalR.Tests.csproj +++ b/src/SignalR/server/SignalR/test/Microsoft.AspNetCore.SignalR.Tests.csproj @@ -1,7 +1,7 @@  - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) diff --git a/src/SignalR/server/SignalR/test/UserAgentHeaderTest.cs b/src/SignalR/server/SignalR/test/UserAgentHeaderTest.cs new file mode 100644 index 0000000000..6c3ba450d8 --- /dev/null +++ b/src/SignalR/server/SignalR/test/UserAgentHeaderTest.cs @@ -0,0 +1,34 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +using System.Linq; +using System.Reflection; +using System.Runtime.InteropServices; +using Microsoft.AspNetCore.Http.Connections.Client; +using Xunit; +using Constants = Microsoft.AspNetCore.Http.Connections.Client.Internal.Constants; + +namespace Microsoft.AspNetCore.Http.Connections.Tests +{ + public class UserAgentHeaderTest + { + [Fact] + public void UserAgentHeaderIsAccurate() + { + var majorVersion = typeof(HttpConnection).Assembly.GetName().Version.Major; + var minorVersion = typeof(HttpConnection).Assembly.GetName().Version.Minor; + var version = typeof(HttpConnection).Assembly.GetName().Version; + var os = RuntimeInformation.OSDescription; + var runtime = ".NET"; + var runtimeVersion = RuntimeInformation.FrameworkDescription; + var assemblyVersion = typeof(Constants) + .Assembly + .GetCustomAttributes() + .FirstOrDefault(); + var userAgent = Constants.UserAgentHeader; + var expectedUserAgent = $"Microsoft SignalR/{majorVersion}.{minorVersion} ({assemblyVersion.InformationalVersion}; {os}; {runtime}; {runtimeVersion})"; + + Assert.Equal(expectedUserAgent, userAgent); + } + } +} 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 f0dcb08acc..acc91b8abe 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 @@ -2,7 +2,7 @@ Tests for users to verify their own implementations of SignalR types - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) true false diff --git a/src/SignalR/server/StackExchangeRedis/ref/Microsoft.AspNetCore.SignalR.StackExchangeRedis.csproj b/src/SignalR/server/StackExchangeRedis/ref/Microsoft.AspNetCore.SignalR.StackExchangeRedis.csproj index 4ce5052d11..8b3c8cd3a1 100644 --- a/src/SignalR/server/StackExchangeRedis/ref/Microsoft.AspNetCore.SignalR.StackExchangeRedis.csproj +++ b/src/SignalR/server/StackExchangeRedis/ref/Microsoft.AspNetCore.SignalR.StackExchangeRedis.csproj @@ -1,10 +1,10 @@ - netcoreapp3.0 + netcoreapp5.0 - - + + diff --git a/src/SignalR/server/StackExchangeRedis/ref/Microsoft.AspNetCore.SignalR.StackExchangeRedis.netcoreapp3.0.cs b/src/SignalR/server/StackExchangeRedis/ref/Microsoft.AspNetCore.SignalR.StackExchangeRedis.netcoreapp.cs similarity index 100% rename from src/SignalR/server/StackExchangeRedis/ref/Microsoft.AspNetCore.SignalR.StackExchangeRedis.netcoreapp3.0.cs rename to src/SignalR/server/StackExchangeRedis/ref/Microsoft.AspNetCore.SignalR.StackExchangeRedis.netcoreapp.cs diff --git a/src/SignalR/server/StackExchangeRedis/src/Internal/RedisProtocol.cs b/src/SignalR/server/StackExchangeRedis/src/Internal/RedisProtocol.cs index a1594b0fd3..b6f276ab5e 100644 --- a/src/SignalR/server/StackExchangeRedis/src/Internal/RedisProtocol.cs +++ b/src/SignalR/server/StackExchangeRedis/src/Internal/RedisProtocol.cs @@ -28,7 +28,7 @@ namespace Microsoft.AspNetCore.SignalR.StackExchangeRedis.Internal // * Acks are sent to the Acknowledgement channel. // * See the Write[type] methods for a description of the protocol for each in-depth. // * The "Variable length integer" is the length-prefixing format used by BinaryReader/BinaryWriter: - // * https://docs.microsoft.com/en-us/dotnet/api/system.io.binarywriter.write?view=netstandard-2.0 + // * https://docs.microsoft.com/dotnet/api/system.io.binarywriter.write?view=netcore-2.2 // * The "Length prefixed string" is the string format used by BinaryReader/BinaryWriter: // * A 7-bit variable length integer encodes the length in bytes, followed by the encoded string in UTF-8. diff --git a/src/SignalR/server/StackExchangeRedis/src/Microsoft.AspNetCore.SignalR.StackExchangeRedis.csproj b/src/SignalR/server/StackExchangeRedis/src/Microsoft.AspNetCore.SignalR.StackExchangeRedis.csproj index 21e567d8a6..affff6ae4a 100644 --- a/src/SignalR/server/StackExchangeRedis/src/Microsoft.AspNetCore.SignalR.StackExchangeRedis.csproj +++ b/src/SignalR/server/StackExchangeRedis/src/Microsoft.AspNetCore.SignalR.StackExchangeRedis.csproj @@ -2,7 +2,7 @@ Provides scale-out support for ASP.NET Core SignalR using a Redis server and the StackExchange.Redis client. - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) true 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 8172acf1f6..c884296369 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 @@ -1,7 +1,7 @@  - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) diff --git a/src/SiteExtensions/LoggingAggregate/src/Microsoft.AspNetCore.AzureAppServices.SiteExtension/Microsoft.AspNetCore.AzureAppServices.SiteExtension.csproj b/src/SiteExtensions/LoggingAggregate/src/Microsoft.AspNetCore.AzureAppServices.SiteExtension/Microsoft.AspNetCore.AzureAppServices.SiteExtension.csproj index 7054d0908d..7b880e889b 100644 --- a/src/SiteExtensions/LoggingAggregate/src/Microsoft.AspNetCore.AzureAppServices.SiteExtension/Microsoft.AspNetCore.AzureAppServices.SiteExtension.csproj +++ b/src/SiteExtensions/LoggingAggregate/src/Microsoft.AspNetCore.AzureAppServices.SiteExtension/Microsoft.AspNetCore.AzureAppServices.SiteExtension.csproj @@ -23,8 +23,8 @@ - - + + diff --git a/src/SiteExtensions/LoggingBranch/LB.csproj b/src/SiteExtensions/LoggingBranch/LB.csproj index ec6512acc9..7ee33acbf5 100644 --- a/src/SiteExtensions/LoggingBranch/LB.csproj +++ b/src/SiteExtensions/LoggingBranch/LB.csproj @@ -18,7 +18,7 @@ - + diff --git a/src/SiteExtensions/Sdk/HostingStartup/HostingStartup.csproj b/src/SiteExtensions/Sdk/HostingStartup/HostingStartup.csproj index 9628c2f525..471247e378 100644 --- a/src/SiteExtensions/Sdk/HostingStartup/HostingStartup.csproj +++ b/src/SiteExtensions/Sdk/HostingStartup/HostingStartup.csproj @@ -1,7 +1,7 @@  - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) Exe true diff --git a/src/SiteExtensions/Sdk/SiteExtension.targets b/src/SiteExtensions/Sdk/SiteExtension.targets index 320ea9fb3d..28bc55a851 100644 --- a/src/SiteExtensions/Sdk/SiteExtension.targets +++ b/src/SiteExtensions/Sdk/SiteExtension.targets @@ -24,7 +24,7 @@ - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) @@ -36,8 +36,8 @@ - - + + diff --git a/src/Tools/FirstRunCertGenerator/src/Microsoft.AspNetCore.DeveloperCertificates.XPlat.csproj b/src/Tools/FirstRunCertGenerator/src/Microsoft.AspNetCore.DeveloperCertificates.XPlat.csproj index e0500429ab..353cc6750e 100644 --- a/src/Tools/FirstRunCertGenerator/src/Microsoft.AspNetCore.DeveloperCertificates.XPlat.csproj +++ b/src/Tools/FirstRunCertGenerator/src/Microsoft.AspNetCore.DeveloperCertificates.XPlat.csproj @@ -1,7 +1,7 @@ - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) Package for the CLI first run experience. $(DefineConstants);XPLAT aspnet;cli diff --git a/src/Tools/FirstRunCertGenerator/test/Microsoft.AspNetCore.DeveloperCertificates.XPlat.Tests.csproj b/src/Tools/FirstRunCertGenerator/test/Microsoft.AspNetCore.DeveloperCertificates.XPlat.Tests.csproj index 023a3bc7f8..dd470dbf37 100644 --- a/src/Tools/FirstRunCertGenerator/test/Microsoft.AspNetCore.DeveloperCertificates.XPlat.Tests.csproj +++ b/src/Tools/FirstRunCertGenerator/test/Microsoft.AspNetCore.DeveloperCertificates.XPlat.Tests.csproj @@ -1,7 +1,7 @@ - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) diff --git a/src/Tools/dotnet-dev-certs/src/dotnet-dev-certs.csproj b/src/Tools/dotnet-dev-certs/src/dotnet-dev-certs.csproj index a7903fc79c..d558f1e6a2 100644 --- a/src/Tools/dotnet-dev-certs/src/dotnet-dev-certs.csproj +++ b/src/Tools/dotnet-dev-certs/src/dotnet-dev-certs.csproj @@ -1,7 +1,7 @@ - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) exe Command line tool to generate certificates used in ASP.NET Core during development. Microsoft.AspNetCore.DeveloperCertificates.Tools diff --git a/src/Tools/dotnet-sql-cache/src/dotnet-sql-cache.csproj b/src/Tools/dotnet-sql-cache/src/dotnet-sql-cache.csproj index 83199e9ca0..6f7a08de47 100644 --- a/src/Tools/dotnet-sql-cache/src/dotnet-sql-cache.csproj +++ b/src/Tools/dotnet-sql-cache/src/dotnet-sql-cache.csproj @@ -1,7 +1,7 @@  - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) exe Command line tool to create tables and indexes in a Microsoft SQL Server database for distributed caching. cache;distributedcache;sqlserver diff --git a/src/Tools/dotnet-user-secrets/src/dotnet-user-secrets.csproj b/src/Tools/dotnet-user-secrets/src/dotnet-user-secrets.csproj index f9e7f56f0b..814cbbec3f 100644 --- a/src/Tools/dotnet-user-secrets/src/dotnet-user-secrets.csproj +++ b/src/Tools/dotnet-user-secrets/src/dotnet-user-secrets.csproj @@ -1,7 +1,7 @@  - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) exe Command line tool to manage user secrets for Microsoft.Extensions.Configuration. false diff --git a/src/Tools/dotnet-user-secrets/test/UserSecretsTestFixture.cs b/src/Tools/dotnet-user-secrets/test/UserSecretsTestFixture.cs index 4c76950548..e72f532679 100644 --- a/src/Tools/dotnet-user-secrets/test/UserSecretsTestFixture.cs +++ b/src/Tools/dotnet-user-secrets/test/UserSecretsTestFixture.cs @@ -35,7 +35,7 @@ namespace Microsoft.Extensions.Configuration.UserSecrets.Tests private const string ProjectTemplate = @" Exe - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) {0} false diff --git a/src/Tools/dotnet-user-secrets/test/dotnet-user-secrets.Tests.csproj b/src/Tools/dotnet-user-secrets/test/dotnet-user-secrets.Tests.csproj index 8b80964219..94aa9103bd 100644 --- a/src/Tools/dotnet-user-secrets/test/dotnet-user-secrets.Tests.csproj +++ b/src/Tools/dotnet-user-secrets/test/dotnet-user-secrets.Tests.csproj @@ -1,7 +1,7 @@  - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) Microsoft.Extensions.SecretManager.Tools.Tests diff --git a/src/Tools/dotnet-watch/src/Internal/ProcessRunner.cs b/src/Tools/dotnet-watch/src/Internal/ProcessRunner.cs index 7874d592b6..0852eabe65 100644 --- a/src/Tools/dotnet-watch/src/Internal/ProcessRunner.cs +++ b/src/Tools/dotnet-watch/src/Internal/ProcessRunner.cs @@ -120,7 +120,7 @@ namespace Microsoft.DotNet.Watcher.Internal // this code used Process.Exited, which could result in us missing some output due to the ordering of // events. // - // See the remarks here: https://docs.microsoft.com/en-us/dotnet/api/system.diagnostics.process.waitforexit#System_Diagnostics_Process_WaitForExit_System_Int32_ + // See the remarks here: https://docs.microsoft.com/dotnet/api/system.diagnostics.process.waitforexit?view=netcore-2.2#System_Diagnostics_Process_WaitForExit_System_Int32_ if (!_process.WaitForExit(Int32.MaxValue)) { throw new TimeoutException(); diff --git a/src/Tools/dotnet-watch/src/dotnet-watch.csproj b/src/Tools/dotnet-watch/src/dotnet-watch.csproj index e50c349324..1b52ed2f69 100644 --- a/src/Tools/dotnet-watch/src/dotnet-watch.csproj +++ b/src/Tools/dotnet-watch/src/dotnet-watch.csproj @@ -1,7 +1,7 @@ - netcoreapp3.0 + $(DefaultNetCoreTargetFramework) exe Command line tool to watch for source file changes during development and restart the dotnet command. Microsoft.DotNet.Watcher.Tools diff --git a/src/Tools/dotnet-watch/test/ProgramTests.cs b/src/Tools/dotnet-watch/test/ProgramTests.cs index 922139a73f..6e24eb13d2 100644 --- a/src/Tools/dotnet-watch/test/ProgramTests.cs +++ b/src/Tools/dotnet-watch/test/ProgramTests.cs @@ -28,7 +28,7 @@ namespace Microsoft.DotNet.Watcher.Tools.Tests { _tempDir .WithCSharpProject("testproj") - .WithTargetFrameworks("netcoreapp3.0") + .WithTargetFrameworks("netcoreapp5.0") .Dir() .WithFile("Program.cs") .Create(); diff --git a/src/Tools/dotnet-watch/test/TestProjects/AppWithDeps/AppWithDeps.csproj b/src/Tools/dotnet-watch/test/TestProjects/AppWithDeps/AppWithDeps.csproj index 656db6ffb9..7399c1018d 100644 --- a/src/Tools/dotnet-watch/test/TestProjects/AppWithDeps/AppWithDeps.csproj +++ b/src/Tools/dotnet-watch/test/TestProjects/AppWithDeps/AppWithDeps.csproj @@ -1,7 +1,7 @@ - netcoreapp3.0 + netcoreapp5.0 exe true diff --git a/src/Tools/dotnet-watch/test/TestProjects/GlobbingApp/GlobbingApp.csproj b/src/Tools/dotnet-watch/test/TestProjects/GlobbingApp/GlobbingApp.csproj index 163d37f881..8f8043d0de 100644 --- a/src/Tools/dotnet-watch/test/TestProjects/GlobbingApp/GlobbingApp.csproj +++ b/src/Tools/dotnet-watch/test/TestProjects/GlobbingApp/GlobbingApp.csproj @@ -1,7 +1,7 @@ - netcoreapp3.0 + netcoreapp5.0 exe false true diff --git a/src/Tools/dotnet-watch/test/TestProjects/KitchenSink/KitchenSink.csproj b/src/Tools/dotnet-watch/test/TestProjects/KitchenSink/KitchenSink.csproj index c28f16d91e..6de103d382 100644 --- a/src/Tools/dotnet-watch/test/TestProjects/KitchenSink/KitchenSink.csproj +++ b/src/Tools/dotnet-watch/test/TestProjects/KitchenSink/KitchenSink.csproj @@ -9,7 +9,7 @@ Exe - netcoreapp3.0 + netcoreapp5.0 true diff --git a/src/Tools/dotnet-watch/test/TestProjects/NoDepsApp/NoDepsApp.csproj b/src/Tools/dotnet-watch/test/TestProjects/NoDepsApp/NoDepsApp.csproj index 9743820f9b..110ff7686b 100644 --- a/src/Tools/dotnet-watch/test/TestProjects/NoDepsApp/NoDepsApp.csproj +++ b/src/Tools/dotnet-watch/test/TestProjects/NoDepsApp/NoDepsApp.csproj @@ -1,7 +1,7 @@ - netcoreapp3.0 + netcoreapp5.0 exe true diff --git a/src/Tools/dotnet-watch/test/dotnet-watch.Tests.csproj b/src/Tools/dotnet-watch/test/dotnet-watch.Tests.csproj index b51c978aa7..a187a518a7 100644 --- a/src/Tools/dotnet-watch/test/dotnet-watch.Tests.csproj +++ b/src/Tools/dotnet-watch/test/dotnet-watch.Tests.csproj @@ -1,7 +1,8 @@  - netcoreapp3.0 + + netcoreapp5.0 Microsoft.DotNet.Watcher.Tools.Tests $(DefaultItemExcludes);TestProjects\**\* DotNetWatcherToolsTests