Application written in C # and dll in C ++ / CLI. dll is connected to a project in C # via references. In the code methods of the classes declared in dll are called. Everything works on my computer. On the same colleagues computer (everyone has approximately the same config: x64 Core i3-i5 Win8.1-10) And on a remote machine (Atom 1.5 Win7 sp1 x86) writes

Could not load file or assembly "WinPrint.dll" or one of their dependencies. The specified module could not be found.

The dll file is in the folder with the exe. In the properties of the project for this dll is "copy locally." All projects are compiled under x86. VisualStudio 2015

And what, I run regsvr32 on my computer and regain the dll-sees, but says that the wrong format (which is correct) and on the remote machine writes

The specified module could not be found.

Why is this happening and how to fix it?

    1 answer 1

    Possible reasons:

    1) Different bit ОС and build configuration.

    2) Dependencies of the .dll , I had something similar, there was no dependency, but p\invoke .NET-а damned the error message that it did not see the plugin .dll , and not its dependency. I advise you to check the dependencies of the native .dll utility Dependency Walker on a remote PC.

    • regsvr32 does not see the dll From the word at all ... If it were for the wrong bitness or if there wasn’t enough dependence which it would curse appropriately or simply say that it is unformat. And he writes that there is none, although she is exactly the way I give him - Alexey
    • @Alexey, you should understand that there is no magic. In my case, regsvr32 was silent. - Alexis
    • @Alexey, add more - re-read your question, quoting: "Could not load the file or assembly" WinPrint.dll "or одну из их зависимостей . The specified module was not found" - Alexis
    • Created test dll at which one method returning false. Dependencies 0. I installed C ++ 2015 Redistributable (x86) on the target computer and ... nothing has changed. - Alexey
    • 2
      So yes, in vain, I did not immediately listen to the advice about Dependency Walker ... Even an empty project pulls a dependency in the form of VCRUNTIME140D.dll which is only on computers with an installed studio .... In principle, the problem is localized. Now you need to decide how to get rid of it ... - Alexey