Assembly.LoadFrom

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • dbhurt15@gmail.com

    #1

    Assembly.LoadFrom

    Let me say first that I'm brand new to .NET

    I'm having a small issue. I'm working on a large project. My part is
    using a .dll located in another directory. I'm having problems
    referencing to that external dll

    What I'm doing right now is using this on form load:
    Dim Asmpath As String = ("C:\Common\new Lib.dll")
    Dim Asm As System.Reflecti on.Assembly =
    System.Reflecti on.Assembly.Loa dFrom(Asmpath)

    but when I debug i get this exception:

    Could not load file or assembly 'newLib, Version=1.0.0.0 ,
    Culture=neutral , PublicKeyToken= ae2fc87ca760880 d' or one of its
    dependencies. The system cannot find the file specified.

    I know I must be using Assembly.LoadFr om wrong or am leaving something
    else out. Any ideas to help along?
  • Lloyd Sheen

    #2
    Re: Assembly.LoadFr om


    <dbhurt15@gmail .comwrote in message
    news:b8dcf244-6820-47d6-924e-82e27be97aea@e3 9g2000hsf.googl egroups.com...
    Let me say first that I'm brand new to .NET
    >
    I'm having a small issue. I'm working on a large project. My part is
    using a .dll located in another directory. I'm having problems
    referencing to that external dll
    >
    What I'm doing right now is using this on form load:
    Dim Asmpath As String = ("C:\Common\new Lib.dll")
    Dim Asm As System.Reflecti on.Assembly =
    System.Reflecti on.Assembly.Loa dFrom(Asmpath)
    >
    but when I debug i get this exception:
    >
    Could not load file or assembly 'newLib, Version=1.0.0.0 ,
    Culture=neutral , PublicKeyToken= ae2fc87ca760880 d' or one of its
    dependencies. The system cannot find the file specified.
    >
    I know I must be using Assembly.LoadFr om wrong or am leaving something
    else out. Any ideas to help along?
    Why not just add a reference to the dll. It will load a copy any time you
    execute and the dll has changed from your last execution.

    LS

    Comment

    • =?Utf-8?B?RmFtaWx5IFRyZWUgTWlrZQ==?=

      #3
      RE: Assembly.LoadFr om

      It sounds to me like that dll depends on another dll which you don't have in
      your working directory, nor in the common directory.

      "dbhurt15@gmail .com" wrote:
      Let me say first that I'm brand new to .NET
      >
      I'm having a small issue. I'm working on a large project. My part is
      using a .dll located in another directory. I'm having problems
      referencing to that external dll
      >
      What I'm doing right now is using this on form load:
      Dim Asmpath As String = ("C:\Common\new Lib.dll")
      Dim Asm As System.Reflecti on.Assembly =
      System.Reflecti on.Assembly.Loa dFrom(Asmpath)
      >
      but when I debug i get this exception:
      >
      Could not load file or assembly 'newLib, Version=1.0.0.0 ,
      Culture=neutral , PublicKeyToken= ae2fc87ca760880 d' or one of its
      dependencies. The system cannot find the file specified.
      >
      I know I must be using Assembly.LoadFr om wrong or am leaving something
      else out. Any ideas to help along?
      >

      Comment

      • Mike Williams

        #4
        Re: Assembly.LoadFr om

        "Lloyd Sheen" <a@b.cwrote in message
        news:ep8Du8vpIH A.4476@TK2MSFTN GP04.phx.gbl...

        I don't know whether anyone from Microsoft regularly reads the Visual Basic
        groups but if they do then I am very surprised that they permit one of their
        own MVPs to engage in such outrageous long term trolling activities in one
        of their own public newsgroups, such as the activity that the person who
        purports to be Bill McCarthy has engaged in on the
        microsoft.publi c.vb.general.di scussion group for many months. If this man
        belongs to you:



        .. . . then perhaps you might like to look at his activity in that group.
        Here for example is one of his very latest offerings:

        "Bill McCarthy" <Bill@N0SPAM.co mwrote in message
        news:19A5DEEA-ED6A-4721-9DB9-9F5D8509D825@mi crosoft.com...
        Yeh, still a way to go. I think given the warm reaction today,
        and given some folks have learning difficulties around here
        (obviously why they are still *stuck* in VB6 *only*), might
        just have to ramp things up a notch or two, and make it more
        toasty :D


        Comment

        Working...