DllImport generates System.DllNotFoundException
问题 I’m having some difficulties while trying to consume an unmanaged-code dll from my application (written in C# framework 4.0). I’m using the dll import as follows [DllImport(@"C:\MGW_SDK.dll", EntryPoint = "fInicializaSDK")] public static extern int fInicializaSDK(); The weird thing is that when called from my development environment (Windows XP) it works just fine, but when on the production server (Windows7) it generates the following exception: System.DllNotFoundException : Unable to load