.Net (C#) Dynamic class loading question

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • db404

    #1

    .Net (C#) Dynamic class loading question

    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(na me) 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.
  • Mattias Sjögren

    #2
    Re: .Net (C#) Dynamic class loading question

    [color=blue]
    >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.[/color]

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



    Mattias

    --
    Mattias Sjögren [MVP] mattias @ mvps.org

    Please reply only to the newsgroup.

    Comment

    Working...