help with appdomain and Application.ExecutablePath

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

    #1

    help with appdomain and Application.ExecutablePath

    Hi Everyone,
    I'm having a problem loadin a assembly into memory. Here is the code I'm
    trying to run(Its a C# convert from an article (Search Dynamically for
    Plug-ins):

    Dim domain As AppDomain = AppDomain.Creat eDomain("Plugin Loader")
    Dim finder As PluginFinder =
    CType(domain.Cr eateInstanceFro mAndUnwrap(Appl ication.Executa blePath ,
    "NFDocs.NarcoDo cs.PluginFinder "), NFDocs.NarcoDoc s.PluginFinder)
    Dim FoundPluginType s As ArrayList =
    finder.SearchPa th(Environment. CurrentDirector y)

    I beleive part of my problem is the Application.Exe cutablePath, If I try run
    it in the immediate Window I get the following error:
    'ExecutablePath ' is not a member of 'MyApplication'

    If I try and just run the above as is, I get the followinf error:
    Could not load type 'NFDocs.NarcoDo cs.PluginFinder ' from assembly
    'NarcoDocs, Version=1.0.0.0 , Culture=neutral , PublicKeyToken= null'.
    I've got the followinf imports:
    Imports System
    Imports System.Drawing
    Imports System.Collecti ons
    Imports System.Componen tModel
    Imports System.Windows. Forms
    Imports System.Windows. Forms.Applicati on
    Imports System.Data
    Imports System.Configur ation
    Imports NFDocs.Plugins. NFDocs.Plugins

    Thanks for any help.
    Michael Lee

Working...