- Recently do the project encountered this problem, Goole, Baidu a half-day, finishing the following several possible:
- DLL file name is inconsistent with the DLL file name at load time.
- DLL file does not exist at all, that is, the loss occurs,
- Load DLL path error, dll file exists, but the load path is incorrect
- Assembly version error. I A.dll internal references to the B.dll is version 1.0, and the performance of the B.dll is a 2.0 version, so the Winfrom design interface reported this can not find a dependency error.
- The main reason is that the referenced project. NET version differs from the startup framework. In my project, the original is VS2008 is the. NET3.5 framework, and later upgraded to VS2010, but has not changed the framework, some programs after the upgrade is not a problem, some upgrade after the compilation through, a run on the prompt" failed to load the file or assembly .... ", change to the corresponding VS version of the. NET4.0 can be run!
- 64-bit or 32-bit platform problem, default select any CPU, change X86 or X64 look;
- The main reason is that the referenced project. NET version differs from the startup framework. In my project, the original is VS2008 is the. NET3.5 framework, and later upgraded to VS2010, but has not changed the framework, some programs after the upgrade is not a problem, some upgrade after the compilation through, a run on the prompt" failed to load the file or assembly .... ", change to the corresponding VS version of the. NET4.0 can be run!
C # failed to load a file or assembly