From d0d8803b62798d1534521b334f1e656479bd484e Mon Sep 17 00:00:00 2001 From: Mackinnon Buck Date: Mon, 24 Oct 2022 16:42:42 -0700 Subject: [PATCH 1/2] Update SDK (#44601) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Update SDK * Update global.json * Trying previous version * Update global.json * Updating 8.0.100-alpha.1.22524 * Updating MicrosoftNetCompilersToolsetVersion to 4.5.0-1.22517.9 * Fix CA1507 * Removing EnableAltSvc Co-authored-by: Sébastien Ros Co-authored-by: Bruno Oliveira Co-authored-by: Bruno Oliveira --- eng/Versions.props | 2 +- global.json | 4 ++-- src/Features/JsonPatch/src/Operations/Operation.cs | 2 +- src/Features/JsonPatch/src/Operations/OperationBase.cs | 6 +++--- src/Servers/Kestrel/Core/src/KestrelServerOptions.cs | 3 --- 5 files changed, 7 insertions(+), 10 deletions(-) diff --git a/eng/Versions.props b/eng/Versions.props index 3e8a2a071826..70a163c09ff5 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -161,7 +161,7 @@ true - 4.4.0-3.22452.8 + 4.5.0-1.22517.9 5.0.0-preview.4.20180.4 diff --git a/global.json b/global.json index 0d2e0bbbb234..1a03d40aaea1 100644 --- a/global.json +++ b/global.json @@ -1,9 +1,9 @@ { "sdk": { - "version": "8.0.100-alpha.1.22480.9" + "version": "8.0.100-alpha.1.22524.1" }, "tools": { - "dotnet": "8.0.100-alpha.1.22480.9", + "dotnet": "8.0.100-alpha.1.22524.1", "runtimes": { "dotnet/x86": [ "$(MicrosoftNETCoreBrowserDebugHostTransportVersion)" diff --git a/src/Features/JsonPatch/src/Operations/Operation.cs b/src/Features/JsonPatch/src/Operations/Operation.cs index 67d93a09630c..9ce29c3a5c16 100644 --- a/src/Features/JsonPatch/src/Operations/Operation.cs +++ b/src/Features/JsonPatch/src/Operations/Operation.cs @@ -9,7 +9,7 @@ namespace Microsoft.AspNetCore.JsonPatch.Operations; public class Operation : OperationBase { - [JsonProperty("value")] + [JsonProperty(nameof(value))] public object value { get; set; } public Operation() diff --git a/src/Features/JsonPatch/src/Operations/OperationBase.cs b/src/Features/JsonPatch/src/Operations/OperationBase.cs index 9bc59cb4d4c9..7ae24f6c7fc2 100644 --- a/src/Features/JsonPatch/src/Operations/OperationBase.cs +++ b/src/Features/JsonPatch/src/Operations/OperationBase.cs @@ -20,10 +20,10 @@ public OperationType OperationType } } - [JsonProperty("path")] + [JsonProperty(nameof(path))] public string path { get; set; } - [JsonProperty("op")] + [JsonProperty(nameof(op))] public string op { get @@ -42,7 +42,7 @@ public string op } } - [JsonProperty("from")] + [JsonProperty(nameof(from))] public string from { get; set; } public OperationBase() diff --git a/src/Servers/Kestrel/Core/src/KestrelServerOptions.cs b/src/Servers/Kestrel/Core/src/KestrelServerOptions.cs index f31880e8911a..fc6322dd417f 100644 --- a/src/Servers/Kestrel/Core/src/KestrelServerOptions.cs +++ b/src/Servers/Kestrel/Core/src/KestrelServerOptions.cs @@ -252,9 +252,6 @@ internal void Serialize(Utf8JsonWriter writer) writer.WritePropertyName(nameof(AllowResponseHeaderCompression)); writer.WriteBooleanValue(AllowResponseHeaderCompression); - writer.WritePropertyName(nameof(EnableAltSvc)); - writer.WriteBooleanValue(EnableAltSvc); - writer.WritePropertyName(nameof(IsDevCertLoaded)); writer.WriteBooleanValue(IsDevCertLoaded); From 43adc340ac4eaa917312aef85374c3e1f82fb070 Mon Sep 17 00:00:00 2001 From: Bruno Oliveira Date: Tue, 25 Oct 2022 14:45:25 -0700 Subject: [PATCH 2/2] Adding nuget --version workaround --- .azure/pipelines/ci.yml | 4 ++-- eng/build.sh | 30 ++++++++++++++++++++++++++++++ 2 files changed, 32 insertions(+), 2 deletions(-) diff --git a/.azure/pipelines/ci.yml b/.azure/pipelines/ci.yml index 09a10476b711..9571689f1f67 100644 --- a/.azure/pipelines/ci.yml +++ b/.azure/pipelines/ci.yml @@ -482,13 +482,13 @@ stages: $(_InternalRuntimeDownloadArgs) displayName: Run build.sh - script: git clean -xfd src/**/obj/; - ./dockerbuild.sh bionic --ci --nobl --arch x64 --build-installers --no-build-deps --no-build-nodejs + ./dockerbuild.sh bionic --ci --nobl --arch x64 --build-installers --no-build-deps --no-build-nodejs --init-nuget -p:OnlyPackPlatformSpecificPackages=true -p:BuildRuntimeArchive=false -p:LinuxInstallerType=deb $(_BuildArgs) $(_InternalRuntimeDownloadArgs) displayName: Build Debian installers - script: git clean -xfd src/**/obj/; - ./dockerbuild.sh rhel --ci --nobl --arch x64 --build-installers --no-build-deps --no-build-nodejs + ./dockerbuild.sh rhel --ci --nobl --arch x64 --build-installers --no-build-deps --no-build-nodejs --init-nuget -p:OnlyPackPlatformSpecificPackages=true -p:BuildRuntimeArchive=false -p:LinuxInstallerType=rpm -p:AssetManifestFileName=aspnetcore-Linux_x64.xml $(_BuildArgs) diff --git a/eng/build.sh b/eng/build.sh index a6b6ba99be44..093b04affdd4 100755 --- a/eng/build.sh +++ b/eng/build.sh @@ -33,6 +33,7 @@ target_arch='x64' configuration='' runtime_source_feed='' runtime_source_feed_key='' +init_nuget=false if [ "$(uname)" = "Darwin" ]; then target_os_name='osx' @@ -82,6 +83,8 @@ Options: --runtime-source-feed Additional feed that can be used when downloading .NET runtimes and SDKs --runtime-source-feed-key Key for feed that can be used when downloading .NET runtimes and SDKs + --init-nuget Run nuget --version. + Description: This build script installs required tools and runs an MSBuild command on this repository This script can be used to invoke various targets, such as targets to produce packages @@ -208,6 +211,9 @@ while [[ $# -gt 0 ]]; do -ci) ci=true ;; + -init-nuget) + init_nuget=true + ;; -binarylog|-bl) binary_log=true ;; @@ -359,6 +365,30 @@ export MSBUILDDEBUGPATH="$log_dir" _tmp_restore=$restore restore=true +if [[ "$init_nuget" == true ]]; then + InitializeBuildTool + + function RunBuildTool { + "$_InitializeBuildTool" "$@" || { + local exit_code=$? + # We should not Write-PipelineTaskError here because that message shows up in the build summary + # The build already logged an error, that's the reason it failed. Producing an error here only adds noise. + echo "Build failed with exit code $exit_code. Check errors above." + if [[ "$ci" == "true" ]]; then + Write-PipelineSetResult -result "Failed" -message "nuget execution failed." + # Exiting with an exit code causes the azure pipelines task to log yet another "noise" error + # The above Write-PipelineSetResult will cause the task to be marked as failure without adding yet another error + ExitWithExitCode 0 + else + ExitWithExitCode $exit_code + fi + } + } + + echo 'Running dotnet nuget --version (issue: https://github.com/NuGet/Home/issues/12159#issuecomment-1278360511)' + RunBuildTool "nuget" "--version" +fi + InitializeToolset restore=$_tmp_restore=