diff --git a/Directory.Build.props b/Directory.Build.props index 2da3b59909e3a5..ca664f1b74db54 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -71,11 +71,13 @@ net6.0 $(NetCoreAppCurrent) - 7.0 + + 8.0 net$(NetCoreAppToolCurrentVersion) $(NetCoreAppCurrentIdentifier),Version=v$(NetCoreAppToolCurrentVersion) - 7.0 + 8.0 net$(AspNetCoreAppCurrentVersion) net462 diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 37b67845cb5010..532cd51db23166 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -94,73 +94,73 @@ - + https://github.com/dotnet/arcade - 2fe7be991697bae1101c72947fa0a5eaad4a6250 + d360f5e4d22cdc673601d6cc60284ced948706ae - + https://github.com/dotnet/arcade - 2fe7be991697bae1101c72947fa0a5eaad4a6250 + d360f5e4d22cdc673601d6cc60284ced948706ae - + https://github.com/dotnet/arcade - 2fe7be991697bae1101c72947fa0a5eaad4a6250 + d360f5e4d22cdc673601d6cc60284ced948706ae - + https://github.com/dotnet/arcade - 2fe7be991697bae1101c72947fa0a5eaad4a6250 + d360f5e4d22cdc673601d6cc60284ced948706ae - + https://github.com/dotnet/arcade - 2fe7be991697bae1101c72947fa0a5eaad4a6250 + d360f5e4d22cdc673601d6cc60284ced948706ae - + https://github.com/dotnet/arcade - 2fe7be991697bae1101c72947fa0a5eaad4a6250 + d360f5e4d22cdc673601d6cc60284ced948706ae - + https://github.com/dotnet/arcade - 2fe7be991697bae1101c72947fa0a5eaad4a6250 + d360f5e4d22cdc673601d6cc60284ced948706ae - + https://github.com/dotnet/arcade - 2fe7be991697bae1101c72947fa0a5eaad4a6250 + d360f5e4d22cdc673601d6cc60284ced948706ae - + https://github.com/dotnet/arcade - 2fe7be991697bae1101c72947fa0a5eaad4a6250 + d360f5e4d22cdc673601d6cc60284ced948706ae - + https://github.com/dotnet/arcade - 2fe7be991697bae1101c72947fa0a5eaad4a6250 + d360f5e4d22cdc673601d6cc60284ced948706ae - + https://github.com/dotnet/arcade - 2fe7be991697bae1101c72947fa0a5eaad4a6250 + d360f5e4d22cdc673601d6cc60284ced948706ae - + https://github.com/dotnet/arcade - 2fe7be991697bae1101c72947fa0a5eaad4a6250 + d360f5e4d22cdc673601d6cc60284ced948706ae - + https://github.com/dotnet/arcade - 2fe7be991697bae1101c72947fa0a5eaad4a6250 + d360f5e4d22cdc673601d6cc60284ced948706ae - + https://github.com/dotnet/arcade - 2fe7be991697bae1101c72947fa0a5eaad4a6250 + d360f5e4d22cdc673601d6cc60284ced948706ae - + https://github.com/dotnet/arcade - 2fe7be991697bae1101c72947fa0a5eaad4a6250 + d360f5e4d22cdc673601d6cc60284ced948706ae - + https://github.com/dotnet/arcade - 2fe7be991697bae1101c72947fa0a5eaad4a6250 + d360f5e4d22cdc673601d6cc60284ced948706ae - + https://github.com/dotnet/arcade - 2fe7be991697bae1101c72947fa0a5eaad4a6250 + d360f5e4d22cdc673601d6cc60284ced948706ae https://github.com/dotnet/runtime-assets @@ -286,9 +286,9 @@ https://github.com/dotnet/xharness c1362c3067c08e04319df8ddfbf8ff551ca75a77 - + https://github.com/dotnet/arcade - 2fe7be991697bae1101c72947fa0a5eaad4a6250 + d360f5e4d22cdc673601d6cc60284ced948706ae https://dev.azure.com/dnceng/internal/_git/dotnet-optimization diff --git a/eng/Versions.props b/eng/Versions.props index f00231fa675e0b..a2a19a0a3aa059 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -81,21 +81,21 @@ 8.0.100-alpha.1.22571.3 - 8.0.0-beta.23053.5 - 8.0.0-beta.23053.5 - 8.0.0-beta.23053.5 - 8.0.0-beta.23053.5 - 8.0.0-beta.23053.5 - 2.5.1-beta.23053.5 - 8.0.0-beta.23053.5 - 8.0.0-beta.23053.5 - 8.0.0-beta.23053.5 - 8.0.0-beta.23053.5 - 8.0.0-beta.23053.5 - 8.0.0-beta.23053.5 - 8.0.0-beta.23053.5 - 8.0.0-beta.23053.5 - 8.0.0-beta.23053.5 + 8.0.0-beta.23059.1 + 8.0.0-beta.23059.1 + 8.0.0-beta.23059.1 + 8.0.0-beta.23059.1 + 8.0.0-beta.23059.1 + 2.5.1-beta.23059.1 + 8.0.0-beta.23059.1 + 8.0.0-beta.23059.1 + 8.0.0-beta.23059.1 + 8.0.0-beta.23059.1 + 8.0.0-beta.23059.1 + 8.0.0-beta.23059.1 + 8.0.0-beta.23059.1 + 8.0.0-beta.23059.1 + 8.0.0-beta.23059.1 6.0.0-preview.1.102 diff --git a/eng/common/templates/job/source-index-stage1.yml b/eng/common/templates/job/source-index-stage1.yml index 09c506d11855db..71b66aeb8a5c5d 100644 --- a/eng/common/templates/job/source-index-stage1.yml +++ b/eng/common/templates/job/source-index-stage1.yml @@ -1,6 +1,6 @@ parameters: runAsPublic: false - sourceIndexPackageVersion: 1.0.1-20220804.1 + sourceIndexPackageVersion: 1.0.1-20221220.2 sourceIndexPackageSource: https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json sourceIndexBuildCommand: powershell -NoLogo -NoProfile -ExecutionPolicy Bypass -Command "eng/common/build.ps1 -restore -build -binarylog -ci" preSteps: [] @@ -40,10 +40,10 @@ jobs: - ${{ preStep }} - task: UseDotNet@2 - displayName: Use .NET Core sdk 3.1 + displayName: Use .NET Core SDK 6 inputs: packageType: sdk - version: 3.1.x + version: 6.0.x installationPath: $(Agent.TempDirectory)/dotnet workingDirectory: $(Agent.TempDirectory) diff --git a/eng/common/tools.ps1 b/eng/common/tools.ps1 index 1a8c16c56e566b..7caacc6de2e1f9 100644 --- a/eng/common/tools.ps1 +++ b/eng/common/tools.ps1 @@ -581,7 +581,7 @@ function InitializeBuildTool() { ExitWithExitCode 1 } $dotnetPath = Join-Path $dotnetRoot (GetExecutableFileName 'dotnet') - $buildTool = @{ Path = $dotnetPath; Command = 'msbuild'; Tool = 'dotnet'; Framework = 'net7.0' } + $buildTool = @{ Path = $dotnetPath; Command = 'msbuild'; Tool = 'dotnet'; Framework = 'net8.0' } } elseif ($msbuildEngine -eq "vs") { try { $msbuildPath = InitializeVisualStudioMSBuild -install:$restore @@ -743,6 +743,8 @@ function MSBuild() { (Join-Path $basePath (Join-Path netcoreapp2.1 'Microsoft.DotNet.Arcade.Sdk.dll')) (Join-Path $basePath (Join-Path netcoreapp3.1 'Microsoft.DotNet.ArcadeLogging.dll')), (Join-Path $basePath (Join-Path netcoreapp3.1 'Microsoft.DotNet.Arcade.Sdk.dll')) + (Join-Path $basePath (Join-Path net7.0 'Microsoft.DotNet.ArcadeLogging.dll')), + (Join-Path $basePath (Join-Path net7.0 'Microsoft.DotNet.Arcade.Sdk.dll')) ) $selectedPath = $null foreach ($path in $possiblePaths) { diff --git a/eng/common/tools.sh b/eng/common/tools.sh index 2f27d7453cd495..cf9fb1ea2d32b5 100755 --- a/eng/common/tools.sh +++ b/eng/common/tools.sh @@ -312,7 +312,7 @@ function InitializeBuildTool { # return values _InitializeBuildTool="$_InitializeDotNetCli/dotnet" _InitializeBuildToolCommand="msbuild" - _InitializeBuildToolFramework="net7.0" + _InitializeBuildToolFramework="net8.0" } # Set RestoreNoCache as a workaround for https://github.com/NuGet/Home/issues/3116 @@ -428,6 +428,8 @@ function MSBuild { possiblePaths+=( "$toolset_dir/netcoreapp2.1/Microsoft.DotNet.Arcade.Sdk.dll" ) possiblePaths+=( "$toolset_dir/netcoreapp3.1/Microsoft.DotNet.ArcadeLogging.dll" ) possiblePaths+=( "$toolset_dir/netcoreapp3.1/Microsoft.DotNet.Arcade.Sdk.dll" ) + possiblePaths+=( "$toolset_dir/net7.0/Microsoft.DotNet.ArcadeLogging.dll" ) + possiblePaths+=( "$toolset_dir/net7.0/Microsoft.DotNet.Arcade.Sdk.dll" ) for path in "${possiblePaths[@]}"; do if [[ -f $path ]]; then selectedPath=$path diff --git a/eng/illink.targets b/eng/illink.targets index 3636c029fc901b..99c7f97be8e081 100644 --- a/eng/illink.targets +++ b/eng/illink.targets @@ -2,6 +2,8 @@ true + + <_IsTrimmingEnabled>false _EmbedILLinkXmls;$(PrepareResourcesDependsOn) $(TargetsTriggeredByCompilation);ILLinkTrimAssembly diff --git a/eng/testing/linker/SupportFiles/Directory.Build.targets b/eng/testing/linker/SupportFiles/Directory.Build.targets index 0e960695809e64..73c132ad0877c4 100644 --- a/eng/testing/linker/SupportFiles/Directory.Build.targets +++ b/eng/testing/linker/SupportFiles/Directory.Build.targets @@ -13,6 +13,7 @@ Condition="'$(TargetArchitecture)' == 'wasm' And '$(TargetOS)' == 'Browser'" /> + true $(CoreCLRBuildIntegrationDir)Microsoft.DotNet.ILCompiler.SingleEntry.targets diff --git a/global.json b/global.json index 40ef8ec6f7dd7c..61cc11c35b7b0d 100644 --- a/global.json +++ b/global.json @@ -1,16 +1,16 @@ { "sdk": { - "version": "7.0.100", + "version": "8.0.100-alpha.1.23061.8", "allowPrerelease": true, "rollForward": "major" }, "tools": { - "dotnet": "7.0.100" + "dotnet": "8.0.100-alpha.1.23061.8" }, "msbuild-sdks": { - "Microsoft.DotNet.Arcade.Sdk": "8.0.0-beta.23053.5", - "Microsoft.DotNet.Helix.Sdk": "8.0.0-beta.23053.5", - "Microsoft.DotNet.SharedFramework.Sdk": "8.0.0-beta.23053.5", + "Microsoft.DotNet.Arcade.Sdk": "8.0.0-beta.23059.1", + "Microsoft.DotNet.Helix.Sdk": "8.0.0-beta.23059.1", + "Microsoft.DotNet.SharedFramework.Sdk": "8.0.0-beta.23059.1", "Microsoft.Build.NoTargets": "3.5.0", "Microsoft.Build.Traversal": "3.1.6", "Microsoft.NET.Sdk.IL": "8.0.0-alpha.1.22631.1" diff --git a/src/coreclr/tools/aot/Mono.Linker.Tests.Cases.Expectations/Assertions/KeptInitializerData.cs b/src/coreclr/tools/aot/Mono.Linker.Tests.Cases.Expectations/Assertions/KeptInitializerData.cs index c52323dac4086d..b91a475e2a46d2 100644 --- a/src/coreclr/tools/aot/Mono.Linker.Tests.Cases.Expectations/Assertions/KeptInitializerData.cs +++ b/src/coreclr/tools/aot/Mono.Linker.Tests.Cases.Expectations/Assertions/KeptInitializerData.cs @@ -15,8 +15,7 @@ public KeptInitializerData () public KeptInitializerData (int occurrenceIndexInBody) { - if (occurrenceIndexInBody < 0) - throw new ArgumentOutOfRangeException (nameof (occurrenceIndexInBody)); + ArgumentOutOfRangeException.ThrowIfNegative(occurrenceIndexInBody); } } } diff --git a/src/coreclr/tools/aot/Mono.Linker.Tests/TestCasesRunner/PathUtilities.cs b/src/coreclr/tools/aot/Mono.Linker.Tests/TestCasesRunner/PathUtilities.cs index 461e7e18823829..12a262b76310d9 100644 --- a/src/coreclr/tools/aot/Mono.Linker.Tests/TestCasesRunner/PathUtilities.cs +++ b/src/coreclr/tools/aot/Mono.Linker.Tests/TestCasesRunner/PathUtilities.cs @@ -10,7 +10,7 @@ namespace Mono.Linker.Tests.TestCasesRunner public static class PathUtilities { #if NET8_0 - public const string TFMDirectoryName = "net8.0"; + public const string TFMDirectoryName = "net8.0"; #elif NET7_0 public const string TFMDirectoryName = "net7.0"; #elif NET6_0 diff --git a/src/installer/pkg/sfx/Microsoft.NETCore.App/Directory.Build.props b/src/installer/pkg/sfx/Microsoft.NETCore.App/Directory.Build.props index d260fa689f48b1..072ce8c6e9d9bc 100644 --- a/src/installer/pkg/sfx/Microsoft.NETCore.App/Directory.Build.props +++ b/src/installer/pkg/sfx/Microsoft.NETCore.App/Directory.Build.props @@ -290,6 +290,6 @@ - $([MSBuild]::NormalizeDirectory('$(ArtifactsBinDir)', 'WorkloadBuildTasks', 'Debug', '$(NetCoreAppToolCurrent)'))WorkloadBuildTasks.dll + $([MSBuild]::NormalizePath('$(ArtifactsBinDir)', 'WorkloadBuildTasks', 'Debug', '$(NetCoreAppToolCurrent)', 'WorkloadBuildTasks.dll')) diff --git a/src/libraries/Common/tests/System/Net/Prerequisites/NetCoreServer/Handlers/DeflateHandler.cs b/src/libraries/Common/tests/System/Net/Prerequisites/NetCoreServer/Handlers/DeflateHandler.cs index c4c6d267e807fd..3117e02787c3ab 100644 --- a/src/libraries/Common/tests/System/Net/Prerequisites/NetCoreServer/Handlers/DeflateHandler.cs +++ b/src/libraries/Common/tests/System/Net/Prerequisites/NetCoreServer/Handlers/DeflateHandler.cs @@ -13,8 +13,8 @@ public static async Task InvokeAsync(HttpContext context) { string responseBody = "Sending DEFLATE compressed"; - context.Response.Headers.Add("Content-MD5", Convert.ToBase64String(ContentHelper.ComputeMD5Hash(responseBody))); - context.Response.Headers.Add("Content-Encoding", "deflate"); + context.Response.Headers["Content-MD5"] = Convert.ToBase64String(ContentHelper.ComputeMD5Hash(responseBody)); + context.Response.Headers["Content-Encoding"] = "deflate"; context.Response.ContentType = "text/plain"; diff --git a/src/libraries/Common/tests/System/Net/Prerequisites/NetCoreServer/Handlers/EchoHandler.cs b/src/libraries/Common/tests/System/Net/Prerequisites/NetCoreServer/Handlers/EchoHandler.cs index ca6fc8ebd7e605..fd05cff102d2e6 100644 --- a/src/libraries/Common/tests/System/Net/Prerequisites/NetCoreServer/Handlers/EchoHandler.cs +++ b/src/libraries/Common/tests/System/Net/Prerequisites/NetCoreServer/Handlers/EchoHandler.cs @@ -21,7 +21,7 @@ public static async Task InvokeAsync(HttpContext context) } // Add original request method verb as a custom response header. - context.Response.Headers.Add("X-HttpRequest-Method", context.Request.Method); + context.Response.Headers["X-HttpRequest-Method"] = context.Request.Method; // Echo back JSON encoded payload. RequestInformation info = await RequestInformation.CreateAsync(context.Request); @@ -34,7 +34,7 @@ public static async Task InvokeAsync(HttpContext context) byte[] hash = md5.ComputeHash(bytes); string encodedHash = Convert.ToBase64String(hash); - context.Response.Headers.Add("Content-MD5", encodedHash); + context.Response.Headers["Content-MD5"] = encodedHash; context.Response.ContentType = "application/json"; context.Response.ContentLength = bytes.Length; await context.Response.Body.WriteAsync(bytes, 0, bytes.Length); diff --git a/src/libraries/Common/tests/System/Net/Prerequisites/NetCoreServer/Handlers/GZipHandler.cs b/src/libraries/Common/tests/System/Net/Prerequisites/NetCoreServer/Handlers/GZipHandler.cs index 3c8c4542545089..59e1b7ecd4df8a 100644 --- a/src/libraries/Common/tests/System/Net/Prerequisites/NetCoreServer/Handlers/GZipHandler.cs +++ b/src/libraries/Common/tests/System/Net/Prerequisites/NetCoreServer/Handlers/GZipHandler.cs @@ -13,8 +13,8 @@ public static async Task InvokeAsync(HttpContext context) { string responseBody = "Sending GZIP compressed"; - context.Response.Headers.Add("Content-MD5", Convert.ToBase64String(ContentHelper.ComputeMD5Hash(responseBody))); - context.Response.Headers.Add("Content-Encoding", "gzip"); + context.Response.Headers["Content-MD5"] = Convert.ToBase64String(ContentHelper.ComputeMD5Hash(responseBody)); + context.Response.Headers["Content-Encoding"] = "gzip"; context.Response.ContentType = "text/plain"; diff --git a/src/libraries/Common/tests/System/Net/Prerequisites/NetCoreServer/Handlers/LargeResponse.cs b/src/libraries/Common/tests/System/Net/Prerequisites/NetCoreServer/Handlers/LargeResponse.cs index 41e21fd3cb5eb2..42bdc68958a03e 100644 --- a/src/libraries/Common/tests/System/Net/Prerequisites/NetCoreServer/Handlers/LargeResponse.cs +++ b/src/libraries/Common/tests/System/Net/Prerequisites/NetCoreServer/Handlers/LargeResponse.cs @@ -21,7 +21,7 @@ public static async Task InvokeAsync(HttpContext context) } // Add original request method verb as a custom response header. - context.Response.Headers.Add("X-HttpRequest-Method", context.Request.Method); + context.Response.Headers["X-HttpRequest-Method"] = context.Request.Method; var size = 1024; if (context.Request.Query.TryGetValue("size", out var value)) diff --git a/src/libraries/Common/tests/System/Net/Prerequisites/NetCoreServer/Handlers/RedirectHandler.cs b/src/libraries/Common/tests/System/Net/Prerequisites/NetCoreServer/Handlers/RedirectHandler.cs index 596b8be559e4b5..58da5c207de469 100644 --- a/src/libraries/Common/tests/System/Net/Prerequisites/NetCoreServer/Handlers/RedirectHandler.cs +++ b/src/libraries/Common/tests/System/Net/Prerequisites/NetCoreServer/Handlers/RedirectHandler.cs @@ -60,15 +60,13 @@ public static void Invoke(HttpContext context) if (hops <= 1) { - context.Response.Headers.Add("Location", redirectUri); + context.Response.Headers["Location"] = redirectUri; } else { - context.Response.Headers.Add( - "Location", - string.Format("/Redirect.ashx?uri={0}&hops={1}", + context.Response.Headers["Location"] = string.Format("/Redirect.ashx?uri={0}&hops={1}", redirectUri, - hops - 1)); + hops - 1); } context.Response.StatusCode = statusCode; diff --git a/src/libraries/Common/tests/System/Net/Prerequisites/NetCoreServer/Handlers/TestHandler.cs b/src/libraries/Common/tests/System/Net/Prerequisites/NetCoreServer/Handlers/TestHandler.cs index 936832d3babde5..767bec6be41d7f 100644 --- a/src/libraries/Common/tests/System/Net/Prerequisites/NetCoreServer/Handlers/TestHandler.cs +++ b/src/libraries/Common/tests/System/Net/Prerequisites/NetCoreServer/Handlers/TestHandler.cs @@ -28,7 +28,7 @@ public static async Task InvokeAsync(HttpContext context) byte[] bytes = Encoding.ASCII.GetBytes(echoJson); var hash = md5.ComputeHash(bytes); string encodedHash = Convert.ToBase64String(hash); - context.Response.Headers.Add("Content-MD5", encodedHash); + context.Response.Headers["Content-MD5"] = encodedHash; RequestInformation newEcho = RequestInformation.DeSerializeFromJson(echoJson); context.Response.ContentType = "text/plain"; //"application/json"; diff --git a/src/libraries/Common/tests/System/Net/Prerequisites/NetCoreServer/Handlers/VerifyUploadHandler.cs b/src/libraries/Common/tests/System/Net/Prerequisites/NetCoreServer/Handlers/VerifyUploadHandler.cs index 3608f6211a3d64..e4c6cb63c55603 100644 --- a/src/libraries/Common/tests/System/Net/Prerequisites/NetCoreServer/Handlers/VerifyUploadHandler.cs +++ b/src/libraries/Common/tests/System/Net/Prerequisites/NetCoreServer/Handlers/VerifyUploadHandler.cs @@ -14,19 +14,19 @@ public class VerifyUploadHandler public static async Task InvokeAsync(HttpContext context) { // Report back original request method verb. - context.Response.Headers.Add("X-HttpRequest-Method", context.Request.Method); + context.Response.Headers["X-HttpRequest-Method"] = context.Request.Method; // Report back original entity-body related request headers. string contentLength = context.Request.Headers["Content-Length"]; if (!string.IsNullOrEmpty(contentLength)) { - context.Response.Headers.Add("X-HttpRequest-Headers-ContentLength", contentLength); + context.Response.Headers["X-HttpRequest-Headers-ContentLength"] = contentLength; } string transferEncoding = context.Request.Headers["Transfer-Encoding"]; if (!string.IsNullOrEmpty(transferEncoding)) { - context.Response.Headers.Add("X-HttpRequest-Headers-TransferEncoding", transferEncoding); + context.Response.Headers["X-HttpRequest-Headers-TransferEncoding"] = transferEncoding; } // Get request body. diff --git a/src/libraries/Common/tests/System/Net/Prerequisites/NetCoreServer/Helpers/AuthenticationHelper.cs b/src/libraries/Common/tests/System/Net/Prerequisites/NetCoreServer/Helpers/AuthenticationHelper.cs index e7a89febbc25d0..6168be185e24f8 100644 --- a/src/libraries/Common/tests/System/Net/Prerequisites/NetCoreServer/Helpers/AuthenticationHelper.cs +++ b/src/libraries/Common/tests/System/Net/Prerequisites/NetCoreServer/Helpers/AuthenticationHelper.cs @@ -49,7 +49,7 @@ private static bool HandleBasicAuthentication(HttpContext context, string user, if (authHeader == null) { context.Response.StatusCode = 401; - context.Response.Headers.Add("WWW-Authenticate", WwwAuthenticateHeaderValue); + context.Response.Headers["WWW-Authenticate"] = WwwAuthenticateHeaderValue; return false; } @@ -82,7 +82,7 @@ private static bool HandleBasicAuthentication(HttpContext context, string user, if (pair.Length != 2 || pair[0] != user || pair[1] != password) { context.Response.StatusCode = 401; - context.Response.Headers.Add("WWW-Authenticate", WwwAuthenticateHeaderValue); + context.Response.Headers["WWW-Authenticate"] = WwwAuthenticateHeaderValue; return false; } @@ -100,7 +100,7 @@ private static bool HandleChallengeResponseAuthentication( if (authHeader == null) { context.Response.StatusCode = 401; - context.Response.Headers.Add("WWW-Authenticate", authType); + context.Response.Headers["WWW-Authenticate"] = authType; return false; } diff --git a/src/libraries/Common/tests/System/Net/Prerequisites/NetCoreServer/Helpers/RequestHelper.cs b/src/libraries/Common/tests/System/Net/Prerequisites/NetCoreServer/Helpers/RequestHelper.cs index b72c1763ff0f86..790f4d22160258 100644 --- a/src/libraries/Common/tests/System/Net/Prerequisites/NetCoreServer/Helpers/RequestHelper.cs +++ b/src/libraries/Common/tests/System/Net/Prerequisites/NetCoreServer/Helpers/RequestHelper.cs @@ -18,7 +18,7 @@ public static void AddResponseCookies(HttpContext context) { if (string.Equals(pair.Key, "X-SetCookie", StringComparison.OrdinalIgnoreCase)) { - context.Response.Headers.Add("Set-Cookie", pair.Value.ToString()); + context.Response.Headers["Set-Cookie"] = pair.Value.ToString(); } } } diff --git a/src/libraries/System.Runtime.InteropServices/tests/TestAssets/NativeExports/NativeExports.csproj b/src/libraries/System.Runtime.InteropServices/tests/TestAssets/NativeExports/NativeExports.csproj index 9e517c1c2ddbb2..b43c6221e5ae0e 100644 --- a/src/libraries/System.Runtime.InteropServices/tests/TestAssets/NativeExports/NativeExports.csproj +++ b/src/libraries/System.Runtime.InteropServices/tests/TestAssets/NativeExports/NativeExports.csproj @@ -95,7 +95,7 @@ arm64-apple-macos11 - x86_64-apple-macos10.14 + x86_64-apple-macos10.15 macosx diff --git a/src/libraries/sendtohelix-wasm.targets b/src/libraries/sendtohelix-wasm.targets index 44b4968d1fc218..ec2dadbd5b3470 100644 --- a/src/libraries/sendtohelix-wasm.targets +++ b/src/libraries/sendtohelix-wasm.targets @@ -53,6 +53,8 @@ true false true + + true @@ -137,7 +139,7 @@ true - + true true false diff --git a/src/mono/msbuild/apple/build/AppleApp.LocalBuild.props b/src/mono/msbuild/apple/build/AppleApp.LocalBuild.props index c9e738a178ca63..aa0bbef6fdf0dc 100644 --- a/src/mono/msbuild/apple/build/AppleApp.LocalBuild.props +++ b/src/mono/msbuild/apple/build/AppleApp.LocalBuild.props @@ -23,7 +23,7 @@ <_NetCoreAppCurrent>net8.0 - <_NetCoreAppToolCurrent>net7.0 + <_NetCoreAppToolCurrent>net8.0 false diff --git a/src/mono/wasm/build/WasmApp.LocalBuild.props b/src/mono/wasm/build/WasmApp.LocalBuild.props index 6cbb86d94e7f51..ff40ab7a66d379 100644 --- a/src/mono/wasm/build/WasmApp.LocalBuild.props +++ b/src/mono/wasm/build/WasmApp.LocalBuild.props @@ -22,7 +22,7 @@ - <_TargetFrameworkForNETCoreTasks>net7.0 + <_TargetFrameworkForNETCoreTasks>net8.0 false diff --git a/src/mono/wasm/host/Options.cs b/src/mono/wasm/host/Options.cs index ee3dd8f5a8134b..98dbbe77c94a29 100644 --- a/src/mono/wasm/host/Options.cs +++ b/src/mono/wasm/host/Options.cs @@ -342,8 +342,7 @@ private void AssertValid(int index) { if (c.Option == null) throw new InvalidOperationException("OptionContext.Option is null."); - if (index >= c.Option.MaxValueCount) - throw new ArgumentOutOfRangeException(nameof(index)); + ArgumentOutOfRangeException.ThrowIfGreaterThanOrEqual(index, c.Option.MaxValueCount, nameof(index)); if (c.Option.OptionValueType == OptionValueType.Required && index >= values.Count) throw new OptionException(string.Format( @@ -453,8 +452,7 @@ protected Option(string prototype, string description, int maxValueCount) protected Option(string prototype, string description, int maxValueCount, bool hidden) { ArgumentException.ThrowIfNullOrEmpty(prototype); - if (maxValueCount < 0) - throw new ArgumentOutOfRangeException(nameof(maxValueCount)); + ArgumentOutOfRangeException.ThrowIfNegative(maxValueCount); this.prototype = prototype; this.description = description; diff --git a/src/mono/wasm/host/WebServerStartup.cs b/src/mono/wasm/host/WebServerStartup.cs index 4025bf928441c2..e2e0be4a39c760 100644 --- a/src/mono/wasm/host/WebServerStartup.cs +++ b/src/mono/wasm/host/WebServerStartup.cs @@ -13,6 +13,7 @@ using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore.Hosting; using Microsoft.AspNetCore.Hosting.Server.Features; +using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Routing; using Microsoft.AspNetCore.StaticFiles; using Microsoft.Extensions.FileProviders; @@ -91,8 +92,8 @@ public void Configure(IApplicationBuilder app, { app.Use((context, next) => { - context.Response.Headers.Add("Cross-Origin-Embedder-Policy", "require-corp"); - context.Response.Headers.Add("Cross-Origin-Opener-Policy", "same-origin"); + context.Response.Headers.Append("Cross-Origin-Embedder-Policy", "require-corp"); + context.Response.Headers.Append("Cross-Origin-Opener-Policy", "same-origin"); return next(); }); } diff --git a/src/tests/Common/external/external.csproj b/src/tests/Common/external/external.csproj index 718d92e2bd2aa4..bc749d9d6e5a35 100644 --- a/src/tests/Common/external/external.csproj +++ b/src/tests/Common/external/external.csproj @@ -14,7 +14,6 @@ $(TargetingPackPath) $(NetCoreAppToolCurrent) win7-x86;win7-x64 - net7.0 SharedLibrary false false diff --git a/src/tools/illink/src/ILLink.RoslynAnalyzer/DynamicallyAccessedMembersAnalyzer.cs b/src/tools/illink/src/ILLink.RoslynAnalyzer/DynamicallyAccessedMembersAnalyzer.cs index 1c8ee148389c95..b372d4f3fdce11 100644 --- a/src/tools/illink/src/ILLink.RoslynAnalyzer/DynamicallyAccessedMembersAnalyzer.cs +++ b/src/tools/illink/src/ILLink.RoslynAnalyzer/DynamicallyAccessedMembersAnalyzer.cs @@ -164,7 +164,7 @@ invocationExpression.Expression is IdentifierNameSyntax ident1 && } } - static IEnumerable GetDynamicallyAccessedMembersDiagnostics (SingleValue sourceValue, SingleValue targetValue, Location location) + static List GetDynamicallyAccessedMembersDiagnostics (SingleValue sourceValue, SingleValue targetValue, Location location) { // The target should always be an annotated value, but the visitor design currently prevents // declaring this in the type system. diff --git a/src/tools/illink/src/ILLink.Tasks/LinkTask.cs b/src/tools/illink/src/ILLink.Tasks/LinkTask.cs index 050720c37324fb..e805b2cd51bea9 100644 --- a/src/tools/illink/src/ILLink.Tasks/LinkTask.cs +++ b/src/tools/illink/src/ILLink.Tasks/LinkTask.cs @@ -262,7 +262,7 @@ public string ILLinkPath { var taskDirectory = Path.GetDirectoryName (Assembly.GetExecutingAssembly ().Location); #pragma warning restore IL3000 // Avoid accessing Assembly file path when publishing as a single file // The linker always runs on .NET Core, even when using desktop MSBuild to host ILLink.Tasks. - _illinkPath = Path.Combine (Path.GetDirectoryName (taskDirectory), "net7.0", "illink.dll"); + _illinkPath = Path.Combine (Path.GetDirectoryName (taskDirectory), "net8.0", "illink.dll"); return _illinkPath; } set => _illinkPath = value; diff --git a/src/tools/illink/src/ILLink.Tasks/build/Microsoft.NET.ILLink.Tasks.props b/src/tools/illink/src/ILLink.Tasks/build/Microsoft.NET.ILLink.Tasks.props index aab7c034a9f178..271cdca79a154a 100644 --- a/src/tools/illink/src/ILLink.Tasks/build/Microsoft.NET.ILLink.Tasks.props +++ b/src/tools/illink/src/ILLink.Tasks/build/Microsoft.NET.ILLink.Tasks.props @@ -18,7 +18,7 @@ Copyright (c) .NET Foundation. All rights reserved. true - $(MSBuildThisFileDirectory)..\tools\net7.0\ILLink.Tasks.dll + $(MSBuildThisFileDirectory)..\tools\net8.0\ILLink.Tasks.dll $(MSBuildThisFileDirectory)..\tools\net472\ILLink.Tasks.dll diff --git a/src/tools/illink/test/ILLink.RoslynAnalyzer.Tests/RequiresAssemblyFilesAnalyzerTests.cs b/src/tools/illink/test/ILLink.RoslynAnalyzer.Tests/RequiresAssemblyFilesAnalyzerTests.cs index 6d4db46a46a452..89c8f461e3faf9 100644 --- a/src/tools/illink/test/ILLink.RoslynAnalyzer.Tests/RequiresAssemblyFilesAnalyzerTests.cs +++ b/src/tools/illink/test/ILLink.RoslynAnalyzer.Tests/RequiresAssemblyFilesAnalyzerTests.cs @@ -287,6 +287,10 @@ public void M() } """; return VerifyRequiresAssemblyFilesAnalyzer (src, + // (7,7): warning SYSLIB0044: 'AssemblyName.CodeBase' is obsolete: 'AssemblyName.CodeBase and AssemblyName.EscapedCodeBase are obsolete. Using them for loading an assembly is not supported.' + DiagnosticResult.CompilerWarning ("SYSLIB0044").WithSpan (7, 7, 7, 17).WithArguments ("System.Reflection.AssemblyName.CodeBase", "AssemblyName.CodeBase and AssemblyName.EscapedCodeBase are obsolete. Using them for loading an assembly is not supported."), + // (8,7): warning SYSLIB0044: 'AssemblyName.EscapedCodeBase' is obsolete: 'AssemblyName.CodeBase and AssemblyName.EscapedCodeBase are obsolete. Using them for loading an assembly is not supported.' + DiagnosticResult.CompilerWarning ("SYSLIB0044").WithSpan (8, 7, 8, 24).WithArguments ("System.Reflection.AssemblyName.EscapedCodeBase", "AssemblyName.CodeBase and AssemblyName.EscapedCodeBase are obsolete. Using them for loading an assembly is not supported."), // (7,7): warning IL3002: Using member 'System.Reflection.AssemblyName.CodeBase.get' which has 'RequiresAssemblyFilesAttribute' can break functionality when embedded in a single-file app. The code will return an empty string for assemblies embedded in a single-file app. VerifyCS.Diagnostic (DiagnosticId.RequiresAssemblyFiles).WithSpan (7, 7, 7, 17).WithArguments ("System.Reflection.AssemblyName.CodeBase.get", " The code will return an empty string for assemblies embedded in a single-file app.", ""), // (7,7): warning IL3000: 'System.Reflection.AssemblyName.CodeBase' always returns an empty string for assemblies embedded in a single-file app. If the path to the app directory is needed, consider calling 'System.AppContext.BaseDirectory'. diff --git a/src/tools/illink/test/ILLink.RoslynAnalyzer.Tests/TestCaseUtils.cs b/src/tools/illink/test/ILLink.RoslynAnalyzer.Tests/TestCaseUtils.cs index 986ac0d38267ce..76da0406184c65 100644 --- a/src/tools/illink/test/ILLink.RoslynAnalyzer.Tests/TestCaseUtils.cs +++ b/src/tools/illink/test/ILLink.RoslynAnalyzer.Tests/TestCaseUtils.cs @@ -26,9 +26,9 @@ public abstract class TestCaseUtils public static readonly ReferenceAssemblies Net6PreviewAssemblies = new ReferenceAssemblies ( - "net7.0", - new PackageIdentity ("Microsoft.NETCore.App.Ref", "7.0.0-preview.5.22301.12"), - Path.Combine ("ref", "net7.0")) + "net8.0", + new PackageIdentity ("Microsoft.NETCore.App.Ref", "8.0.0-alpha.1.23060.19"), + Path.Combine ("ref", "net8.0")) .WithNuGetConfigFilePath (Path.Combine (TestCaseUtils.GetRepoRoot (), "NuGet.config")); private static ImmutableArray s_net6Refs; @@ -159,7 +159,7 @@ public static void GetDirectoryPaths (out string rootSourceDirectory, out string var LinkerTestDirectory = (string)AppContext.GetData("ILLink.RoslynAnalyzer.Tests.LinkerTestDir")!; var configuration = (string)AppContext.GetData("ILLink.RoslynAnalyzer.Tests.Configuration")!; - const string tfm = "net7.0"; + const string tfm = "net8.0"; rootSourceDirectory = Path.GetFullPath(Path.Combine(LinkerTestDirectory, "Mono.Linker.Tests.Cases")); testAssemblyPath = Path.GetFullPath(Path.Combine(artifactsBinDirectory, "ILLink.RoslynAnalyzer.Tests", configuration, tfm)); diff --git a/src/tools/illink/test/Mono.Linker.Tests/TestCasesRunner/PathUtilities.cs b/src/tools/illink/test/Mono.Linker.Tests/TestCasesRunner/PathUtilities.cs index fcd41c3ddd6b8d..0977e74aa94f02 100644 --- a/src/tools/illink/test/Mono.Linker.Tests/TestCasesRunner/PathUtilities.cs +++ b/src/tools/illink/test/Mono.Linker.Tests/TestCasesRunner/PathUtilities.cs @@ -15,7 +15,9 @@ public static class PathUtilities public const string ConfigDirectoryName = "Release"; #endif -#if NET7_0 +#if NET8_0 + public const string TFMDirectoryName = "net8.0"; +#elif NET7_0 public const string TFMDirectoryName = "net7.0"; #elif NET6_0 public const string TFMDirectoryName = "net6.0";