From 435c2d17836023aaaaf130e75f0e859f0cf04620 Mon Sep 17 00:00:00 2001 From: Elinor Fung Date: Fri, 30 Aug 2024 12:15:00 -0700 Subject: [PATCH 1/6] Update Assembly HostContext, IsFullyTrusted, SecurityRuleSet properties for .NET Core/5+ behaviour --- .../AssemblyBuilder.xml | 6 +++++- xml/System.Reflection/Assembly.xml | 21 +++++++++++++------ 2 files changed, 20 insertions(+), 7 deletions(-) diff --git a/xml/System.Reflection.Emit/AssemblyBuilder.xml b/xml/System.Reflection.Emit/AssemblyBuilder.xml index c2c048fcb2c..139b7e33eaa 100644 --- a/xml/System.Reflection.Emit/AssemblyBuilder.xml +++ b/xml/System.Reflection.Emit/AssemblyBuilder.xml @@ -2683,7 +2683,11 @@ The following code example shows how to define and use a dynamic assembly. The e Gets the host context where the dynamic assembly is being created. - A value that indicates the host context where the dynamic assembly is being created. + + .NET Framework only: A value that indicates the host context where the dynamic assembly is being created. + + .NET Core and 5+: 0 in all cases. + To be added. diff --git a/xml/System.Reflection/Assembly.xml b/xml/System.Reflection/Assembly.xml index 5d478f09233..f776e933f68 100644 --- a/xml/System.Reflection/Assembly.xml +++ b/xml/System.Reflection/Assembly.xml @@ -3628,7 +3628,11 @@ This property is marked obsolete starting in .NET 5, and generates a compile-tim Gets the host context with which the assembly was loaded. - An value that indicates the host context with which the assembly was loaded, if any. + + .NET Framework only: An value that indicates the host context with which the assembly was loaded, if any. + + .NET Core and 5+: 0 in all cases. + To be added. @@ -3901,7 +3905,10 @@ This property is marked obsolete starting in .NET 5, and generates a compile-tim Gets a value that indicates whether the current assembly is loaded with full trust. - if the current assembly is loaded with full trust; otherwise, . + .NET Framework only: if the current assembly is loaded with full trust; otherwise, . + + .NET Core and 5+: in all cases. + To be added. @@ -6323,14 +6330,16 @@ In .NET 5 and later versions, for bundled assemblies, the value returned is an e Gets a value that indicates which set of security rules the common language runtime (CLR) enforces for this assembly. - The security rule set that the CLR enforces for this assembly. + + .NET Framework only: The security rule set that the CLR enforces for this assembly. + + .NET Core and 5+: in all cases. + From 4373f9b7c41461a9c2f6fd87b0c11376953c9264 Mon Sep 17 00:00:00 2001 From: Elinor Fung Date: Fri, 30 Aug 2024 12:23:52 -0700 Subject: [PATCH 2/6] Update xml/System.Reflection/Assembly.xml --- xml/System.Reflection/Assembly.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xml/System.Reflection/Assembly.xml b/xml/System.Reflection/Assembly.xml index f776e933f68..80bb91c635a 100644 --- a/xml/System.Reflection/Assembly.xml +++ b/xml/System.Reflection/Assembly.xml @@ -3905,7 +3905,7 @@ This property is marked obsolete starting in .NET 5, and generates a compile-tim Gets a value that indicates whether the current assembly is loaded with full trust. - .NET Framework only: if the current assembly is loaded with full trust; otherwise, . + .NET Framework only: if the current assembly is loaded with full trust; otherwise, . .NET Core and 5+: in all cases. From 9204e7fb87f850d36f4514aeeb67dc8f6a4376e0 Mon Sep 17 00:00:00 2001 From: Elinor Fung Date: Fri, 30 Aug 2024 12:47:24 -0700 Subject: [PATCH 3/6] Fix link --- xml/System.Reflection.Emit/AssemblyBuilder.xml | 2 +- xml/System.Reflection/Assembly.xml | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/xml/System.Reflection.Emit/AssemblyBuilder.xml b/xml/System.Reflection.Emit/AssemblyBuilder.xml index 139b7e33eaa..df6ba72204b 100644 --- a/xml/System.Reflection.Emit/AssemblyBuilder.xml +++ b/xml/System.Reflection.Emit/AssemblyBuilder.xml @@ -2686,7 +2686,7 @@ The following code example shows how to define and use a dynamic assembly. The e .NET Framework only: A value that indicates the host context where the dynamic assembly is being created. - .NET Core and 5+: 0 in all cases. + .NET Core and .NET 5+: 0 in all cases. To be added. diff --git a/xml/System.Reflection/Assembly.xml b/xml/System.Reflection/Assembly.xml index 80bb91c635a..bc803a05864 100644 --- a/xml/System.Reflection/Assembly.xml +++ b/xml/System.Reflection/Assembly.xml @@ -3631,7 +3631,7 @@ This property is marked obsolete starting in .NET 5, and generates a compile-tim .NET Framework only: An value that indicates the host context with which the assembly was loaded, if any. - .NET Core and 5+: 0 in all cases. + .NET Core and .NET 5+: 0 in all cases. To be added. @@ -3907,7 +3907,7 @@ This property is marked obsolete starting in .NET 5, and generates a compile-tim .NET Framework only: if the current assembly is loaded with full trust; otherwise, . - .NET Core and 5+: in all cases. + .NET Core and .NET 5+: in all cases. To be added. @@ -6333,7 +6333,7 @@ In .NET 5 and later versions, for bundled assemblies, the value returned is an e .NET Framework only: The security rule set that the CLR enforces for this assembly. - .NET Core and 5+: in all cases. + .NET Core and .NET 5+: in all cases. Date: Fri, 30 Aug 2024 14:03:58 -0700 Subject: [PATCH 4/6] Undo virtual properties --- xml/System.Reflection/Assembly.xml | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/xml/System.Reflection/Assembly.xml b/xml/System.Reflection/Assembly.xml index bc803a05864..4b51e0b8802 100644 --- a/xml/System.Reflection/Assembly.xml +++ b/xml/System.Reflection/Assembly.xml @@ -3628,11 +3628,7 @@ This property is marked obsolete starting in .NET 5, and generates a compile-tim Gets the host context with which the assembly was loaded. - - .NET Framework only: An value that indicates the host context with which the assembly was loaded, if any. - - .NET Core and .NET 5+: 0 in all cases. - + An value that indicates the host context with which the assembly was loaded, if any. To be added. @@ -6330,11 +6326,7 @@ In .NET 5 and later versions, for bundled assemblies, the value returned is an e Gets a value that indicates which set of security rules the common language runtime (CLR) enforces for this assembly. - - .NET Framework only: The security rule set that the CLR enforces for this assembly. - - .NET Core and .NET 5+: in all cases. - + The security rule set that the CLR enforces for this assembly. Date: Fri, 30 Aug 2024 15:05:42 -0700 Subject: [PATCH 5/6] Undo AssemblyBuilder.HostContext --- xml/System.Reflection.Emit/AssemblyBuilder.xml | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/xml/System.Reflection.Emit/AssemblyBuilder.xml b/xml/System.Reflection.Emit/AssemblyBuilder.xml index df6ba72204b..c2c048fcb2c 100644 --- a/xml/System.Reflection.Emit/AssemblyBuilder.xml +++ b/xml/System.Reflection.Emit/AssemblyBuilder.xml @@ -2683,11 +2683,7 @@ The following code example shows how to define and use a dynamic assembly. The e Gets the host context where the dynamic assembly is being created. - - .NET Framework only: A value that indicates the host context where the dynamic assembly is being created. - - .NET Core and .NET 5+: 0 in all cases. - + A value that indicates the host context where the dynamic assembly is being created. To be added. From ace30efd7d3dd31d43eb229a77ee528a7bdc8f70 Mon Sep 17 00:00:00 2001 From: Elinor Fung Date: Fri, 30 Aug 2024 15:07:39 -0700 Subject: [PATCH 6/6] Update AppDomain.IsFullyTrusted --- xml/System/AppDomain.xml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/xml/System/AppDomain.xml b/xml/System/AppDomain.xml index 806285f3dcd..d159ec07035 100644 --- a/xml/System/AppDomain.xml +++ b/xml/System/AppDomain.xml @@ -6509,12 +6509,15 @@ This method overload uses the information from the Gets a value that indicates whether assemblies that are loaded into the current application domain execute with full trust. - if assemblies that are loaded into the current application domain execute with full trust; otherwise, . + .NET Framework only: if assemblies that are loaded into the current application domain execute with full trust; otherwise, . + + .NET Core and .NET 5+: in all cases. + method overload, unless the permissions that are granted to the application domain are equivalent to full trust. + **.NET Framework only:** This method always returns `true` for the default application domain of an application that runs on the desktop. It returns `false` for a sandboxed application domain that was created by using the method overload, unless the permissions that are granted to the application domain are equivalent to full trust.