U
uberfan
I keep getting the same exception ("The type
System.Reflection.Emit.AssemblyBuilder in Assembly mscorlib,
Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 is
not marked as serializable.") when I try create a dynamicassembly from
a new appdomain. I works when I use the current domain but since I need
to unload these assemblies after I use them, I need them to be in their
own appdomain.
Could someone please help me out with this.. It's been driving nuts for
a few days now. Is it a bug in the 1.1?
thanks
private AssemblyBuilder MakeAssemblyBuilder()
{
// Build a dynamic assembly using Reflection Emit API.
AppDomain dynamicAppDomain =null;
AssemblyBuilder dynamicAsm = null;
AssemblyName assemblyName = new AssemblyName();
assemblyName.Name = "MyDynamicAssembly";
dynamicAppDomain =
AppDomain.CreateDomain(System.Guid.NewGuid().ToString());
dynamicAsm = m_dynamicAppDomain.DefineDynamicAssembly(assemblyName,
AssemblyBuilderAccess.Run);
}
System.Reflection.Emit.AssemblyBuilder in Assembly mscorlib,
Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 is
not marked as serializable.") when I try create a dynamicassembly from
a new appdomain. I works when I use the current domain but since I need
to unload these assemblies after I use them, I need them to be in their
own appdomain.
Could someone please help me out with this.. It's been driving nuts for
a few days now. Is it a bug in the 1.1?
thanks
private AssemblyBuilder MakeAssemblyBuilder()
{
// Build a dynamic assembly using Reflection Emit API.
AppDomain dynamicAppDomain =null;
AssemblyBuilder dynamicAsm = null;
AssemblyName assemblyName = new AssemblyName();
assemblyName.Name = "MyDynamicAssembly";
dynamicAppDomain =
AppDomain.CreateDomain(System.Guid.NewGuid().ToString());
dynamicAsm = m_dynamicAppDomain.DefineDynamicAssembly(assemblyName,
AssemblyBuilderAccess.Run);
}