-1

I am trying to compile a project (NBIS.Net 5.0.0) into a .dll so I can add it as reference in another .NET C# project (VS 2013). Everything works fine, my program runs and uses functions from the referenced library. This is on the dev machine (win7 x64) as well as on a target machine (win7 x64).

But when I try to run it on a Surface Pro 4 with Windows 10, my Application crashes as soon as it starts using a function of that particualr assembly. Is there any setting that I need to change when I compile the assembly with VS? Or are there runtimes missing on the Windows 10 target machine that are present on a Windows 7 machine? Thank you!

  • possible reasons include the two you mentioned, and probably 100 more. do you have a crashdump available, or can you attach a remote debuger to the release environment? – Cee McSharpface Sep 26 '16 at 08:16
  • Put try/catch around that particular call and read the exception. You may be missing VS redistributables. – JeffRSon Sep 26 '16 at 08:19
  • I attached a remote debugger on the process and was able to get the `System.IO.FileNotFoundException`: "Could not load file or assembly 'NBIS.dll' or one of its dependencies. The specified module could not be found: NBIS.dll" This .dll exists in the same folder as the exe AND also in a path that is in the PATH environment variable. How can I find out what dependency it its that it can not find? Thanks! – biolightning Sep 26 '16 at 12:25
  • It's probably VCredist. Have a look here: http://stackoverflow.com/questions/7378959/how-to-check-for-dll-dependency/28304716#28304716 – JeffRSon Sep 28 '16 at 13:36
  • I did not install the Visual C++ 2010 Redistributable Package. That was the trouble... – biolightning Sep 28 '16 at 14:14

1 Answers1

-1

To troubleshoot this kind of problem, you can use Fusion. It's .NET's assembly binding logging tool.

Scott Hanselman has a Blog Post on using it and related tools.

MarioDS
  • 12,895
  • 15
  • 65
  • 121