Click here to Skip to main content
15,899,679 members
Home / Discussions / C#
   

C#

 
GeneralRe: Strange problem in property grid when using custom TypeConverter Pin
cueshot30-Mar-07 11:57
cueshot30-Mar-07 11:57 
QuestionRe: Strange problem in property grid when using custom TypeConverter Pin
cueshot30-Mar-07 15:20
cueshot30-Mar-07 15:20 
AnswerRe: Strange problem in property grid when using custom TypeConverter Pin
cueshot5-Apr-07 13:35
cueshot5-Apr-07 13:35 
QuestionRe: Strange problem in property grid when using custom TypeConverter Pin
cueshot5-Apr-07 13:57
cueshot5-Apr-07 13:57 
QuestionVs 2005 Addin Question Pin
Jason McBurney27-Mar-07 11:57
Jason McBurney27-Mar-07 11:57 
QuestionSaving changes to a dataGridView - colour rows Pin
steve_rm27-Mar-07 11:36
steve_rm27-Mar-07 11:36 
AnswerRe: Saving changes to a dataGridView - colour rows Pin
joon vh.28-Mar-07 4:08
joon vh.28-Mar-07 4:08 
QuestionIs is possible to Serialise a Dynamically created assembly? Pin
Trevor T27-Mar-07 11:07
Trevor T27-Mar-07 11:07 
Hi all,

I want to do the following:
Provide an App Server that, amongst other things, creates a set of dyamically generated classes.
Allow a client app (that I develop) to connect to the App Server and retrieve, via a Remoting call, the server's dynamically created Assembly so that the client app can use the classes that the server Dynamically created (via Relection of course).

I've completed the dynamic code generation of a working set of classes within an 'in memory' dynamically compiled Assembly. What I need to know is how to 'serialise' the assembly back to the client in a manner that allows the client to use the classes in that assembly.

The 'Assembly' class is Serializable, so I've tried providing the obvious server side remoting method:

// In the server:
public class ServerClass : MarshalByRefObject
{
public Assembly GetDynamicAssembly()
{
// Return the assembly containing all my dynamically created classes).
return myDynamicallyGeneratedAssembly;
}
}
// In the client:
ServerClass RemoteServerClass = (create Remoted Server Reference);
Assembly dynamicAssembly = RemoteServerClass.GetDynamicAssembly();

The above call to GetDynamicAssembly() fails with an error along the lines of:

"Could not load file or assembly 'd9ee95f9, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified."

The 'd9ee95f9' is obviouly the randomly created assembly name for the dynamic assembly and changes each time I try it.

Is it possible to do what I want, and if so how?

Trevor

Questionread image from picture box Pin
iman_kh27-Mar-07 10:53
iman_kh27-Mar-07 10:53 
AnswerRe: read image from picture box Pin
art_coding27-Mar-07 11:37
art_coding27-Mar-07 11:37 
QuestionAcceptchange() in data set Pin
iman_kh27-Mar-07 10:51
iman_kh27-Mar-07 10:51 
QuestionProvider model Pin
netJP12L27-Mar-07 10:24
netJP12L27-Mar-07 10:24 
QuestionC# network transfer stream problem Pin
art_coding27-Mar-07 10:19
art_coding27-Mar-07 10:19 
QuestionClass "Child" MUST NOT call "Euthanize" on class "Dog" Pin
Edmundisme27-Mar-07 9:54
Edmundisme27-Mar-07 9:54 
AnswerRe: Class "Child" MUST NOT call "Euthanize" on class "Dog" Pin
Dave Kreskowiak27-Mar-07 10:11
mveDave Kreskowiak27-Mar-07 10:11 
GeneralRe: Class "Child" MUST NOT call "Euthanize" on class "Dog" Pin
Austin Harris27-Mar-07 10:25
Austin Harris27-Mar-07 10:25 
GeneralRe: Class "Child" MUST NOT call "Euthanize" on class "Dog" Pin
Dave Kreskowiak27-Mar-07 12:43
mveDave Kreskowiak27-Mar-07 12:43 
GeneralRe: Class "Child" MUST NOT call "Euthanize" on class "Dog" Pin
Leslie Sanford27-Mar-07 10:26
Leslie Sanford27-Mar-07 10:26 
GeneralRe: Class "Child" MUST NOT call "Euthanize" on class "Dog" Pin
Edmundisme27-Mar-07 10:27
Edmundisme27-Mar-07 10:27 
AnswerRe: Class "Child" MUST NOT call "Euthanize" on class "Dog" Pin
Leslie Sanford27-Mar-07 10:22
Leslie Sanford27-Mar-07 10:22 
GeneralRe: Class "Child" MUST NOT call "Euthanize" on class "Dog" Pin
Edmundisme27-Mar-07 10:36
Edmundisme27-Mar-07 10:36 
GeneralRe: Class "Child" MUST NOT call "Euthanize" on class "Dog" Pin
Leslie Sanford27-Mar-07 10:47
Leslie Sanford27-Mar-07 10:47 
GeneralRe: Class "Child" MUST NOT call "Euthanize" on class "Dog" Pin
Edmundisme27-Mar-07 11:49
Edmundisme27-Mar-07 11:49 
GeneralRe: Class "Child" MUST NOT call "Euthanize" on class "Dog" Pin
led mike28-Mar-07 5:21
led mike28-Mar-07 5:21 
GeneralRe: Class "Child" MUST NOT call "Euthanize" on class "Dog" Pin
Edmundisme28-Mar-07 6:15
Edmundisme28-Mar-07 6:15 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.