调试代码时创建表单时出错

时间:2013-11-15 19:05:15

标签: c# .net biometrics

Hy朋友

我开发了一个从生物识别指纹机中获取数据的应用程序但是当我在VS2010中运行它时,它的完整构建成功,然后出错

System.InvalidOperationException was unhandled
  Message="An error occurred creating the form. See Exception.InnerException for details.  The error is: Retrieving the COM class factory for component with CLSID {00853A19-BD51-419B-9269-2DABE57EB61F} failed due to the following error: 80040154."
  Source="CardManagement"
  StackTrace:
       at Card.My.MyProject.MyForms.Create__Instance__[T](T Instance) in 17d14f5c-a337-4978-8281-53493378c1071.vb:line 190
       at Card.My.MyProject.MyForms.get_Card()
       at Card.My.MyApplication.OnCreateMainForm() in C:\Documents and Settings\XPMUser\Desktop\card\Card Management\My Project\Application.Designer.vb:line 35
       at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnRun()
       at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.DoApplicationModel()
       at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run(String[] commandLine)
       at Card.My.MyApplication.Main(String[] Args) in 17d14f5c-a337-4978-8281-53493378c1071.vb:line 81
       at System.AppDomain.nExecuteAssembly(Assembly assembly, String[] args)
       at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
       at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
       at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
       at System.Threading.ThreadHelper.ThreadStart()

任何一个帮助我都没时间了。我花了6个小时阅读相关帖子

3 个答案:

答案 0 :(得分:1)

请尝试像Zkemkeeper一样下载所有SDK,但无法使用Regsvr32进行注册,因为它无法获取所有其他必需的dll。

以下是为zkemkeeper下载SDK的网址。

www.findthatzip-file.com/search-18066782-hZIP/winrar-winzip-download-fpsdk.zip.htm

下载并将所有dll复制到System32 for 32-bit,同样复制64位并执行Regsvr,这将立即生效。

答案 1 :(得分:0)

Ya我已经解决了......发生此错误是因为com dll Zmkeeper.dll无法注册。我尝试使用regsvr32手动但失败了。最后我安装了随软件附带的演示软件包注册所有想要的dll然后再添加dlls作为参考。工作。但现在我也不知道为什么我不能这样做regsvr32

答案 2 :(得分:-2)

另一个解决方案:就是在这个链接中自己注册Com: http://blogs.technet.com/b/meamcs/archive/2012/03/05/referencing-32-bit-com-components-in-sharepoint-2010-after-upgrade-from-sharepoint-2007.aspx

这样你应该在目标机器上完成它。