diff --git a/.config/dotnet-tools.json b/.config/dotnet-tools.json index 74ab0de0094926..8c7cd58dba3fda 100644 --- a/.config/dotnet-tools.json +++ b/.config/dotnet-tools.json @@ -27,7 +27,7 @@ ] }, "microsoft.dotnet.helix.jobmonitor": { - "version": "11.0.0-beta.26411.119", + "version": "11.0.0-beta.26420.103", "commands": [ "dotnet-helix-job-monitor" ] diff --git a/eng/Version.Details.props b/eng/Version.Details.props index 14299a3d6b53b4..54bbcbf6ead703 100644 --- a/eng/Version.Details.props +++ b/eng/Version.Details.props @@ -6,48 +6,48 @@ This file should be imported by eng/Versions.props - 5.11.0-1.26411.119 - 5.11.0-1.26411.119 - 5.11.0-1.26411.119 - 5.11.0-1.26411.119 - 11.0.100-rc.1.26411.119 - 11.0.100-rc.1.26411.119 - 11.0.0-beta.26411.119 - 11.0.0-beta.26411.119 - 11.0.0-beta.26411.119 - 11.0.0-beta.26411.119 - 11.0.0-beta.26411.119 - 11.0.0-beta.26411.119 - 11.0.0-beta.26411.119 - 11.0.0-beta.26411.119 - 0.11.5-preview.26411.119 - 11.0.0-beta.26411.119 - 11.0.0-beta.26411.119 - 11.0.0-beta.26411.119 - 11.0.0-beta.26411.119 - 11.0.0-beta.26411.119 - 11.0.0-beta.26411.119 - 11.0.0-beta.26411.119 - 11.0.0-beta.26411.119 - 11.0.0-beta.26411.119 + 5.11.0-1.26420.103 + 5.11.0-1.26420.103 + 5.11.0-1.26420.103 + 5.11.0-1.26420.103 + 11.0.100-rc.1.26420.103 + 11.0.100-rc.1.26420.103 + 11.0.0-beta.26420.103 + 11.0.0-beta.26420.103 + 11.0.0-beta.26420.103 + 11.0.0-beta.26420.103 + 11.0.0-beta.26420.103 + 11.0.0-beta.26420.103 + 11.0.0-beta.26420.103 + 11.0.0-beta.26420.103 + 0.11.5-preview.26420.103 + 11.0.0-beta.26420.103 + 11.0.0-beta.26420.103 + 11.0.0-beta.26420.103 + 11.0.0-beta.26420.103 + 11.0.0-beta.26420.103 + 11.0.0-beta.26420.103 + 11.0.0-beta.26420.103 + 11.0.0-beta.26420.103 + 11.0.0-beta.26420.103 3.2.2-beta.26257.113 - 2.9.3-beta.26411.119 - 11.0.0-beta.26411.119 - 5.11.0-1.26411.119 - 11.0.0-rc.1.26411.119 - 11.0.0-rc.1.26411.119 - 11.0.100-rc.1.26411.119 - 11.0.0-rc.1.26411.119 - 11.0.0-rc.1.26411.119 - 7.11.0-rc.65534 - 7.11.0-rc.65534 - 7.11.0-rc.65534 - 7.11.0-rc.65534 - 11.0.0-rc.1.26411.119 - 3.0.0-rc.1.26411.119 - 11.0.0-rc.1.26411.119 - 11.0.0-rc.1.26411.119 - 11.0.0-rc.1.26411.119 + 2.9.3-beta.26420.103 + 11.0.0-beta.26420.103 + 5.11.0-1.26420.103 + 11.0.0-rc.1.26420.103 + 11.0.0-rc.1.26420.103 + 11.0.100-rc.1.26420.103 + 11.0.0-rc.1.26420.103 + 11.0.0-rc.1.26420.103 + 7.11.0-rc.42103 + 7.11.0-rc.42103 + 7.11.0-rc.42103 + 7.11.0-rc.42103 + 11.0.0-rc.1.26420.103 + 3.0.0-rc.1.26420.103 + 11.0.0-rc.1.26420.103 + 11.0.0-rc.1.26420.103 + 11.0.0-rc.1.26420.103 11.0.0-alpha.0.26180.1 @@ -83,14 +83,14 @@ This file should be imported by eng/Versions.props 23.1.0-alpha.1.26405.2 23.1.0-alpha.1.26405.2 - 11.0.0-alpha.1.26407.6 - 11.0.0-alpha.1.26407.6 - 11.0.0-alpha.1.26407.6 - 11.0.0-alpha.1.26407.6 - 11.0.0-alpha.1.26407.6 - 11.0.0-alpha.1.26407.6 - 11.0.0-alpha.1.26407.6 - 11.0.0-alpha.1.26407.6 + 11.0.0-alpha.1.26413.1 + 11.0.0-alpha.1.26413.1 + 11.0.0-alpha.1.26413.1 + 11.0.0-alpha.1.26413.1 + 11.0.0-alpha.1.26413.1 + 11.0.0-alpha.1.26413.1 + 11.0.0-alpha.1.26413.1 + 11.0.0-alpha.1.26413.1 1.0.0-prerelease.26403.1 1.0.0-prerelease.26403.1 diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 07b61070f84fbd..cd1a78a79e08db 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -1,5 +1,5 @@ - + https://github.com/dotnet/icu @@ -37,95 +37,95 @@ https://github.com/dotnet/llvm-project 8ae183bac6b9a8fc311b885cc6e261f77bbb7a57 - + https://github.com/dotnet/dotnet - 7cdb217445905f3342bbb0266a4497b9a014389a + 1d599674e31ad86ca9e6e1dad7055b531e4d58e4 - + https://github.com/dotnet/dotnet - 7cdb217445905f3342bbb0266a4497b9a014389a + 1d599674e31ad86ca9e6e1dad7055b531e4d58e4 - + https://github.com/dotnet/dotnet - 7cdb217445905f3342bbb0266a4497b9a014389a + 1d599674e31ad86ca9e6e1dad7055b531e4d58e4 - + https://github.com/dotnet/dotnet - 7cdb217445905f3342bbb0266a4497b9a014389a + 1d599674e31ad86ca9e6e1dad7055b531e4d58e4 - + https://github.com/dotnet/dotnet - 7cdb217445905f3342bbb0266a4497b9a014389a + 1d599674e31ad86ca9e6e1dad7055b531e4d58e4 - + https://github.com/dotnet/dotnet - 7cdb217445905f3342bbb0266a4497b9a014389a + 1d599674e31ad86ca9e6e1dad7055b531e4d58e4 - + https://github.com/dotnet/dotnet - 7cdb217445905f3342bbb0266a4497b9a014389a + 1d599674e31ad86ca9e6e1dad7055b531e4d58e4 - + https://github.com/dotnet/dotnet - 7cdb217445905f3342bbb0266a4497b9a014389a + 1d599674e31ad86ca9e6e1dad7055b531e4d58e4 - + https://github.com/dotnet/dotnet - 7cdb217445905f3342bbb0266a4497b9a014389a + 1d599674e31ad86ca9e6e1dad7055b531e4d58e4 - + https://github.com/dotnet/dotnet - 7cdb217445905f3342bbb0266a4497b9a014389a + 1d599674e31ad86ca9e6e1dad7055b531e4d58e4 https://github.com/dotnet/dotnet 0eae08ed2f094f44e0151e4815e7cdd1a334fcdf - + https://github.com/dotnet/dotnet - 7cdb217445905f3342bbb0266a4497b9a014389a + 1d599674e31ad86ca9e6e1dad7055b531e4d58e4 - + https://github.com/dotnet/dotnet - 7cdb217445905f3342bbb0266a4497b9a014389a + 1d599674e31ad86ca9e6e1dad7055b531e4d58e4 - + https://github.com/dotnet/dotnet - 7cdb217445905f3342bbb0266a4497b9a014389a + 1d599674e31ad86ca9e6e1dad7055b531e4d58e4 - + https://github.com/dotnet/dotnet - 7cdb217445905f3342bbb0266a4497b9a014389a + 1d599674e31ad86ca9e6e1dad7055b531e4d58e4 - + https://github.com/dotnet/dotnet - 7cdb217445905f3342bbb0266a4497b9a014389a + 1d599674e31ad86ca9e6e1dad7055b531e4d58e4 - + https://github.com/dotnet/dotnet - 7cdb217445905f3342bbb0266a4497b9a014389a + 1d599674e31ad86ca9e6e1dad7055b531e4d58e4 - + https://github.com/dotnet/dotnet - 7cdb217445905f3342bbb0266a4497b9a014389a + 1d599674e31ad86ca9e6e1dad7055b531e4d58e4 - + https://github.com/dotnet/dotnet - 7cdb217445905f3342bbb0266a4497b9a014389a + 1d599674e31ad86ca9e6e1dad7055b531e4d58e4 - + https://github.com/dotnet/dotnet - 7cdb217445905f3342bbb0266a4497b9a014389a + 1d599674e31ad86ca9e6e1dad7055b531e4d58e4 - + https://github.com/dotnet/dotnet - 7cdb217445905f3342bbb0266a4497b9a014389a + 1d599674e31ad86ca9e6e1dad7055b531e4d58e4 - + https://github.com/dotnet/dotnet - 7cdb217445905f3342bbb0266a4497b9a014389a + 1d599674e31ad86ca9e6e1dad7055b531e4d58e4 https://github.com/dotnet/runtime-assets @@ -263,33 +263,33 @@ https://github.com/dotnet/llvm-project 8ae183bac6b9a8fc311b885cc6e261f77bbb7a57 - + https://github.com/dotnet/dotnet - 7cdb217445905f3342bbb0266a4497b9a014389a + 1d599674e31ad86ca9e6e1dad7055b531e4d58e4 - + https://github.com/dotnet/dotnet - 7cdb217445905f3342bbb0266a4497b9a014389a + 1d599674e31ad86ca9e6e1dad7055b531e4d58e4 - + https://github.com/dotnet/dotnet - 7cdb217445905f3342bbb0266a4497b9a014389a + 1d599674e31ad86ca9e6e1dad7055b531e4d58e4 - + https://github.com/dotnet/dotnet - 7cdb217445905f3342bbb0266a4497b9a014389a + 1d599674e31ad86ca9e6e1dad7055b531e4d58e4 - + https://github.com/dotnet/dotnet - 7cdb217445905f3342bbb0266a4497b9a014389a + 1d599674e31ad86ca9e6e1dad7055b531e4d58e4 - + https://github.com/dotnet/dotnet - 7cdb217445905f3342bbb0266a4497b9a014389a + 1d599674e31ad86ca9e6e1dad7055b531e4d58e4 - + https://github.com/dotnet/dotnet - 7cdb217445905f3342bbb0266a4497b9a014389a + 1d599674e31ad86ca9e6e1dad7055b531e4d58e4 https://github.com/dotnet/xharness @@ -303,9 +303,9 @@ https://github.com/dotnet/xharness acc639bea6c5720abf118b8808e18f9cabe90568 - + https://github.com/dotnet/dotnet - 7cdb217445905f3342bbb0266a4497b9a014389a + 1d599674e31ad86ca9e6e1dad7055b531e4d58e4 https://dev.azure.com/dnceng/internal/_git/dotnet-optimization @@ -331,33 +331,33 @@ https://github.com/dotnet/runtime-assets 7d4d3d2b53b18ad0ca1826581c9710b565b44fe5 - + https://github.com/dotnet/dotnet - 7cdb217445905f3342bbb0266a4497b9a014389a + 1d599674e31ad86ca9e6e1dad7055b531e4d58e4 - + https://github.com/dotnet/dotnet - 7cdb217445905f3342bbb0266a4497b9a014389a + 1d599674e31ad86ca9e6e1dad7055b531e4d58e4 - + https://github.com/dotnet/dotnet - 7cdb217445905f3342bbb0266a4497b9a014389a + 1d599674e31ad86ca9e6e1dad7055b531e4d58e4 - + https://github.com/dotnet/dotnet - 7cdb217445905f3342bbb0266a4497b9a014389a + 1d599674e31ad86ca9e6e1dad7055b531e4d58e4 - + https://github.com/dotnet/dotnet - 7cdb217445905f3342bbb0266a4497b9a014389a + 1d599674e31ad86ca9e6e1dad7055b531e4d58e4 - + https://github.com/dotnet/dotnet - 7cdb217445905f3342bbb0266a4497b9a014389a + 1d599674e31ad86ca9e6e1dad7055b531e4d58e4 - + https://github.com/dotnet/dotnet - 7cdb217445905f3342bbb0266a4497b9a014389a + 1d599674e31ad86ca9e6e1dad7055b531e4d58e4 https://dev.azure.com/dnceng/internal/_git/dotnet-optimization @@ -369,53 +369,53 @@ - + https://github.com/dotnet/dotnet - 7cdb217445905f3342bbb0266a4497b9a014389a + 1d599674e31ad86ca9e6e1dad7055b531e4d58e4 - + https://github.com/dotnet/dotnet - 7cdb217445905f3342bbb0266a4497b9a014389a + 1d599674e31ad86ca9e6e1dad7055b531e4d58e4 - + https://github.com/dotnet/dotnet - 7cdb217445905f3342bbb0266a4497b9a014389a + 1d599674e31ad86ca9e6e1dad7055b531e4d58e4 - + https://github.com/dotnet/dotnet - 7cdb217445905f3342bbb0266a4497b9a014389a + 1d599674e31ad86ca9e6e1dad7055b531e4d58e4 - + https://github.com/dotnet/node - db20b769545bd6a97f81fbe23cd1fcd5f6b88c5a + c105bfbfc6c71c8d7b2307b10602035b26f5b899 - + https://github.com/dotnet/node - db20b769545bd6a97f81fbe23cd1fcd5f6b88c5a + c105bfbfc6c71c8d7b2307b10602035b26f5b899 - + https://github.com/dotnet/node - db20b769545bd6a97f81fbe23cd1fcd5f6b88c5a + c105bfbfc6c71c8d7b2307b10602035b26f5b899 - + https://github.com/dotnet/node - db20b769545bd6a97f81fbe23cd1fcd5f6b88c5a + c105bfbfc6c71c8d7b2307b10602035b26f5b899 - + https://github.com/dotnet/node - db20b769545bd6a97f81fbe23cd1fcd5f6b88c5a + c105bfbfc6c71c8d7b2307b10602035b26f5b899 - + https://github.com/dotnet/node - db20b769545bd6a97f81fbe23cd1fcd5f6b88c5a + c105bfbfc6c71c8d7b2307b10602035b26f5b899 - + https://github.com/dotnet/node - db20b769545bd6a97f81fbe23cd1fcd5f6b88c5a + c105bfbfc6c71c8d7b2307b10602035b26f5b899 - + https://github.com/dotnet/node - db20b769545bd6a97f81fbe23cd1fcd5f6b88c5a + c105bfbfc6c71c8d7b2307b10602035b26f5b899 https://github.com/dotnet/runtime-assets @@ -425,9 +425,9 @@ https://github.com/dotnet/runtime-assets 7d4d3d2b53b18ad0ca1826581c9710b565b44fe5 - + https://github.com/dotnet/dotnet - 7cdb217445905f3342bbb0266a4497b9a014389a + 1d599674e31ad86ca9e6e1dad7055b531e4d58e4 diff --git a/eng/common/Get-GitHubAppToken.ps1 b/eng/common/Get-GitHubAppToken.ps1 index 6b5899d7a29925..9c7e3dcd6ac425 100644 --- a/eng/common/Get-GitHubAppToken.ps1 +++ b/eng/common/Get-GitHubAppToken.ps1 @@ -113,10 +113,13 @@ try { $installations = @() $page = 1 do { - $pageInstallations = @(Invoke-RestMethod ` + # Assign the response before wrapping it in @(). PowerShell otherwise + # preserves a top-level JSON array as one nested pipeline object. + $pageResponse = Invoke-RestMethod ` -Uri "https://api.github.com/app/installations?per_page=100&page=$page" ` -Headers $headers ` - -Method Get) + -Method Get + $pageInstallations = @($pageResponse) $installations += $pageInstallations $page++ } while ($pageInstallations.Count -eq 100) @@ -125,12 +128,19 @@ catch { Write-PipelineTelemetryError -Category 'Build' -Message "Failed to list GitHub App installations: $_. The signed JWT may be invalid or the App's Client ID ('$AppClientId') may be incorrect." exit 1 } -$installation = $installations | Where-Object { $_.account.login -ieq $InstallationOwner } | Select-Object -First 1 -if (-not $installation) { +$matchingInstallations = @($installations | Where-Object { $_.account.login -ieq $InstallationOwner }) +if ($matchingInstallations.Count -eq 0) { $found = ($installations | ForEach-Object { $_.account.login }) -join ', ' Write-PipelineTelemetryError -Category 'Build' -Message "No installation found for '$InstallationOwner'. App is installed on: $found" exit 1 } +if ($matchingInstallations.Count -ne 1) { + $matchingIds = ($matchingInstallations | ForEach-Object { $_.id }) -join ', ' + Write-PipelineTelemetryError -Category 'Build' -Message "Found multiple installations for '$InstallationOwner': $matchingIds" + exit 1 +} +$installation = $matchingInstallations[0] +Write-Host "Using installation $($installation.id) for '$($installation.account.login)'." try { $tokenResponse = Invoke-RestMethod ` diff --git a/eng/common/core-templates/job/helix-job-monitor.yml b/eng/common/core-templates/job/helix-job-monitor.yml index a65b50d0a787f8..81ecccdd17bd0a 100644 --- a/eng/common/core-templates/job/helix-job-monitor.yml +++ b/eng/common/core-templates/job/helix-job-monitor.yml @@ -84,6 +84,15 @@ parameters: type: boolean default: false +# Controls per-test output attachments. Defaults to Failed. +- name: testResultAttachmentMode + type: string + default: Failed + values: + - Failed + - All + - None + # Advanced: optional pipeline artifact (produced earlier in this run) that contains the tool # nupkg. When set, the artifact is downloaded and the tool is installed from the nupkg into # a local tool-path; this bypasses the repo's .config/dotnet-tools.json manifest and is @@ -210,6 +219,7 @@ jobs: organization='${{ parameters.organization }}' repository='${{ parameters.repository }}' + testResultAttachmentMode='${{ parameters.testResultAttachmentMode }}' # Fall back to Azure DevOps-provided environment variables when the caller did not # supply organization / repository explicitly. BUILD_REPOSITORY_NAME is typically @@ -232,6 +242,9 @@ jobs: if [ -n "$organization" ]; then toolArgs+=( --organization "$organization" ); fi if [ -n "$repository" ]; then toolArgs+=( --repository "$repository" ); fi + if [ -n "$testResultAttachmentMode" ]; then + toolArgs+=( --test-result-attachment-mode "$testResultAttachmentMode" ) + fi # Build.Reason and Build.SourceBranch are required to derive the Helix source filter # the same way the Helix SDK submitter does (PR -> 'pr', internal -> 'official', diff --git a/eng/common/core-templates/post-build/post-build.yml b/eng/common/core-templates/post-build/post-build.yml index 9d951352696ebb..6dcee6664d68e9 100644 --- a/eng/common/core-templates/post-build/post-build.yml +++ b/eng/common/core-templates/post-build/post-build.yml @@ -236,6 +236,7 @@ stages: StageLabel: 'Validation' JobLabel: 'Signing' BinlogToolVersion: $(BinlogToolVersion) + enableInternalRuntimes: false # SourceLink validation has been removed — the underlying CLI tool # (targeting netcoreapp2.1) has not functioned for years. diff --git a/eng/common/core-templates/steps/publish-logs.yml b/eng/common/core-templates/steps/publish-logs.yml index 2c1e0ab11620c7..3f0a9b9e6aa0ac 100644 --- a/eng/common/core-templates/steps/publish-logs.yml +++ b/eng/common/core-templates/steps/publish-logs.yml @@ -5,6 +5,7 @@ parameters: # A default - in case value from eng/common/core-templates/post-build/common-variables.yml is not passed BinlogToolVersion: '1.0.11' is1ESPipeline: false + enableInternalRuntimes: true steps: - task: Powershell@2 @@ -25,13 +26,20 @@ steps: # Sensitive data can as well be added to $(System.DefaultWorkingDirectory)/eng/BinlogSecretsRedactionFile.txt' # If the file exists - sensitive data for redaction will be sourced from it # (single entry per line, lines starting with '# ' are considered comments and skipped) - arguments: -InputPath '$(System.DefaultWorkingDirectory)/PostBuildLogs' - -BinlogToolVersion '${{parameters.BinlogToolVersion}}' - -TokensFilePath '$(System.DefaultWorkingDirectory)/eng/BinlogSecretsRedactionFile.txt' - -runtimeSourceFeed https://ci.dot.net/internal - -runtimeSourceFeedKey '$(dotnetbuilds-internal-container-read-token-base64)' - '$(System.AccessToken)' - ${{parameters.CustomSensitiveDataList}} + ${{ if and(parameters.enableInternalRuntimes, ne(variables['System.TeamProject'], 'public')) }}: + arguments: -InputPath '$(System.DefaultWorkingDirectory)/PostBuildLogs' + -BinlogToolVersion '${{parameters.BinlogToolVersion}}' + -TokensFilePath '$(System.DefaultWorkingDirectory)/eng/BinlogSecretsRedactionFile.txt' + -runtimeSourceFeed https://ci.dot.net/internal + -runtimeSourceFeedKey '$(dotnetbuilds-internal-container-read-token-base64)' + '$(System.AccessToken)' + ${{parameters.CustomSensitiveDataList}} + ${{ else }}: + arguments: -InputPath '$(System.DefaultWorkingDirectory)/PostBuildLogs' + -BinlogToolVersion '${{parameters.BinlogToolVersion}}' + -TokensFilePath '$(System.DefaultWorkingDirectory)/eng/BinlogSecretsRedactionFile.txt' + '$(System.AccessToken)' + ${{parameters.CustomSensitiveDataList}} continueOnError: true condition: always() diff --git a/global.json b/global.json index 2e097b75ffe736..442df207859d6b 100644 --- a/global.json +++ b/global.json @@ -1,6 +1,6 @@ { "sdk": { - "version": "11.0.100-preview.6.26359.118", + "version": "11.0.100-preview.7.26381.103", "allowPrerelease": true, "rollForward": "major", "paths": [ @@ -10,14 +10,14 @@ "errorMessage": "The required .NET SDK wasn't found. Please run ./eng/common/dotnet.sh (Unix) or eng\\common\\dotnet.cmd (Windows) to install it." }, "tools": { - "dotnet": "11.0.100-preview.6.26359.118" + "dotnet": "11.0.100-preview.7.26381.103" }, "msbuild-sdks": { - "Microsoft.DotNet.Arcade.Sdk": "11.0.0-beta.26411.119", - "Microsoft.DotNet.Helix.Sdk": "11.0.0-beta.26411.119", - "Microsoft.DotNet.SharedFramework.Sdk": "11.0.0-beta.26411.119", + "Microsoft.DotNet.Arcade.Sdk": "11.0.0-beta.26420.103", + "Microsoft.DotNet.Helix.Sdk": "11.0.0-beta.26420.103", + "Microsoft.DotNet.SharedFramework.Sdk": "11.0.0-beta.26420.103", "Microsoft.Build.NoTargets": "3.7.0", "Microsoft.Build.Traversal": "3.4.0", - "Microsoft.NET.Sdk.IL": "11.0.0-rc.1.26411.119" + "Microsoft.NET.Sdk.IL": "11.0.0-rc.1.26420.103" } } diff --git a/src/libraries/Microsoft.Extensions.Configuration.Binder/tests/Common/ConfigurationBinderTests.cs b/src/libraries/Microsoft.Extensions.Configuration.Binder/tests/Common/ConfigurationBinderTests.cs index 31fc33321e102b..40eed1215954cf 100644 --- a/src/libraries/Microsoft.Extensions.Configuration.Binder/tests/Common/ConfigurationBinderTests.cs +++ b/src/libraries/Microsoft.Extensions.Configuration.Binder/tests/Common/ConfigurationBinderTests.cs @@ -2710,7 +2710,7 @@ public void TypeWithPrimitives_Pass() Assert.Equal(CultureInfo.GetCultureInfoByIetfLanguageTag("yo-NG"), obj.Prop17); Assert.Equal(DateTime.Parse("2023-03-29T18:23:43.9977489+00:00", CultureInfo.InvariantCulture), obj.Prop19); Assert.Equal(DateTimeOffset.Parse("2023-03-29T18:21:22.8046981+00:00", CultureInfo.InvariantCulture), obj.Prop20); - Assert.Equal((decimal)5.3, obj.Prop21); + Assert.Equal(5.3m, obj.Prop21); Assert.Equal(TimeSpan.Parse("10675199.02:48:05.4775807", CultureInfo.InvariantCulture), obj.Prop23); Assert.Equal(Guid.Parse("e905a75b-d195-494d-8938-e55dcee44574"), obj.Prop24); Uri.TryCreate("https://microsoft.com", UriKind.RelativeOrAbsolute, out Uri? value); diff --git a/src/libraries/Microsoft.VisualBasic.Core/tests/ConversionsTests.cs b/src/libraries/Microsoft.VisualBasic.Core/tests/ConversionsTests.cs index 1712e8f549bda3..c1e17eb9667b9c 100644 --- a/src/libraries/Microsoft.VisualBasic.Core/tests/ConversionsTests.cs +++ b/src/libraries/Microsoft.VisualBasic.Core/tests/ConversionsTests.cs @@ -1915,7 +1915,7 @@ public static IEnumerable ToDecimal_String_TestData() yield return new object[] { "&o5", (decimal)5 }; yield return new object[] { " &o5", (decimal)5 }; yield return new object[] { "&o0", (decimal)0 }; - yield return new object[] { 1.1.ToString(), (decimal)1.1 }; + yield return new object[] { 1.1.ToString(), 1.1m }; yield return new object[] { "18446744073709551616", 18446744073709551616.0m }; } diff --git a/src/libraries/System.Data.Common/tests/System/Data/SqlTypes/SqlDecimalTest.cs b/src/libraries/System.Data.Common/tests/System/Data/SqlTypes/SqlDecimalTest.cs index 9b57fd0187b4d3..cad436e25234e1 100644 --- a/src/libraries/System.Data.Common/tests/System/Data/SqlTypes/SqlDecimalTest.cs +++ b/src/libraries/System.Data.Common/tests/System/Data/SqlTypes/SqlDecimalTest.cs @@ -58,7 +58,7 @@ public void Create() { // SqlDecimal (decimal) SqlDecimal test = new SqlDecimal(30.3098m); - Assert.Equal((decimal)30.3098, test.Value); + Assert.Equal(30.3098m, test.Value); // SqlDecimal (double) test = new SqlDecimal(1E11d); @@ -312,7 +312,7 @@ public void Conversions() Assert.Equal(6464, _test1.ToSqlInt64().Value); // ToSqlMoney () - Assert.Equal((decimal)6464.6464, _test1.ToSqlMoney().Value); + Assert.Equal(6464.6464m, _test1.ToSqlMoney().Value); Assert.Throws(() => SqlDecimal.MaxValue.ToSqlMoney().Value); diff --git a/src/libraries/System.Data.Common/tests/System/Data/SqlTypes/SqlMoneyTest.cs b/src/libraries/System.Data.Common/tests/System/Data/SqlTypes/SqlMoneyTest.cs index d067e9ce328993..826716712ce504 100644 --- a/src/libraries/System.Data.Common/tests/System/Data/SqlTypes/SqlMoneyTest.cs +++ b/src/libraries/System.Data.Common/tests/System/Data/SqlTypes/SqlMoneyTest.cs @@ -52,7 +52,7 @@ public void Create() { Assert.Throws(() => new SqlMoney(1000000000000000m)); - SqlMoney CreationTest = new SqlMoney((decimal)913.3); + SqlMoney CreationTest = new SqlMoney(913.3m); Assert.Equal(913.3m, CreationTest.Value); Assert.Throws(() => new SqlMoney(1e200)); @@ -205,7 +205,7 @@ public void Conversions() SqlMoney testMoney100 = new SqlMoney(100); // ToDecimal - Assert.Equal((decimal)6464.6464, _test1.ToDecimal()); + Assert.Equal(6464.6464m, _test1.ToDecimal()); // ToDouble Assert.Equal(6464.6464, _test1.ToDouble()); @@ -229,7 +229,7 @@ public void Conversions() Assert.Throws(() => _test2.ToSqlByte()); // ToSqlDecimal () - Assert.Equal((decimal)6464.6464, _test1.ToSqlDecimal().Value); + Assert.Equal(6464.6464m, _test1.ToSqlDecimal().Value); Assert.Equal(-45000m, _test4.ToSqlDecimal().Value); // ToSqlInt16 () @@ -326,7 +326,7 @@ public void ThanOrEqualOperators() [Fact] public void UnaryNegation() { - Assert.Equal((decimal)(-6464.6464), -(_test1).Value); + Assert.Equal(-6464.6464m, -(_test1).Value); Assert.Equal(45000M, -(_test4).Value); } @@ -366,7 +366,7 @@ public void SqlDoubleToSqlMoney() [Fact] public void SqlMoneyToDecimal() { - Assert.Equal((decimal)6464.6464, (decimal)_test1); + Assert.Equal(6464.6464m, (decimal)_test1); Assert.Equal(-45000M, (decimal)_test4); } diff --git a/src/libraries/System.Private.Xml/tests/XmlConvert/ToTypeTests.cs b/src/libraries/System.Private.Xml/tests/XmlConvert/ToTypeTests.cs index d8ff50e4aee396..dafed9cce680c7 100644 --- a/src/libraries/System.Private.Xml/tests/XmlConvert/ToTypeTests.cs +++ b/src/libraries/System.Private.Xml/tests/XmlConvert/ToTypeTests.cs @@ -543,10 +543,10 @@ public int ToType35() public int ToType36() { // decimal - CError.Compare(XmlConvert.ToString((decimal)(-4582.24)), "-4582.24", "decimal"); - CError.Compare(XmlConvert.ToString((decimal)0.00005), "0.00005", "decimal"); - CError.Compare(XmlConvert.ToString((decimal)0.0000000000000000000000001), "0.0000000000000000000000001", "decimal"); - CError.Compare(XmlConvert.ToString((decimal)145896.233422154), "145896.233422154", "decimal"); + CError.Compare(XmlConvert.ToString(-4582.24m), "-4582.24", "decimal"); + CError.Compare(XmlConvert.ToString(0.00005m), "0.00005", "decimal"); + CError.Compare(XmlConvert.ToString(0.0000000000000000000000001m), "0.0000000000000000000000001", "decimal"); + CError.Compare(XmlConvert.ToString(145896.233422154m), "145896.233422154", "decimal"); CError.Compare(XmlConvert.ToString(Convert.ToDecimal("0.123456789012345678", CultureInfo.InvariantCulture)), "0.123456789012345678", "decimal"); CError.Compare(XmlConvert.ToString((decimal)1234567890123456789), (1234567890123456789M).ToString(), "decimal"); CError.Compare(XmlConvert.ToString((decimal)-0), "0", "decimal"); @@ -1117,7 +1117,7 @@ public int ToType62() public int ToType9() { object[] array0 = { "145896.2334", "-1.23", " -458.238", "145896.233422154", "0.123456789012345678", "1234567890123456789", "100.0", "100." }; - object[] array1 = { (decimal)145896.2334, (decimal)-1.23, (decimal)-458.238, (decimal)145896.233422154, Convert.ToDecimal("0.123456789012345678", CultureInfo.InvariantCulture), (decimal)1234567890123456789, (decimal)100, (decimal)100 }; + object[] array1 = { 145896.2334m, -1.23m, -458.238m, 145896.233422154m, Convert.ToDecimal("0.123456789012345678", CultureInfo.InvariantCulture), (decimal)1234567890123456789, (decimal)100, (decimal)100 }; return TestValid(array0, array1, "decimal"); } diff --git a/src/libraries/System.Runtime.Serialization.Xml/tests/SerializationTypes.cs b/src/libraries/System.Runtime.Serialization.Xml/tests/SerializationTypes.cs index 888ced17e42d6f..e6350f456dfaf3 100644 --- a/src/libraries/System.Runtime.Serialization.Xml/tests/SerializationTypes.cs +++ b/src/libraries/System.Runtime.Serialization.Xml/tests/SerializationTypes.cs @@ -1492,7 +1492,7 @@ public static PurchaseOrder CreateInstance() OrderedItem item = new OrderedItem(); item.ItemName = "Widget S"; item.Description = "Small widget"; - item.UnitPrice = (decimal)5.23; + item.UnitPrice = 5.23m; item.Quantity = 3; item.Calculate(); @@ -1504,7 +1504,7 @@ public static PurchaseOrder CreateInstance() subTotal += oi.LineTotal; } po.SubTotal = subTotal; - po.ShipCost = (decimal)12.51; + po.ShipCost = 12.51m; po.TotalCost = po.SubTotal + po.ShipCost; return po; } diff --git a/src/libraries/System.Runtime/tests/System.Runtime.Tests/System/DecimalTests.cs b/src/libraries/System.Runtime/tests/System.Runtime.Tests/System/DecimalTests.cs index a4a70942ff4ec3..7ec7379b99461b 100644 --- a/src/libraries/System.Runtime/tests/System.Runtime.Tests/System/DecimalTests.cs +++ b/src/libraries/System.Runtime/tests/System.Runtime.Tests/System/DecimalTests.cs @@ -1658,10 +1658,10 @@ public static IEnumerable ToString_TestData() { yield return new object[] { decimal.MinValue, "G", defaultFormat, "-79228162514264337593543950335" }; yield return new object[] { (decimal)-4567, "G", defaultFormat, "-4567" }; - yield return new object[] { (decimal)-4567.89101, "G", defaultFormat, "-4567.89101" }; + yield return new object[] { -4567.89101m, "G", defaultFormat, "-4567.89101" }; yield return new object[] { (decimal)0, "G", defaultFormat, "0" }; yield return new object[] { (decimal)4567, "G", defaultFormat, "4567" }; - yield return new object[] { (decimal)4567.89101, "G", defaultFormat, "4567.89101" }; + yield return new object[] { 4567.89101m, "G", defaultFormat, "4567.89101" }; yield return new object[] { decimal.MaxValue, "G", defaultFormat, "79228162514264337593543950335" }; yield return new object[] { decimal.MinusOne, "G", defaultFormat, "-1" }; diff --git a/src/native/minipal/thread.c b/src/native/minipal/thread.c index 950614563f6e74..14fab8c5904643 100644 --- a/src/native/minipal/thread.c +++ b/src/native/minipal/thread.c @@ -10,6 +10,13 @@ #define _DARWIN_C_SOURCE #endif +#if defined(__APPLE__) && !defined(_DARWIN_C_SOURCE) +// Apple's hides the non-portable pthread_threadid_np/pthread_setname_np +// declarations when _XOPEN_SOURCE/_POSIX_C_SOURCE is defined (as the Mono build does), +// unless _DARWIN_C_SOURCE is defined before including it. +#define _DARWIN_C_SOURCE +#endif + #include "thread.h" #include diff --git a/src/tests/async/pgo/pgo.csproj b/src/tests/async/pgo/pgo.csproj index 7c7111c8cd7ee1..7548a677889c52 100644 --- a/src/tests/async/pgo/pgo.csproj +++ b/src/tests/async/pgo/pgo.csproj @@ -3,4 +3,4 @@ - \ No newline at end of file +