母雞我運行Visual Studio 2012中的應用程序,它就像一個魅力,但是當我嘗試運行在bin文件夾中的.exe文件,我得到這個錯誤:Visual Studio中的Borland DLL錯誤
System.IO.FileLoadException: Could not load file or assembly 'Borland.Data.DbxCommonDriver, Version=16.0.0.0, Culture=neutral, PublicKeyToken=a91a7c5705831a4f' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
File name: 'Borland.Data.DbxCommonDriver, Version=16.0.0.0, Culture=neutral, PublicKeyToken=a91a7c5705831a4f'
at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
at System.Reflection.RuntimeAssembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
at System.Reflection.RuntimeAssembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean forIntrospection)
at System.Reflection.RuntimeAssembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection)
at System.Reflection.Assembly.Load(String assemblyString)
at Borland.Data.TClassRegistryPackageItem..ctor(String PackageName)
at Borland.Data.TClassRegistry.RegisterPackageClass(String ClassName, String PackageName)
at Borland.Data.Units.DBXCommon.RegisterClassLoader(TDBXProperties DriverProperties, String ClassNameProp, String ClassNameDefault, String PackageNameProp, String PackageDefault, String& ResultPackageName)
at Borland.Data.TDBXDriverRegistry.GetDriver(TDBXDriverDef DriverDef)
at Borland.Data.TDBXConnectionFactory.GetDriver(String DriverName, TDBXProperties DriverProperties)
at Borland.Data.TDBXConnectionBuilder.CreateConnection()
at Borland.Data.TDBXConnectionFactory.GetConnection(TDBXContext DBXContext, TDBXProperties ConnectionProperties)
at Borland.Data.TAdoDbxConnection.Open()
at ProjectGroep9.LoginForm.connSuccess() in c:\Users\Tom\Project2TI\trunk\ProjectGroep9\ProjectGroep9\LoginForm.cs:line 146
at ProjectGroep9.LoginForm.bevestigLabel_Click(Object sender, EventArgs e) in c:\Users\Tom\Project2TI\trunk\ProjectGroep9\ProjectGroep9\LoginForm.cs:line 58
at System.Windows.Forms.Control.OnClick(EventArgs e)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.Label.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].
更新:Visual Studio,當拋出錯誤說: 無法加載程序集Borland.Data.DbxCommonDriver,Version = 16.0.0.0,Culture = neutral,
PublicKeyToken = a91a7c5705831a4f或其依賴項之一。
一個PowerShell命令給了我下面的interbaseAdo.NETDriver Program Files文件夾輸出the.dll:
Borland.Data.DbxCommonDriver, Version=16.0.0.0, Culture=neutral,
PublicKeyToken=91d62ebb5b0d1b1b
我和我的同事遇到同樣的問題,請參閱http:// stackoverflow。com/questions/21628601/ado-net-2-0-interbase-driver-and-asp-net-wrong-assembly-reference,你能找出你的系統上的Borland.Data.BdxCommonDriver.DLL的PublicKeyToken是什麼? – RFerwerda
你能否提供更多的細節? 像,所引用的DLL文件仍然在bin文件夾中? – RvdV79
Thanx對於評論傢伙,我今天在學校裏和我的老師一起研究過,他們的反應就像是「這到底是什麼,embarcadero?」 ^^引用的文件位於bin文件夾中:) – Docschnitzel