diff --git a/xml/System.Reflection/Assembly.xml b/xml/System.Reflection/Assembly.xml index b9c1e184525..a38ffe376b1 100644 --- a/xml/System.Reflection/Assembly.xml +++ b/xml/System.Reflection/Assembly.xml @@ -405,11 +405,8 @@ In .NET 5 and later versions, for bundled assemblies, this property throws an ex The current assembly was loaded into the reflection-only context, and requires a dependent assembly that was not preloaded. - requires a dependent assembly, but the file is not a valid assembly. - - -or- - - requires a dependent assembly that was compiled for a version of the runtime that is later than the currently loaded version. + requires a dependent assembly, but the file is not a valid assembly for the currently loaded runtime. + @@ -511,11 +508,8 @@ In .NET 5 and later versions, for bundled assemblies, this property throws an ex The current assembly was loaded into the reflection-only context, and requires a dependent assembly that was not preloaded. - requires a dependent assembly, but the file is not a valid assembly. - - -or- - - requires a dependent assembly that was compiled for a version of the runtime that is later than the currently loaded version. + requires a dependent assembly, but the file is not a valid assembly for the currently loaded runtime. + @@ -632,12 +626,9 @@ In .NET 5 and later versions, for bundled assemblies, this property throws an ex The current assembly was loaded into the reflection-only context, and requires a dependent assembly that was not preloaded. - requires a dependent assembly, but the file is not a valid assembly. - - -or- - - requires a dependent assembly which that was compiled for a version of the runtime that is later than the currently loaded version. - + requires a dependent assembly, but the file is not a valid assembly for the currently loaded runtime. + + @@ -3239,12 +3230,9 @@ Note: In .NET for Win Note: In .NET for Windows Store apps or the Portable Class Library, catch the base class exception, , instead. - requires a dependent assembly, but the file is not a valid assembly. - - -or- - - requires a dependent assembly which was compiled for a version of the runtime later than the currently loaded version. - + requires a dependent assembly, but the file is not a valid assembly for the currently loaded runtime. + + @@ -3340,12 +3328,9 @@ Note: In .NET for Win The current assembly was loaded into the reflection-only context, and requires a dependent assembly that was not preloaded. - requires a dependent assembly, but the file is not a valid assembly. - - -or- - - requires a dependent assembly which was compiled for a version of the runtime later than the currently loaded version. - + requires a dependent assembly, but the file is not a valid assembly for the currently loaded runtime. + + @@ -3447,12 +3432,9 @@ Note: In .NET for Win The current assembly was loaded into the reflection-only context, and requires a dependent assembly that was not preloaded. - requires a dependent assembly, but the file is not a valid assembly. - - -or- - - requires a dependent assembly which was compiled for a version of the runtime later than the currently loaded version. - + requires a dependent assembly, but the file is not a valid assembly for the currently loaded runtime. + + @@ -3981,28 +3963,25 @@ This property is marked obsolete starting in .NET 5, and generates a compile-tim A byte array that is a COFF-based image containing an emitted assembly. - Loads the assembly with a common object file format (COFF)-based image containing an emitted assembly. The assembly is loaded into the application domain of the caller. + Loads the assembly with a common object file format (COFF)-based image containing an emitted assembly. The loaded assembly. - + method overload. For more information about the use of evidence with overloads of the method that take byte arrays, see the method overload. - Reflecting on C++ executable files might throw a . This is most likely caused by the C++ compiler stripping the relocation addresses or the `.reloc` section from your executable file. To preserve the `.reloc` address for your C++ executable file, specify `/fixed:no` when you are linking. + This method overload always creates a new object in its own isolated load context. - Note that this method overload always creates a new object with its own mapping. + **.NET Framework only:** The trust level of an assembly that is loaded by using this method is the same as the trust level of the calling assembly. To load an assembly from a byte array with the trust level of the application domain, use the method overload. For more information about the use of evidence with overloads of the method that take byte arrays, see the method overload. ]]> is . - is not a valid assembly. - - -or- - - Version 2.0 or later of the common language runtime is currently loaded and was compiled with a later version. + is not a valid assembly for the currently loaded runtime. + @@ -4067,21 +4046,6 @@ This property is marked obsolete starting in .NET 5, and generates a compile-tim > [!NOTE] > Do not use an with only the property set. The property does not supply any elements of the assembly identity (such as name or version), so loading does not occur according to load-by-identity rules, as you would expect from the method. Instead, the assembly is loaded using load-from rules. For information about the disadvantages of using the load-from context, see the method overload or [Best Practices for Assembly Loading](/dotnet/framework/deployment/best-practices-for-assembly-loading). - Whether certain permissions are granted or not granted to an assembly is based on evidence. The rules for assembly and security evidence merging are as follows: - -- When you use a method with no parameter, the assembly is loaded with the evidence that the loader supplies. - -- When you use a method with an parameter, pieces of evidence are merged. Pieces of evidence supplied as an argument to the method supersede pieces of evidence supplied by the loader. - -- When you use a method overload with a `Byte[]` parameter to load a common object file format (COFF) image, evidence is inherited from the calling assembly. This applies to the .NET Framework version 1.1 Service Pack 1 (SP1) and subsequent releases. - - > [!NOTE] - > In the .NET Framework version 1.0 and in version 1.1 without SP1, when you use a method overload with a `Byte[]` parameter to load a COFF image, evidence is combined. `Zone`, `Url` and `Site` are inherited from the calling assembly, and `Hash` and `StrongName` are taken from the COFF assembly. - -- When you use a method with a `Byte[]` parameter and to load a COFF image, only the supplied evidence is used. Evidence of the calling assembly and evidence of the COFF image is ignored. - - Reflecting on C++ executable files might throw a . This is most likely caused by the C++ compiler stripping the relocation addresses or the `.reloc` section from your executable file. To preserve the `.reloc` address for your C++ executable file, specify `/fixed:no` when you are linking. - > [!NOTE] > If both the property and the property are set, the first attempt to load the assembly uses the display name (including version, culture, and so on, as returned by the property). If the file is not found, is used to search for the assembly. If the assembly is found using , the display name is matched against the assembly. If the match fails, a is thrown. @@ -4108,9 +4072,8 @@ This property is marked obsolete starting in .NET 5, and generates a compile-tim Note: In .NET for Windows Store apps or the Portable Class Library, catch the base class exception, , instead. - is not a valid assembly. -or- - - Version 2.0 or later of the common language runtime is currently loaded and was compiled with a later version. + is not a valid assembly for the currently loaded runtime. + How the Runtime Locates Assemblies @@ -4176,21 +4139,6 @@ To load the correct assembly, it's recommended to call the `Load` method by pass is thrown if `assemblyString` specifies the full assembly name, and the first assembly that matches the simple name has a different version, culture, or public key token. The loader does not continue probing for other assemblies that match the simple name. - Whether certain permissions are granted or not granted to an assembly is based on evidence. The rules for assembly and security evidence merging are as follows: - -- When you use a method with no parameter, the assembly is loaded with the evidence that the loader supplies. - -- When you use a method with an parameter, pieces of evidence are merged. Pieces of evidence supplied as an argument to the method supersede pieces of evidence supplied by the loader. - -- When you use a method overload with a `Byte[]` parameter to load a common object file format (COFF) image, evidence is inherited from the calling assembly. This applies to the .NET Framework version 1.1 Service Pack 1 (SP1) and subsequent releases. - - > [!NOTE] - > In the .NET Framework version 1.0 and in version 1.1 without SP1, when you use a method overload with a `Byte[]` parameter to load a COFF image, evidence is combined. `Zone`, `Url` and `Site` are inherited from the calling assembly, and `Hash` and `StrongName` are taken from the COFF assembly. - -- When you use a method with a `Byte[]` parameter and to load a COFF image, only the supplied evidence is used. Evidence of the calling assembly and evidence of the COFF image is ignored. - - Reflecting on C++ executable files might throw a . This is most likely caused by the C++ compiler stripping the relocation addresses or the `.reloc` section from your executable file. To preserve the `.reloc` address for your C++ executable file, specify `/fixed:no` when you are linking. - In the .NET Framework version 2.0, processor architecture is added to assembly identity, and can be specified as part of assembly name strings. For example, "ProcessorArchitecture=msil". However, the recommended way to specify an assembly name is to create an object and pass it to an appropriate overload of the method. See . @@ -4212,11 +4160,8 @@ To load the correct assembly, it's recommended to call the `Load` method by pass is not found. A file that was found could not be loaded. - is not a valid assembly. - - -or- - - Version 2.0 or later of the common language runtime is currently loaded and was compiled with a later version. + is not a valid assembly for the currently loaded runtime. + How the Runtime Locates Assemblies @@ -4284,28 +4229,24 @@ To load the correct assembly, it's recommended to call the `Load` method by pass A byte array that is a COFF-based image containing an emitted assembly. A byte array that contains the raw bytes representing the symbols for the assembly. - Loads the assembly with a common object file format (COFF)-based image containing an emitted assembly, optionally including symbols for the assembly. The assembly is loaded into the application domain of the caller. + Loads the assembly with a common object file format (COFF)-based image containing an emitted assembly, optionally including symbols for the assembly. The loaded assembly. method overload. For more information about the use of evidence with overloads of the method that take byte arrays, see the method overload. - Reflecting on C++ executable files might throw a . This is most likely caused by the C++ compiler stripping the relocation addresses or the `.reloc` section from your executable file. To preserve the `.reloc` address for your C++ executable file, specify `/fixed:no` when you are linking. + This method overload always creates a new object in its own isolated load context. - Note that this method overload always creates a new object with its own mapping. + **.NET Framework only:** The trust level of an assembly that is loaded by using this method is the same as the trust level of the calling assembly. To load an assembly from a byte array with the trust level of the application domain, use the method overload. For more information about the use of evidence with overloads of the method that take byte arrays, see the method overload. ]]> is . - is not a valid assembly. - - -or- - - Version 2.0 or later of the common language runtime is currently loaded and was compiled with a later version. + is not a valid assembly for the currently loaded runtime. + @@ -4351,7 +4292,7 @@ To load the correct assembly, it's recommended to call the `Load` method by pass The object that describes the assembly to be loaded. Evidence for loading the assembly. - Loads an assembly given its . The assembly is loaded into the domain of the caller using the supplied evidence. + Loads an assembly given its . The assembly is loaded using the supplied evidence. The loaded assembly. method with an parameter, pieces of evidence are merged. Pieces of evidence supplied as an argument to the method supersede pieces of evidence supplied by the loader. -- When you use a method overload with a `Byte[]` parameter to load a common object file format (COFF) image, evidence is inherited from the calling assembly. This applies to the .NET Framework version 1.1 Service Pack 1 (SP1) and subsequent releases. - - > [!NOTE] - > In the .NET Framework version 1.0 and in version 1.1 without SP1, when you use a method overload with a `Byte[]` parameter to load a COFF image, evidence is combined. `Zone`, `Url` and `Site` are inherited from the calling assembly, and `Hash` and `StrongName` are taken from the COFF assembly. +- When you use a method overload with a `Byte[]` parameter to load a common object file format (COFF) image, evidence is inherited from the calling assembly. - When you use a method with a `Byte[]` parameter and to load a COFF image, only the supplied evidence is used. Evidence of the calling assembly and evidence of the COFF image is ignored. - Reflecting on C++ executable files might throw a . This is most likely caused by the C++ compiler stripping the relocation addresses or the `.reloc` section from your executable file. To preserve the `.reloc` address for your C++ executable file, specify `/fixed:no` when you are linking. - > [!NOTE] > If both the property and the property are set, the first attempt to load the assembly uses the display name (including version, culture, and so on, as returned by the property). If the file is not found, is used to search for the assembly. If the assembly is found using , the display name is matched against the assembly. If the match fails, a is thrown. @@ -4389,11 +4325,8 @@ To load the correct assembly, it's recommended to call the `Load` method by pass is not found. - is not a valid assembly. - - -or- - - Version 2.0 or later of the common language runtime is currently loaded and was compiled with a later version. + is not a valid assembly for the currently loaded runtime. + An assembly or module was loaded twice with two different evidences. -or- @@ -4446,7 +4379,7 @@ To load the correct assembly, it's recommended to call the `Load` method by pass The display name of the assembly. Evidence for loading the assembly. - Loads an assembly given its display name, loading the assembly into the domain of the caller using the supplied evidence. + Loads an assembly given its display name and using the supplied evidence. The loaded assembly. method with an parameter, pieces of evidence are merged. Pieces of evidence supplied as an argument to the method supersede pieces of evidence supplied by the loader. -- When you use a method overload with a `Byte[]` parameter to load a common object file format (COFF) image, evidence is inherited from the calling assembly. This applies to the .NET Framework version 1.1 Service Pack 1 (SP1) and subsequent releases. - - > [!NOTE] - > In the .NET Framework version 1.0 and in version 1.1 without SP1, when you use a method overload with a `Byte[]` parameter to load a COFF image, evidence is combined. `Zone`, `Url` and `Site` are inherited from the calling assembly, and `Hash` and `StrongName` are taken from the COFF assembly. +- When you use a method overload with a `Byte[]` parameter to load a common object file format (COFF) image, evidence is inherited from the calling assembly. - When you use a method with a `Byte[]` parameter and to load a COFF image, only the supplied evidence is used. Evidence of the calling assembly and evidence of the COFF image is ignored. - Reflecting on C++ executable files might throw a . This is most likely caused by the C++ compiler stripping the relocation addresses or the `.reloc` section from your executable file. To preserve the `.reloc` address for your C++ executable file, specify `/fixed:no` when you are linking. - If you call this method more than once on the same assembly but with a different evidence specified, the common language runtime does not throw a because the equality and integrity of the different evidence specifications cannot be determined. The evidence that first succeeds is the evidence that is used. In the .NET Framework version 2.0, processor architecture is added to assembly identity, and can be specified as part of assembly name strings. For example, "ProcessorArchitecture=msil". However, the recommended way to specify an assembly name is to create an object and pass it to an appropriate overload of the method. See . @@ -4480,11 +4408,8 @@ To load the correct assembly, it's recommended to call the `Load` method by pass is not found. - is not a valid assembly. - - -or- - - Version 2.0 or later of the common language runtime is currently loaded and was compiled with a later version. + is not a valid assembly for the currently loaded runtime. + A file that was found could not be loaded. -or- @@ -4539,13 +4464,16 @@ To load the correct assembly, it's recommended to call the `Load` method by pass A byte array that is a COFF-based image containing an emitted assembly. A byte array that contains the raw bytes representing the symbols for the assembly. Evidence for loading the assembly. - Loads the assembly with a common object file format (COFF)-based image containing an emitted assembly, optionally including symbols and evidence for the assembly. The assembly is loaded into the application domain of the caller. + Loads the assembly with a common object file format (COFF)-based image containing an emitted assembly, optionally including symbols and evidence for the assembly. The loaded assembly. object in its own isolated load context. + +The assembly is loaded using the supplied evidence. The raw bytes representing the symbols for the assembly are also loaded. Whether certain permissions are granted or not granted to an assembly is based on evidence. The rules for assembly and security evidence merging are as follows: @@ -4553,29 +4481,19 @@ To load the correct assembly, it's recommended to call the `Load` method by pass - When you use a method with an parameter, pieces of evidence are merged. Pieces of evidence supplied as an argument to the method supersede pieces of evidence supplied by the loader. -- When you use a method overload with a `Byte[]` parameter to load a COFF image, evidence is inherited from the calling assembly. This applies to the .NET Framework version 1.1 Service Pack 1 (SP1) and subsequent releases. - - > [!NOTE] - > In the .NET Framework version 1.0 and in version 1.1 without SP1, when you use a method overload with a `Byte[]` parameter to load a COFF image, evidence is combined. `Zone`, `Url` and `Site` are inherited from the calling assembly, and `Hash` and `StrongName` are taken from the COFF assembly. +- When you use a method overload with a `Byte[]` parameter to load a COFF image, evidence is inherited from the calling assembly. - When you use a method with a `Byte[]` parameter and to load a COFF image, only the supplied evidence is used. Evidence of the calling assembly and evidence of the COFF image are ignored. - Reflecting on C++ executable files might throw a . This is most likely caused by the C++ compiler stripping the relocation addresses or the `.reloc` section from your executable file. To preserve the `.reloc` address for your C++ executable file, specify `/fixed:no` when you are linking. - If you call the method more than once on the same assembly but with a different evidence specified, the common language runtime does not throw a because the equality and integrity of the different evidence specifications cannot be determined. The evidence that first succeeds is the evidence that is used. - Note that this method overload always creates a new object with its own mapping. - ]]> is . - is not a valid assembly. - - -or- - - Version 2.0 or later of the common language runtime is currently loaded and was compiled with a later version. + is not a valid assembly for the currently loaded runtime. + An assembly or module was loaded twice with two different evidences. is not . By default, legacy CAS policy is not enabled in the .NET Framework 4; when it is not enabled, must be . @@ -4620,7 +4538,7 @@ To load the correct assembly, it's recommended to call the `Load` method by pass A byte array that is a COFF-based image containing an emitted assembly. A byte array that contains the raw bytes representing the symbols for the assembly. The source of the security context. - Loads the assembly with a common object file format (COFF)-based image containing an emitted assembly, optionally including symbols and specifying the source for the security context. The assembly is loaded into the application domain of the caller. + Loads the assembly with a common object file format (COFF)-based image containing an emitted assembly, optionally including symbols and specifying the source for the security context. The loaded assembly. is . - is not a valid assembly. - - -or- - - was compiled with a later version of the common language runtime than the version that is currently loaded. + is not a valid assembly for the currently loaded runtime. + The value of is not one of the enumeration values. @@ -4724,11 +4639,8 @@ Starting with .NET Framework 4, if `path` specifies an assembly in a remote loca The ability to execute code in remote assemblies is disabled. See <loadFromRemoteSources>. The parameter is an empty string ("") or does not exist. - is not a valid assembly. - - -or- - - Version 2.0 or later of the common language runtime is currently loaded and was compiled with a later version. + is not a valid assembly for the currently loaded runtime. + @@ -4774,7 +4686,7 @@ The ability to execute code in remote assemblies is disabled. See The fully qualified path of the assembly file. Evidence for loading the assembly. - Loads an assembly given its path, loading the assembly into the domain of the caller using the supplied evidence. + Loads an assembly given its path, loading the assembly using the supplied evidence. The loaded assembly. <loadFromRemoteSources>. - is not a valid assembly. - - -or- - - Version 2.0 or later of the common language runtime is currently loaded and was compiled with a later version. + is not a valid assembly for the currently loaded runtime. + is not . By default, legacy CAS policy is not enabled in the .NET Framework 4; when it is not enabled, must be . @@ -4890,7 +4799,7 @@ Starting with .NET Framework 4, the ability to execute code in assemblies loaded > [!NOTE] > 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. - `assemblyFile` may be absolute or relative to the current directory, and the assembly is loaded into the domain of the caller. + `assemblyFile` may be absolute or relative to the current directory. Assemblies can be loaded into one of three contexts, or can be loaded without context: @@ -4922,8 +4831,6 @@ Starting with .NET Framework 4, the ability to execute code in assemblies loaded - If a native image exists for `assemblyFile`, it is not used. The assembly cannot be loaded as domain neutral. -- In the .NET Framework version 1.0 and 1.1, policy is not applied. - ## Examples @@ -4945,11 +4852,8 @@ Starting with .NET Framework 4, the ability to execute code in assemblies loaded The ability to execute code in remote assemblies is disabled. See <loadFromRemoteSources>. - is not a valid assembly; for example, a 32-bit assembly in a 64-bit process. See the exception topic for more information. - - -or- - - Version 2.0 or later of the common language runtime is currently loaded and was compiled with a later version. + is not a valid assembly for the currently loaded runtime; for example, a 32-bit assembly in a 64-bit process. + A codebase that does not start with "file://" was specified without the required . The parameter is an empty string (""). The assembly name exceeds the system-defined maximum length. @@ -5009,7 +4913,7 @@ The ability to execute code in remote assemblies is disabled. See method with no parameter, the assembly is loaded with the evidence that the loader supplies. @@ -5067,11 +4969,8 @@ The ability to execute code in remote assemblies is disabled. See <loadFromRemoteSources>. - is not a valid assembly; for example, a 32-bit assembly in a 64-bit process. See the exception topic for more information. - - -or- - - Version 2.0 or later of the common language runtime is currently loaded and was compiled with a later version. + is not a valid assembly for the currently loaded runtime; for example, a 32-bit assembly in a 64-bit process. + A codebase that does not start with "file://" was specified without the required . The parameter is an empty string (""). The assembly name exceeds the system-defined maximum length. @@ -5151,7 +5050,7 @@ The ability to execute code in remote assemblies is disabled. See <loadFromRemoteSources>. - is not a valid assembly; for example, a 32-bit assembly in a 64-bit process. See the exception topic for more information. - - -or- - - was compiled with a later version of the common language runtime than the version that is currently loaded. + is not a valid assembly for the currently loaded runtime; for example, a 32-bit assembly in a 64-bit process. + A codebase that does not start with "file://" was specified without the required . The parameter is an empty string (""). The assembly name exceeds the system-defined maximum length. @@ -5261,7 +5157,7 @@ The ability to execute code in remote assemblies is disabled. See method with no parameter, the assembly is loaded with the evidence that the loader supplies. @@ -5319,11 +5213,8 @@ The ability to execute code in remote assemblies is disabled. See <loadFromRemoteSources>. - is not a valid assembly; for example, a 32-bit assembly in a 64-bit process. See the exception topic for more information. - - -or- - - Version 2.0 or later of the common language runtime is currently loaded and was compiled with a later version. + is not a valid assembly for the currently loaded runtime; for example, a 32-bit assembly in a 64-bit process. + A codebase that does not start with "file://" was specified without the required . The parameter is an empty string (""). The assembly name exceeds the system-defined maximum length. @@ -5598,11 +5489,8 @@ The ability to execute code in remote assemblies is disabled. See The parameter is . - is not a valid assembly. - - -or- - - Version 2.0 or later of the common language runtime is currently loaded and was compiled with a later version. + is not a valid assembly for the currently loaded runtime. + @@ -5650,7 +5538,7 @@ The ability to execute code in remote assemblies is disabled. See The display name of the assembly. Evidence for loading the assembly. - Loads an assembly from the application directory or from the global assembly cache using a partial name. The assembly is loaded into the domain of the caller using the supplied evidence. + Loads an assembly from the application directory or from the global assembly cache using a partial name. The assembly is loaded using the supplied evidence. The loaded assembly. If is not found, this method returns . An assembly or module was loaded twice with two different sets of evidence. The parameter is . - is not a valid assembly. - - -or- - - Version 2.0 or later of the common language runtime is currently loaded and was compiled with a later version. + is not a valid assembly for the currently loaded runtime. + @@ -6213,11 +6098,8 @@ In .NET 5 and later versions, for bundled assemblies, the value returned is an e is . - is not a valid assembly. - - -or- - - Version 2.0 or later of the common language runtime is currently loaded and was compiled with a later version. + is not a valid assembly for the currently loaded runtime. + cannot be loaded. .NET Core and .NET 5+ only: In all cases. @@ -6288,11 +6170,6 @@ In .NET 5 and later versions, for bundled assemblies, the value returned is an e You cannot execute code from an assembly loaded into the reflection-only context. To execute code, the assembly must be loaded into the execution context as well, using the method. - Whether certain permissions are granted or not granted to an assembly is based on evidence. The rules for assembly and security evidence merging are as follows: - -> [!NOTE] -> Reflecting on executable files compiled in C++ might throw a . This is most likely caused by the C++ compiler stripping the relocation addresses or the .reloc section from your executable file. To preserve the .reloc address, specify `/fixed:no` when you are linking. - The reflection-only context is no different from other contexts. Assemblies that are loaded into the context can be unloaded only by unloading the application domain. ]]> @@ -6306,11 +6183,8 @@ In .NET 5 and later versions, for bundled assemblies, the value returned is an e is found, but cannot be loaded. - is not a valid assembly. - - -or- - - Version 2.0 or later of the common language runtime is currently loaded and was compiled with a later version. + is not a valid assembly for the currently loaded runtime. + .NET Core and .NET 5+ only: In all cases. @@ -6381,7 +6255,7 @@ In .NET 5 and later versions, for bundled assemblies, the value returned is an e The `assemblyFile` parameter must refer to a URI without escape characters. This method supplies escape characters for all invalid characters in the URI. - The path specified for `assemblyFile` is relative to the current directory. The assembly is loaded into the domain of the caller. + The path specified for `assemblyFile` is relative to the current directory. The reflection-only context is no different from other contexts. Assemblies that are loaded into the context can be unloaded only by unloading the application domain. @@ -6394,11 +6268,8 @@ In .NET 5 and later versions, for bundled assemblies, the value returned is an e is found, but could not be loaded. - is not a valid assembly. - - -or- - - Version 2.0 or later of the common language runtime is currently loaded and was compiled with a later version. + is not a valid assembly for the currently loaded runtime. + A codebase that does not start with "file://" was specified without the required . The assembly name exceeds the system-defined maximum length. @@ -6732,11 +6603,8 @@ In .NET 5 and later versions, for bundled assemblies, the value returned is an e is not found, or the module you are trying to load does not specify a filename extension. A file that was found could not be loaded. - is not a valid assembly. - - -or- - - was compiled with a later version of the common language runtime than the version that is currently loaded. + is not a valid assembly for the currently loaded runtime. + A codebase that does not start with "file://" was specified without the required . The parameter is an empty string (""). The assembly name exceeds the system-defined maximum length. diff --git a/xml/System/AppDomain.xml b/xml/System/AppDomain.xml index f85ad4a85c7..5a0749abecd 100644 --- a/xml/System/AppDomain.xml +++ b/xml/System/AppDomain.xml @@ -1532,11 +1532,8 @@ This method overload uses the information from the or is . - is not a valid assembly. - - -or- - - Version 2.0 or later of the common language runtime is currently loaded and was compiled with a later version. + is not a valid assembly for the currently loaded runtime. + An assembly or module was loaded twice with two different evidences. was not found. @@ -1635,11 +1632,8 @@ This method overload uses the information from the or is . - is not a valid assembly. - - -or- - - Version 2.0 or later of the common language runtime is currently loaded and was compiled with a later version. + is not a valid assembly for the currently loaded runtime. + An assembly or module was loaded twice with two different evidences. was not found. @@ -1750,11 +1744,8 @@ This method overload uses the information from the or is . - is not a valid assembly. - - -or- - - was compiled with a later version of the common language runtime than the version that is currently loaded. + is not a valid assembly for the currently loaded runtime. + An assembly or module was loaded twice with two different evidences. was not found. @@ -1845,11 +1836,8 @@ This method overload uses the information from the or is . - is not a valid assembly. - - -or- - - Version 2.0 or later of the common language runtime is currently loaded and was compiled with a later version. + is not a valid assembly for the currently loaded runtime. + An assembly or module was loaded twice with two different evidences. was not found. @@ -1966,11 +1954,8 @@ This method overload uses the information from the The caller does not have permission to call this constructor. The operation is attempted on an unloaded application domain. - is not a valid assembly. - - -or- - - Version 2.0 or later of the common language runtime is currently loaded and was compiled with a later version. + is not a valid assembly for the currently loaded runtime. + An assembly or module was loaded twice with two different evidences. @@ -2072,11 +2057,8 @@ This method overload uses the information from the The caller cannot provide activation attributes for an object that does not inherit from . The operation is attempted on an unloaded application domain. - is not a valid assembly. - - -or- - - Version 2.0 or later of the common language runtime is currently loaded and was compiled with a later version. + is not a valid assembly for the currently loaded runtime. + An assembly or module was loaded twice with two different evidences. @@ -2199,11 +2181,8 @@ This method overload uses the information from the The caller cannot provide activation attributes for an object that does not inherit from . The operation is attempted on an unloaded application domain. - is not a valid assembly. - - -or- - - was compiled with a later version of the common language runtime than the version that is currently loaded. + is not a valid assembly for the currently loaded runtime. + An assembly or module was loaded twice with two different evidences. @@ -2303,11 +2282,8 @@ This method overload uses the information from the The caller cannot provide activation attributes for an object that does not inherit from . The operation is attempted on an unloaded application domain. - is not a valid assembly. - - -or- - - Version 2.0 or later of the common language runtime is currently loaded and was compiled with a later version. + is not a valid assembly for the currently loaded runtime. + An assembly or module was loaded twice with two different evidences. @@ -2437,11 +2413,8 @@ This method overload uses the information from the No parameterless public constructor was found. The caller does not have sufficient permission to call this constructor. - is not a valid assembly. - - -or- - - Version 2.0 or later of the common language runtime is currently loaded and was compiled with a later version. + is not a valid assembly for the currently loaded runtime. + An assembly or module was loaded twice with two different evidences. This instance is . @@ -2545,11 +2518,8 @@ This method overload uses the information from the The caller cannot provide activation attributes for an object that does not inherit from . The operation is attempted on an unloaded application domain. - is not a valid assembly. - - -or- - - Version 2.0 or later of the common language runtime is currently loaded and was compiled with a later version. + is not a valid assembly for the currently loaded runtime. + An assembly or module was loaded twice with two different evidences. This instance is . @@ -2668,11 +2638,8 @@ This method overload uses the information from the No matching public constructor was found. The caller does not have sufficient permission to call this constructor. - is not a valid assembly. - - -or- - - was compiled with a later version of the common language runtime than the version that is currently loaded. + is not a valid assembly for the currently loaded runtime. + An assembly or module was loaded twice with two different evidences. This instance is . @@ -2775,11 +2742,8 @@ This method overload uses the information from the No matching public constructor was found. The caller does not have sufficient permission to call this constructor. - is not a valid assembly. - - -or- - - Version 2.0 or later of the common language runtime is currently loaded and was compiled with a later version. + is not a valid assembly for the currently loaded runtime. + An assembly or module was loaded twice with two different evidences. This instance is . @@ -2879,11 +2843,8 @@ This method overload uses the information from the No parameterless public constructor was found. The caller does not have sufficient permission to call this constructor. - is not a valid assembly. - - -or- - - Version 2.0 or later of the common language runtime is currently loaded and was compiled with a later version. + is not a valid assembly for the currently loaded runtime. + An assembly or module was loaded twice with two different evidences. @@ -2984,11 +2945,8 @@ This method overload uses the information from the No parameterless public constructor was found. The caller does not have sufficient permission to call this constructor. - is not a valid assembly. - - -or- - - Version 2.0 or later of the common language runtime is currently loaded and was compiled with a later version. + is not a valid assembly for the currently loaded runtime. + An assembly or module was loaded twice with two different evidences. @@ -3197,11 +3155,8 @@ This method overload uses the information from the No matching public constructor was found. The caller does not have sufficient permission to call this constructor. - is not a valid assembly. - - -or- - - Version 2.0 or later of the common language runtime is currently loaded and was compiled with a later version. + is not a valid assembly for the currently loaded runtime. + An assembly or module was loaded twice with two different evidences. @@ -4814,11 +4769,8 @@ This method overload uses the information from the is not found. - is not a valid assembly. - - -or- - - Version 2.0 or later of the common language runtime is currently loaded and was compiled with a later version. + is not a valid assembly for the currently loaded runtime. + The operation is attempted on an unloaded application domain. An assembly or module was loaded twice with two different evidences. The specified assembly has no entry point. @@ -4899,11 +4851,8 @@ This method overload uses the information from the is not found. - is not a valid assembly. - - -or- - - Version 2.0 or later of the common language runtime is currently loaded and was compiled with a later version. + is not a valid assembly for the currently loaded runtime. + The operation is attempted on an unloaded application domain. An assembly or module was loaded twice with two different evidences. The specified assembly has no entry point. @@ -4998,11 +4947,8 @@ This method overload uses the information from the is not found. - is not a valid assembly. - - -or- - - was compiled with a later version of the common language runtime than the version that is currently loaded. + is not a valid assembly for the currently loaded runtime. + The operation is attempted on an unloaded application domain. An assembly or module was loaded twice with two different evidences. The specified assembly has no entry point. @@ -5085,11 +5031,8 @@ This method overload uses the information from the is not found. - is not a valid assembly. - - -or- - - Version 2.0 or later of the common language runtime is currently loaded and was compiled with a later version. + is not a valid assembly for the currently loaded runtime. + The operation is attempted on an unloaded application domain. An assembly or module was loaded twice with two different evidences. @@ -5201,11 +5144,8 @@ This method overload uses the information from the is not found. - is not a valid assembly. - - -or- - - was compiled with a later version of the common language runtime than the version that is currently loaded. + is not a valid assembly for the currently loaded runtime. + The operation is attempted on an unloaded application domain. An assembly or module was loaded twice with two different evidences. The specified assembly has no entry point. @@ -5289,11 +5229,8 @@ This method overload uses the information from the is not found. - is not a valid assembly. - - -or- - - Version 2.0 or later of the common language runtime is currently loaded and was compiled with a later version. + is not a valid assembly for the currently loaded runtime. + The operation is attempted on an unloaded application domain. An assembly or module was loaded twice with two different evidences. @@ -5377,11 +5314,7 @@ This method overload uses the information from the is . The assembly specified by is not found. - The assembly specified by is not a valid assembly. - - -or- - - Version 2.0 or later of the common language runtime is currently loaded and was compiled with a later version. + The assembly specified by is not a valid assembly for the currently loaded runtime. The operation is attempted on an unloaded application domain. The assembly specified by was found, but could not be loaded. The specified assembly has no entry point. @@ -5465,11 +5398,7 @@ This method overload uses the information from the The assembly specified by is not found. The assembly specified by was found, but could not be loaded. - The assembly specified by is not a valid assembly. - - -or- - - was compiled with a later version of the common language runtime than the version that is currently loaded. + The assembly specified by is not a valid assembly for the currently loaded runtime. The operation is attempted on an unloaded application domain. The specified assembly has no entry point. @@ -5537,11 +5466,7 @@ This method overload uses the information from the is . The assembly specified by is not found. The assembly specified by was found, but could not be loaded. - The assembly specified by is not a valid assembly. - - -or- - - Version 2.0 or later of the common language runtime is currently loaded and was compiled with a later version. + The assembly specified by is not a valid assembly for the currently loaded runtime.. The operation is attempted on an unloaded application domain. The specified assembly has no entry point. @@ -5625,11 +5550,7 @@ This method overload uses the information from the is . The assembly specified by is not found. The assembly specified by was found, but could not be loaded. - The assembly specified by is not a valid assembly. - - -or- - - was compiled with a later version of the common language runtime than the version that is currently loaded. + The assembly specified by is not a valid assembly for the currently loaded runtime. The operation is attempted on an unloaded application domain. The specified assembly has no entry point. @@ -5704,11 +5625,7 @@ This method overload uses the information from the The assembly specified by is not found. The assembly specified by was found, but could not be loaded. - The assembly specified by is not a valid assembly. - - -or- - - Version 2.0 or later of the common language runtime is currently loaded and was compiled with a later version. + The assembly specified by is not a valid assembly for the currently loaded runtime. The operation is attempted on an unloaded application domain. is not . When legacy CAS policy is not enabled, should be . @@ -5788,11 +5705,7 @@ This method overload uses the information from the is . The assembly specified by is not found. The assembly specified by was found, but could not be loaded. - The assembly specified by is not a valid assembly. - - -or- - - Version 2.0 or later of the common language runtime is currently loaded and was compiled with a later version. + The assembly specified by is not a valid assembly for the currently loaded runtime. The operation is attempted on an unloaded application domain. is not . When legacy CAS policy is not enabled, should be . @@ -6748,13 +6661,9 @@ This method overload uses the information from the method. To load assemblies into other application domains, use a method such as . - For information that is common to all overloads of this method, see the method overload. - + Beginning with the .NET Framework 4, the trust level of an assembly that is loaded by using this method is the same as the trust level of the application domain. ## Examples The following sample demonstrates the use of loading a raw assembly. @@ -6771,11 +6680,8 @@ This method overload uses the information from the is . - is not a valid assembly. - - -or- - - Version 2.0 or later of the common language runtime is currently loaded and was compiled with a later version. + is not a valid assembly for the currently loaded runtime. + The operation is attempted on an unloaded application domain. An assembly or module was loaded twice with two different evidences. @@ -6865,11 +6771,8 @@ This method overload uses the information from the is not found. - is not a valid assembly. - - -or- - - Version 2.0 or later of the common language runtime is currently loaded and was compiled with a later version. + is not a valid assembly for the currently loaded runtime. + The operation is attempted on an unloaded application domain. An assembly or module was loaded twice with two different evidences. @@ -6934,8 +6837,6 @@ This method overload uses the information from the method. To load assemblies into other application domains, use a method such as . - For information that is common to all overloads of this method, see the method overload. ]]> @@ -6945,11 +6846,8 @@ This method overload uses the information from the is not found. - is not a valid assembly. - - -or- - - Version 2.0 or later of the common language runtime is currently loaded and was compiled with a later version. + is not a valid assembly for the currently loaded runtime. + The operation is attempted on an unloaded application domain. An assembly or module was loaded twice with two different evidences. @@ -7028,13 +6926,9 @@ This method overload uses the information from the method. To load assemblies into other application domains, use a method such as . - For information that is common to all overloads of this method, see the method overload. - + Beginning with the .NET Framework 4, the trust level of an assembly that is loaded by using this method is the same as the trust level of the application domain. ## Examples The following sample demonstrates the use of loading a raw assembly. @@ -7051,11 +6945,8 @@ This method overload uses the information from the is . - is not a valid assembly. - - -or- - - Version 2.0 or later of the common language runtime is currently loaded and was compiled with a later version. + is not a valid assembly for the currently loaded runtime. + The operation is attempted on an unloaded application domain. An assembly or module was loaded twice with two different evidences. @@ -7112,8 +7003,6 @@ This method overload uses the information from the method. To load assemblies into other application domains, use a method such as . - For information that is common to all overloads of this method, see the method overload. ]]> @@ -7123,11 +7012,8 @@ This method overload uses the information from the is not found. - is not a valid assembly. - - -or- - - Version 2.0 or later of the common language runtime is currently loaded and was compiled with a later version. + is not a valid assembly for the currently loaded runtime. + The operation is attempted on an unloaded application domain. An assembly or module was loaded twice with two different evidences. @@ -7184,8 +7070,6 @@ This method overload uses the information from the method. To load assemblies into other application domains, use a method such as . - For information that is common to all overloads of this method, see the method overload. ]]> @@ -7195,11 +7079,8 @@ This method overload uses the information from the is not found. - is not a valid assembly. - - -or- - - Version 2.0 or later of the common language runtime is currently loaded and was compiled with a later version. + is not a valid assembly for the currently loaded runtime. + The operation is attempted on an unloaded application domain. An assembly or module was loaded twice with two different evidences. @@ -7258,13 +7139,9 @@ This method overload uses the information from the method. To load assemblies into other application domains, use a method such as . - For information that is common to all overloads of this method, see the method overload. - + Beginning with the .NET Framework 4, the trust level of an assembly that is loaded by using this method is the same as the trust level of the application domain. ## Examples The following sample demonstrates the use of loading a raw assembly. @@ -7281,11 +7158,8 @@ This method overload uses the information from the is . - is not a valid assembly. - - -or- - - Version 2.0 or later of the common language runtime is currently loaded and was compiled with a later version. + is not a valid assembly for the currently loaded runtime. + The operation is attempted on an unloaded application domain. An assembly or module was loaded twice with two different evidences. diff --git a/xml/System/Type.xml b/xml/System/Type.xml index c2f017a9861..f6d15f27788 100644 --- a/xml/System/Type.xml +++ b/xml/System/Type.xml @@ -9074,11 +9074,8 @@ Type.GetType("System.Collections.Generic.Dictionary`2[System.String,[MyType,MyAs Note: In .NET for Windows Store apps or the Portable Class Library, catch the base class exception, , instead. - The assembly or one of its dependencies is not valid. - - -or- - - Version 2.0 or later of the common language runtime is currently loaded, and the assembly was compiled with a later version. + The assembly is not valid for the currently loaded runtime. + @@ -9312,11 +9309,7 @@ Type.GetType("System.Collections.Generic.Dictionary`2[System.String,[MyType,MyAs Note: In .NET for Windows Store apps or the Portable Class Library, catch the base class exception, , instead. - The assembly or one of its dependencies is not valid. - - -or- - - Version 2.0 or later of the common language runtime is currently loaded, and the assembly was compiled with a later version. + The assembly or one of its dependencies is not valid for the currently loaded runtime. @@ -9537,11 +9530,7 @@ Type.GetType("System.Collections.Generic.Dictionary`2[System.String,[MyType,MyAs is and the assembly or one of its dependencies was not found. The assembly or one of its dependencies was found, but could not be loaded. - The assembly or one of its dependencies is not valid. - - -or- - - Version 2.0 or later of the common language runtime is currently loaded, and the assembly was compiled with a later version. + The assembly is not valid for the currently loaded runtime. @@ -9659,11 +9648,7 @@ Type.GetType("System.Collections.Generic.Dictionary`2[System.String,[MyType,MyAs -or- is a valid assembly name without a type name. - The assembly or one of its dependencies is not valid. - - -or- - - The assembly was compiled with a later version of the common language runtime than the version that is currently loaded. + The assembly or one of its dependencies is not valid for the currently loaded runtime. @@ -9796,11 +9781,7 @@ Type.GetType("System.Collections.Generic.Dictionary`2[System.String,[MyType,MyAs is a valid assembly name without a type name. The assembly or one of its dependencies was found, but could not be loaded. - The assembly or one of its dependencies is not valid. - - -or- - - The assembly was compiled with a later version of the common language runtime than the version that is currently loaded. + The assembly or one of its dependencies is not valid for the currently loaded runtime. @@ -9927,11 +9908,7 @@ Type.GetType("System.Collections.Generic.Dictionary`2[System.String,[MyType,MyAs -or- is a valid assembly name without a type name. - The assembly or one of its dependencies is not valid. - - -or- - - The assembly was compiled with a later version of the common language runtime than the version that is currently loaded. + The assembly or one of its dependencies is not a valid assembly for the currently loaded runtime. @@ -16983,11 +16960,7 @@ The following example uses the method to c is and the assembly or one of its dependencies was not found. The assembly or one of its dependencies was found, but could not be loaded. - The assembly or one of its dependencies is not valid. - - -or- - - The assembly was compiled with a later version of the common language runtime than the version that is currently loaded. + The assembly or one of its dependencies is not a valid assembly for the currently loaded runtime. .NET Core and .NET 5+ only: In all cases.