1
在精簡XP SP3 x86虛擬機上運行.net 2.0應用程序時出現此錯誤,即使.net 2.0框架運行時已在安裝之前安裝應用程序。在調用Assembly.GetExportedTypes()時引發FileNotFoundException()
Exception Source: mscorlib Exception Type: System.IO.FileNotFoundException Exception Message: Could not load file or assembly 'WindowsBase, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified. Exception Target Site: GetExportedTypes ---- Stack Trace ---- System.Reflection.Assembly.GetExportedTypes() XSplit.Core.exe: N 00000 XSplit.Core.Capture.ChannelAddinManager.#Dm(As String) XSplit.Core.exe: N 00105 XSplit.Core.Capture.ChannelAddinManager.#Cm() XSplit.Core.exe: N 00265 XSplit.Core.Capture.ChannelAddinManager.Init(path As String, host As IAddinHost) XSplit.Core.exe: N 00104 XSplit.Core.frmLogin.InitializeAddinComponent() XSplit.Core.exe: N 00534 XSplit.Core.frmLogin..ctor(args As String[]) XSplit.Core.exe: N 01263
的滋生這種錯誤相關的代碼是這樣的
var assembly = Assembly.LoadFrom(dllFile); var assemblyTypes = assembly.GetExportedTypes();
即使安裝框架2.0 SP2後,這個錯誤仍然拋出。
你們有什麼線索,爲什麼這是?
構建目標是.net 2.0,並且沒有引用的程序集都是WPF,所以我們對爲什麼會引發此錯誤感到困惑。 – sjlewis 2010-10-12 06:53:49