how to locate & load 3rd party private assemblies at run time?

Discussion in 'ASP .Net' started by Terry McKiernan, Jul 7, 2003.

  1. I'm writing an add-on to a 3rd party commercial application. This other app
    has a bunch of private assemblies -- nothing in the GAC, all private -- and
    to interact with the app I need to use various objects in these assemblies.
    That's how this other app's SDK works.

    The problem is, I don't know in advance where the other app is installed.
    It has a regular setup wizard so the end user can choose an installation
    directory. My add-on application is to be distributed via the web, not
    installed and configured by hand. So I can't assume any particular location
    for the 3rd party app's DLLs, and I am not going to be around to tweak the
    ..config file for my add-on app by hand each time. It needs to handle things
    dynamically. Else, I get the dreaded System.IO.FileNotFoundException.

    I can look in the registry and get the installation path for the 3rd party
    app, and thus find its DLLs. But what do I do next? I've tried loading
    these assemblies using Assembly.LoadFrom(), but I'm not sure what to do
    afterwards -- how do I then create objects, call methods etc? I also read
    some advice saying I should create a new AppDomainSetup and set the
    ApplicationBase path to be the path to the 3rd party app, but I'm still not
    clear what to do after that and then I won't be able to load my own app's
    private assemblies.

    Seems like this is a common enough problem and there should be an easy
    solution, but I can't find it. Can anyone tell me the trick? How do you
    locate, load and USE private assemblies where you do not know their location
    in advance but can discover them at run time? Thanks!

    --

    Terry

    Terry McKiernan
    pinpoint tools

    www.pinpointtools.com
    Terry McKiernan, Jul 7, 2003
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. BestNews

    Any 3rd party Grid control in dotnet

    BestNews, Aug 26, 2003, in forum: ASP .Net
    Replies:
    4
    Views:
    5,163
    Robert Jacobson
    Aug 26, 2003
  2. Matalote
    Replies:
    2
    Views:
    442
    Matalote
    Jan 26, 2004
  3. Manoj Paramu Das
    Replies:
    2
    Views:
    482
    Nick Harris
    May 6, 2004
  4. Alvin Bruney

    Re: Locate assemblies in ASP.NET

    Alvin Bruney, Jul 18, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    359
    Alvin Bruney
    Jul 18, 2003
  5. =?Utf-8?B?Sm9obi5ORVQ=?=

    Run 3rd party app as specified user

    =?Utf-8?B?Sm9obi5ORVQ=?=, Jul 11, 2006, in forum: ASP .Net
    Replies:
    0
    Views:
    351
    =?Utf-8?B?Sm9obi5ORVQ=?=
    Jul 11, 2006
Loading...

Share This Page