none
Error Opening Designer File - Unspecified error (Exception from HRESULT: 0x80004005 (E_FAIL)) in VS2015 Designer

    Question

  • Please bear with me as I am a pretty novice developer....

    I have an application written in VB, that was started in 2010 with 4.0 Framework.  After getting a new laptop and downloading Visual Studio 2015.  I was able to open the solution, run it, and even open the designer files.  However, just a few days ago I went to open a particular windows form to work on layout and I got an error:  

     Unspecified error (Exception from HRESULT: 0x80004005 (E_FAIL)) in VS2015 Designer

    Here is the call stack:

    at System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32 errorCode, IntPtr errorInfo)
    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) 

    I have tried the following - 

    1. Resetting the design environment.....That initially fixed the issue, but it has now returned to the same vbform.  
    2. I have tried registering the msxml3.dll in command prompt.
    3. I have tried referencing a different framework

    Now of these have worked after the first time.  I also get the error:

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

    Here is the call for that:

    at System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32 errorCode, IntPtr errorInfo)
    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) 

    Any suggestions?  If you need anything such as code, please let me know.  

    Thanks in advance!!!!

    Wednesday, November 11, 2015 8:17 PM

Answers

  • Hi Jack,

    So I decided to dig into the code of the most recent changes.  I had avoided this since I really wasn't to sure what my last changes were.  However, I have resolved the issues by doing the following:  

    From an old application we had a vb Class that allowed for a "custom combo box" that allowed for certain features that would be needed for the application.  Since I needed the same function in this new app, I imported the CustomComboBox vb Class into my app and then added in 5 custom combo boxes from my tool box.  By changing the vb.designer file lines where these 5 combo boxes were back to regular system.windows.forms.combobox, that fixed it.  Perhaps you could you look at the Class file and see if anything stands out as to why (no obligations at all).  Here is the link to the code:

    CustomComboBox Code

    Even though Im still not sure as to why there was an issue with this Class file, at least its working and I want to thank everyone who offered suggestions and advice!!

    Regards,

    Medic_CEO


    Sunday, November 15, 2015 12:17 AM

All replies

  • Hi Medic_CEO,

    You can try to repair IIS Express, that may fix your issue
    http://www.microsoft.com/en-us/download/details.aspx?id=34679

    Best regards!
    If this was helpful, propose it as an answer.

    Wednesday, November 11, 2015 8:45 PM
  • Thanks for Almir Vuk's reply.

    Hi Medic_CEO,

    Please try Almir Vuk's suggestion first.

    According to your description, it is works fine before. What do you have done on your computer or for the Visual Studio 2015 before this problem occurs?

    Please try the way of Scenario Two in following article which the author has the same problem. Hope that can help you.

    http://blogs.msdn.com/b/smondal/archive/2013/03/08/error-hresult-e-fail-has-been-returned-from-a-call-to-a-com-component.aspx

    Best Regards,
    Weiwei

    Thursday, November 12, 2015 5:29 AM
    Moderator
  • Hello Almir,

    I appreciate the suggestion.  The download was cancelled automatically as it said there is a newer version for both the x64 and the x86.

    Regards, 

    medic_ceo

    Thursday, November 12, 2015 8:13 PM
  • Hello again Weiwei,

    The suggestion above did not resolve the issue.  To answer your question from above, I cannot recall anything specific that I did that would have been different.  When I stopped working the other night, the form designer worked great.  I put my computer in sleep mode and went to bed.  When I got to work the next morning, I opened my PC, started VS 2015 and immediately got there error.  This is a very simple and straightforward application.  I use a few XML files for data and that's it.  It does not connect to a server or anything more advanced.

    I have seen this link that you provided, but I was not sure how to run the devenv.exe /setup?  Any specific steps you could provide would be very much appreciated.  I had tried to do it myself, by I do not have the Visual Studio 10.0 sub-folder and when I follow the sub-folder for my Visual Studio 14.0\Common 7\IDE and then click on the devenv.exe, it starts up VS2015.  

    Thank you again!

    medic_ceo



    • Edited by Medic_CEO Thursday, November 12, 2015 8:21 PM
    Thursday, November 12, 2015 8:20 PM
  • Hi medic_ceo,

    >>but I was not sure how to run the devenv.exe /setup?

    You need to run it in VS command prompt.

    In addition, I have no directly solution for this issue, maybe I could provide some steps to troubleshoot this issue.

    As you said that it is the VB winform app, it worked well in VS2010, but it has this issue in your VS2015, am I right?

    (1) Please use the VS2010 to re-open the project which has been opened in VS2015, if it worked well, at least, we could know that the project files are not corrupted.

    (2) Open your VS2015, just create a new blank winform app, if the designer worked well, at least, we could know that it is not the VS setup issue. Of course, if all winform apps have the same issue, I think you would think about your VS setup like this case here:

    https://social.msdn.microsoft.com/Forums/vstudio/en-US/79fb4abd-dcca-4568-8e62-665af0a9d807/unspecified-error-exception-from-hresult-0x80004005-efail-has-occurred-while-creating-new-web

    (3) But if just the specific app has this issue in your VS2015, one idea is that create a new blank solution in your VS2015, and then add the project files to the new blank solution, clean and rebuild the solution, open the form again.

    (4) But if step 4 has no help, you'd better to check that whether it is related to the specific line code in yor form files, for example, we could go into the designer.vb file and started commenting out a bunch of it until I found the lines that are causing all the trouble.

    Using the above steps to troubleshoot this issue, if you get any latest information in your side, please feel free to let us know.

    Best Regards,

    Jack


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Saturday, November 14, 2015 10:59 AM
    Moderator
  • Hi Jack,

    So I decided to dig into the code of the most recent changes.  I had avoided this since I really wasn't to sure what my last changes were.  However, I have resolved the issues by doing the following:  

    From an old application we had a vb Class that allowed for a "custom combo box" that allowed for certain features that would be needed for the application.  Since I needed the same function in this new app, I imported the CustomComboBox vb Class into my app and then added in 5 custom combo boxes from my tool box.  By changing the vb.designer file lines where these 5 combo boxes were back to regular system.windows.forms.combobox, that fixed it.  Perhaps you could you look at the Class file and see if anything stands out as to why (no obligations at all).  Here is the link to the code:

    CustomComboBox Code

    Even though Im still not sure as to why there was an issue with this Class file, at least its working and I want to thank everyone who offered suggestions and advice!!

    Regards,

    Medic_CEO


    Sunday, November 15, 2015 12:17 AM
  • Hi medic_ceo,

    I'm glad that you have solved the problem and thanks for sharing your solution here. It will be benefit for other communities who has the same problem.

    If any question in future, please feel free to come back our forum.

    Best Regards,
    Weiwei

    Monday, November 16, 2015 1:23 AM
    Moderator
  • Hi Weiwei,

    If you are up to the challenge, I have another issues, related to the one above.  Here is the link to the post - 

    https://social.msdn.microsoft.com/Forums/en-US/7c227224-9063-493e-bcd8-7102d32462c2/missing-com-reference-for-application-in-vs-2015?forum=visualstudiogeneral

    Thanks in advance,

    Medic_CEO

    Tuesday, November 17, 2015 8:45 PM