You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: xml/System.Reflection.Emit/AssemblyBuilder.xml
+3-3Lines changed: 3 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -442,7 +442,7 @@ The following code example shows how to define and use a dynamic assembly. The e
442
442
<paramname="access">The access rights of the assembly.</param>
443
443
<summary>Defines a dynamic assembly that has the specified name and access rights.</summary>
444
444
<returns>An object that represents the new assembly.</returns>
445
-
<remarks>To be added.</remarks>
445
+
<remarks>.NET 6+ only: If the <seecref="P:System.Runtime.Loader.AssemblyLoadContext.CurrentContextualReflectionContext" /> property is null, then the assembly is created in the <seecref="T:System.Runtime.Loader.AssemblyLoadContext" /> of the function that calls DefineDynamicAssembly. Otherwise, it's created with the <seecref="T:System.Runtime.Loader.AssemblyLoadContext" /> specified in <seecref="P:System.Runtime.Loader.AssemblyLoadContext.CurrentContextualReflectionContext" />.</remarks>
446
446
</Docs>
447
447
</Member>
448
448
<MemberMemberName="DefineDynamicAssembly">
@@ -505,9 +505,9 @@ The following code example shows how to define and use a dynamic assembly. The e
505
505
<paramname="name">The name of the assembly.</param>
506
506
<paramname="access">The access rights of the assembly.</param>
507
507
<paramname="assemblyAttributes">A collection that contains the attributes of the assembly.</param>
508
-
<summary>Defines a new assembly that has the specified name, access rights, and attributes.</summary>
508
+
<summary>Defines a dynamic assembly that has the specified name, access rights, and attributes.</summary>
509
509
<returns>An object that represents the new assembly.</returns>
510
-
<remarks>To be added.</remarks>
510
+
<remarks>.NET 6+ only: If the <seecref="P:System.Runtime.Loader.AssemblyLoadContext.CurrentContextualReflectionContext" /> property is null, then the assembly is created in the <seecref="T:System.Runtime.Loader.AssemblyLoadContext" /> of the function that calls DefineDynamicAssembly. Otherwise, it's created with the <seecref="T:System.Runtime.Loader.AssemblyLoadContext" /> specified in <seecref="P:System.Runtime.Loader.AssemblyLoadContext.CurrentContextualReflectionContext" />.</remarks>
Copy file name to clipboardExpand all lines: xml/System.Reflection/Assembly.xml
+10-2Lines changed: 10 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -3241,6 +3241,8 @@ Note: In <see href="https://go.microsoft.com/fwlink/?LinkID=247912">.NET for Win
3241
3241
## Remarks
3242
3242
This method only searches the current assembly instance. The `name` parameter includes the namespace but not the assembly. To search other assemblies for a type, use the <xref:System.Type.GetType%28System.String%29?displayProperty=nameWithType> method overload, which can optionally include an assembly display name as part of the type name.
3243
3243
3244
+
In .NET Core/.NET 5+, if there are assembly-qualified generic type parameters in the type name string, those assembly references will be loaded by the <xref:System.Runtime.Loader.AssemblyLoadContext> of the method that called Assembly.GetType, or by the <xref:System.Runtime.Loader.AssemblyLoadContext.CurrentContextualReflectionContext%2A?displayProperty=nameWithType> context if it's set.
3245
+
3244
3246
> [!NOTE]
3245
3247
> If the type has been forwarded to another assembly, it is still returned by this method. For information on type forwarding, see [Type Forwarding in the Common Language Runtime](/dotnet/standard/assembly/type-forwarding).
3246
3248
@@ -3345,6 +3347,8 @@ Note: In <see href="https://go.microsoft.com/fwlink/?LinkID=247912">.NET for Win
3345
3347
## Remarks
3346
3348
This method only searches the current assembly instance. The `name` parameter includes the namespace but not the assembly. To search other assemblies for a type, use the <xref:System.Type.GetType%28System.String%29?displayProperty=nameWithType> method overload, which can optionally include an assembly display name as part of the type name.
3347
3349
3350
+
In .NET Core/.NET 5+, if there are assembly-qualified generic type parameters in the type name string, those assembly references will be loaded by the <xref:System.Runtime.Loader.AssemblyLoadContext> of the method that called Assembly.GetType, or by the <xref:System.Runtime.Loader.AssemblyLoadContext.CurrentContextualReflectionContext%2A?displayProperty=nameWithType> context if it's set.
3351
+
3348
3352
> [!NOTE]
3349
3353
> If the type has been forwarded to another assembly, it is still returned by this method. For information on type forwarding, see [Type Forwarding in the Common Language Runtime](/dotnet/standard/assembly/type-forwarding).
3350
3354
@@ -3450,6 +3454,8 @@ Note: In <see href="https://go.microsoft.com/fwlink/?LinkID=247912">.NET for Win
3450
3454
## Remarks
3451
3455
This method only searches the current assembly instance. The `name` parameter includes the namespace but not the assembly. To search other assemblies for a type, use the <xref:System.Type.GetType%28System.String%29?displayProperty=nameWithType> method overload, which can optionally include an assembly display name as part of the type name.
3452
3456
3457
+
In .NET Core/.NET 5+, if there are assembly-qualified generic type parameters in the type name string, those assembly references will be loaded by the <xref:System.Runtime.Loader.AssemblyLoadContext> of the method that called Assembly.GetType, or by the <xref:System.Runtime.Loader.AssemblyLoadContext.CurrentContextualReflectionContext%2A?displayProperty=nameWithType> context if it's set.
3458
+
3453
3459
> [!NOTE]
3454
3460
> If the type has been forwarded to another assembly, it is still returned by this method. For information on type forwarding, see [Type Forwarding in the Common Language Runtime](/dotnet/standard/assembly/type-forwarding).
3455
3461
@@ -4097,7 +4103,7 @@ This property is marked obsolete starting in .NET 5, and generates a compile-tim
4097
4103
4098
4104
## Remarks
4099
4105
4100
-
In .NET Core/.NET 5+, the target assembly will be loaded into the current <xref:System.Runtime.Loader.AssemblyLoadContext>. For more information on assembly loading, see [Managed assembly loading algorithm](/dotnet/core/dependency-loading/loading-managed#algorithm").
4106
+
In .NET Core/.NET 5+, the target assembly will be loaded into the current <xref:System.Runtime.Loader.AssemblyLoadContext> or into the <xref:System.Runtime.Loader.AssemblyLoadContext.CurrentContextualReflectionContext%2A?displayProperty=nameWithType> context if it's set. For more information on assembly loading, see [Managed assembly loading algorithm](/dotnet/core/dependency-loading/loading-managed#algorithm).
4101
4107
4102
4108
> [!NOTE]
4103
4109
> **.NET Framework only:** For information about loading assemblies from remote locations, see [`<loadFromRemoteSources>`](/dotnet/framework/configure-apps/file-schema/runtime/loadfromremotesources-element).
@@ -4191,7 +4197,7 @@ Note: In <see href="https://go.microsoft.com/fwlink/?LinkID=247912">.NET for Win
4191
4197
4192
4198
## Remarks
4193
4199
4194
-
In .NET Core/5+, the target assembly is loaded into the current <xref:System.Runtime.Loader.AssemblyLoadContext>. For more information on assembly loading, see [Managed assembly loading algorithm](/dotnet/core/dependency-loading/loading-managed#algorithm").
4200
+
In .NET Core/.NET 5+, the target assembly will be loaded into the current <xref:System.Runtime.Loader.AssemblyLoadContext> or into the <xref:System.Runtime.Loader.AssemblyLoadContext.CurrentContextualReflectionContext%2A?displayProperty=nameWithType> context if it's set. For more information on assembly loading, see [Managed assembly loading algorithm](/dotnet/core/dependency-loading/loading-managed#algorithm).
4195
4201
4196
4202
To load the correct assembly, it's recommended to call the `Load` method by passing the long form of the assembly name. The long form of an assembly name consists of its simple name (such as "System" for the System.dll assembly) along with its version, culture, public key token, and optionally its processor architecture. It corresponds to the assembly's <xref:System.Reflection.Assembly.FullName%2A> property. The following example illustrates the use of a long name to load the System.dll assembly for .NET Framework 4:
4197
4203
@@ -5571,6 +5577,8 @@ The assembly is loaded into the default AssemblyLoadContext. For more informatio
5571
5577
5572
5578
Applications that load assemblies with this method will be affected by upgrades of those assemblies. Therefore, do not use this method; redesign the application to use the <xref:System.Reflection.Assembly.Load%28System.String%29> method overload or the <xref:System.Reflection.Assembly.LoadFrom%28System.String%29> method overload.
5573
5579
5580
+
In .NET Core/5+, the target assembly is loaded into the current <xref:System.Runtime.Loader.AssemblyLoadContext> or the <xref:System.Runtime.Loader.AssemblyLoadContext.CurrentContextualReflectionContext%2A?displayProperty=nameWithType> if it's set.
5581
+
5574
5582
This method first calls <xref:System.Reflection.Assembly.Load%2A>. If the assembly is not found, this method returns the assembly from the global assembly cache that has the same simple name, and the highest version number.
Copy file name to clipboardExpand all lines: xml/System/Activator.xml
+6Lines changed: 6 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -574,6 +574,8 @@ Note: In <see href="https://go.microsoft.com/fwlink/?LinkID=247912">.NET for Win
574
574
575
575
For more information on how the common language runtime identifies and loads assemblies, see [How the Runtime Locates Assemblies](/dotnet/framework/deployment/how-the-runtime-locates-assemblies). For information on using the application configuration file to define assembly locations, see [Specifying an Assembly's Location](/dotnet/framework/configure-apps/specify-assembly-location). If `assemblyName` is found, it is loaded in the default context.
576
576
577
+
In .NET Core 3.0 and later versions, assembly loads triggered by this API are affected by the current value of <xref:System.Runtime.Loader.AssemblyLoadContext.CurrentContextualReflectionContext%2A?displayProperty=nameWithType>.
578
+
577
579
> [!NOTE]
578
580
> This method can be used to create nonpublic types if the caller has been granted <xref:System.Security.Permissions.ReflectionPermission> with the <xref:System.Security.Permissions.ReflectionPermissionFlag.RestrictedMemberAccess?displayProperty=nameWithType> flag and if the grant set of the assembly that contains the nonpublic types is restricted to the caller's grant set or to a subset thereof. (See [Security Considerations for Reflection](/dotnet/framework/reflection-and-codedom/security-considerations-for-reflection).) To use this functionality, your application should target .NET Framework 3.5 or later.
579
581
@@ -1018,6 +1020,8 @@ Note: In <see href="https://go.microsoft.com/fwlink/?LinkID=247912">.NET for Win
1018
1020
## Remarks
1019
1021
Use <xref:System.Runtime.Remoting.ObjectHandle.Unwrap%2A?displayProperty=nameWithType> to unwrap the return value.
1020
1022
1023
+
In .NET Core 3.0 and later versions, assembly loads triggered by this API are affected by the current value of <xref:System.Runtime.Loader.AssemblyLoadContext.CurrentContextualReflectionContext%2A?displayProperty=nameWithType>.
1024
+
1021
1025
> [!NOTE]
1022
1026
> This method can be used to create nonpublic types if the caller has been granted <xref:System.Security.Permissions.ReflectionPermission> with the <xref:System.Security.Permissions.ReflectionPermissionFlag.RestrictedMemberAccess?displayProperty=nameWithType> flag and if the grant set of the nonpublic types is restricted to the caller's grant set or to a subset thereof. (See [Security Considerations for Reflection](/dotnet/framework/reflection-and-codedom/security-considerations-for-reflection).) To use this functionality, your application should target .NET Framework 3.5 or later.
1023
1027
@@ -1493,6 +1497,8 @@ An error occurred when attempting remote activation in a target specified in <pa
1493
1497
## Remarks
1494
1498
Use <xref:System.Runtime.Remoting.ObjectHandle.Unwrap%2A?displayProperty=nameWithType> to unwrap the return value.
1495
1499
1500
+
In .NET Core 3.0 and later versions, assembly loads triggered by this API are affected by the current value of <xref:System.Runtime.Loader.AssemblyLoadContext.CurrentContextualReflectionContext%2A?displayProperty=nameWithType>.
1501
+
1496
1502
> [!NOTE]
1497
1503
> This method can be used to create nonpublic types and members if the caller has been granted <xref:System.Security.Permissions.ReflectionPermission> with the <xref:System.Security.Permissions.ReflectionPermissionFlag.RestrictedMemberAccess?displayProperty=nameWithType> flag and if the grant set of the assembly that contains the nonpublic types and members is restricted to the caller's grant set or to a subset thereof. (See [Security Considerations for Reflection](/dotnet/framework/reflection-and-codedom/security-considerations-for-reflection).) To use this functionality, your application should target .NET Framework 3.5 or later.
0 commit comments