You must Sign In to post a response.
  • Category: .NET

    How to retrieve the assembly object for externally referenced project DLLs?

    I have a solution which contains:
    1) 1 class libarary project( ClassLibraryOne)
    2)one console application (AppOne)

    in the console application i have a reference of ClassLibraryOne added in the project AppOne.What i want is to retrieve the names of all the public classes in ClassLibraryOne in the main function of AppOne.
    I think this can be achieved by using Reflections.I have tried using AppDomain.CurrentDomain.GetAssemblies() but it didn't work. Please suggest.
  • #763350
    You can try to get the assembly details using

    System.Reflection.Assembly myAssembly = System.Reflection.Assembly.LoadFile("C:\\Projects\\bin\\\DataModels.dll");

    By Nathan
    Direction is important than speed

  • #763362
    Hello Tarun,

    You can get it by using System.Reflection namespace.

    System.Reflection.Assembly assembly = System.Reflection.Assembly.LoadFrom(@"\bin\Debug\Cricketers.dll");

    Hope this will help you.

    Regards,
    Nirav Lalan
    DNS Gold Member
    "Failure is the path of least persistence"


Sign In to post your comments