调用COM组件时返回错误HRESULT E_FAIL 我有一个C++调用了C语言形式。它似乎工作正常。 但是,当我打开C#项目表单设计器时,会弹出以下错误消息。 可能有什么问题。解决方案构建并运行正常

调用COM组件时返回错误HRESULT E_FAIL 我有一个C++调用了C语言形式。它似乎工作正常。 但是,当我打开C#项目表单设计器时,会弹出以下错误消息。 可能有什么问题。解决方案构建并运行正常,c#,c++,com,C#,C++,Com,调用COM组件时返回错误HRESULT E_FAIL Instances of this error (1) 隐藏调用堆栈 在System.Runtime.InteropServices.Marshal.ThroweExceptionForhr内部(Int32 errorCode,IntPtr errorInfo) at System.Runtime.InteropServices.Marshal.ThroweExceptionForHR(Int32错误代码) 位于Microsoft.Vi

调用COM组件时返回错误HRESULT E_FAIL

Instances of this error (1)  
  • 隐藏调用堆栈
  • 在System.Runtime.InteropServices.Marshal.ThroweExceptionForhr内部(Int32 errorCode,IntPtr errorInfo) at System.Runtime.InteropServices.Marshal.ThroweExceptionForHR(Int32错误代码) 位于Microsoft.VisualStudio.Shell.Design.Serialization.DesignerDocDataService.GetFileDocData(字符串文件名、文件访问权限、字符串createTemplate、布尔addToHostList、布尔nestedItem) 位于Microsoft.VisualStudio.Shell.Design.Serialization.DesignerDocDataService.GetChildDocData(字符串名称、文件访问权限、字符串createTemplate) 在Microsoft.VisualStudio.Design.Serialization.CodeDom.VSCodeDomDesignerLoader.GetResourceDocData(CultureInfo信息,文件访问) 位于Microsoft.VisualStudio.Design.Serialization.CodeDom.VSCodeDomDesignerLoader.System.ComponentModel.Design.IResourceService.GetResourceReader(CultureInfo信息) 位于System.ComponentModel.Design.Serialization.ResourceCodeDomSerializer.SerializationResourceManager.GetMetadata()处 位于System.ComponentModel.Design.Serialization.ResourceCodeDomainSerializer.SerializationResourceManager.GetMetadataEnumerator()处 位于System.ComponentModel.Design.Serialization.CodeDomainSerializerBase.DeserializePropertiesFromResources(IDesignerSerializationManager,对象值,属性[]筛选器) 在System.ComponentModel.Design.Serialization.TypeCodeDomainSerializer.Deserialize(IDesignerSerializationManager,CodeTypeDeclaration)中 位于System.ComponentModel.Design.Serialization.CodeDomainDesignerLoader.PerformLoad(IDesignerSerializationManager) 位于Microsoft.VisualStudio.Design.Serialization.CodeDom.VSCodeDomDesignerLoader.PerformLoad(IDesignerSerializationManager序列化管理器) 在Microsoft.VisualStudio.Design.Serialization.CodeDom.VSCodeDomDesignerLoader.DeferredLoadHandler.Microsoft.VisualStudio.TextManager.Interop.IVsTextBufferDataEvents.OnLoadCompleted(Int32-fReload)


    要在VS2013 ultimate中修复此问题,我必须遵循帖子

    其中讨论的是简单地清除VisualStudio的ItemTemplateCache,并一次性使用/setup标志运行vs

    如果链接中断或不可用,则此处为旧版本VS的缓存位置:

    您可以在“Program Files\Microsoft Visual”中删除项目缓存 Studio 10.0\Common7\IDE\ProjectTemplatesCache”,然后运行“devenv” /“设置”再次构建缓存,以查看是否有帮助


    当我在iis中发布我的网站时,可能会重复什么?