简体   繁体   English

VS2015安装项目错误80040154未注册类

[英]VS2015 Setup project error 80040154 Class not registered

My company is developing an application which makes use of the BOSCH Video SDK. 我公司正在开发一个使用BOSCH Video SDK的应用程序。 I've included the required DLL files in my Setup project, and I believe they're being registered when my project is installed, but I am getting the "Class not registered" error at runtime.. 我已经在我的安装项目中包含了所需的DLL文件,并且我相信它们在安装我的项目时已被注册,但是在运行时出现“未注册类”错误。

I suspect my issues are coming from the fact that this application is being compiled in x64 and is using the 64-bit DLL's from the BOSCH Video SDK. 我怀疑我的问题出在以下事实:该应用程序已在x64中编译,并使用了BOSCH Video SDK中的64位DLL。 This is intentional and we definitely want this to install and run in 64 bit mode. 这是有意的,我们绝对希望它以64位模式安装并运行。

The exact error message is "Retreiving the COM class factory for component with CLSID {D12FF18F-AFC2-4E6E-9FEB-8FC4B57FFC93} failed due to the following error: 80040154 Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG))". 确切的错误消息是“由于以下错误而为具有CLSID {D12FF18F-AFC2-4E6E-9FEB-8FC4B57FFC93}的组件检索COM类工厂失败:80040154未注册类(HRESULT的异常:0x80040154(REGDB_E_CLASSNOTREG)”)。

在此处输入图片说明

In my setup project all of the dependencies are marked as Register: vsdraCOM. 在我的安装项目中,所有依赖项都标记为Register:vsdraCOM。

在此处输入图片说明

Both my setup project and the application project itself have their target set as 'x64'. 我的安装项目和应用程序项目本身的目标都设置为“ x64”。

在此处输入图片说明

在此处输入图片说明

In my Setup project I have also implemented the solution found here which details using the Fix64bitInstallUtilLib.js script and the 64-bit InstallUtilLib.dll to properly install a 64-bit project without running into the BadImageFormatException problem. 在我的安装项目中,我还实现了此处找到的解决方案,该解决方案使用Fix64bitInstallUtilLib.js脚本和64位InstallUtilLib.dll来详细安装64位项目,而不会遇到BadImageFormatException问题。 My project installs and launches without any issues but when it hits the first line which uses the BOSCH Video SDK I get the "Class not registered" error. 我的项目安装并启动时没有任何问题,但是当它到达使用BOSCH Video SDK的第一行时,出现“未注册类”错误。

I have also tried to manually register the DLL files using both the 32-bit and 64-bit versions of regsvr32.exe but each time I get an error reading "entry-point DllRegisterServer" was not found. 我也尝试过使用32位和64位版本的regsvr32.exe手动注册DLL文件,但是每次遇到读取“入口点DllRegisterServer”的错误时,都找不到。

在此处输入图片说明

I'm not sure what else there is left to try. 我不确定还有什么可以尝试的。 I feel like there is a critical piece to this puzzle that I am missing. 我觉得这个谜题有一个关键部分,我很想念。 Please let me know if any additional information is needed. 请让我知道是否需要其他信息。

Our end-goal here is to be able to deploy our setup.msi file to a fresh client machine without having to first manually install the BOSCH Video SDK. 我们的最终目标是能够将setup.msi文件部署到新的客户端计算机上,而无需首先手动安装BOSCH Video SDK。 I thought this would be as easy as including the required DLL files and setting Register: vsdraCOM but I guess it isn't that simple. 我以为这就像包含所需的DLL文件并设置Register:vsdraCOM一样容易,但是我想并不是那么简单。

I figured it out. 我想到了。 The answer was to include the Bosch Video SDK Runtime with my installer, create an app manifest in my project, and add the SDK as a depdency to the manifest. 答案是将Bosch Video SDK Runtime包含在我的安装程序中,在我的项目中创建一个应用清单,并将SDK作为依赖关系添加到清单中。 It was also convenient to add a PropertyGroup to the CSPROJ file with the condition 'Release|x64' so that the manifest is only included when compiled in Release mode. 将条件条件为'Release | x64'的PropertyGroup添加到CSPROJ文件中也很方便,以便仅在发布模式下编译清单时才包含清单。

  1. Add the Bosch Video SDK Runtime folder to source control. 将Bosch Video SDK Runtime文件夹添加到源代码管理中。 在此处输入图片说明

  2. Add runtime files and folders to Application Folder in setup project. 将运行时文件和文件夹添加到安装项目中的“应用程序文件夹”中。 在此处输入图片说明

  3. Add app.manifest file to project and add dependency section for the SDK. 将app.manifest文件添加到项目中,并为SDK添加依赖项部分。 在此处输入图片说明

  4. Use a text editor to edit your CSPROJ file and add a PropertyGroup with a condition for 'Release|x64' so that your manifest is only used on release versions. 使用文本编辑器编辑CSPROJ文件,并添加一个带有“ Release | x64”条件的PropertyGroup,以便您的清单仅用于发行版。 在此处输入图片说明

Hopefully this proves useful for someone at some point. 希望这在某些时候对某人有用。 The real lesson here is to actually read the Help files from time to time.. 真正的教训是不时地阅读帮助文件。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM