在許多機器上運行的.NET程序出現問題,但在一臺機器上運行失敗。該程序是從web服務下載真實程序文件的引導程序。在32位Windows 7上:無法生成臨時類,試圖加載格式不正確的程序CS0009
客戶端收到兩個新的Windows 7 32位機器。程序在一個上運行正常,另一個則失敗。
錯誤在下面。 (我是從屏幕截圖重新錄入,所以要跳過堆棧跟蹤的一些細節。)
There was an error when trying to start the target application: Unable to generate a temporary class (result=1). error CS0009: Metadata file 'c:\Windows\assembly\GAC_MSIL\System.Xml\2.0.0.0__b77a5c561934e089\System.XML.dll' could not be opened -- 'An attempt was made to load a program with an incorrect format.' System.InvalidOperationException: Unable to generate a temporary class (result=1). error CS0009: Metadata file 'c:\Windows\assembly\GAC_MSIL\System.Xml\2.0.0.0__b77a5c561934e089\System.XML.dll' could not be opened -- 'An attempt was made to load a program with an incorrect format.' at System.Xml.Serialization.Compiler.Compile... at System.Xml.Serialization.TempAssembly.GenerateAssembly... at System.Xml.Serialization.TempAssembly..ctor... at System.Xml.Serialization.XmlSerializer.GetSerializersFromCache... at System.Xml.Serialization.XmlSerializer.FromMappings... at System.Web.Services.Protocols.SoapClientType..ctor(Type type) at System.Web.Services.Protocols.SoapHttpClientProtocol..ctor() at [our class that inherits from SoapHttpClientProtocol]..ctor() (default ctor) at [our class that calls the service].updateApplication()
不正確的格式錯誤似乎是最典型的是與嘗試在32位的DLL加載到64個進程有關,但由於這是一個32位的操作系統,所以這不成問題。 GAC的這一部分似乎是JIT根據需要編譯到正確的平臺(在這種情況下應該是32位)。所以我真的看不到任何可能出錯的地方。
用戶已使用程序功能刪除並重新安裝Framework 3.5。
任何其他想法缺乏reimage?
謝謝, 克里斯
廢料該機器,磁盤的損壞。 – 2011-04-06 18:17:15