.Net (C#) Dynamic class loading question

D

db404

I am working on a web framework, in C# wich will then be
used as part of a web app.

The web app will reference the Framework at design time,
which in turn will (or is supposed to) dynamically create
classes defined in the webapp assembly based on a config
file.

Here's the problem: while the Framework assembly can
create classes with Type.GetType(name) etc. from within
it's own Assembly, it cannot create classes from the
webapp assembly (even though it is being called from
there). While I could just load the webapp assembly I'd
have to know it's name, which I can't figure out how to
find out from within the Framework assembly - obviously
coding it is out as the framework isn't supposed to care
what webapp is using it.

I come from a Java background and this would work there
assuming a correctly set CLASSPATH (with Class.forName).
Is there some equivalent in .Net

Thanks in advance.
 
M

Mattias Sjögren

The web app will reference the Framework at design time,
which in turn will (or is supposed to) dynamically create
classes defined in the webapp assembly based on a config
file.

Can't you write the assembly name to the config file too?



Mattias
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top