gpt4 book ai didi

c# - 无法获取具有 CLSID {A9E69610-B80D-11D0-B9B9-00A0C922E750} 的组件的类工厂 de COM 错误 : 80040154 Class not Registered

转载 作者:行者123 更新时间:2023-12-04 13:24:10 25 4
gpt4 key购买 nike

我是一名学生,今天在我的类里面,当我尝试使用 WCF 测试客户端运行一个项目时,visual Sutdio 2019 检索到这个错误:

Error: Cannot obtain Metadata from http://localhost:54417/ServiceBookStore.svc 
If this is a Windows (R) Communication Foundation service to which you have access, please check that you have enabled metadata publishing at the specified address.
For help enabling metadata publishing, please refer to the MSDN documentation at http://go.microsoft.com/fwlink/?LinkId=65455.WS-Metadata Exchange Error URI: http://localhost:54417/ServiceBookStore.svc
我和我的老师试图解决这个问题,我一直在寻找解决方案,但我没有找到太多东西。我尝试卸载 VS 2019 但效果不佳
打印错误:
enter image description here
谢谢你的帮助!

最佳答案

听起来您的服务是针对 Any CPU 构建的,导致您在 64-bit 上出错您在何处使用 COM 组件。您需要构建它 x86 .
该应用程序可能作为 32-bit 运行这就是为什么它可以使用组件的原因。针对 x86 构建您的解决方案将强制您的服务作为 32-bit 运行.

Open Visual studio > project properties > in the Build tab > platform target =X86


enter image description here

另一个解决方案:

Open Visual studio > project properties > Build > "Prefer 32-bit" uncheck this. (If it is checked).

关于c# - 无法获取具有 CLSID {A9E69610-B80D-11D0-B9B9-00A0C922E750} 的组件的类工厂 de COM 错误 : 80040154 Class not Registered,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/69683264/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com