获取“错误HRESULT E_FAIL已从调用COM组件返回”VB

时间:2016-05-09 18:25:32

标签: vb.net visual-studio-2015

我正在使用Visual Studio Community 2015来修改VB 2013项目。每当我尝试打开我的主Windows窗体时,就会发生“从错误的HRESULT E_FAIL调用COM组件返回”消息。我根本无法修改表格。我可以找到调试中没有代码错误。

如果他们看起来适用于我的情况,我已经尝试了以下几种解决方案: Error HRESULT E_FAIL has been returned from a call to a COM component VS2012 when debugging

这只发生在解决方案中的一个VB表单上。其他两种表格工作正常。

调用堆栈错误:

Instances of this error (1)  

1.   Hide Call Stack 

at System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32 errorCode, IntPtr errorInfo)
at Microsoft.VisualStudio.LanguageServices.Implementation.Utilities.Exceptions.ThrowEFail()
at Microsoft.VisualStudio.LanguageServices.Implementation.CodeModel.CodeTypeRef.LookupTypeSymbol()
at Microsoft.VisualStudio.LanguageServices.Implementation.CodeModel.CodeTypeRef.get_TypeKind()
at EnvDTE.CodeTypeRef.get_TypeKind()
at Microsoft.VisualStudio.Design.Serialization.CodeDom.VSCodeDomParser.GetUrtTypeFromVsType(CodeTypeRef vsType)
at Microsoft.VisualStudio.Design.Serialization.CodeDom.VSCodeDomParser.OnTypePopulateMembers(Object sender, EventArgs e)
at System.CodeDom.CodeTypeDeclaration.get_Members()
at Microsoft.VisualStudio.Design.Serialization.CodeDom.MergedCodeDomParser.CodeTypeDeclarationPopulator.OnPopulateMembers(Object sender, EventArgs e)
at System.CodeDom.CodeTypeDeclaration.get_Members()
at System.ComponentModel.Design.Serialization.TypeCodeDomSerializer.Deserialize(IDesignerSerializationManager manager, CodeTypeDeclaration declaration)
at System.ComponentModel.Design.Serialization.CodeDomDesignerLoader.PerformLoad(IDesignerSerializationManager manager)
at Microsoft.VisualStudio.Design.Serialization.CodeDom.VSCodeDomDesignerLoader.PerformLoad(IDesignerSerializationManager serializationManager)
at Microsoft.VisualStudio.Design.Serialization.CodeDom.VSCodeDomDesignerLoader.DeferredLoadHandler.Microsoft.VisualStudio.TextManager.Interop.IVsTextBufferDataEvents.OnLoadCompleted(Int32 fReload)

1 个答案:

答案 0 :(得分:0)

我要重建表单,因为它只有一个屏幕会出错。目前似乎没有一个很好的解决方案。