From 0c78d8087eb33adcc5e8a9aee344654af56be5e3 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" <42748379+dotnet-maestro[bot]@users.noreply.github.com> Date: Mon, 15 Nov 2021 10:15:23 -0800 Subject: [PATCH 1/7] [release/6.0] Update dependencies from dotnet/arcade (#61422) * Update dependencies from https://github.com/dotnet/arcade build 20211108.5 Microsoft.DotNet.XUnitExtensions , Microsoft.DotNet.VersionTools.Tasks , Microsoft.DotNet.Build.Tasks.Workloads , Microsoft.DotNet.Build.Tasks.Templating , Microsoft.DotNet.Build.Tasks.TargetFramework.Sdk , Microsoft.DotNet.Build.Tasks.Packaging , Microsoft.DotNet.Build.Tasks.Installers , Microsoft.DotNet.Build.Tasks.Feed , Microsoft.DotNet.Build.Tasks.Archives , Microsoft.DotNet.Arcade.Sdk , Microsoft.DotNet.ApiCompat , Microsoft.DotNet.CodeAnalysis , Microsoft.DotNet.XUnitConsoleRunner , Microsoft.DotNet.GenFacades , Microsoft.DotNet.GenAPI , Microsoft.DotNet.RemoteExecutor , Microsoft.DotNet.PackageTesting , Microsoft.DotNet.Helix.Sdk , Microsoft.DotNet.SharedFramework.Sdk From Version 6.0.0-beta.21522.3 -> To Version 6.0.0-beta.21558.5 * Update dependencies from https://github.com/dotnet/arcade build 20211110.2 Microsoft.DotNet.XUnitExtensions , Microsoft.DotNet.VersionTools.Tasks , Microsoft.DotNet.Build.Tasks.Workloads , Microsoft.DotNet.Build.Tasks.Templating , Microsoft.DotNet.Build.Tasks.TargetFramework.Sdk , Microsoft.DotNet.Build.Tasks.Packaging , Microsoft.DotNet.Build.Tasks.Installers , Microsoft.DotNet.Build.Tasks.Feed , Microsoft.DotNet.Build.Tasks.Archives , Microsoft.DotNet.Arcade.Sdk , Microsoft.DotNet.ApiCompat , Microsoft.DotNet.CodeAnalysis , Microsoft.DotNet.XUnitConsoleRunner , Microsoft.DotNet.GenFacades , Microsoft.DotNet.GenAPI , Microsoft.DotNet.RemoteExecutor , Microsoft.DotNet.PackageTesting , Microsoft.DotNet.Helix.Sdk , Microsoft.DotNet.SharedFramework.Sdk From Version 6.0.0-beta.21522.3 -> To Version 6.0.0-beta.21560.2 * pin the fileversions in the platformManifest file for ref pack * Apply suggestions from code review Co-authored-by: Santiago Fernandez Madero * Disable SDK Targeting Pack Cache Co-authored-by: dotnet-maestro[bot] Co-authored-by: Anirudh Agnihotry Co-authored-by: Anirudh Agnihotry Co-authored-by: Santiago Fernandez Madero --- NuGet.config | 3 - eng/Version.Details.xml | 76 ++-- eng/Versions.props | 30 +- eng/build.ps1 | 4 + eng/build.sh | 4 + eng/common/templates/job/execute-sdl.yml | 2 +- eng/common/templates/job/onelocbuild.yml | 2 +- .../templates/job/source-index-stage1.yml | 2 +- eng/common/templates/jobs/jobs.yml | 4 +- global.json | 12 +- .../Microsoft.NETCore.App.Ref.sfxproj | 5 + .../PlatformManifest.txt | 338 ++++++++++++++++++ 12 files changed, 415 insertions(+), 67 deletions(-) create mode 100644 src/installer/pkg/sfx/Microsoft.NETCore.App/PlatformManifest.txt diff --git a/NuGet.config b/NuGet.config index 064229f6edf86..d5dbd101f043e 100644 --- a/NuGet.config +++ b/NuGet.config @@ -9,11 +9,8 @@ - - - 1.0.0-rc.2.21511.46 - 6.0.0-beta.21522.3 - 6.0.0-beta.21522.3 - 6.0.0-beta.21522.3 - 6.0.0-beta.21522.3 - 6.0.0-beta.21522.3 - 6.0.0-beta.21522.3 - 2.5.1-beta.21522.3 - 6.0.0-beta.21522.3 - 6.0.0-beta.21522.3 - 6.0.0-beta.21522.3 - 6.0.0-beta.21522.3 - 6.0.0-beta.21522.3 - 6.0.0-beta.21522.3 - 6.0.0-beta.21522.3 - 6.0.0-beta.21522.3 + 6.0.0-beta.21560.2 + 6.0.0-beta.21560.2 + 6.0.0-beta.21560.2 + 6.0.0-beta.21560.2 + 6.0.0-beta.21560.2 + 6.0.0-beta.21560.2 + 2.5.1-beta.21560.2 + 6.0.0-beta.21560.2 + 6.0.0-beta.21560.2 + 6.0.0-beta.21560.2 + 6.0.0-beta.21560.2 + 6.0.0-beta.21560.2 + 6.0.0-beta.21560.2 + 6.0.0-beta.21560.2 + 6.0.0-beta.21560.2 6.0.0-preview.1.102 diff --git a/eng/build.ps1 b/eng/build.ps1 index af253dfb3dbd4..14dadeec13b1d 100644 --- a/eng/build.ps1 +++ b/eng/build.ps1 @@ -254,6 +254,10 @@ foreach ($argument in $PSBoundParameters.Keys) $failedBuilds = @() +# Disable targeting pack caching as we reference a partially constructed targeting pack and update it later. +# The later changes are ignored when using the cache. +$env:DOTNETSDK_ALLOW_TARGETING_PACK_CACHING=0 + if ($os -eq "Browser") { # override default arch for Browser, we only support wasm $arch = "wasm" diff --git a/eng/build.sh b/eng/build.sh index 128e720d3c0b2..8836bde10c492 100755 --- a/eng/build.sh +++ b/eng/build.sh @@ -468,6 +468,10 @@ fi initDistroRid $os $arch $crossBuild $portableBuild +# Disable targeting pack caching as we reference a partially constructed targeting pack and update it later. +# The later changes are ignored when using the cache. +export DOTNETSDK_ALLOW_TARGETING_PACK_CACHING=0 + # URL-encode space (%20) to avoid quoting issues until the msbuild call in /eng/common/tools.sh. # In *proj files (XML docs), URL-encoded string are rendered in their decoded form. cmakeargs="${cmakeargs// /%20}" diff --git a/eng/common/templates/job/execute-sdl.yml b/eng/common/templates/job/execute-sdl.yml index 69eb67849d741..4882dd931341e 100644 --- a/eng/common/templates/job/execute-sdl.yml +++ b/eng/common/templates/job/execute-sdl.yml @@ -62,7 +62,7 @@ jobs: pool: # To extract archives (.tar.gz, .zip), we need access to "tar", added in Windows 10/2019. ${{ if eq(parameters.extractArchiveArtifacts, 'false') }}: - name: Hosted VS2017 + vmImage: windows-2019 ${{ if ne(parameters.extractArchiveArtifacts, 'false') }}: vmImage: windows-2019 steps: diff --git a/eng/common/templates/job/onelocbuild.yml b/eng/common/templates/job/onelocbuild.yml index e8bc77d2ebbe3..2b55a567f82ae 100644 --- a/eng/common/templates/job/onelocbuild.yml +++ b/eng/common/templates/job/onelocbuild.yml @@ -4,7 +4,7 @@ parameters: # Optional: A defined YAML pool - https://docs.microsoft.com/en-us/azure/devops/pipelines/yaml-schema?view=vsts&tabs=schema#pool pool: - vmImage: vs2017-win2016 + vmImage: windows-2019 CeapexPat: $(dn-bot-ceapex-package-r) # PAT for the loc AzDO instance https://dev.azure.com/ceapex GithubPat: $(BotAccount-dotnet-bot-repo-PAT) diff --git a/eng/common/templates/job/source-index-stage1.yml b/eng/common/templates/job/source-index-stage1.yml index 1cc0c29e4fdab..d8990549e8097 100644 --- a/eng/common/templates/job/source-index-stage1.yml +++ b/eng/common/templates/job/source-index-stage1.yml @@ -6,7 +6,7 @@ parameters: preSteps: [] binlogPath: artifacts/log/Debug/Build.binlog pool: - vmImage: vs2017-win2016 + vmImage: windows-2019 condition: '' dependsOn: '' diff --git a/eng/common/templates/jobs/jobs.yml b/eng/common/templates/jobs/jobs.yml index a1f8fce96ca81..90015a7e5ae3f 100644 --- a/eng/common/templates/jobs/jobs.yml +++ b/eng/common/templates/jobs/jobs.yml @@ -83,7 +83,7 @@ jobs: - ${{ if eq(parameters.enableSourceBuild, true) }}: - Source_Build_Complete pool: - vmImage: vs2017-win2016 + vmImage: windows-2019 runAsPublic: ${{ parameters.runAsPublic }} publishUsingPipelines: ${{ parameters.enablePublishUsingPipelines }} enablePublishBuildArtifacts: ${{ parameters.enablePublishBuildArtifacts }} @@ -96,4 +96,4 @@ jobs: dependsOn: - Asset_Registry_Publish pool: - vmImage: vs2017-win2016 + vmImage: windows-2019 diff --git a/global.json b/global.json index 472931979ee5d..38978a4a66c62 100644 --- a/global.json +++ b/global.json @@ -1,21 +1,21 @@ { "sdk": { - "version": "6.0.100-rc.1.21430.12", + "version": "6.0.100", "allowPrerelease": true, "rollForward": "major" }, "tools": { - "dotnet": "6.0.100-rc.1.21430.12" + "dotnet": "6.0.100" }, "native-tools": { "cmake": "3.16.4", "python3": "3.7.1" }, "msbuild-sdks": { - "Microsoft.DotNet.Build.Tasks.TargetFramework.Sdk": "6.0.0-beta.21522.3", - "Microsoft.DotNet.Arcade.Sdk": "6.0.0-beta.21522.3", - "Microsoft.DotNet.Helix.Sdk": "6.0.0-beta.21522.3", - "Microsoft.DotNet.SharedFramework.Sdk": "6.0.0-beta.21522.3", + "Microsoft.DotNet.Build.Tasks.TargetFramework.Sdk": "6.0.0-beta.21560.2", + "Microsoft.DotNet.Arcade.Sdk": "6.0.0-beta.21560.2", + "Microsoft.DotNet.Helix.Sdk": "6.0.0-beta.21560.2", + "Microsoft.DotNet.SharedFramework.Sdk": "6.0.0-beta.21560.2", "Microsoft.Build.NoTargets": "3.1.0", "Microsoft.Build.Traversal": "3.0.23", "Microsoft.NET.Sdk.IL": "6.0.0-rc.1.21415.6" diff --git a/src/installer/pkg/sfx/Microsoft.NETCore.App/Microsoft.NETCore.App.Ref.sfxproj b/src/installer/pkg/sfx/Microsoft.NETCore.App/Microsoft.NETCore.App.Ref.sfxproj index f1e52a78e99c1..18a665f80baac 100644 --- a/src/installer/pkg/sfx/Microsoft.NETCore.App/Microsoft.NETCore.App.Ref.sfxproj +++ b/src/installer/pkg/sfx/Microsoft.NETCore.App/Microsoft.NETCore.App.Ref.sfxproj @@ -4,6 +4,7 @@ TargetingPack true + false dotnet-targeting-pack dotnet-targeting-pack $(SharedFrameworkName).PGO @@ -19,4 +20,8 @@ + + + + diff --git a/src/installer/pkg/sfx/Microsoft.NETCore.App/PlatformManifest.txt b/src/installer/pkg/sfx/Microsoft.NETCore.App/PlatformManifest.txt new file mode 100644 index 0000000000000..981251ae96d2b --- /dev/null +++ b/src/installer/pkg/sfx/Microsoft.NETCore.App/PlatformManifest.txt @@ -0,0 +1,338 @@ +System.Globalization.Native.dylib|Microsoft.NETCore.App.Ref||0.0.0.0 +System.Globalization.Native.so|Microsoft.NETCore.App.Ref||0.0.0.0 +System.IO.Compression.Native.a|Microsoft.NETCore.App.Ref||0.0.0.0 +System.IO.Compression.Native.dylib|Microsoft.NETCore.App.Ref||0.0.0.0 +System.IO.Compression.Native.so|Microsoft.NETCore.App.Ref||0.0.0.0 +System.Native.a|Microsoft.NETCore.App.Ref||0.0.0.0 +System.Native.dylib|Microsoft.NETCore.App.Ref||0.0.0.0 +System.Native.so|Microsoft.NETCore.App.Ref||0.0.0.0 +System.Net.Http.Native.a|Microsoft.NETCore.App.Ref||0.0.0.0 +System.Net.Http.Native.dylib|Microsoft.NETCore.App.Ref||0.0.0.0 +System.Net.Http.Native.so|Microsoft.NETCore.App.Ref||0.0.0.0 +System.Net.Security.Native.a|Microsoft.NETCore.App.Ref||0.0.0.0 +System.Net.Security.Native.dylib|Microsoft.NETCore.App.Ref||0.0.0.0 +System.Net.Security.Native.so|Microsoft.NETCore.App.Ref||0.0.0.0 +System.Security.Cryptography.Native.Apple.a|Microsoft.NETCore.App.Ref||0.0.0.0 +System.Security.Cryptography.Native.Apple.dylib|Microsoft.NETCore.App.Ref||0.0.0.0 +System.Security.Cryptography.Native.OpenSsl.a|Microsoft.NETCore.App.Ref||0.0.0.0 +System.Security.Cryptography.Native.OpenSsl.dylib|Microsoft.NETCore.App.Ref||0.0.0.0 +System.Security.Cryptography.Native.OpenSsl.so|Microsoft.NETCore.App.Ref||0.0.0.0 +clrcompression.dll|Microsoft.NETCore.App.Ref||6.0.21.52210 +Microsoft.CSharp.dll|Microsoft.NETCore.App.Ref|6.0.0.0|6.0.21.52210 +Microsoft.VisualBasic.Core.dll|Microsoft.NETCore.App.Ref|11.0.0.0|6.0.21.52210 +Microsoft.Win32.Primitives.dll|Microsoft.NETCore.App.Ref|6.0.0.0|6.0.21.52210 +Microsoft.Win32.Registry.dll|Microsoft.NETCore.App.Ref|6.0.0.0|6.0.21.52210 +System.AppContext.dll|Microsoft.NETCore.App.Ref|6.0.0.0|6.0.21.52210 +System.Buffers.dll|Microsoft.NETCore.App.Ref|6.0.0.0|6.0.21.52210 +System.Collections.dll|Microsoft.NETCore.App.Ref|6.0.0.0|6.0.21.52210 +System.Collections.Concurrent.dll|Microsoft.NETCore.App.Ref|6.0.0.0|6.0.21.52210 +System.Collections.Immutable.dll|Microsoft.NETCore.App.Ref|6.0.0.0|6.0.21.52210 +System.Collections.NonGeneric.dll|Microsoft.NETCore.App.Ref|6.0.0.0|6.0.21.52210 +System.Collections.Specialized.dll|Microsoft.NETCore.App.Ref|6.0.0.0|6.0.21.52210 +System.ComponentModel.dll|Microsoft.NETCore.App.Ref|6.0.0.0|6.0.21.52210 +System.ComponentModel.Annotations.dll|Microsoft.NETCore.App.Ref|6.0.0.0|6.0.21.52210 +System.ComponentModel.EventBasedAsync.dll|Microsoft.NETCore.App.Ref|6.0.0.0|6.0.21.52210 +System.ComponentModel.Primitives.dll|Microsoft.NETCore.App.Ref|6.0.0.0|6.0.21.52210 +System.ComponentModel.TypeConverter.dll|Microsoft.NETCore.App.Ref|6.0.0.0|6.0.21.52210 +System.Console.dll|Microsoft.NETCore.App.Ref|6.0.0.0|6.0.21.52210 +System.Data.Common.dll|Microsoft.NETCore.App.Ref|6.0.0.0|6.0.21.52210 +System.Data.DataSetExtensions.dll|Microsoft.NETCore.App.Ref|4.0.0.0|6.0.21.52210 +System.Diagnostics.Contracts.dll|Microsoft.NETCore.App.Ref|6.0.0.0|6.0.21.52210 +System.Diagnostics.Debug.dll|Microsoft.NETCore.App.Ref|6.0.0.0|6.0.21.52210 +System.Diagnostics.DiagnosticSource.dll|Microsoft.NETCore.App.Ref|6.0.0.0|6.0.21.52210 +System.Diagnostics.FileVersionInfo.dll|Microsoft.NETCore.App.Ref|6.0.0.0|6.0.21.52210 +System.Diagnostics.Process.dll|Microsoft.NETCore.App.Ref|6.0.0.0|6.0.21.52210 +System.Diagnostics.StackTrace.dll|Microsoft.NETCore.App.Ref|6.0.0.0|6.0.21.52210 +System.Diagnostics.TextWriterTraceListener.dll|Microsoft.NETCore.App.Ref|6.0.0.0|6.0.21.52210 +System.Diagnostics.Tools.dll|Microsoft.NETCore.App.Ref|6.0.0.0|6.0.21.52210 +System.Diagnostics.TraceSource.dll|Microsoft.NETCore.App.Ref|6.0.0.0|6.0.21.52210 +System.Diagnostics.Tracing.dll|Microsoft.NETCore.App.Ref|6.0.0.0|6.0.21.52210 +System.Drawing.Primitives.dll|Microsoft.NETCore.App.Ref|6.0.0.0|6.0.21.52210 +System.Dynamic.Runtime.dll|Microsoft.NETCore.App.Ref|6.0.0.0|6.0.21.52210 +System.Formats.Asn1.dll|Microsoft.NETCore.App.Ref|6.0.0.0|6.0.21.52210 +System.Globalization.dll|Microsoft.NETCore.App.Ref|6.0.0.0|6.0.21.52210 +System.Globalization.Calendars.dll|Microsoft.NETCore.App.Ref|6.0.0.0|6.0.21.52210 +System.Globalization.Extensions.dll|Microsoft.NETCore.App.Ref|6.0.0.0|6.0.21.52210 +System.IO.dll|Microsoft.NETCore.App.Ref|6.0.0.0|6.0.21.52210 +System.IO.Compression.dll|Microsoft.NETCore.App.Ref|6.0.0.0|6.0.21.52210 +System.IO.Compression.Brotli.dll|Microsoft.NETCore.App.Ref|6.0.0.0|6.0.21.52210 +System.IO.Compression.ZipFile.dll|Microsoft.NETCore.App.Ref|6.0.0.0|6.0.21.52210 +System.IO.FileSystem.dll|Microsoft.NETCore.App.Ref|6.0.0.0|6.0.21.52210 +System.IO.FileSystem.AccessControl.dll|Microsoft.NETCore.App.Ref|6.0.0.0|6.0.21.52210 +System.IO.FileSystem.DriveInfo.dll|Microsoft.NETCore.App.Ref|6.0.0.0|6.0.21.52210 +System.IO.FileSystem.Primitives.dll|Microsoft.NETCore.App.Ref|6.0.0.0|6.0.21.52210 +System.IO.FileSystem.Watcher.dll|Microsoft.NETCore.App.Ref|6.0.0.0|6.0.21.52210 +System.IO.IsolatedStorage.dll|Microsoft.NETCore.App.Ref|6.0.0.0|6.0.21.52210 +System.IO.MemoryMappedFiles.dll|Microsoft.NETCore.App.Ref|6.0.0.0|6.0.21.52210 +System.IO.Pipes.dll|Microsoft.NETCore.App.Ref|6.0.0.0|6.0.21.52210 +System.IO.Pipes.AccessControl.dll|Microsoft.NETCore.App.Ref|6.0.0.0|6.0.21.52210 +System.IO.UnmanagedMemoryStream.dll|Microsoft.NETCore.App.Ref|6.0.0.0|6.0.21.52210 +System.Linq.dll|Microsoft.NETCore.App.Ref|6.0.0.0|6.0.21.52210 +System.Linq.Expressions.dll|Microsoft.NETCore.App.Ref|6.0.0.0|6.0.21.52210 +System.Linq.Parallel.dll|Microsoft.NETCore.App.Ref|6.0.0.0|6.0.21.52210 +System.Linq.Queryable.dll|Microsoft.NETCore.App.Ref|6.0.0.0|6.0.21.52210 +System.Memory.dll|Microsoft.NETCore.App.Ref|6.0.0.0|6.0.21.52210 +System.Net.Http.dll|Microsoft.NETCore.App.Ref|6.0.0.0|6.0.21.52210 +System.Net.Http.Json.dll|Microsoft.NETCore.App.Ref|6.0.0.0|6.0.21.52210 +System.Net.HttpListener.dll|Microsoft.NETCore.App.Ref|6.0.0.0|6.0.21.52210 +System.Net.Mail.dll|Microsoft.NETCore.App.Ref|6.0.0.0|6.0.21.52210 +System.Net.NameResolution.dll|Microsoft.NETCore.App.Ref|6.0.0.0|6.0.21.52210 +System.Net.NetworkInformation.dll|Microsoft.NETCore.App.Ref|6.0.0.0|6.0.21.52210 +System.Net.Ping.dll|Microsoft.NETCore.App.Ref|6.0.0.0|6.0.21.52210 +System.Net.Primitives.dll|Microsoft.NETCore.App.Ref|6.0.0.0|6.0.21.52210 +System.Net.Quic.dll|Microsoft.NETCore.App.Ref|6.0.0.0|6.0.21.52210 +System.Net.Requests.dll|Microsoft.NETCore.App.Ref|6.0.0.0|6.0.21.52210 +System.Net.Security.dll|Microsoft.NETCore.App.Ref|6.0.0.0|6.0.21.52210 +System.Net.ServicePoint.dll|Microsoft.NETCore.App.Ref|6.0.0.0|6.0.21.52210 +System.Net.Sockets.dll|Microsoft.NETCore.App.Ref|6.0.0.0|6.0.21.52210 +System.Net.WebClient.dll|Microsoft.NETCore.App.Ref|6.0.0.0|6.0.21.52210 +System.Net.WebHeaderCollection.dll|Microsoft.NETCore.App.Ref|6.0.0.0|6.0.21.52210 +System.Net.WebProxy.dll|Microsoft.NETCore.App.Ref|6.0.0.0|6.0.21.52210 +System.Net.WebSockets.dll|Microsoft.NETCore.App.Ref|6.0.0.0|6.0.21.52210 +System.Net.WebSockets.Client.dll|Microsoft.NETCore.App.Ref|6.0.0.0|6.0.21.52210 +System.Numerics.Vectors.dll|Microsoft.NETCore.App.Ref|6.0.0.0|6.0.21.52210 +System.ObjectModel.dll|Microsoft.NETCore.App.Ref|6.0.0.0|6.0.21.52210 +System.Private.DataContractSerialization.dll|Microsoft.NETCore.App.Ref|6.0.0.0|6.0.21.52210 +System.Private.Runtime.InteropServices.JavaScript.dll|Microsoft.NETCore.App.Ref|6.0.0.0|6.0.21.52210 +System.Private.Uri.dll|Microsoft.NETCore.App.Ref|6.0.0.0|6.0.21.52210 +System.Private.Xml.dll|Microsoft.NETCore.App.Ref|6.0.0.0|6.0.21.52210 +System.Private.Xml.Linq.dll|Microsoft.NETCore.App.Ref|6.0.0.0|6.0.21.52210 +System.Reflection.dll|Microsoft.NETCore.App.Ref|6.0.0.0|6.0.21.52210 +System.Reflection.DispatchProxy.dll|Microsoft.NETCore.App.Ref|6.0.0.0|6.0.21.52210 +System.Reflection.Emit.dll|Microsoft.NETCore.App.Ref|6.0.0.0|6.0.21.52210 +System.Reflection.Emit.ILGeneration.dll|Microsoft.NETCore.App.Ref|6.0.0.0|6.0.21.52210 +System.Reflection.Emit.Lightweight.dll|Microsoft.NETCore.App.Ref|6.0.0.0|6.0.21.52210 +System.Reflection.Extensions.dll|Microsoft.NETCore.App.Ref|6.0.0.0|6.0.21.52210 +System.Reflection.Metadata.dll|Microsoft.NETCore.App.Ref|6.0.0.0|6.0.21.52210 +System.Reflection.Primitives.dll|Microsoft.NETCore.App.Ref|6.0.0.0|6.0.21.52210 +System.Reflection.TypeExtensions.dll|Microsoft.NETCore.App.Ref|6.0.0.0|6.0.21.52210 +System.Resources.Reader.dll|Microsoft.NETCore.App.Ref|6.0.0.0|6.0.21.52210 +System.Resources.ResourceManager.dll|Microsoft.NETCore.App.Ref|6.0.0.0|6.0.21.52210 +System.Resources.Writer.dll|Microsoft.NETCore.App.Ref|6.0.0.0|6.0.21.52210 +System.Runtime.dll|Microsoft.NETCore.App.Ref|6.0.0.0|6.0.21.52210 +System.Runtime.CompilerServices.Unsafe.dll|Microsoft.NETCore.App.Ref|6.0.0.0|6.0.21.52210 +System.Runtime.CompilerServices.VisualC.dll|Microsoft.NETCore.App.Ref|6.0.0.0|6.0.21.52210 +System.Runtime.Extensions.dll|Microsoft.NETCore.App.Ref|6.0.0.0|6.0.21.52210 +System.Runtime.Handles.dll|Microsoft.NETCore.App.Ref|6.0.0.0|6.0.21.52210 +System.Runtime.InteropServices.dll|Microsoft.NETCore.App.Ref|6.0.0.0|6.0.21.52210 +System.Runtime.InteropServices.RuntimeInformation.dll|Microsoft.NETCore.App.Ref|6.0.0.0|6.0.21.52210 +System.Runtime.Intrinsics.dll|Microsoft.NETCore.App.Ref|6.0.0.0|6.0.21.52210 +System.Runtime.Loader.dll|Microsoft.NETCore.App.Ref|6.0.0.0|6.0.21.52210 +System.Runtime.Numerics.dll|Microsoft.NETCore.App.Ref|6.0.0.0|6.0.21.52210 +System.Runtime.Serialization.Formatters.dll|Microsoft.NETCore.App.Ref|6.0.0.0|6.0.21.52210 +System.Runtime.Serialization.Json.dll|Microsoft.NETCore.App.Ref|6.0.0.0|6.0.21.52210 +System.Runtime.Serialization.Primitives.dll|Microsoft.NETCore.App.Ref|6.0.0.0|6.0.21.52210 +System.Runtime.Serialization.Xml.dll|Microsoft.NETCore.App.Ref|6.0.0.0|6.0.21.52210 +System.Security.AccessControl.dll|Microsoft.NETCore.App.Ref|6.0.0.0|6.0.21.52210 +System.Security.Claims.dll|Microsoft.NETCore.App.Ref|6.0.0.0|6.0.21.52210 +System.Security.Cryptography.Algorithms.dll|Microsoft.NETCore.App.Ref|6.0.0.0|6.0.21.52210 +System.Security.Cryptography.Cng.dll|Microsoft.NETCore.App.Ref|6.0.0.0|6.0.21.52210 +System.Security.Cryptography.Csp.dll|Microsoft.NETCore.App.Ref|6.0.0.0|6.0.21.52210 +System.Security.Cryptography.Encoding.dll|Microsoft.NETCore.App.Ref|6.0.0.0|6.0.21.52210 +System.Security.Cryptography.OpenSsl.dll|Microsoft.NETCore.App.Ref|6.0.0.0|6.0.21.52210 +System.Security.Cryptography.Primitives.dll|Microsoft.NETCore.App.Ref|6.0.0.0|6.0.21.52210 +System.Security.Cryptography.X509Certificates.dll|Microsoft.NETCore.App.Ref|6.0.0.0|6.0.21.52210 +System.Security.Principal.dll|Microsoft.NETCore.App.Ref|6.0.0.0|6.0.21.52210 +System.Security.Principal.Windows.dll|Microsoft.NETCore.App.Ref|6.0.0.0|6.0.21.52210 +System.Security.SecureString.dll|Microsoft.NETCore.App.Ref|6.0.0.0|6.0.21.52210 +System.Text.Encoding.dll|Microsoft.NETCore.App.Ref|6.0.0.0|6.0.21.52210 +System.Text.Encoding.CodePages.dll|Microsoft.NETCore.App.Ref|6.0.0.0|6.0.21.52210 +System.Text.Encoding.Extensions.dll|Microsoft.NETCore.App.Ref|6.0.0.0|6.0.21.52210 +System.Text.Encodings.Web.dll|Microsoft.NETCore.App.Ref|6.0.0.0|6.0.21.52210 +System.Text.Json.dll|Microsoft.NETCore.App.Ref|6.0.0.0|6.0.21.52210 +System.Text.RegularExpressions.dll|Microsoft.NETCore.App.Ref|6.0.0.0|6.0.21.52210 +System.Threading.dll|Microsoft.NETCore.App.Ref|6.0.0.0|6.0.21.52210 +System.Threading.Channels.dll|Microsoft.NETCore.App.Ref|6.0.0.0|6.0.21.52210 +System.Threading.Overlapped.dll|Microsoft.NETCore.App.Ref|6.0.0.0|6.0.21.52210 +System.Threading.Tasks.dll|Microsoft.NETCore.App.Ref|6.0.0.0|6.0.21.52210 +System.Threading.Tasks.Dataflow.dll|Microsoft.NETCore.App.Ref|6.0.0.0|6.0.21.52210 +System.Threading.Tasks.Extensions.dll|Microsoft.NETCore.App.Ref|6.0.0.0|6.0.21.52210 +System.Threading.Tasks.Parallel.dll|Microsoft.NETCore.App.Ref|6.0.0.0|6.0.21.52210 +System.Threading.Thread.dll|Microsoft.NETCore.App.Ref|6.0.0.0|6.0.21.52210 +System.Threading.ThreadPool.dll|Microsoft.NETCore.App.Ref|6.0.0.0|6.0.21.52210 +System.Threading.Timer.dll|Microsoft.NETCore.App.Ref|6.0.0.0|6.0.21.52210 +System.Transactions.Local.dll|Microsoft.NETCore.App.Ref|6.0.0.0|6.0.21.52210 +System.ValueTuple.dll|Microsoft.NETCore.App.Ref|4.0.3.0|6.0.21.52210 +System.Web.HttpUtility.dll|Microsoft.NETCore.App.Ref|6.0.0.0|6.0.21.52210 +System.Xml.ReaderWriter.dll|Microsoft.NETCore.App.Ref|6.0.0.0|6.0.21.52210 +System.Xml.XDocument.dll|Microsoft.NETCore.App.Ref|6.0.0.0|6.0.21.52210 +System.Xml.XmlDocument.dll|Microsoft.NETCore.App.Ref|6.0.0.0|6.0.21.52210 +System.Xml.XmlSerializer.dll|Microsoft.NETCore.App.Ref|6.0.0.0|6.0.21.52210 +System.Xml.XPath.dll|Microsoft.NETCore.App.Ref|6.0.0.0|6.0.21.52210 +System.Xml.XPath.XDocument.dll|Microsoft.NETCore.App.Ref|6.0.0.0|6.0.21.52210 +mscorlib.dll|Microsoft.NETCore.App.Ref|4.0.0.0|6.0.21.52210 +Microsoft.VisualBasic.dll|Microsoft.NETCore.App.Ref|10.0.0.0|6.0.21.52210 +System.dll|Microsoft.NETCore.App.Ref|4.0.0.0|6.0.21.52210 +System.ComponentModel.DataAnnotations.dll|Microsoft.NETCore.App.Ref|4.0.0.0|6.0.21.52210 +System.Configuration.dll|Microsoft.NETCore.App.Ref|4.0.0.0|6.0.21.52210 +System.Core.dll|Microsoft.NETCore.App.Ref|4.0.0.0|6.0.21.52210 +System.Data.dll|Microsoft.NETCore.App.Ref|4.0.0.0|6.0.21.52210 +System.Drawing.dll|Microsoft.NETCore.App.Ref|4.0.0.0|6.0.21.52210 +System.IO.Compression.FileSystem.dll|Microsoft.NETCore.App.Ref|4.0.0.0|6.0.21.52210 +System.Net.dll|Microsoft.NETCore.App.Ref|4.0.0.0|6.0.21.52210 +System.Numerics.dll|Microsoft.NETCore.App.Ref|4.0.0.0|6.0.21.52210 +System.Runtime.Serialization.dll|Microsoft.NETCore.App.Ref|4.0.0.0|6.0.21.52210 +System.Security.dll|Microsoft.NETCore.App.Ref|4.0.0.0|6.0.21.52210 +System.ServiceProcess.dll|Microsoft.NETCore.App.Ref|4.0.0.0|6.0.21.52210 +System.ServiceModel.Web.dll|Microsoft.NETCore.App.Ref|4.0.0.0|6.0.21.52210 +System.Transactions.dll|Microsoft.NETCore.App.Ref|4.0.0.0|6.0.21.52210 +System.Web.dll|Microsoft.NETCore.App.Ref|4.0.0.0|6.0.21.52210 +System.Windows.dll|Microsoft.NETCore.App.Ref|4.0.0.0|6.0.21.52210 +System.Xml.dll|Microsoft.NETCore.App.Ref|4.0.0.0|6.0.21.52210 +System.Xml.Serialization.dll|Microsoft.NETCore.App.Ref|4.0.0.0|6.0.21.52210 +System.Xml.Linq.dll|Microsoft.NETCore.App.Ref|4.0.0.0|6.0.21.52210 +WindowsBase.dll|Microsoft.NETCore.App.Ref|4.0.0.0|6.0.21.52210 +netstandard.dll|Microsoft.NETCore.App.Ref|2.1.0.0|6.0.21.52210 +System.Private.CoreLib.dll|Microsoft.NETCore.App.Ref|6.0.0.0|6.0.21.52210 +System.Private.DataContractSerialization.dll|Microsoft.NETCore.App.Ref|6.0.0.0|6.0.21.52210 +System.Private.Uri.dll|Microsoft.NETCore.App.Ref|6.0.0.0|6.0.21.52210 +System.Private.Xml.dll|Microsoft.NETCore.App.Ref|6.0.0.0|6.0.21.52210 +System.Private.Xml.Linq.dll|Microsoft.NETCore.App.Ref|6.0.0.0|6.0.21.52210 +libSystem.Globalization.Native.dylib|Microsoft.NETCore.App.Ref||0.0.0.0 +libSystem.Globalization.Native.so|Microsoft.NETCore.App.Ref||0.0.0.0 +libSystem.IO.Compression.Native.a|Microsoft.NETCore.App.Ref||0.0.0.0 +libSystem.IO.Compression.Native.dylib|Microsoft.NETCore.App.Ref||0.0.0.0 +libSystem.IO.Compression.Native.so|Microsoft.NETCore.App.Ref||0.0.0.0 +libSystem.Native.a|Microsoft.NETCore.App.Ref||0.0.0.0 +libSystem.Native.dylib|Microsoft.NETCore.App.Ref||0.0.0.0 +libSystem.Native.so|Microsoft.NETCore.App.Ref||0.0.0.0 +libSystem.Net.Http.Native.a|Microsoft.NETCore.App.Ref||0.0.0.0 +libSystem.Net.Http.Native.dylib|Microsoft.NETCore.App.Ref||0.0.0.0 +libSystem.Net.Http.Native.so|Microsoft.NETCore.App.Ref||0.0.0.0 +libSystem.Net.Security.Native.a|Microsoft.NETCore.App.Ref||0.0.0.0 +libSystem.Net.Security.Native.dylib|Microsoft.NETCore.App.Ref||0.0.0.0 +libSystem.Net.Security.Native.so|Microsoft.NETCore.App.Ref||0.0.0.0 +libSystem.Security.Cryptography.Native.Apple.a|Microsoft.NETCore.App.Ref||0.0.0.0 +libSystem.Security.Cryptography.Native.Apple.dylib|Microsoft.NETCore.App.Ref||0.0.0.0 +libSystem.Security.Cryptography.Native.Android.a|Microsoft.NETCore.App.Ref||0.0.0.0 +libSystem.Security.Cryptography.Native.Android.so|Microsoft.NETCore.App.Ref||0.0.0.0 +libSystem.Security.Cryptography.Native.OpenSsl.a|Microsoft.NETCore.App.Ref||0.0.0.0 +libSystem.Security.Cryptography.Native.OpenSsl.dylib|Microsoft.NETCore.App.Ref||0.0.0.0 +libSystem.Security.Cryptography.Native.OpenSsl.so|Microsoft.NETCore.App.Ref||0.0.0.0 +coreclr.dll|Microsoft.NETCore.App.Ref||6.0.21.52210 +libcoreclr.so|Microsoft.NETCore.App.Ref||0.0.0.0 +libcoreclr.dylib|Microsoft.NETCore.App.Ref||0.0.0.0 +clretwrc.dll|Microsoft.NETCore.App.Ref||6.0.21.52210 +clrjit.dll|Microsoft.NETCore.App.Ref||6.0.21.52210 +libclrjit.so|Microsoft.NETCore.App.Ref||0.0.0.0 +libclrjit.dylib|Microsoft.NETCore.App.Ref||0.0.0.0 +dbgshim.dll|Microsoft.NETCore.App.Ref||6.0.21.52210 +libdbgshim.so|Microsoft.NETCore.App.Ref||0.0.0.0 +libdbgshim.dylib|Microsoft.NETCore.App.Ref||0.0.0.0 +mscordaccore.dll|Microsoft.NETCore.App.Ref||6.0.21.52210 +libmscordaccore.so|Microsoft.NETCore.App.Ref||0.0.0.0 +libmscordaccore.dylib|Microsoft.NETCore.App.Ref||0.0.0.0 +mscordbi.dll|Microsoft.NETCore.App.Ref||6.0.21.52210 +libmscordbi.so|Microsoft.NETCore.App.Ref||0.0.0.0 +libmscordbi.dylib|Microsoft.NETCore.App.Ref||0.0.0.0 +mscorrc.dll|Microsoft.NETCore.App.Ref||6.0.21.52210 +api-ms-win-core-console-l1-1-0.dll|Microsoft.NETCore.App.Ref||10.0.19041.1 +api-ms-win-core-console-l1-2-0.dll|Microsoft.NETCore.App.Ref||10.0.19041.1 +api-ms-win-core-datetime-l1-1-0.dll|Microsoft.NETCore.App.Ref||10.0.19041.1 +api-ms-win-core-debug-l1-1-0.dll|Microsoft.NETCore.App.Ref||10.0.19041.1 +api-ms-win-core-errorhandling-l1-1-0.dll|Microsoft.NETCore.App.Ref||10.0.19041.1 +api-ms-win-core-file-l1-1-0.dll|Microsoft.NETCore.App.Ref||10.0.19041.1 +api-ms-win-core-file-l1-2-0.dll|Microsoft.NETCore.App.Ref||10.0.19041.1 +api-ms-win-core-file-l2-1-0.dll|Microsoft.NETCore.App.Ref||10.0.19041.1 +api-ms-win-core-handle-l1-1-0.dll|Microsoft.NETCore.App.Ref||10.0.19041.1 +api-ms-win-core-heap-l1-1-0.dll|Microsoft.NETCore.App.Ref||10.0.19041.1 +api-ms-win-core-interlocked-l1-1-0.dll|Microsoft.NETCore.App.Ref||10.0.19041.1 +api-ms-win-core-libraryloader-l1-1-0.dll|Microsoft.NETCore.App.Ref||10.0.19041.1 +api-ms-win-core-localization-l1-2-0.dll|Microsoft.NETCore.App.Ref||10.0.19041.1 +api-ms-win-core-memory-l1-1-0.dll|Microsoft.NETCore.App.Ref||10.0.19041.1 +api-ms-win-core-namedpipe-l1-1-0.dll|Microsoft.NETCore.App.Ref||10.0.19041.1 +api-ms-win-core-processenvironment-l1-1-0.dll|Microsoft.NETCore.App.Ref||10.0.19041.1 +api-ms-win-core-processthreads-l1-1-0.dll|Microsoft.NETCore.App.Ref||10.0.19041.1 +api-ms-win-core-processthreads-l1-1-1.dll|Microsoft.NETCore.App.Ref||10.0.19041.1 +api-ms-win-core-profile-l1-1-0.dll|Microsoft.NETCore.App.Ref||10.0.19041.1 +api-ms-win-core-rtlsupport-l1-1-0.dll|Microsoft.NETCore.App.Ref||10.0.19041.1 +api-ms-win-core-string-l1-1-0.dll|Microsoft.NETCore.App.Ref||10.0.19041.1 +api-ms-win-core-synch-l1-1-0.dll|Microsoft.NETCore.App.Ref||10.0.19041.1 +api-ms-win-core-synch-l1-2-0.dll|Microsoft.NETCore.App.Ref||10.0.19041.1 +api-ms-win-core-sysinfo-l1-1-0.dll|Microsoft.NETCore.App.Ref||10.0.19041.1 +api-ms-win-core-timezone-l1-1-0.dll|Microsoft.NETCore.App.Ref||10.0.19041.1 +api-ms-win-core-util-l1-1-0.dll|Microsoft.NETCore.App.Ref||10.0.19041.1 +api-ms-win-crt-conio-l1-1-0.dll|Microsoft.NETCore.App.Ref||10.0.19041.1 +api-ms-win-crt-convert-l1-1-0.dll|Microsoft.NETCore.App.Ref||10.0.19041.1 +api-ms-win-crt-environment-l1-1-0.dll|Microsoft.NETCore.App.Ref||10.0.19041.1 +api-ms-win-crt-filesystem-l1-1-0.dll|Microsoft.NETCore.App.Ref||10.0.19041.1 +api-ms-win-crt-heap-l1-1-0.dll|Microsoft.NETCore.App.Ref||10.0.19041.1 +api-ms-win-crt-locale-l1-1-0.dll|Microsoft.NETCore.App.Ref||10.0.19041.1 +api-ms-win-crt-math-l1-1-0.dll|Microsoft.NETCore.App.Ref||10.0.19041.1 +api-ms-win-crt-multibyte-l1-1-0.dll|Microsoft.NETCore.App.Ref||10.0.19041.1 +api-ms-win-crt-private-l1-1-0.dll|Microsoft.NETCore.App.Ref||10.0.19041.1 +api-ms-win-crt-process-l1-1-0.dll|Microsoft.NETCore.App.Ref||10.0.19041.1 +api-ms-win-crt-runtime-l1-1-0.dll|Microsoft.NETCore.App.Ref||10.0.19041.1 +api-ms-win-crt-stdio-l1-1-0.dll|Microsoft.NETCore.App.Ref||10.0.19041.1 +api-ms-win-crt-string-l1-1-0.dll|Microsoft.NETCore.App.Ref||10.0.19041.1 +api-ms-win-crt-time-l1-1-0.dll|Microsoft.NETCore.App.Ref||10.0.19041.1 +api-ms-win-crt-utility-l1-1-0.dll|Microsoft.NETCore.App.Ref||10.0.19041.1 +API-MS-Win-core-xstate-l2-1-0.dll|Microsoft.NETCore.App.Ref||10.0.19041.1 +ucrtbase.dll|Microsoft.NETCore.App.Ref||6.0.21.52210 +msquic.dll|Microsoft.NETCore.App.Ref||1.8.0.0 +System.IO.Compression.Native.dll|Microsoft.NETCore.App.Ref||6.0.21.52210 +createdump.exe|Microsoft.NETCore.App.Ref||6.0.21.52210 +createdump|Microsoft.NETCore.App.Ref||0.0.0.0 +libcoreclrtraceptprovider.so|Microsoft.NETCore.App.Ref||0.0.0.0 +Microsoft.DiaSymReader.Native.x86.dll|Microsoft.NETCore.App.Ref||14.28.29715.1 +Microsoft.DiaSymReader.Native.amd64.dll|Microsoft.NETCore.App.Ref||14.28.29715.1 +Microsoft.DiaSymReader.Native.arm.dll|Microsoft.NETCore.App.Ref||14.28.29715.1 +Microsoft.DiaSymReader.Native.arm64.dll|Microsoft.NETCore.App.Ref||14.28.29715.1 +libmonosgen-2.0.lib|Microsoft.NETCore.App.Ref||0.0.0.0 +libmonosgen-2.0.a|Microsoft.NETCore.App.Ref||0.0.0.0 +libmonosgen-2.0.so|Microsoft.NETCore.App.Ref||0.0.0.0 +libmonosgen-2.0.dylib|Microsoft.NETCore.App.Ref||0.0.0.0 +llc|Microsoft.NETCore.App.Ref||0.0.0.0 +mono-aot-cross|Microsoft.NETCore.App.Ref||0.0.0.0 +mono-aot-cross.exe|Microsoft.NETCore.App.Ref||6.0.21.52210 +opt|Microsoft.NETCore.App.Ref||0.0.0.0 +libmono-component-diagnostics_tracing.dll|Microsoft.NETCore.App.Ref||6.0.21.52210 +libmono-component-diagnostics_tracing.so|Microsoft.NETCore.App.Ref||0.0.0.0 +libmono-component-diagnostics_tracing.dylib|Microsoft.NETCore.App.Ref||0.0.0.0 +libmono-component-diagnostics_tracing-static.a|Microsoft.NETCore.App.Ref||0.0.0.0 +libmono-component-diagnostics_tracing-stub-static.a|Microsoft.NETCore.App.Ref||0.0.0.0 +libmono-component-diagnostics_tracing-static.lib|Microsoft.NETCore.App.Ref||0.0.0.0 +libmono-component-diagnostics_tracing-stub-static.lib|Microsoft.NETCore.App.Ref||0.0.0.0 +libmono-component-hot_reload.dll|Microsoft.NETCore.App.Ref||6.0.21.52210 +libmono-component-hot_reload.so|Microsoft.NETCore.App.Ref||0.0.0.0 +libmono-component-hot_reload.dylib|Microsoft.NETCore.App.Ref||0.0.0.0 +libmono-component-hot_reload-static.a|Microsoft.NETCore.App.Ref||0.0.0.0 +libmono-component-hot_reload-stub-static.a|Microsoft.NETCore.App.Ref||0.0.0.0 +libmono-component-hot_reload-static.lib|Microsoft.NETCore.App.Ref||0.0.0.0 +libmono-component-hot_reload-stub-static.lib|Microsoft.NETCore.App.Ref||0.0.0.0 +libmono-component-debugger.dll|Microsoft.NETCore.App.Ref||6.0.21.52210 +libmono-component-debugger.so|Microsoft.NETCore.App.Ref||0.0.0.0 +libmono-component-debugger.dylib|Microsoft.NETCore.App.Ref||0.0.0.0 +libmono-component-debugger-static.a|Microsoft.NETCore.App.Ref||0.0.0.0 +libmono-component-debugger-stub-static.a|Microsoft.NETCore.App.Ref||0.0.0.0 +libmono-component-debugger-static.lib|Microsoft.NETCore.App.Ref||0.0.0.0 +libmono-component-debugger-stub-static.lib|Microsoft.NETCore.App.Ref||0.0.0.0 +libmono-ee-interp.a|Microsoft.NETCore.App.Ref||0.0.0.0 +libmono-icall-table.a|Microsoft.NETCore.App.Ref||0.0.0.0 +libmono-ilgen.a|Microsoft.NETCore.App.Ref||0.0.0.0 +libmono-profiler-aot.a|Microsoft.NETCore.App.Ref||0.0.0.0 +System.Private.Runtime.InteropServices.Javascript.dll|Microsoft.NETCore.App.Ref|6.0.0.0|6.0.21.52210 +dotnet.js|Microsoft.NETCore.App.Ref||0.0.0.0 +dotnet.wasm|Microsoft.NETCore.App.Ref||0.0.0.0 +dotnet.timezones.blat|Microsoft.NETCore.App.Ref||0.0.0.0 +icudt.dat|Microsoft.NETCore.App.Ref||0.0.0.0 +icudt_no_CJK.dat|Microsoft.NETCore.App.Ref||0.0.0.0 +icudt_CJK.dat|Microsoft.NETCore.App.Ref||0.0.0.0 +icudt_EFIGS.dat|Microsoft.NETCore.App.Ref||0.0.0.0 +icudt_optimal.dat|Microsoft.NETCore.App.Ref||0.0.0.0 +icudt_optimal_no_CJK.dat|Microsoft.NETCore.App.Ref||0.0.0.0 +binding_support.js|Microsoft.NETCore.App.Ref||0.0.0.0 +dotnet_support.js|Microsoft.NETCore.App.Ref||0.0.0.0 +library_mono.js|Microsoft.NETCore.App.Ref||0.0.0.0 +pal_random.js|Microsoft.NETCore.App.Ref||0.0.0.0 +corebindings.c|Microsoft.NETCore.App.Ref||0.0.0.0 +driver.c|Microsoft.NETCore.App.Ref||0.0.0.0 +pinvoke.c|Microsoft.NETCore.App.Ref||0.0.0.0 +pinvoke.h|Microsoft.NETCore.App.Ref||0.0.0.0 +emcc-default.rsp|Microsoft.NETCore.App.Ref||0.0.0.0 +emcc-props.json|Microsoft.NETCore.App.Ref||0.0.0.0 +libicudata.a|Microsoft.NETCore.App.Ref||0.0.0.0 +libicui18n.a|Microsoft.NETCore.App.Ref||0.0.0.0 +libicuuc.a|Microsoft.NETCore.App.Ref||0.0.0.0 +mscordaccore_amd64_amd64_6.0.21.52210.dll|Microsoft.NETCore.App.Ref|6.0.0.0|6.0.21.52210 +mscordaccore_amd64_amd64_6.0.21.52210.dll|Microsoft.NETCore.App.Ref|6.0.0.0|6.0.21.52210 From 39ecea66f01371e9a8af3169a02a63f916e54217 Mon Sep 17 00:00:00 2001 From: David Fowler Date: Mon, 15 Nov 2021 15:34:08 -0800 Subject: [PATCH 2/7] =?UTF-8?q?Fix=20race=20condition=20with=20cancellatio?= =?UTF-8?q?n=20tokens=20in=20Read/Flush=20operations=20=E2=80=A6=20(#61500?= =?UTF-8?q?)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Fix race condition with cancellation tokens in Read/Flush operations (#59090) * Fix race condition with cancellation tokens in Read/Write operations - There's a tight race where UnsafeRegister can fire inline and then ReadAsync never completes. This is because the cancellation token property has not been assigned yet so the callback noops. This change checks the result of the UnsafeRegister operation to see if ran synchronously and throws if it did. We also move any state transitions to after these checks to make sure the PipeAwaitable state doesn't change before throwing. * Add a debug assert to make sure there's no state change. * Add if debug * More if DEBUG * add packaging changes * Run validation checks for just netcoreapp * use targetIdentifier property to avoid function call and use netframework * simplify some conditions Co-authored-by: Anirudh Agnihotry Co-authored-by: Anirudh Agnihotry --- eng/packaging.targets | 4 ++-- .../src/System.IO.Pipelines.csproj | 2 ++ .../src/System/IO/Pipelines/PipeAwaitable.cs | 23 ++++++++++++++++--- 3 files changed, 24 insertions(+), 5 deletions(-) diff --git a/eng/packaging.targets b/eng/packaging.targets index 3c14f61ae32b6..72401ef6da063 100644 --- a/eng/packaging.targets +++ b/eng/packaging.targets @@ -44,9 +44,9 @@ $(MajorVersion).$(MinorVersion).$(ServicingVersion) <_IsWindowsDesktopApp Condition="$(WindowsDesktopCoreAppLibrary.Contains('$(AssemblyName);'))">true <_IsAspNetCoreApp Condition="$(AspNetCoreAppLibrary.Contains('$(AssemblyName);'))">true - <_AssemblyInTargetingPack Condition="'$(IsNETCoreAppSrc)' == 'true' or '$(_IsAspNetCoreApp)' == 'true' or '$(_IsWindowsDesktopApp)' == 'true'">true + <_AssemblyInTargetingPack Condition="('$(IsNETCoreAppSrc)' == 'true' or '$(_IsAspNetCoreApp)' == 'true' or '$(_IsWindowsDesktopApp)' == 'true') and '$(TargetFrameworkIdentifier)' != '.NETFramework'">true - $(MajorVersion).$(MinorVersion).0.$(ServicingVersion) + $(MajorVersion).$(MinorVersion).0.$(ServicingVersion) diff --git a/src/libraries/System.IO.Pipelines/src/System.IO.Pipelines.csproj b/src/libraries/System.IO.Pipelines/src/System.IO.Pipelines.csproj index 34f79827374ac..a58b8c1af08d0 100644 --- a/src/libraries/System.IO.Pipelines/src/System.IO.Pipelines.csproj +++ b/src/libraries/System.IO.Pipelines/src/System.IO.Pipelines.csproj @@ -9,6 +9,8 @@ Commonly Used Types: System.IO.Pipelines.Pipe System.IO.Pipelines.PipeWriter System.IO.Pipelines.PipeReader + true + 1 { cancellationToken.ThrowIfCancellationRequested(); - _awaitableState |= AwaitableState.Running; - // Don't register if already completed, we would immediately unregistered in ObserveCancellation if (cancellationToken.CanBeCanceled && !IsCompleted) { +#if DEBUG + var previousAwaitableState = _awaitableState; +#endif + + _cancellationTokenRegistration = cancellationToken.UnsafeRegister(callback, state); + + // If we get back the default CancellationTokenRegistration then it means the + // callback synchronously and we can throw inline. This is safe because we haven't changed + // the state of the awaitable as yet. + if (_cancellationTokenRegistration == default(CancellationTokenRegistration)) + { +#if DEBUG + Debug.Assert(previousAwaitableState == _awaitableState, "The awaitable state changed!"); +#endif + + cancellationToken.ThrowIfCancellationRequested(); + } + #if (NETSTANDARD2_0 || NETFRAMEWORK) _cancellationToken = cancellationToken; #endif - _cancellationTokenRegistration = cancellationToken.UnsafeRegister(callback, state); } + + _awaitableState |= AwaitableState.Running; } [MethodImpl(MethodImplOptions.AggressiveInlining)] From 216555588c3b16a4a15388dbe784379016e98ad2 Mon Sep 17 00:00:00 2001 From: Nikola Milosavljevic Date: Mon, 15 Nov 2021 20:37:46 -0800 Subject: [PATCH 3/7] Stabilize upgrade codes for host msi (#61606) * Stabilize upgrade codes for host msi * Override ProviderKey with values from 6.0.0 release * Fixing typo * Update version of Microsoft.DotNet.Build.Tasks.Installers package --- eng/Version.Details.xml | 4 ++-- eng/Versions.props | 2 +- src/installer/pkg/sfx/installers/dotnet-host.proj | 8 ++++++++ 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index daa527ce4bd70..f131abb265644 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -54,9 +54,9 @@ https://github.com/dotnet/arcade ee9b7f19853685805c612103282c8d9486c7db86 - + https://github.com/dotnet/arcade - ee9b7f19853685805c612103282c8d9486c7db86 + a35b36664af90a8e61f051ad06fb8039380b1526 https://github.com/dotnet/arcade diff --git a/eng/Versions.props b/eng/Versions.props index 5883dc9bbeaf8..f6623b53f786d 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -62,7 +62,7 @@ 6.0.0-beta.21560.2 2.5.1-beta.21560.2 6.0.0-beta.21560.2 - 6.0.0-beta.21560.2 + 6.0.0-beta.21565.3 6.0.0-beta.21560.2 6.0.0-beta.21560.2 6.0.0-beta.21560.2 diff --git a/src/installer/pkg/sfx/installers/dotnet-host.proj b/src/installer/pkg/sfx/installers/dotnet-host.proj index 797d2f5afcc31..7a54d385a4fa5 100644 --- a/src/installer/pkg/sfx/installers/dotnet-host.proj +++ b/src/installer/pkg/sfx/installers/dotnet-host.proj @@ -21,12 +21,20 @@ $(MSBuildThisFileDirectory)rpm_scripts/host $(RpmScriptsDirectory)/after_install.sh $(RpmScriptsDirectory)/after_remove.sh + + {FD6988BF-5CCB-4202-3752-072442B1070B} + {97C9F490-5379-6902-7B80-D2723CA59D95} + {181630A5-53EA-4D70-E563-06F64946DE38} + + + + From fd61aefcf12382a9ddd24295f660b95606201d57 Mon Sep 17 00:00:00 2001 From: Layomi Akinrinade Date: Tue, 16 Nov 2021 10:09:58 -0800 Subject: [PATCH 4/7] [release/6.0] Provide locations for src-gen diagnostic output (#61614) * Provide locations for src-gen diagnostic output * Fix tests and address feedback * Add defensive check for context type location --- .../gen/ContextGenerationSpec.cs | 3 + .../gen/JsonSourceGenerator.Emitter.cs | 6 +- .../gen/JsonSourceGenerator.Parser.cs | 55 ++++- .../gen/Reflection/FieldInfoWrapper.cs | 2 + .../gen/Reflection/PropertyInfoWrapper.cs | 2 + .../gen/Reflection/ReflectionExtensions.cs | 19 ++ .../gen/Reflection/TypeWrapper.cs | 2 + .../gen/TypeGenerationSpec.cs | 6 + .../CompilationHelper.cs | 24 +- .../JsonSourceGeneratorDiagnosticsTests.cs | 216 ++++++++++-------- .../JsonSourceGeneratorTests.cs | 17 +- 11 files changed, 232 insertions(+), 120 deletions(-) diff --git a/src/libraries/System.Text.Json/gen/ContextGenerationSpec.cs b/src/libraries/System.Text.Json/gen/ContextGenerationSpec.cs index 13e9c7437391d..b88bd91867200 100644 --- a/src/libraries/System.Text.Json/gen/ContextGenerationSpec.cs +++ b/src/libraries/System.Text.Json/gen/ContextGenerationSpec.cs @@ -5,6 +5,7 @@ using System.Text.Json.Serialization; using System.Text.Json.Reflection; using System.Diagnostics; +using Microsoft.CodeAnalysis; namespace System.Text.Json.SourceGeneration { @@ -15,6 +16,8 @@ namespace System.Text.Json.SourceGeneration [DebuggerDisplay("ContextTypeRef={ContextTypeRef}")] internal sealed class ContextGenerationSpec { + public Location Location { get; init; } + public JsonSourceGenerationOptionsAttribute GenerationOptions { get; init; } public Type ContextType { get; init; } diff --git a/src/libraries/System.Text.Json/gen/JsonSourceGenerator.Emitter.cs b/src/libraries/System.Text.Json/gen/JsonSourceGenerator.Emitter.cs index ec6124a8222be..087f3e2dc4095 100644 --- a/src/libraries/System.Text.Json/gen/JsonSourceGenerator.Emitter.cs +++ b/src/libraries/System.Text.Json/gen/JsonSourceGenerator.Emitter.cs @@ -274,8 +274,9 @@ private void GenerateTypeInfo(TypeGenerationSpec typeGenerationSpec) break; case ClassType.TypeUnsupportedBySourceGen: { + Location location = typeGenerationSpec.Type.GetDiagnosticLocation() ?? typeGenerationSpec.AttributeLocation ?? _currentContext.Location; _sourceGenerationContext.ReportDiagnostic( - Diagnostic.Create(TypeNotSupported, Location.None, new string[] { typeGenerationSpec.TypeRef })); + Diagnostic.Create(TypeNotSupported, location, new string[] { typeGenerationSpec.TypeRef })); return; } default: @@ -293,7 +294,8 @@ private void GenerateTypeInfo(TypeGenerationSpec typeGenerationSpec) } else { - _sourceGenerationContext.ReportDiagnostic(Diagnostic.Create(DuplicateTypeName, Location.None, new string[] { typeGenerationSpec.TypeInfoPropertyName })); + Location location = typeGenerationSpec.AttributeLocation ?? _currentContext.Location; + _sourceGenerationContext.ReportDiagnostic(Diagnostic.Create(DuplicateTypeName, location, new string[] { typeGenerationSpec.TypeInfoPropertyName })); } } diff --git a/src/libraries/System.Text.Json/gen/JsonSourceGenerator.Parser.cs b/src/libraries/System.Text.Json/gen/JsonSourceGenerator.Parser.cs index 2785e66c7cd3a..fd190452e294f 100644 --- a/src/libraries/System.Text.Json/gen/JsonSourceGenerator.Parser.cs +++ b/src/libraries/System.Text.Json/gen/JsonSourceGenerator.Parser.cs @@ -116,6 +116,14 @@ private sealed class Parser private readonly HashSet _implicitlyRegisteredTypes = new(); + /// + /// A list of diagnostics emitted at the type level. This is cached and emitted between the processing of context types + /// in order to properly retrieve [JsonSerializable] attribute applications for top-level types (since a type might occur + /// both at top-level and in nested object graphs, with no guarantee of the order that we will see the type). + /// The element tuple types specifies the serializable type, the kind of diagnostic to emit, and the diagnostic message. + /// + private readonly List<(Type, DiagnosticDescriptor, string[])> _typeLevelDiagnostics = new(); + private JsonKnownNamingPolicy _currentContextNamingPolicy; private static DiagnosticDescriptor ContextClassesMustBePartial { get; } = new DiagnosticDescriptor( @@ -244,6 +252,11 @@ public Parser(Compilation compilation, in JsonSourceGenerationContext sourceGene foreach (ClassDeclarationSyntax classDeclarationSyntax in classDeclarationSyntaxList) { + // Ensure context-scoped metadata caches are empty. + Debug.Assert(_typeGenerationSpecCache.Count == 0); + Debug.Assert(_implicitlyRegisteredTypes.Count == 0); + Debug.Assert(_typeLevelDiagnostics.Count == 0); + CompilationUnitSyntax compilationUnitSyntax = classDeclarationSyntax.FirstAncestorOrSelf(); SemanticModel compilationSemanticModel = compilation.GetSemanticModel(compilationUnitSyntax.SyntaxTree); @@ -285,15 +298,18 @@ public Parser(Compilation compilation, in JsonSourceGenerationContext sourceGene INamedTypeSymbol contextTypeSymbol = (INamedTypeSymbol)compilationSemanticModel.GetDeclaredSymbol(classDeclarationSyntax); Debug.Assert(contextTypeSymbol != null); + Location contextLocation = contextTypeSymbol.Locations.Length > 0 ? contextTypeSymbol.Locations[0] : Location.None; + if (!TryGetClassDeclarationList(contextTypeSymbol, out List classDeclarationList)) { // Class or one of its containing types is not partial so we can't add to it. - _sourceGenerationContext.ReportDiagnostic(Diagnostic.Create(ContextClassesMustBePartial, Location.None, new string[] { contextTypeSymbol.Name })); + _sourceGenerationContext.ReportDiagnostic(Diagnostic.Create(ContextClassesMustBePartial, contextLocation, new string[] { contextTypeSymbol.Name })); continue; } ContextGenerationSpec contextGenSpec = new() { + Location = contextLocation, GenerationOptions = options ?? new JsonSourceGenerationOptionsAttribute(), ContextType = contextTypeSymbol.AsType(_metadataLoadContext), ContextClassDeclarationList = classDeclarationList @@ -316,14 +332,31 @@ public Parser(Compilation compilation, in JsonSourceGenerationContext sourceGene continue; } + // Emit type-level diagnostics + foreach ((Type Type, DiagnosticDescriptor Descriptor, string[] MessageArgs) diagnostic in _typeLevelDiagnostics) + { + Type type = diagnostic.Type; + Location location = type.GetDiagnosticLocation(); + + if (location == null) + { + TypeGenerationSpec spec = _typeGenerationSpecCache[type]; + location = spec.AttributeLocation; + } + + location ??= contextLocation; + _sourceGenerationContext.ReportDiagnostic(Diagnostic.Create(diagnostic.Descriptor, location, diagnostic.MessageArgs)); + } + contextGenSpec.ImplicitlyRegisteredTypes.UnionWith(_implicitlyRegisteredTypes); contextGenSpecList ??= new List(); contextGenSpecList.Add(contextGenSpec); - // Clear the cache of generated metadata between the processing of context classes. + // Clear the caches of generated metadata between the processing of context classes. _typeGenerationSpecCache.Clear(); _implicitlyRegisteredTypes.Clear(); + _typeLevelDiagnostics.Clear(); } if (contextGenSpecList == null) @@ -487,6 +520,8 @@ private static bool TryGetClassDeclarationList(INamedTypeSymbol typeSymbol, [Not typeGenerationSpec.GenerationMode = generationMode; } + typeGenerationSpec.AttributeLocation = attributeSyntax.GetLocation(); + return typeGenerationSpec; } @@ -877,7 +912,7 @@ private TypeGenerationSpec GetOrAddTypeGenerationSpec(Type type, JsonSourceGener if (!type.TryGetDeserializationConstructor(useDefaultCtorInAnnotatedStructs, out ConstructorInfo? constructor)) { classType = ClassType.TypeUnsupportedBySourceGen; - _sourceGenerationContext.ReportDiagnostic(Diagnostic.Create(MultipleJsonConstructorAttribute, Location.None, new string[] { $"{type}" })); + _typeLevelDiagnostics.Add((type, MultipleJsonConstructorAttribute, new string[] { $"{type}" })); } else { @@ -944,7 +979,7 @@ private TypeGenerationSpec GetOrAddTypeGenerationSpec(Type type, JsonSourceGener } spec = GetPropertyGenerationSpec(propertyInfo, isVirtual, generationMode); - CacheMemberHelper(); + CacheMemberHelper(propertyInfo.GetDiagnosticLocation()); } foreach (FieldInfo fieldInfo in currentType.GetFields(bindingFlags)) @@ -955,10 +990,10 @@ private TypeGenerationSpec GetOrAddTypeGenerationSpec(Type type, JsonSourceGener } spec = GetPropertyGenerationSpec(fieldInfo, isVirtual: false, generationMode); - CacheMemberHelper(); + CacheMemberHelper(fieldInfo.GetDiagnosticLocation()); } - void CacheMemberHelper() + void CacheMemberHelper(Location memberLocation) { CacheMember(spec, ref propGenSpecList, ref ignoredMembers); @@ -972,13 +1007,13 @@ void CacheMemberHelper() { if (dataExtensionPropGenSpec != null) { - _sourceGenerationContext.ReportDiagnostic(Diagnostic.Create(MultipleJsonExtensionDataAttribute, Location.None, new string[] { type.Name })); + _typeLevelDiagnostics.Add((type, MultipleJsonExtensionDataAttribute, new string[] { type.Name })); } Type propType = spec.TypeGenerationSpec.Type; if (!IsValidDataExtensionPropertyType(propType)) { - _sourceGenerationContext.ReportDiagnostic(Diagnostic.Create(DataExtensionPropertyInvalid, Location.None, new string[] { type.Name, spec.ClrName })); + _sourceGenerationContext.ReportDiagnostic(Diagnostic.Create(DataExtensionPropertyInvalid, memberLocation, new string[] { type.Name, spec.ClrName })); } dataExtensionPropGenSpec = GetOrAddTypeGenerationSpec(propType, generationMode); @@ -987,13 +1022,13 @@ void CacheMemberHelper() if (!hasInitOnlyProperties && spec.CanUseSetter && spec.IsInitOnlySetter) { - _sourceGenerationContext.ReportDiagnostic(Diagnostic.Create(InitOnlyPropertyDeserializationNotSupported, Location.None, new string[] { type.Name })); + _sourceGenerationContext.ReportDiagnostic(Diagnostic.Create(InitOnlyPropertyDeserializationNotSupported, memberLocation, new string[] { type.Name })); hasInitOnlyProperties = true; } if (spec.HasJsonInclude && (!spec.CanUseGetter || !spec.CanUseSetter || !spec.IsPublic)) { - _sourceGenerationContext.ReportDiagnostic(Diagnostic.Create(InaccessibleJsonIncludePropertiesNotSupported, Location.None, new string[] { type.Name, spec.ClrName })); + _sourceGenerationContext.ReportDiagnostic(Diagnostic.Create(InaccessibleJsonIncludePropertiesNotSupported, memberLocation, new string[] { type.Name, spec.ClrName })); } } } diff --git a/src/libraries/System.Text.Json/gen/Reflection/FieldInfoWrapper.cs b/src/libraries/System.Text.Json/gen/Reflection/FieldInfoWrapper.cs index 66e00c0de20bb..d06c264ab0456 100644 --- a/src/libraries/System.Text.Json/gen/Reflection/FieldInfoWrapper.cs +++ b/src/libraries/System.Text.Json/gen/Reflection/FieldInfoWrapper.cs @@ -100,5 +100,7 @@ public override void SetValue(object obj, object value, BindingFlags invokeAttr, { throw new NotImplementedException(); } + + public Location? Location => _field.Locations.Length > 0 ? _field.Locations[0] : null; } } diff --git a/src/libraries/System.Text.Json/gen/Reflection/PropertyInfoWrapper.cs b/src/libraries/System.Text.Json/gen/Reflection/PropertyInfoWrapper.cs index bfb593f992fbd..d7eea3323416b 100644 --- a/src/libraries/System.Text.Json/gen/Reflection/PropertyInfoWrapper.cs +++ b/src/libraries/System.Text.Json/gen/Reflection/PropertyInfoWrapper.cs @@ -92,5 +92,7 @@ public override void SetValue(object obj, object value, BindingFlags invokeAttr, { throw new NotSupportedException(); } + + public Location? Location => _property.Locations.Length > 0 ? _property.Locations[0] : null; } } diff --git a/src/libraries/System.Text.Json/gen/Reflection/ReflectionExtensions.cs b/src/libraries/System.Text.Json/gen/Reflection/ReflectionExtensions.cs index 101f3e48fbfb7..d0bc8e59b147c 100644 --- a/src/libraries/System.Text.Json/gen/Reflection/ReflectionExtensions.cs +++ b/src/libraries/System.Text.Json/gen/Reflection/ReflectionExtensions.cs @@ -5,6 +5,7 @@ using System.Diagnostics; using System.Linq; using System.Reflection; +using Microsoft.CodeAnalysis; namespace System.Text.Json.Reflection { @@ -45,5 +46,23 @@ private static bool HasJsonConstructorAttribute(ConstructorInfo constructorInfo) return false; } + + public static Location? GetDiagnosticLocation(this Type type) + { + Debug.Assert(type is TypeWrapper); + return ((TypeWrapper)type).Location; + } + + public static Location? GetDiagnosticLocation(this PropertyInfo propertyInfo) + { + Debug.Assert(propertyInfo is PropertyInfoWrapper); + return ((PropertyInfoWrapper)propertyInfo).Location; + } + + public static Location? GetDiagnosticLocation(this FieldInfo fieldInfo) + { + Debug.Assert(fieldInfo is FieldInfoWrapper); + return ((FieldInfoWrapper)fieldInfo).Location; + } } } diff --git a/src/libraries/System.Text.Json/gen/Reflection/TypeWrapper.cs b/src/libraries/System.Text.Json/gen/Reflection/TypeWrapper.cs index 5d4d778bc6348..2d06d9ec50cd9 100644 --- a/src/libraries/System.Text.Json/gen/Reflection/TypeWrapper.cs +++ b/src/libraries/System.Text.Json/gen/Reflection/TypeWrapper.cs @@ -600,5 +600,7 @@ public override bool Equals(Type o) } return base.Equals(o); } + + public Location? Location => _typeSymbol.Locations.Length > 0 ? _typeSymbol.Locations[0] : null; } } diff --git a/src/libraries/System.Text.Json/gen/TypeGenerationSpec.cs b/src/libraries/System.Text.Json/gen/TypeGenerationSpec.cs index 2e544454c5234..e2a391990c8a0 100644 --- a/src/libraries/System.Text.Json/gen/TypeGenerationSpec.cs +++ b/src/libraries/System.Text.Json/gen/TypeGenerationSpec.cs @@ -7,6 +7,7 @@ using System.Reflection; using System.Text.Json.Reflection; using System.Text.Json.Serialization; +using Microsoft.CodeAnalysis; namespace System.Text.Json.SourceGeneration { @@ -18,6 +19,11 @@ internal class TypeGenerationSpec /// public string TypeRef { get; private set; } + /// + /// If specified as a root type via JsonSerializableAttribute, specifies the location of the attribute application. + /// + public Location? AttributeLocation { get; set; } + /// /// The name of the public JsonTypeInfo property for this type on the generated context class. /// For example, if the context class is named MyJsonContext, and the value of this property is JsonMessage; diff --git a/src/libraries/System.Text.Json/tests/System.Text.Json.SourceGeneration.Unit.Tests/CompilationHelper.cs b/src/libraries/System.Text.Json/tests/System.Text.Json.SourceGeneration.Unit.Tests/CompilationHelper.cs index b84c518275ffc..8e3105e119238 100644 --- a/src/libraries/System.Text.Json/tests/System.Text.Json.SourceGeneration.Unit.Tests/CompilationHelper.cs +++ b/src/libraries/System.Text.Json/tests/System.Text.Json.SourceGeneration.Unit.Tests/CompilationHelper.cs @@ -336,22 +336,32 @@ public partial class MyJsonContext : JsonSerializerContext return CreateCompilation(source); } - internal static void CheckDiagnosticMessages(ImmutableArray diagnostics, DiagnosticSeverity level, string[] expectedMessages) + internal static void CheckDiagnosticMessages( + DiagnosticSeverity level, + ImmutableArray diagnostics, + (Location Location, string Message)[] expectedDiags, + bool sort = true) { - string[] actualMessages = diagnostics.Where(diagnostic => diagnostic.Severity == level).Select(diagnostic => diagnostic.GetMessage()).ToArray(); + (Location Location, string Message)[] actualDiags = diagnostics + .Where(diagnostic => diagnostic.Severity == level) + .Select(diagnostic => (diagnostic.Location, diagnostic.GetMessage())) + .ToArray(); - // Can't depend on reflection order when generating type metadata. - Array.Sort(actualMessages); - Array.Sort(expectedMessages); + if (sort) + { + // Can't depend on reflection order when generating type metadata. + Array.Sort(actualDiags); + Array.Sort(expectedDiags); + } if (CultureInfo.CurrentUICulture.Name.StartsWith("en", StringComparison.OrdinalIgnoreCase)) { - Assert.Equal(expectedMessages, actualMessages); + Assert.Equal(expectedDiags, actualDiags); } else { // for non-English runs, just compare the number of messages are the same - Assert.Equal(expectedMessages.Length, actualMessages.Length); + Assert.Equal(expectedDiags.Length, actualDiags.Length); } } } diff --git a/src/libraries/System.Text.Json/tests/System.Text.Json.SourceGeneration.Unit.Tests/JsonSourceGeneratorDiagnosticsTests.cs b/src/libraries/System.Text.Json/tests/System.Text.Json.SourceGeneration.Unit.Tests/JsonSourceGeneratorDiagnosticsTests.cs index 470c83408c2c1..1adc0fbec10da 100644 --- a/src/libraries/System.Text.Json/tests/System.Text.Json.SourceGeneration.Unit.Tests/JsonSourceGeneratorDiagnosticsTests.cs +++ b/src/libraries/System.Text.Json/tests/System.Text.Json.SourceGeneration.Unit.Tests/JsonSourceGeneratorDiagnosticsTests.cs @@ -1,7 +1,10 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. +using System.Collections.Generic; +using System.Linq; using Microsoft.CodeAnalysis; +using Microsoft.CodeAnalysis.Text; using Xunit; namespace System.Text.Json.SourceGeneration.UnitTests @@ -9,7 +12,7 @@ namespace System.Text.Json.SourceGeneration.UnitTests public class JsonSourceGeneratorDiagnosticsTests { [Fact] - [ActiveIssue("Figure out issue with CampaignSummaryViewModel namespace.")] + [ActiveIssue("https://github.com/dotnet/runtime/issues/58226", TestPlatforms.Browser)] public void SuccessfulSourceGeneration() { // Compile the referenced assembly first. @@ -26,10 +29,13 @@ public void SuccessfulSourceGeneration() using System.Text.Json.Serialization; using ReferencedAssembly; - [assembly: JsonSerializable(typeof(JsonSourceGenerator.IndexViewModel)] - namespace JsonSourceGenerator { + [JsonSerializable(typeof(JsonSourceGenerator.IndexViewModel)] + public partial class JsonContext : JsonSerializerContext + { + } + public class IndexViewModel { public List ActiveOrUpcomingEvents { get; set; } @@ -50,78 +56,88 @@ public class IndexViewModel CompilationHelper.RunGenerators(compilation, out var generatorDiags, generator); - // Expected info logs. - string[] expectedInfoDiagnostics = new string[] { - "Generated serialization metadata for type System.Collections.Generic.List", - "Generated serialization metadata for type System.Int32", - "Generated serialization metadata for type System.String", - "Generated serialization metadata for type System.DateTimeOffset", - "Generated serialization metadata for type System.Boolean", - "Generated serialization metadata for type ReferencedAssembly.ActiveOrUpcomingEvent", - "Generated serialization metadata for type ReferencedAssembly.CampaignSummaryViewModel", - "Generated serialization metadata for type JsonSourceGenerator.IndexViewModel", - }; - - CompilationHelper.CheckDiagnosticMessages(generatorDiags, DiagnosticSeverity.Info, expectedInfoDiagnostics); - CompilationHelper.CheckDiagnosticMessages(generatorDiags, DiagnosticSeverity.Warning, new string[] { }); - CompilationHelper.CheckDiagnosticMessages(generatorDiags, DiagnosticSeverity.Error, new string[] { }); + CompilationHelper.CheckDiagnosticMessages(DiagnosticSeverity.Info, generatorDiags, Array.Empty<(Location, string)>()); + CompilationHelper.CheckDiagnosticMessages(DiagnosticSeverity.Warning, generatorDiags, Array.Empty<(Location, string)>()); + CompilationHelper.CheckDiagnosticMessages(DiagnosticSeverity.Error, generatorDiags, Array.Empty<(Location, string)>()); } [Fact] - [ActiveIssue("Figure out issue with CampaignSummaryViewModel namespace.")] + [ActiveIssue("https://github.com/dotnet/runtime/issues/58226", TestPlatforms.Browser)] public void UnsuccessfulSourceGeneration() { - // Compile the referenced assembly first. - Compilation campaignCompilation = CompilationHelper.CreateCampaignSummaryViewModelCompilation(); - Compilation eventCompilation = CompilationHelper.CreateActiveOrUpcomingEventCompilation(); + static void RunTest(bool explicitRef) + { + // Compile the referenced assembly first. + Compilation campaignCompilation = CompilationHelper.CreateCampaignSummaryViewModelCompilation(); + Compilation eventCompilation = CompilationHelper.CreateActiveOrUpcomingEventCompilation(); - // Emit the image of the referenced assembly. - byte[] campaignImage = CompilationHelper.CreateAssemblyImage(campaignCompilation); - byte[] eventImage = CompilationHelper.CreateAssemblyImage(eventCompilation); + // Emit the image of the referenced assembly. + byte[] campaignImage = CompilationHelper.CreateAssemblyImage(campaignCompilation); + byte[] eventImage = CompilationHelper.CreateAssemblyImage(eventCompilation); - // Main source for current compilation. - string source = @" + string optionalAttribute = explicitRef ? "[JsonSerializable(typeof(ActiveOrUpcomingEvent[,])]" : null; + + // Main source for current compilation. + string source = @$" using System.Collections.Generic; using System.Text.Json.Serialization; using ReferencedAssembly; - [assembly: JsonSerializable(typeof(JsonSourceGenerator.IndexViewModel)] - namespace JsonSourceGenerator - { + {{ + {optionalAttribute} + [JsonSerializable(typeof(JsonSourceGenerator.IndexViewModel)] + public partial class JsonContext : JsonSerializerContext + {{ + }} + public class IndexViewModel - { - public ISet ActiveOrUpcomingEvents { get; set; } - public CampaignSummaryViewModel FeaturedCampaign { get; set; } - public bool IsNewAccount { get; set; } + {{ + public ActiveOrUpcomingEvent[,] ActiveOrUpcomingEvents {{ get; set; }} + public CampaignSummaryViewModel FeaturedCampaign {{ get; set; }} + public bool IsNewAccount {{ get; set; }} public bool HasFeaturedCampaign => FeaturedCampaign != null; - } - }"; + }} + }}"; - MetadataReference[] additionalReferences = { + MetadataReference[] additionalReferences = { MetadataReference.CreateFromImage(campaignImage), MetadataReference.CreateFromImage(eventImage), }; - Compilation compilation = CompilationHelper.CreateCompilation(source, additionalReferences); + Compilation compilation = CompilationHelper.CreateCompilation(source, additionalReferences); - JsonSourceGenerator generator = new JsonSourceGenerator(); + JsonSourceGenerator generator = new JsonSourceGenerator(); + CompilationHelper.RunGenerators(compilation, out var generatorDiags, generator); - CompilationHelper.RunGenerators(compilation, out var generatorDiags, generator); + Location location; + if (explicitRef) + { + // Unsupported type is not in compiling assembly, but is indicated directly with [JsonSerializable], so location points to attribute application. + INamedTypeSymbol symbol = (INamedTypeSymbol)compilation.GetSymbolsWithName("JsonContext").FirstOrDefault(); + SyntaxReference syntaxReference = symbol.GetAttributes().First().ApplicationSyntaxReference; + TextSpan textSpan = syntaxReference.Span; + location = syntaxReference.SyntaxTree.GetLocation(textSpan)!; + } + else + { + // Unsupported type is not in compiling assembly, and isn't indicated directly with [JsonSerializable], so location points to context type. + location = compilation.GetSymbolsWithName("JsonContext").First().Locations[0]; + } - // Expected success info logs. - string[] expectedInfoDiagnostics = new string[] { - "Generated serialization metadata for type JsonSourceGeneration.IndexViewModel", - "Generated serialization metadata for type System.Boolean", - "Generated serialization metadata for type ReferencedAssembly.CampaignSummaryViewModel" - }; + // Expected warning logs. + (Location, string)[] expectedWarningDiagnostics = new (Location, string)[] + { + (location, "Did not generate serialization metadata for type 'global::ReferencedAssembly.ActiveOrUpcomingEvent[]'.") + }; - // Expected warning logs. - string[] expectedWarningDiagnostics = new string[] { "Did not generate serialization metadata for type System.Collections.Generic.ISet" }; + CompilationHelper.CheckDiagnosticMessages(DiagnosticSeverity.Info, generatorDiags, Array.Empty<(Location, string)>()); + CompilationHelper.CheckDiagnosticMessages(DiagnosticSeverity.Warning, generatorDiags, expectedWarningDiagnostics); + CompilationHelper.CheckDiagnosticMessages(DiagnosticSeverity.Error, generatorDiags, Array.Empty<(Location, string)>()); + } - CompilationHelper.CheckDiagnosticMessages(generatorDiags, DiagnosticSeverity.Info, expectedInfoDiagnostics); - CompilationHelper.CheckDiagnosticMessages(generatorDiags, DiagnosticSeverity.Warning, expectedWarningDiagnostics); - CompilationHelper.CheckDiagnosticMessages(generatorDiags, DiagnosticSeverity.Error, new string[] { }); + RunTest(explicitRef: true); + RunTest(false); } [Fact] @@ -132,20 +148,28 @@ public void NameClashSourceGeneration() JsonSourceGenerator generator = new JsonSourceGenerator(); CompilationHelper.RunGenerators(compilation, out var generatorDiags, generator); - string[] expectedWarningDiagnostics = new string[] { "There are multiple types named Location. Source was generated for the first one detected. Use 'JsonSerializableAttribute.TypeInfoPropertyName' to resolve this collision." }; + INamedTypeSymbol symbol = (INamedTypeSymbol)compilation.GetSymbolsWithName("JsonContext").FirstOrDefault(); + SyntaxReference syntaxReference = new List(symbol.GetAttributes())[1].ApplicationSyntaxReference; + TextSpan textSpan = syntaxReference.Span; + Location location = syntaxReference.SyntaxTree.GetLocation(textSpan)!; - CompilationHelper.CheckDiagnosticMessages(generatorDiags, DiagnosticSeverity.Info, Array.Empty()); - CompilationHelper.CheckDiagnosticMessages(generatorDiags, DiagnosticSeverity.Warning, expectedWarningDiagnostics); - CompilationHelper.CheckDiagnosticMessages(generatorDiags, DiagnosticSeverity.Error, Array.Empty()); + (Location, string)[] expectedWarningDiagnostics = new (Location, string)[] + { + (location, "There are multiple types named Location. Source was generated for the first one detected. Use 'JsonSerializableAttribute.TypeInfoPropertyName' to resolve this collision.") + }; + + CompilationHelper.CheckDiagnosticMessages(DiagnosticSeverity.Info, generatorDiags, Array.Empty<(Location, string)>()); + CompilationHelper.CheckDiagnosticMessages(DiagnosticSeverity.Warning, generatorDiags, expectedWarningDiagnostics); + CompilationHelper.CheckDiagnosticMessages(DiagnosticSeverity.Error, generatorDiags, Array.Empty<(Location, string)>()); // With resolution. compilation = CompilationHelper.CreateRepeatedLocationsWithResolutionCompilation(); generator = new JsonSourceGenerator(); CompilationHelper.RunGenerators(compilation, out generatorDiags, generator); - CompilationHelper.CheckDiagnosticMessages(generatorDiags, DiagnosticSeverity.Info, Array.Empty()); - CompilationHelper.CheckDiagnosticMessages(generatorDiags, DiagnosticSeverity.Warning, Array.Empty()); - CompilationHelper.CheckDiagnosticMessages(generatorDiags, DiagnosticSeverity.Error, Array.Empty()); + CompilationHelper.CheckDiagnosticMessages(DiagnosticSeverity.Info, generatorDiags, Array.Empty<(Location, string)>()); + CompilationHelper.CheckDiagnosticMessages(DiagnosticSeverity.Warning, generatorDiags, Array.Empty<(Location, string)>()); + CompilationHelper.CheckDiagnosticMessages(DiagnosticSeverity.Error, generatorDiags, Array.Empty<(Location, string)>()); } [Fact] @@ -154,41 +178,40 @@ public void ProgramsThatDontUseGeneratorCompile() // No STJ usage. string source = @"using System; -public class Program -{ - public static void Main() - { - Console.WriteLine(""Hello World""); - - } -} -"; + public class Program + { + public static void Main() + { + Console.WriteLine(""Hello World""); + } + } + "; Compilation compilation = CompilationHelper.CreateCompilation(source); JsonSourceGenerator generator = new JsonSourceGenerator(); CompilationHelper.RunGenerators(compilation, out var generatorDiags, generator); - CompilationHelper.CheckDiagnosticMessages(generatorDiags, DiagnosticSeverity.Info, Array.Empty()); - CompilationHelper.CheckDiagnosticMessages(generatorDiags, DiagnosticSeverity.Warning, Array.Empty()); - CompilationHelper.CheckDiagnosticMessages(generatorDiags, DiagnosticSeverity.Error, Array.Empty()); + CompilationHelper.CheckDiagnosticMessages(DiagnosticSeverity.Info, generatorDiags, Array.Empty<(Location, string)>()); + CompilationHelper.CheckDiagnosticMessages(DiagnosticSeverity.Warning, generatorDiags, Array.Empty<(Location, string)>()); + CompilationHelper.CheckDiagnosticMessages(DiagnosticSeverity.Error, generatorDiags, Array.Empty<(Location, string)>()); // With STJ usage. source = @"using System.Text.Json; -public class Program -{ - public static void Main() - { - JsonSerializer.Serialize(""Hello World""); - } -} -"; + public class Program + { + public static void Main() + { + JsonSerializer.Serialize(""Hello World""); + } + } + "; compilation = CompilationHelper.CreateCompilation(source); generator = new JsonSourceGenerator(); CompilationHelper.RunGenerators(compilation, out generatorDiags, generator); - CompilationHelper.CheckDiagnosticMessages(generatorDiags, DiagnosticSeverity.Info, Array.Empty()); - CompilationHelper.CheckDiagnosticMessages(generatorDiags, DiagnosticSeverity.Warning, Array.Empty()); - CompilationHelper.CheckDiagnosticMessages(generatorDiags, DiagnosticSeverity.Error, Array.Empty()); + CompilationHelper.CheckDiagnosticMessages(DiagnosticSeverity.Info, generatorDiags, Array.Empty<(Location, string)>()); + CompilationHelper.CheckDiagnosticMessages(DiagnosticSeverity.Warning, generatorDiags, Array.Empty<(Location, string)>()); + CompilationHelper.CheckDiagnosticMessages(DiagnosticSeverity.Error, generatorDiags, Array.Empty<(Location, string)>()); } [Fact] @@ -198,11 +221,16 @@ public void WarnOnClassesWithInitOnlyProperties() JsonSourceGenerator generator = new JsonSourceGenerator(); CompilationHelper.RunGenerators(compilation, out var generatorDiags, generator); - string[] expectedWarningDiagnostics = new string[] { "The type 'Location' defines init-only properties, deserialization of which is currently not supported in source generation mode." }; + Location location = compilation.GetSymbolsWithName("Id").First().Locations[0]; + + (Location, string)[] expectedWarningDiagnostics = new (Location, string)[] + { + (location, "The type 'Location' defines init-only properties, deserialization of which is currently not supported in source generation mode.") + }; - CompilationHelper.CheckDiagnosticMessages(generatorDiags, DiagnosticSeverity.Info, Array.Empty()); - CompilationHelper.CheckDiagnosticMessages(generatorDiags, DiagnosticSeverity.Warning, expectedWarningDiagnostics); - CompilationHelper.CheckDiagnosticMessages(generatorDiags, DiagnosticSeverity.Error, Array.Empty()); + CompilationHelper.CheckDiagnosticMessages(DiagnosticSeverity.Info, generatorDiags, Array.Empty<(Location, string)>()); + CompilationHelper.CheckDiagnosticMessages(DiagnosticSeverity.Warning, generatorDiags, expectedWarningDiagnostics); + CompilationHelper.CheckDiagnosticMessages(DiagnosticSeverity.Error, generatorDiags, Array.Empty<(Location, string)>()); } [Fact] @@ -212,16 +240,20 @@ public void WarnOnClassesWithInaccessibleJsonIncludeProperties() JsonSourceGenerator generator = new JsonSourceGenerator(); CompilationHelper.RunGenerators(compilation, out var generatorDiags, generator); - string[] expectedWarningDiagnostics = new string[] + Location idLocation = compilation.GetSymbolsWithName("Id").First().Locations[0]; + Location address2Location = compilation.GetSymbolsWithName("Address2").First().Locations[0]; + Location countryLocation = compilation.GetSymbolsWithName("Country").First().Locations[0]; + + (Location, string)[] expectedWarningDiagnostics = new (Location, string)[] { - "The member 'Location.Id' has been annotated with the JsonIncludeAttribute but is not visible to the source generator.", - "The member 'Location.Address2' has been annotated with the JsonIncludeAttribute but is not visible to the source generator.", - "The member 'Location.Country' has been annotated with the JsonIncludeAttribute but is not visible to the source generator." + (idLocation, "The member 'Location.Id' has been annotated with the JsonIncludeAttribute but is not visible to the source generator."), + (address2Location, "The member 'Location.Address2' has been annotated with the JsonIncludeAttribute but is not visible to the source generator."), + (countryLocation, "The member 'Location.Country' has been annotated with the JsonIncludeAttribute but is not visible to the source generator.") }; - CompilationHelper.CheckDiagnosticMessages(generatorDiags, DiagnosticSeverity.Info, Array.Empty()); - CompilationHelper.CheckDiagnosticMessages(generatorDiags, DiagnosticSeverity.Warning, expectedWarningDiagnostics); - CompilationHelper.CheckDiagnosticMessages(generatorDiags, DiagnosticSeverity.Error, Array.Empty()); + CompilationHelper.CheckDiagnosticMessages(DiagnosticSeverity.Info, generatorDiags, Array.Empty<(Location, string)>()); + CompilationHelper.CheckDiagnosticMessages(DiagnosticSeverity.Warning, generatorDiags, expectedWarningDiagnostics, sort: false); + CompilationHelper.CheckDiagnosticMessages(DiagnosticSeverity.Error, generatorDiags, Array.Empty<(Location, string)>()); } } } diff --git a/src/libraries/System.Text.Json/tests/System.Text.Json.SourceGeneration.Unit.Tests/JsonSourceGeneratorTests.cs b/src/libraries/System.Text.Json/tests/System.Text.Json.SourceGeneration.Unit.Tests/JsonSourceGeneratorTests.cs index 105dc91af17b3..69ca5e498f5f9 100644 --- a/src/libraries/System.Text.Json/tests/System.Text.Json.SourceGeneration.Unit.Tests/JsonSourceGeneratorTests.cs +++ b/src/libraries/System.Text.Json/tests/System.Text.Json.SourceGeneration.Unit.Tests/JsonSourceGeneratorTests.cs @@ -3,7 +3,6 @@ using System.Collections.Generic; using System.Collections.Immutable; -using System.IO; using System.Linq; using System.Reflection; using Microsoft.CodeAnalysis; @@ -69,7 +68,7 @@ public void UsePrivates() Assert.Equal("HelloWorld.MyType", myType.FullName); // Check for received fields, properties and methods in created type. - string[] expectedPropertyNames = { "PublicPropertyInt", "PublicPropertyString",}; + string[] expectedPropertyNames = { "PublicPropertyInt", "PublicPropertyString", }; string[] expectedFieldNames = { "PublicChar", "PublicDouble" }; string[] expectedMethodNames = { "get_PrivatePropertyInt", "get_PrivatePropertyString", "get_PublicPropertyInt", "get_PublicPropertyString", "MyMethod", "MySecondMethod", "set_PrivatePropertyInt", "set_PrivatePropertyString", "set_PublicPropertyInt", "set_PublicPropertyString", "UsePrivates" }; CheckFieldsPropertiesMethods(myType, expectedFieldNames, expectedPropertyNames, expectedMethodNames); @@ -244,7 +243,7 @@ public void UsePrivates() string[] expectedPropertyNamesNotMyType = { "Address1", "Address2", "City", "Country", "Id", "Name", "PhoneNumber", "PostalCode", "State" }; string[] expectedMethodNamesNotMyType = { "get_Address1", "get_Address2", "get_City", "get_Country", "get_Id", "get_Name", "get_PhoneNumber", "get_PostalCode", "get_State", "set_Address1", "set_Address2", "set_City", "set_Country", "set_Id", "set_Name", "set_PhoneNumber", "set_PostalCode", "set_State" }; - CheckFieldsPropertiesMethods(notMyType, expectedFieldNamesNotMyType, expectedPropertyNamesNotMyType, expectedMethodNamesNotMyType ); + CheckFieldsPropertiesMethods(notMyType, expectedFieldNamesNotMyType, expectedPropertyNamesNotMyType, expectedMethodNamesNotMyType); } [Theory] @@ -290,9 +289,9 @@ public JsonSerializableAttribute(Type type) { } Assert.Null(types); } - CompilationHelper.CheckDiagnosticMessages(generatorDiags, DiagnosticSeverity.Info, Array.Empty()); - CompilationHelper.CheckDiagnosticMessages(generatorDiags, DiagnosticSeverity.Warning, Array.Empty()); - CompilationHelper.CheckDiagnosticMessages(generatorDiags, DiagnosticSeverity.Error, Array.Empty()); + CompilationHelper.CheckDiagnosticMessages(DiagnosticSeverity.Info, generatorDiags, Array.Empty<(Location, string)>()); + CompilationHelper.CheckDiagnosticMessages(DiagnosticSeverity.Warning, generatorDiags, Array.Empty<(Location, string)>()); + CompilationHelper.CheckDiagnosticMessages(DiagnosticSeverity.Error, generatorDiags, Array.Empty<(Location, string)>()); } [Theory] @@ -322,9 +321,9 @@ public JsonSerializableAttribute(string typeInfoPropertyName, Type type) { } CompilationHelper.RunGenerators(compilation, out ImmutableArray generatorDiags, generator); Assert.Null(generator.GetSerializableTypes()); - CompilationHelper.CheckDiagnosticMessages(generatorDiags, DiagnosticSeverity.Info, Array.Empty()); - CompilationHelper.CheckDiagnosticMessages(generatorDiags, DiagnosticSeverity.Warning, Array.Empty()); - CompilationHelper.CheckDiagnosticMessages(generatorDiags, DiagnosticSeverity.Error, Array.Empty()); + CompilationHelper.CheckDiagnosticMessages(DiagnosticSeverity.Info, generatorDiags, Array.Empty<(Location, string)>()); + CompilationHelper.CheckDiagnosticMessages(DiagnosticSeverity.Warning, generatorDiags, Array.Empty<(Location, string)>()); + CompilationHelper.CheckDiagnosticMessages(DiagnosticSeverity.Error, generatorDiags, Array.Empty<(Location, string)>()); } [Fact] From 1aaf3bf3a17241438d9ad615304ab194be573949 Mon Sep 17 00:00:00 2001 From: Santiago Fernandez Madero Date: Tue, 16 Nov 2021 13:53:32 -0800 Subject: [PATCH 5/7] [release/6.0] Disable activation host tests that fail with a 6.0 RC2 or newer SDK (#61654) * [release/6.0] Disable activation host tests that fail with a 6.0 RC2 or newer SDK * Update src/installer/pkg/sfx/Microsoft.NETCore.App/Microsoft.NETCore.App.Ref.sfxproj Co-authored-by: Anirudh Agnihotry Co-authored-by: Anirudh Agnihotry --- .../tests/HostActivation.Tests/NativeHosting/Nethost.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/installer/tests/HostActivation.Tests/NativeHosting/Nethost.cs b/src/installer/tests/HostActivation.Tests/NativeHosting/Nethost.cs index 9a90ad8125336..792bf4faf6f8f 100644 --- a/src/installer/tests/HostActivation.Tests/NativeHosting/Nethost.cs +++ b/src/installer/tests/HostActivation.Tests/NativeHosting/Nethost.cs @@ -89,6 +89,7 @@ public void GetHostFxrPath_DotNetRootParameter(bool explicitLoad, bool useAssemb } [Theory] + [ActiveIssue("https://github.com/dotnet/runtime/issues/61131", TestPlatforms.OSX)] [InlineData(true, false, true, false)] [InlineData(true, false, true, true)] [InlineData(true, false, false, false)] @@ -180,6 +181,7 @@ public void GetHostFxrPath_HostFxrAlreadyLoaded() } [Theory] + [ActiveIssue("https://github.com/dotnet/runtime/issues/61131", TestPlatforms.OSX)] [SkipOnPlatform(TestPlatforms.Windows, "This test targets the install_location config file which is only used on Linux and macOS.")] [InlineData("{0}", false, true)] [InlineData("{0}\n", false, true)] @@ -245,6 +247,7 @@ public void GetHostFxrPath_InstallLocationFile(string value, bool shouldUseArchS } [Fact] + [ActiveIssue("https://github.com/dotnet/runtime/issues/61131", TestPlatforms.OSX)] [SkipOnPlatform(TestPlatforms.Windows, "This test targets the install_location config file which is only used on Linux and macOS.")] public void GetHostFxrPath_GlobalInstallation_HasNoDefaultInstallationPath() { @@ -275,6 +278,7 @@ public void GetHostFxrPath_GlobalInstallation_HasNoDefaultInstallationPath() } [Fact] + [ActiveIssue("https://github.com/dotnet/runtime/issues/61131", TestPlatforms.OSX)] [SkipOnPlatform(TestPlatforms.Windows, "This test targets the install_location config file which is only used on Linux and macOS.")] public void GetHostFxrPath_GlobalInstallation_ArchitectureSpecificPathIsPickedOverDefaultPath() { From c91170a7ae2d8529541ad846bde1a8a563429bd8 Mon Sep 17 00:00:00 2001 From: Maryam Ariyan Date: Tue, 16 Nov 2021 19:19:18 -0800 Subject: [PATCH 6/7] HostFactoryResolver - Increase default timeout and add env var option (#61688) * HostFactoryResolver - Increase default timeout and add env var option * Add GeneratePackageOnBuild on source csproj * Add ServicingVersion property * Update src/libraries/Microsoft.Extensions.HostFactoryResolver/tests/TopLevelStatementsTestsTimeout/TopLevelStatementsTestsTimeout.csproj --- .../src/HostFactoryResolver.cs | 22 ++++++++++++++++--- ...ensions.HostFactoryResolver.Sources.csproj | 2 ++ .../tests/HostFactoryResolverTests.cs | 10 +++++++++ ...xtensions.HostFactoryResolver.Tests.csproj | 1 + .../TopLevelStatementsTestsTimeout/Program.cs | 10 +++++++++ .../TopLevelStatementsTestsTimeout.csproj | 13 +++++++++++ 6 files changed, 55 insertions(+), 3 deletions(-) create mode 100644 src/libraries/Microsoft.Extensions.HostFactoryResolver/tests/TopLevelStatementsTestsTimeout/Program.cs create mode 100644 src/libraries/Microsoft.Extensions.HostFactoryResolver/tests/TopLevelStatementsTestsTimeout/TopLevelStatementsTestsTimeout.csproj diff --git a/src/libraries/Microsoft.Extensions.HostFactoryResolver/src/HostFactoryResolver.cs b/src/libraries/Microsoft.Extensions.HostFactoryResolver/src/HostFactoryResolver.cs index d860312da271c..ec4335d5f5343 100644 --- a/src/libraries/Microsoft.Extensions.HostFactoryResolver/src/HostFactoryResolver.cs +++ b/src/libraries/Microsoft.Extensions.HostFactoryResolver/src/HostFactoryResolver.cs @@ -20,9 +20,25 @@ internal sealed class HostFactoryResolver public const string BuildWebHost = nameof(BuildWebHost); public const string CreateWebHostBuilder = nameof(CreateWebHostBuilder); public const string CreateHostBuilder = nameof(CreateHostBuilder); + private const string TimeoutEnvironmentKey = "DOTNET_HOST_FACTORY_RESOLVER_DEFAULT_TIMEOUT_IN_SECONDS"; // The amount of time we wait for the diagnostic source events to fire - private static readonly TimeSpan s_defaultWaitTimeout = Debugger.IsAttached ? Timeout.InfiniteTimeSpan : TimeSpan.FromSeconds(5); + private static readonly TimeSpan s_defaultWaitTimeout = SetupDefaultTimout(); + + private static TimeSpan SetupDefaultTimout() + { + if (Debugger.IsAttached) + { + return Timeout.InfiniteTimeSpan; + } + + if (uint.TryParse(Environment.GetEnvironmentVariable(TimeoutEnvironmentKey), out uint timeoutInSeconds)) + { + return TimeSpan.FromSeconds((int)timeoutInSeconds); + } + + return TimeSpan.FromMinutes(5); + } public static Func? ResolveWebHostFactory(Assembly assembly) { @@ -229,7 +245,7 @@ public object CreateHost() // Try to set an exception if the entry point returns gracefully, this will force // build to throw - _hostTcs.TrySetException(new InvalidOperationException("Unable to build IHost")); + _hostTcs.TrySetException(new InvalidOperationException("The entry point exited without ever building an IHost.")); } catch (TargetInvocationException tie) when (tie.InnerException is StopTheHostException) { @@ -268,7 +284,7 @@ public object CreateHost() // Wait before throwing an exception if (!_hostTcs.Task.Wait(_waitTimeout)) { - throw new InvalidOperationException("Unable to build IHost"); + throw new InvalidOperationException($"Timed out waiting for the entry point to build the IHost after {s_defaultWaitTimeout}. This timeout can be modified using the '{TimeoutEnvironmentKey}' environment variable."); } } catch (AggregateException) when (_hostTcs.Task.IsCompleted) diff --git a/src/libraries/Microsoft.Extensions.HostFactoryResolver/src/Microsoft.Extensions.HostFactoryResolver.Sources.csproj b/src/libraries/Microsoft.Extensions.HostFactoryResolver/src/Microsoft.Extensions.HostFactoryResolver.Sources.csproj index 31cd86025ee01..90718d135b406 100644 --- a/src/libraries/Microsoft.Extensions.HostFactoryResolver/src/Microsoft.Extensions.HostFactoryResolver.Sources.csproj +++ b/src/libraries/Microsoft.Extensions.HostFactoryResolver/src/Microsoft.Extensions.HostFactoryResolver.Sources.csproj @@ -9,6 +9,8 @@ true true + true + 1 Internal package for sharing Microsoft.Extensions.Hosting.HostFactoryResolver type. diff --git a/src/libraries/Microsoft.Extensions.HostFactoryResolver/tests/HostFactoryResolverTests.cs b/src/libraries/Microsoft.Extensions.HostFactoryResolver/tests/HostFactoryResolverTests.cs index 0e353f7f8cb70..d6cf530c94e93 100644 --- a/src/libraries/Microsoft.Extensions.HostFactoryResolver/tests/HostFactoryResolverTests.cs +++ b/src/libraries/Microsoft.Extensions.HostFactoryResolver/tests/HostFactoryResolverTests.cs @@ -253,6 +253,16 @@ public void TopLevelStatements() Assert.IsAssignableFrom(factory(Array.Empty())); } + [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + public void TopLevelStatementsTestsTimeout() + { + var assembly = Assembly.Load("TopLevelStatementsTestsTimeout"); + var factory = HostFactoryResolver.ResolveServiceProviderFactory(assembly, s_WaitTimeout); + + Assert.NotNull(factory); + Assert.Throws(() => factory(Array.Empty())); + } + [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] public void ApplicationNameSetFromAgrument() { diff --git a/src/libraries/Microsoft.Extensions.HostFactoryResolver/tests/Microsoft.Extensions.HostFactoryResolver.Tests.csproj b/src/libraries/Microsoft.Extensions.HostFactoryResolver/tests/Microsoft.Extensions.HostFactoryResolver.Tests.csproj index bae78e8e4e183..fe811f1fe1b5d 100644 --- a/src/libraries/Microsoft.Extensions.HostFactoryResolver/tests/Microsoft.Extensions.HostFactoryResolver.Tests.csproj +++ b/src/libraries/Microsoft.Extensions.HostFactoryResolver/tests/Microsoft.Extensions.HostFactoryResolver.Tests.csproj @@ -28,6 +28,7 @@ + diff --git a/src/libraries/Microsoft.Extensions.HostFactoryResolver/tests/TopLevelStatementsTestsTimeout/Program.cs b/src/libraries/Microsoft.Extensions.HostFactoryResolver/tests/TopLevelStatementsTestsTimeout/Program.cs new file mode 100644 index 0000000000000..f4c01882987e1 --- /dev/null +++ b/src/libraries/Microsoft.Extensions.HostFactoryResolver/tests/TopLevelStatementsTestsTimeout/Program.cs @@ -0,0 +1,10 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +using System; +using System.Threading; +using Microsoft.Extensions.Hosting; + +var hostBuilder = new HostBuilder(); +Thread.Sleep(TimeSpan.FromSeconds(30)); +hostBuilder.Build(); \ No newline at end of file diff --git a/src/libraries/Microsoft.Extensions.HostFactoryResolver/tests/TopLevelStatementsTestsTimeout/TopLevelStatementsTestsTimeout.csproj b/src/libraries/Microsoft.Extensions.HostFactoryResolver/tests/TopLevelStatementsTestsTimeout/TopLevelStatementsTestsTimeout.csproj new file mode 100644 index 0000000000000..716b25a87281d --- /dev/null +++ b/src/libraries/Microsoft.Extensions.HostFactoryResolver/tests/TopLevelStatementsTestsTimeout/TopLevelStatementsTestsTimeout.csproj @@ -0,0 +1,13 @@ + + + + $(NetCoreAppCurrent);net461 + true + Exe + + + + + + + From c1e9122f0c3202545aee28243c18b0f33c5c12d9 Mon Sep 17 00:00:00 2001 From: Santiago Fernandez Madero Date: Tue, 16 Nov 2021 19:20:21 -0800 Subject: [PATCH 7/7] [release/6.0] Disable native ports package validation (#61697) --- .../System.IO.Ports/pkg/runtime.native.System.IO.Ports.proj | 2 ++ .../System.IO.Ports/pkg/runtime.native.System.IO.Ports.props | 2 ++ 2 files changed, 4 insertions(+) diff --git a/src/libraries/System.IO.Ports/pkg/runtime.native.System.IO.Ports.proj b/src/libraries/System.IO.Ports/pkg/runtime.native.System.IO.Ports.proj index 86043b1f0aa51..ff96f2f4fca13 100644 --- a/src/libraries/System.IO.Ports/pkg/runtime.native.System.IO.Ports.proj +++ b/src/libraries/System.IO.Ports/pkg/runtime.native.System.IO.Ports.proj @@ -6,6 +6,8 @@ false $(NoWarn);NU5128 + + false diff --git a/src/libraries/System.IO.Ports/pkg/runtime.native.System.IO.Ports.props b/src/libraries/System.IO.Ports/pkg/runtime.native.System.IO.Ports.props index dd4aff2fd0e45..4824f36ff0a4b 100644 --- a/src/libraries/System.IO.Ports/pkg/runtime.native.System.IO.Ports.props +++ b/src/libraries/System.IO.Ports/pkg/runtime.native.System.IO.Ports.props @@ -13,6 +13,8 @@ true $(NoWarn);NU5128 + + false