Skip to content

Commit 435c2d1

Browse files
committed
Update Assembly HostContext, IsFullyTrusted, SecurityRuleSet properties for .NET Core/5+ behaviour
1 parent 1667ba9 commit 435c2d1

File tree

2 files changed

+20
-7
lines changed

2 files changed

+20
-7
lines changed

xml/System.Reflection.Emit/AssemblyBuilder.xml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2683,7 +2683,11 @@ The following code example shows how to define and use a dynamic assembly. The e
26832683
</ReturnValue>
26842684
<Docs>
26852685
<summary>Gets the host context where the dynamic assembly is being created.</summary>
2686-
<value>A value that indicates the host context where the dynamic assembly is being created.</value>
2686+
<value>
2687+
.NET Framework only: A value that indicates the host context where the dynamic assembly is being created.
2688+
2689+
.NET Core and 5+: 0 in all cases.
2690+
</value>
26872691
<remarks>To be added.</remarks>
26882692
</Docs>
26892693
</Member>

xml/System.Reflection/Assembly.xml

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3628,7 +3628,11 @@ This property is marked obsolete starting in .NET 5, and generates a compile-tim
36283628
</ReturnValue>
36293629
<Docs>
36303630
<summary>Gets the host context with which the assembly was loaded.</summary>
3631-
<value>An <see cref="T:System.Int64" /> value that indicates the host context with which the assembly was loaded, if any.</value>
3631+
<value>
3632+
.NET Framework only: An <see cref="T:System.Int64" /> value that indicates the host context with which the assembly was loaded, if any.
3633+
3634+
.NET Core and 5+: 0 in all cases.
3635+
</value>
36323636
<remarks>To be added.</remarks>
36333637
</Docs>
36343638
</Member>
@@ -3901,7 +3905,10 @@ This property is marked obsolete starting in .NET 5, and generates a compile-tim
39013905
<Docs>
39023906
<summary>Gets a value that indicates whether the current assembly is loaded with full trust.</summary>
39033907
<value>
3904-
<see langword="true" /> if the current assembly is loaded with full trust; otherwise, <see langword="false" />.</value>
3908+
.NET Framework only: <see langword="true" /> if the current assembly is loaded with full trust; otherwise, <see langword="false" />.</value>
3909+
3910+
.NET Core and 5+: <see langword="true" /> in all cases.
3911+
</value>
39053912
<remarks>To be added.</remarks>
39063913
</Docs>
39073914
</Member>
@@ -6323,14 +6330,16 @@ In .NET 5 and later versions, for bundled assemblies, the value returned is an e
63236330
</ReturnValue>
63246331
<Docs>
63256332
<summary>Gets a value that indicates which set of security rules the common language runtime (CLR) enforces for this assembly.</summary>
6326-
<value>The security rule set that the CLR enforces for this assembly.</value>
6333+
<value>
6334+
.NET Framework only: The security rule set that the CLR enforces for this assembly.
6335+
6336+
.NET Core and 5+: <xref:System.Security.SecurityRuleSet.None?displayProperty=nameWithType> in all cases.
6337+
</value>
63276338
<remarks>
63286339
<format type="text/markdown"><![CDATA[
63296340

63306341
## Remarks
6331-
By default, assemblies that you compile with the .NET Framework 4 have [level 2](/dotnet/framework/misc/security-transparent-code-level-2) transparency, although you can explicitly make them [level 1](/dotnet/framework/misc/security-transparent-code-level-1) instead. Assemblies that were compiled with earlier versions of the .NET Framework have level 1 transparency.
6332-
6333-
See [Security Changes](/dotnet/framework/security/security-changes).
6342+
**.NET Framework only:** By default, assemblies that you compile with the .NET Framework 4 have [level 2](/dotnet/framework/misc/security-transparent-code-level-2) transparency, although you can explicitly make them [level 1](/dotnet/framework/misc/security-transparent-code-level-1) instead. Assemblies that were compiled with earlier versions of the .NET Framework have level 1 transparency. See [Security Changes](/dotnet/framework/security/security-changes).
63346343

63356344
]]></format>
63366345
</remarks>

0 commit comments

Comments
 (0)