locked
how to get plugin DLL name??? RRS feed

  • Question

  • i have added a watch and get a return of "C:\\USERS\\JOHNSON TAN\\DESKTOP\\MEFSIMPLEDEMO\\PLUGINS\\CALCULATIONSERVICE1.DLL"

    (new System.Collections.Generic.Mscorlib_CollectionDebugView<string>((new System.ComponentModel.Composition.Hosting.DirectoryCatalog.DirectoryCatalogDebuggerProxy(catalog)).LoadedFiles)).Items[0]

    i am new to MEF, my requirement is read the DLL name that my application loaded.

    which means i need to get the 

    CALCULATIONSERVICE1.DLL

    CALCULATIONSERVICE2.DLL

    CALCULATIONSERVICE3.DLL

    to put into a list

    please advice me how to get the CALCULATIONSERVICE1.DLL name? many thanks.

    Friday, December 28, 2012 6:56 AM

Answers

  • Hi,

    I am using

    DirectoryCatalog directoryCatalog = new DirectoryCatalog(_Path);
    
    foreach(string name in directoryCatalog.LoadedFiles)
    {
      // ...
    }

    at initial start to get all DLL names located in _Path by MEF.

    Regards

    Chris

    • Edited by chriga Saturday, December 29, 2012 6:56 PM
    • Marked as answer by Kian Wee Tan Sunday, December 30, 2012 12:34 AM
    Saturday, December 29, 2012 6:56 PM

All replies

  • Hi,

    I am using

    DirectoryCatalog directoryCatalog = new DirectoryCatalog(_Path);
    
    foreach(string name in directoryCatalog.LoadedFiles)
    {
      // ...
    }

    at initial start to get all DLL names located in _Path by MEF.

    Regards

    Chris

    • Edited by chriga Saturday, December 29, 2012 6:56 PM
    • Marked as answer by Kian Wee Tan Sunday, December 30, 2012 12:34 AM
    Saturday, December 29, 2012 6:56 PM
  • thanks chriga my problem is solved :)
    Sunday, December 30, 2012 12:34 AM