vendredi 27 février 2015

VS 2008 designer failure: HRESULT E_FAIL has been returned from a call to a COM component

I am using VS 2008 SP1 with some updates, doing SW development in C++/CLI and Winforms. I have one winforms probject, where the designer shows a failure upon opening:



HRESULT E_FAIL has been returned from a call to a COM component

bei EnvDTE.CodeFunction.get_FunctionKind()
bei Microsoft.VisualC.CppCodeParser.OnTypePopulateMembers(Object sender, EventArgs e)
bei System.CodeDom.CodeTypeDeclaration.get_Members()
bei System.ComponentModel.Design.Serialization.TypeCodeDomSerializer.Deserialize(IDesignerSerializationManager manager, CodeTypeDeclaration declaration)
bei System.ComponentModel.Design.Serialization.CodeDomDesignerLoader.PerformLoad(IDesignerSerializationManager manager)
bei Microsoft.VisualStudio.Design.Serialization.CodeDom.VSCodeDomDesignerLoader.PerformLoad(IDesignerSerializationManager serializationManager)
bei System.ComponentModel.Design.Serialization.BasicDesignerLoader.BeginLoad(IDesignerLoaderHost host)


I can click on "ignore" then and see my whole winforms, being displayed correctly. But I don't want to ignore always, as it is 1) annoying, and 2) I would also ignore real failures, causing corruption on the form during design time (have had that some times before, loosing hours of development time)...


Another winforms project inside the same solution has no designer problems.


What I have tried so far:



  • deleting .ncb and .suo, deleting vcproj.user

  • cleaning up temp folders and some VS cache folders. But I don't know what more cache folders do exist, so please name all of them in a possible answer.

  • removing all controls from the winform, keeping the background functions

  • creating another project in the solution, copying the files to that folder

  • deleting the .sln solution file, creating it new

  • tried to debug the VS using a 2nd VS, but even when I was able to hit the break button on the 2nd VS in time after hitting enter to open the faulty form, I just saw a bunch of assembler lines. Not helpful at all.


What 'solves' the problem:



  • removing all controls from the winform including all functions

  • creating a project in another solution, adding the files and necessary references there (they remain at their original path on the hard disk), not modifying anything. This actually confuses me very much...


Any other ideas, how I can remove that failure? It's in VS obviously, as I can compile and run without errors, and even view the form on another VS as described above.

But I want to keep my original VS solution and not open another one.


Aucun commentaire:

Enregistrer un commentaire