对COM组件的调用返回错误HRESULT E_FAIL
Error HRESULT E_FAIL has been returned from a call to a COM component
我有一个C++调用C#窗体。它似乎工作正常。但是,当我打开C#项目表单设计器时,会弹出以下错误消息。可能出了什么问题。解决方案构建并运行良好。
对COM组件的调用返回错误HRESULT E_FAIL。
Instances of this error (1)
- 隐藏调用堆栈
在System.Runtime.InteropServices.Marshal.SthrowExceptionForHRInternal(Int32错误代码,IntPtr错误信息)在System.Runtime.InteropServices.Marshal.SthrowExceptionForHR(Int32错误代码)位于Microsoft.VisualStudio.Shell.Design.Serialization.DesignerDocDataService.GetFileDocData(String fileName,FileAccess access,String createTemplate,Boolean addToHostList,Boolean nestedItem)位于Microsoft.VisualStudio.Shell.Design.Serialization.DesignerDocDataService.GetChildDocData(字符串名称,FileAccess访问,字符串创建模板)位于Microsoft.VisualStudio.Design.Serialization.CodeDom.VSCodeDomDesignerLoader.GetResourceDocData(CultureInfo信息,FileAccess访问)位于Microsoft.VisualStudio.Design.Serialization.CodeDom.VSCodeDomDesignerLoader.System.ComponentModel.Design.IResourceService.GetResourceReader(CultureInfo-info)位于System.ComponentModel.Design.Serialization.ResourceCodeDomSerializer.SerializationResourceManager.GetMetadata()位于System.ComponentModel.Design.Serialization.ResourceCodeDomSerializer.SerializationResourceManager.GetMetadataEnumerator()位于System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DescerializePropertiesFromResources(IDesignerSerializationManager管理器,对象值,Attribute[]筛选器)位于System.ComponentModel.Design.Serialization.TypeCodeDomSerializer.Deserialize(IDesignerSerializationManager管理器,CodeTypeDeclaration声明)位于System.ComponentModel.Design.Serialization.CodeDomDesignerLoader.PerformLoad(IDesignerSerializationManager管理器)位于Microsoft.VisualStudio.Design.Serialization.CodeDom.VSCodeDomDesignerLoader.PerformLoad(IDesignerSerializationManager serializationManager)位于Microsoft.VisualStudio.Design.Serialization.CodeDom.VSCodeDomDesignerLoader.DeferredLoadHandler.Microsoft.Microsoft.VisualStudio.TextManager.Interop.IVsTextBufferDataEvents.OnLoadCompleted(Int32 fReload)
为了在VS2013终极版中解决这个问题,我不得不遵循帖子http://rathodkrunal.blogspot.com/2011/11/visual-studio-2010-error-hresult-efail.html
其中,它谈到了简单地清除Visual Studio的ItemTemplateCache,并一次性使用/setup标志运行vs。
如果链接断开或不可用,这里是旧VS:的缓存位置
您可以在"Program Files\Microsoft VisualStudio 10.0\Common7\IDE\ProjectTemplatesCache",然后运行"devenv/setup"来再次构建缓存,看看它是否有帮助。
- Problems with std::cin.fail()
- 如何在C++中使用 HRESULT 条件检查
- 了解 cin.fail() 和 cin.clear语言 - Vector 追加程序
- cin.fail() not returning true
- cin.fail 在输入数字和字母时不起作用
- 我如何检查CIN.FAIL(),但仍使用Ctrl D到达文档的结尾
- OpenCV UIImageToMat linker fail in xcode
- CIN.FAIL无法按预期工作
- 如何初始化setMasterVolume的hresult
- HRESULT:将自定义代码与系统一个区分开
- Qt WebEngine on fail
- 在C++流中,eof(),fail(),bad()和good()有什么区别
- ICLRRuntimeHost::UnloadAppDomain fail
- 如何从 FAILED(HRESULT) 中抛出 std::system_error 异常?
- 如何使用CIN.FAIL()杀死程序
- What value should `std::stringstream::fail()` return after r
- 检测在ofstream写入过程中的空间不足,stream.fail()无法正常工作
- sgx_ecc256_create_key_pair fail
- 有没有办法将cin.fail和cin.clear翻译成C编程语言
- 如何在cin.fail()中求解循环