0
當使用程序集綁定日誌查看器來檢查是什麼原因造成的FileNotFoundException異常錯誤,當我跑我的C#應用程序,我得到了在錯誤日誌文件中的下列操作之一:裝配基準不匹配的組件定義中找到
LOG: Post-policy reference: msvcm90, Version=9.0.30729.4974, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
LOG: Did not find assembly in DEVOVERRIDE path C:\Documents and Settings\All Users\Application Data\Red Gate\.NET Reflector\DevPath
LOG: GAC Lookup was unsuccessful.
LOG: Attempting download of new URL file:///F:/Stuff/Muaz/Programming/C#/Spatial and Temporal Research/Spatial and Temporal Research/bin/Debug/msvcm90.DLL.
LOG: Assembly download was successful. Attempting setup of file: F:\Stuff\Muaz\Programming\C#\Spatial and Temporal Research\Spatial and Temporal Research\bin\Debug\msvcm90.dll
LOG: Entering run-from-source setup phase.
LOG: Assembly Name is: msvcm90, Version=9.0.30729.1, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
WRN: Comparing the assembly name resulted in the mismatch: Revision Number
ERR: The assembly reference did not match the assembly definition found.
ERR: Failed to complete setup of assembly (hr = 0x80131040). Probing terminated.
我嘗試使用直接綁定在app.config文件:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<startup useLegacyV2RuntimeActivationPolicy="true">
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/>
</startup>
<runtime>
<assemblyBinding>
<dependentAssembly>
<assemblyIdentity name="msvcm90"
publicKeyToken="b03f5f7f11d50a3a" />
<bindingRedirect oldVersion="9.0.30729.4974"
newVersion="9.0.30729.1"/>
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>
但發生同樣的錯誤。我試圖搜索DLL文件msvcm90,但無法找到版本9.0.30729.4974(也許是因爲它的舊)。任何其他方式來解決這個問題?謝謝。
謝謝,我在c:\ wondows \ winsxs中找到了dll版本,並將其複製到文件夾中。現在在日誌文件中沒有任何錯誤出現在程序集綁定查看器中,但我仍然收到錯誤:「System.IO.FileNotFoundException:無法加載文件或程序集」Autodesk.Navisworks.Timeliner.dll「或其某個依賴項。模塊找不到。「我張貼在這裏:http://stackoverflow.com/questions/9729691/an-unhandled-exception-of-type-system-io-filenotfoundexception-occurred-in-unk我仍然無法解決。我會盡力像你告訴我一樣運行Windows Update並看到結果 – mj1261829 2012-03-17 07:12:34
像這樣的程序集將會有更多的依賴項超越msvcm90.dll。驗證許可證並與Autodesk聯繫以獲得支持。 – 2012-03-17 07:31:51