1

I have built a program using Visual studio 2013 in visual basic. I am using a set of DLLs to communicate to some external hardware. The computer I developed the software on is a Win7 64bit machine and I can compile and run the software with no hiccups on it. I also have another computer (Surface Pro 3 64bit) that I use to test my software on and that works as well. Basically I just locate the debug directory of the development computer and copy the EXE and support DLLs to the new computer and run the EXE. This all works with my surface pro 3 computer.

My company purchased some other surface pro 3 computers for our production department and I am trying to get the software running on those as well. I do the same thing. Grab the EXE and support DLLs from the debug directory of the development computer. Except on these computers when I run the software program it tells me it can't find the DLL for the program. The DLL is sitting right in the application's folder, yet it says it can't find it.

I have tried multiple things, like publishing the software and including the DLLs in the installation, then running the installation on the "problem" computers. This still doesn't work. Same issue, it can't find the DLL.

CDspace
  • 2,639
  • 18
  • 30
  • 36
  • I would recommend that instead of copy from debug folder, copy the final result from bin folder. How do you copy the application? Are you executing using a link? Wich dll? Tell us more details about the error – McNets Jan 20 '17 at 22:49
  • What is the bitness of the OS on the 3 machines? Are 64bit or 32bit? Also please tell us exactly the error message received – Steve Jan 20 '17 at 22:49
  • The error just says that it can't load the DLL and the specified DLL can't be found. 0x8007007E. – OptoHeisler Jan 21 '17 at 00:22
  • Sorry, also, I noticed that it works on computers that have visual studio installed on them, but other computers that don't have visual studio installed get the error message. – OptoHeisler Jan 21 '17 at 00:24
  • To copy the application I am copying all files in the debug directory, which includes the dlls, application and other application outputs. – OptoHeisler Jan 21 '17 at 00:26

2 Answers2

0

This could be a number of things:

  1. Incorrect version of .NET - do the new computers have the target version of .NET installed on them?
  2. A required DLL is not being found, you should enable assembly bind failure logging and try again - How to enable assembly bind failure logging (Fusion) in .NET
Community
  • 1
  • 1
CCBlackburn
  • 1,704
  • 1
  • 12
  • 23
  • CCBlackburn the target units have the proper .NET framework. I enabled assembly bind logging in fusion and did not see any errors at all when I run the software that are logged by fusion. I still however get the error that the software cannot find the DLL for the software even though it is still in the applications directory. – OptoHeisler Jan 23 '17 at 23:14
  • Ok, another thing to try, run up Sysinternals Procmon - https://live.sysinternals.com/Procmon.exe and filter it for the name of the DLL. This should show where the system is searching for the DLL, this might give you a clue as to what's going on – CCBlackburn Jan 24 '17 at 21:08
0

So it turns out that the DLL I was referencing requires the VC++ redistributable packages to be installed on the computer. I downloaded and installed these on all of the problem computers and now the software recognizes the DLL and run.