Could not load file or assembly 'Interop.IWshRuntimeLibrary'

Unanswered Could not load file or assembly 'Interop.IWshRuntimeLibrary'

  • Tuesday, June 22, 2010 4:22 PM
     
     
    I'm using this library to create shortcuts in a custom action. In the reference, copy local is true. I get this error when I try to install on other computers. Any idea why this would happen? Building on Windows 7, error happens on both Windows 7 and XP. I notice that the file isn't in the Install folder of the target directory when the error happens, but I don't know why because copy local is set to true.

All Replies

  • Tuesday, June 22, 2010 4:58 PM
    Moderator
     
     
    Copy local is nothing to do with setup projects. If you want to install that assembly on the client system you must add it to the File System view (in whatever folder is needed) in the setup project.
    Phil Wilson
    • Marked As Answer by ScottyDoesKnow Tuesday, June 22, 2010 6:50 PM
    • Unmarked As Answer by ScottyDoesKnow Wednesday, July 14, 2010 12:15 PM
    •  
  • Tuesday, June 22, 2010 5:21 PM
     
     
    OK it detects all of the other libraries in the custom action project in Detected Dependencies but not this one, and when you go to add assembly it doesn't list COM libraries.
  • Tuesday, June 22, 2010 5:22 PM
     
     
    And I have output from the custom action project in the setup, so shouldn't copy local copy it to the file system?
  • Tuesday, June 22, 2010 6:50 PM
     
     
    Strange that it doesn't do it automatically, but manually adding the dll file to the Install folder of the user's application folder worked. Thanks Phil.
  • Wednesday, July 14, 2010 12:16 PM
     
     
    OK the problem just came up again. The library is added to the setup project, it's in the File System viewer in the Install folder (it's used in a custom install action), and while trying to install to a 32 bit Vista machine it gave the same error saying it couldn't find the file.
  • Wednesday, July 14, 2010 4:17 PM
    Moderator
     
     

    Is this an assembly being installed into the GAC?


    Phil Wilson
  • Wednesday, July 14, 2010 6:16 PM
     
     
    I'll say no, because I don't know how to do that. I just added it to the setup project and put it in the file system viewer in the Install folder.
  • Thursday, July 15, 2010 12:59 PM
     
     
    Oh and it only screws up on Vista, XP and 7 work fine.
  • Monday, July 19, 2010 5:22 PM
     
     
    Anybody have any clue what's wrong?
  • Friday, June 24, 2011 8:51 AM
     
     
    In the PrimaryOutput of the Application folder of your setup project add Interop.IwshRuntimeLibrary.dll. Then rebuild your setup project and try running the setup.exe. this worked in my case.. hope this solution helps you too.. 
    Sameer G
  • Tuesday, August 23, 2011 1:13 PM
     
     

    sameer,

    Application folder means exactly folder? I tried copying the same DLL in %AppData% folder but didn't work ... I am using installshield to create the setup project. Are you suggesting to copy the Interop.IwshRuntimeLibrary.dll include with my setup binaries? please help me