My program uses functions from my C ++ / CLI library. The dll is always in the same folder as exe's. The program runs without problems on ~ 20 different computers (OS from Win7 to 10). But yesterday, installing the program on a computer with Win7, caught such an exception when trying to use the dll functionality:
System.IO.FileNotFoundException: Could not load the file or assembly 'MyDllName.dll' or one of its dependencies. The specified module could not be found.
At first I thought that there were not enough dependencies on the dll. Checked by Dependensy Walker'om-all dependent dll in place. And if you delete the library from the program folder, you will get a slightly different error:
System.IO.FileNotFoundException: Could not load or assembly 'MyDllName, Version = 0.0.0.0, Culture = neutral, PublicKeyToken = null' or one of its dependencies. Cannot find the specified file.
How to fix this error? well, or at least in which direction to dig?
PS: I tried to reproduce the error on the virtual machine: I installed the same OS, .Net. Created a user with minimal permissions. I started the program, all the rules.