Skip to main content
Home Forums Silverlight Programming Programming with .NET - General How to use emit technology to create an assembly that can load by Silverlight?
7 replies. Latest Post by harishbhattbhatt on June 18, 2009.
(0)
timiil
Member
7 points
11 Posts
06-17-2009 2:39 AM |
Hello all, i am looking for a such solution, use .NET reflection/emit technology to create an assembly, not same with the common .NET platform , but compatible with Silverlight , so we can use System.Reflection.Assembly.Load(byte[] rawAsm) method to load this assembly in Silverlight and call its type and member. Thanks for any help.
silverbyte
Participant
1338 points
405 Posts
06-17-2009 3:00 AM |
Hi,
I am not sure it's possible. It depends what you want to put in the assembly. Is it code or resources?
Can you explain a bit your scenario?
06-17-2009 3:08 AM |
Hi, i am just want to put some very simple POCO like entity code in this assembly , something like that : public class Product { public int ID { get; set; } public string Name { get; set; } //... } Of course we can not add something that don't supported in Silverlight :)
06-17-2009 3:12 AM |
Have you tried to do it using examples for the full .NET framework?
mehroz
409 points
88 Posts
06-17-2009 7:24 AM |
See an example from Allen Chen – MSFT in this thread.
Regards,
06-17-2009 9:56 AM |
Hi , Thanks for your information. But the problem is still very confuse to us , we can produce this assembly in Silverlight , but we don't know how to create one in common .NET platform (for example : Winform or ASP.NET) that is compatible with Silverlight...
06-18-2009 5:43 AM |
I am not sure you can and you don't need actually.
Where do you need to use the created dynamic assembly?
Is it in Silvelright or on desktop app (Winform) or in ASP.NET ?
harishbh...
16 points
5 Posts
06-18-2009 9:46 AM |
I am not sure but you can also try codedom technology to generate assembly...in my case i have developed a class and not an assembly, if required i can provide you that code