2012-05-09 20 views
2

組件我們做了圓滑地跑了.NET應用程序,但是當我們試圖執行另一臺機器上的.exe文件時遇到錯誤無法加載文件或程序集'applicationname'或其某個依賴項。該模塊應包含清單

The application was unable to start correctly(oxcOOOOO7b)

我們試圖重建可視化解決方案演播室2010但遇到錯誤:

Could not load file or assembly 'crawler' or one of its dependencies.
The module was expected to contain an assembly manifest.

可能是什麼原因?這可能是因爲沒有.net framework 3.5?我們在Windows 7上安裝了.NET Framework 4.0和3.0。

+1

我面臨同樣的問題! – sbose

+0

[嘗試運行項目時出現錯誤:該模塊應包含程序集清單]可能的重複項(http://stackoverflow.com/questions/12135925/error-while-trying-to-run-projectthe-module-was -expected到含有-一個組件) – KyleMit

回答

0

It is a low-level assembly loading problem. The CLR has located a file with the right name but when it tries to load the assembly, it finds out that the file doesn't contain a proper manifest. A .NET assembly must contain a manifest, it contains metadata that describes the assembly, listing the types in the assembly, etc.

我做了一些調查,發現這些解決方案可能有所幫助。

  1. 確保2個.exe/dll具有相同的名稱。

  2. 確保無論您的目標.NET框架是什麼,您的機器上都安裝了 。

  3. 目標.NET框架4而不是.NET框架4客戶端配置文件。

  4. 檢查所有構建選項是否設置爲x86或x64, ,具體取決於您的系統架構或AnyCPU。

  5. 這可能是因爲某種病毒。嘗試使用防病毒掃描您的計算機並重新構建項目。

更多詳情refer this thread

相關問題