Export (0) Print
Expand All

AssemblyBuilder Class

Defines and represents a dynamic assembly.

For a list of all members of this type, see AssemblyBuilder Members.

System.Object
   System.Reflection.Assembly
      System.Reflection.Emit.AssemblyBuilder

[Visual Basic]
NotInheritable Public Class AssemblyBuilder
   Inherits Assembly
[C#]
public sealed class AssemblyBuilder : Assembly
[C++]
public __gc __sealed class AssemblyBuilder : public Assembly
[JScript]
public class AssemblyBuilder extends Assembly

Thread Safety

Reflection Emit is thread-safe when using assemblies that were created with the AppDomain.DefineDynamicAssembly method with the Boolean parameter isSynchronized set to true.

Remarks

A dynamic assembly is an assembly that is created using the Reflection Emit APIs. The dynamic modules in the assembly are saved when the dynamic assembly is saved using the Save method. To generate an executable, the SetEntryPoint method must be called to identify the method that is the entry point to the assembly. Assemblies are saved as DLL by default, unless SetEntryPoint requests the generation of a console application or a Windows-based application.

If a dynamic assembly contains more than one dynamic module, the assembly's manifest file name should match the module's name that is specified as the first argument to DefineDynamicModule.

Some methods on the base class Assembly such as GetModules and GetLoadedModules will not work correctly when called AssemblyBuilder objects. You can load the defined dynamic assembly and call the methods on the loaded assembly. For example, to ensure that resource modules are included in the returned module list, call GetModules on the loaded Assembly object.The signing of a dynamic assembly using KeyPair is not effective until the assembly is saved to disk. So, strong names will not work with transient dynamic assemblies.

Requirements

Namespace: System.Reflection.Emit

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

Assembly: Mscorlib (in Mscorlib.dll)

.NET Framework Security: 

See Also

AssemblyBuilder Members | System.Reflection.Emit Namespace

Show:
© 2014 Microsoft