Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. renaming .dll file gives error message

renaming .dll file gives error message

Scheduled Pinned Locked Moved C#
csharphelpannouncement
8 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    pavya_Cool
    wrote on last edited by
    #1

    Hi All, I wrote code for class assembly named FTPUtility.dll using C#. After that i just rename that FTPUtility.dll file and used it in my application as reference. but it gives the error message "Could not load file or assembly 'FTPUtility, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified." Anybody can tell me why this error occured.

    Pravin

    V V 0 3 Replies Last reply
    0
    • P pavya_Cool

      Hi All, I wrote code for class assembly named FTPUtility.dll using C#. After that i just rename that FTPUtility.dll file and used it in my application as reference. but it gives the error message "Could not load file or assembly 'FTPUtility, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified." Anybody can tell me why this error occured.

      Pravin

      V Offline
      V Offline
      Vasudevan Deepak Kumar
      wrote on last edited by
      #2

      Is the error observed in Visual Studio Build Output window?

      Vasudevan Deepak Kumar Personal Homepage
      Tech Gossips
      All the world's a stage, And all the men and women merely players. They have their exits and their entrances; And one man in his time plays many parts... --William Shakespeare

      P 1 Reply Last reply
      0
      • V Vasudevan Deepak Kumar

        Is the error observed in Visual Studio Build Output window?

        Vasudevan Deepak Kumar Personal Homepage
        Tech Gossips
        All the world's a stage, And all the men and women merely players. They have their exits and their entrances; And one man in his time plays many parts... --William Shakespeare

        P Offline
        P Offline
        pavya_Cool
        wrote on last edited by
        #3

        no, error does not appear in Build output window. it occures at the runtime

        Pravin

        1 Reply Last reply
        0
        • P pavya_Cool

          Hi All, I wrote code for class assembly named FTPUtility.dll using C#. After that i just rename that FTPUtility.dll file and used it in my application as reference. but it gives the error message "Could not load file or assembly 'FTPUtility, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified." Anybody can tell me why this error occured.

          Pravin

          V Offline
          V Offline
          Vikram A Punathambekar
          wrote on last edited by
          #4

          Are you renaming after adding as a reference and building? It will naturally fail then. Why are you renaming the DLL?

          Cheers, Vikram.


          The hands that help are holier than the lips that pray.

          P 1 Reply Last reply
          0
          • V Vikram A Punathambekar

            Are you renaming after adding as a reference and building? It will naturally fail then. Why are you renaming the DLL?

            Cheers, Vikram.


            The hands that help are holier than the lips that pray.

            P Offline
            P Offline
            pavya_Cool
            wrote on last edited by
            #5

            No, first i rename that dll file and after that i have added it as reference. It compiles fine. but shows FileNotFound exception at run time. error message is as follows.... "Could not load file or assembly 'FTPUtility, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified."

            Pravin

            1 Reply Last reply
            0
            • P pavya_Cool

              Hi All, I wrote code for class assembly named FTPUtility.dll using C#. After that i just rename that FTPUtility.dll file and used it in my application as reference. but it gives the error message "Could not load file or assembly 'FTPUtility, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified." Anybody can tell me why this error occured.

              Pravin

              0 Offline
              0 Offline
              0x3c0
              wrote on last edited by
              #6

              You need to remove the reference to FTPUtility and add it again

              P 1 Reply Last reply
              0
              • 0 0x3c0

                You need to remove the reference to FTPUtility and add it again

                P Offline
                P Offline
                pavya_Cool
                wrote on last edited by
                #7

                i did that

                Pravin

                0 1 Reply Last reply
                0
                • P pavya_Cool

                  i did that

                  Pravin

                  0 Offline
                  0 Offline
                  0x3c0
                  wrote on last edited by
                  #8

                  The .Net framework doesn't like it when you rename a file without changing the assembly metadata so that the two correspond. That's what is causing the error. To fix it, go into the project properties of FTPUtility and change the assembly name field to the new filename. Then rebuild the project and replace the DLL file

                  1 Reply Last reply
                  0
                  Reply
                  • Reply as topic
                  Log in to reply
                  • Oldest to Newest
                  • Newest to Oldest
                  • Most Votes


                  • Login

                  • Don't have an account? Register

                  • Login or register to search.
                  • First post
                    Last post
                  0
                  • Categories
                  • Recent
                  • Tags
                  • Popular
                  • World
                  • Users
                  • Groups