組裝每當我在我的應用程序在該DLL它給了我下面的錯誤bin文件夾和訪問添加新的DLL:無法加載文件或程序集「mydllfile.dll」或其某個依賴項。該模塊應包含清單
Could not load file or assembly '~\bin\mydll.dll' or one of its dependencies. The module was expected to contain an assembly manifest.
是什麼原因導致這個問題,我該如何解決?
組裝每當我在我的應用程序在該DLL它給了我下面的錯誤bin文件夾和訪問添加新的DLL:無法加載文件或程序集「mydllfile.dll」或其某個依賴項。該模塊應包含清單
Could not load file or assembly '~\bin\mydll.dll' or one of its dependencies. The module was expected to contain an assembly manifest.
是什麼原因導致這個問題,我該如何解決?
您使用的.dll是否包含本地代碼?如果是的話,這個答案可能會有所幫助https://stackoverflow.com/a/11343920/771034
你可以使用Dependency Walker Tool - 它顯示你的依賴庫缺少什麼。
如果缺少的庫是MFC或任何Visual C++運行時,則安裝Microsoft可再發行組件包(它應該來自您正在構建DLL的同一Visual Studio)。
此外,您可以設置靜態鏈接到MFC或VC++運行時庫。在這種情況下,您不需要將Visual C++運行庫放入設置中
This configure in project settings C/C++ -> Code Generation node - use MT for Release and MTd for Debug
MFC運行時在常規項目選項卡上配置。