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/Assembly.xml
+15-35Lines changed: 15 additions & 35 deletions
Original file line number
Diff line number
Diff line change
@@ -4041,6 +4041,9 @@ This property is marked obsolete starting in .NET 5, and generates a compile-tim
4041
4041
<format type="text/markdown">< configuration element.
4045
4048
4046
4049
> [!NOTE]
@@ -4128,20 +4131,13 @@ Note: In <see href="https://go.microsoft.com/fwlink/?LinkID=247912">.NET for Win
4128
4131
<param name="assemblyString">The long or short form of the assembly name.</param>
4129
4132
<summary>Loads an assembly with the specified name.</summary>
This API is present in .NET Core for compatibility, but it is recommended to use <xref:System.Reflection.AssemblyLoadContext> overloads in .NET Core 2.0 and later.
4137
-
4138
-
The assembly is loaded into the current AssemblyLoadContext.
In .NET Core 2.0 and later, the target assembly will be loaded into the current <xref:System.Reflection.AssemblyLoadContext>. For more information on assembly loading, see <see cref="https://learn.microsoft.com/en-us/dotnet/core/dependency-loading/loading-managed#algorithm" />.
4143
4140
4144
-
## Remarks
4145
4141
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 the .NET Framework 4:
@@ -4241,20 +4237,12 @@ To load the correct assembly, it's recommended to call the `Load` method by pass
4241
4237
<param name="rawSymbolStore">A byte array that contains the raw bytes representing the symbols for the assembly.</param>
4242
4238
<summary>Loads the assembly with a common object file format (COFF)-based image containing an emitted assembly, optionally including symbols for the assembly.</summary>
This API is present in .NET Core for compatibility, but it is recommended to use <xref:System.Reflection.AssemblyLoadContext> overloads in .NET Core 2.0 and later.
4250
-
4251
-
The assembly is loaded into the current AssemblyLoadContext.
In .NET Core 2.0 and later, the target assembly will be loaded into the current <xref:System.Reflection.AssemblyLoadContext>. For more information on assembly loading, see <see cref="https://learn.microsoft.com/en-us/dotnet/core/dependency-loading/loading-managed#algorithm" />.
4258
4246
4259
4247
This method overload always creates a new <xref:System.Reflection.Assembly> object in its own isolated load context.
4260
4248
@@ -4640,20 +4628,15 @@ The assembly is loaded using the supplied evidence. The raw bytes representing t
4640
4628
<param name="path">The fully qualified path of the file to load.</param>
4641
4629
<summary>Loads the contents of an assembly file on the specified path.</summary>
This API is present in .NET Core for compatibility, but it is recommended to use <xref:System.Reflection.AssemblyLoadContext> overloads in .NET Core 2.0 and later.
4636
+
This API is present in .NET Core for compatibility, but it is recommended to use <xref:System.Reflection.AssemblyLoadContext> overloads in .NET Core 2.0 and later.
4649
4637
4650
-
The assembly is loaded into a new AssemblyLoadContext created for this purpose.
The assembly is loaded into a new AssemblyLoadContext created for this purpose. For more information on assembly loading, see <see cref="https://learn.microsoft.com/en-us/dotnet/core/dependency-loading/loading-managed#algorithm" />.
4655
4639
4656
-
## Remarks
4657
4640
Use the <xref:System.Reflection.Assembly.LoadFile%2A> method to load and examine assemblies that have the same identity, but are located in different paths. <xref:System.Reflection.Assembly.LoadFile%2A> does not load files into the load-from context, and does not resolve dependencies using the load path, as the <xref:System.Reflection.Assembly.LoadFrom%2A> method does. <xref:System.Reflection.Assembly.LoadFile%2A> is useful in this limited scenario because <xref:System.Reflection.Assembly.LoadFrom%2A> cannot be used to load assemblies that have the same identities but different paths; it will load only the first such assembly.
4658
4641
4659
4642
Starting with .NET Framework 4, if `path` specifies an assembly in a remote location, assembly loading is disabled by default, and the `LoadFile` method throws a <xref:System.IO.FileLoadException>. To enable execution of code loaded from remote locations, you can use the [`<loadFromRemoteSources>`](/dotnet/framework/configure-apps/file-schema/runtime/loadfromremotesources-element) configuration element.
@@ -4820,22 +4803,19 @@ Starting with .NET Framework 4, the ability to execute code in assemblies loaded
4820
4803
<param name="assemblyFile">The name or path of the file that contains the manifest of the assembly.</param>
4821
4804
<summary>Loads an assembly given its file name or path.</summary>
This API is present in .NET Core for compatibility, but it is recommended to use <xref:System.Reflection.AssemblyLoadContext> overloads in .NET Core 2.0 and later.
4811
+
This API is present in .NET Core for compatibility, but it is recommended to use <xref:System.Reflection.AssemblyLoadContext> overloads in .NET Core 2.0 and later.
4829
4812
4830
-
The assembly is loaded into the default AssemblyLoadContext.
The assembly is loaded into the default AssemblyLoadContext. For more information on assembly loading, see <see cref="https://learn.microsoft.com/en-us/dotnet/core/dependency-loading/loading-managed#algorithm" />.
4835
4814
4836
-
## Remarks
4837
4815
The `assemblyFile` parameter must refer to a URI without escape characters. This method supplies escape characters for all invalid characters in the URI.
4838
4816
4817
+
Before .NET 5, the following applied:
4818
+
4839
4819
> [!NOTE]
4840
4820
> File transfer protocol (FTP) is not supported. If the URI supplied for `assemblyFile` is an FTP address, the assembly is not loaded. No exception is thrown.
0 commit comments