Windows Develop Bookmark and Share   
 index > Windows Forms Designer > HRESULT 0x80042B5E
 

HRESULT 0x80042B5E

Hi,

I have a VS2008 project(originally VS2005). Whenever I add a new Item I get

HRESULT 0x80042B5E

from the Windows Formss designer with the following stack trace

Andrew

at EnvDTE.CodeElements.GetEnumerator()
at Microsoft.VisualStudio.Design.Serialization.CodeDom.VSCodeDomParser.CodeTypeDeclarationFromCodeClass(CodeClass vsClass)
at Microsoft.VisualStudio.Design.Serialization.CodeDom.VSCodeDomParser.OnNamespacePopulateTypes(Object sender, EventArgs e)
at System.CodeDom.CodeNamespace.get_Types()
at Microsoft.VisualStudio.Design.Serialization.CodeDom.VSCodeDomParser.Parse(TextReader codeStream)
at Microsoft.VisualStudio.Design.Serialization.CodeDom.MergedCodeDomParser.System.CodeDom.Compiler.ICodeParser.Parse(TextReader stream)
at System.CodeDom.Compiler.CodeDomProvider.Parse(TextReader codeStream)
at Microsoft.VisualStudio.Shell.Design.Serialization.CodeDom.CodeDomDocDataAdapter.get_CompileUnit()
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)

AndrewEames  Tuesday, June 17, 2008 2:30 PM
what item are you trying to add? please post some code/tell us what the code does or should do.

Lucian Baciu  Wednesday, June 18, 2008 3:01 PM

It happens when I just try and add a new C# file to a project from the Add/New Item context menu. This is a project that was upgraded from VS2005

Andrew

AndrewEames  Wednesday, June 18, 2008 3:09 PM
AndrewEames wrote:

It happens when I just try and add a new C# file to a project from the Add/New Item context menu. This is a project that was upgraded from VS2005

Andrew

well, something went wrong when updating. usualy you get a list of items that couldn't be updated. also, a log file is generated. look what error you had while updating your project
Lucian Baciu  Wednesday, June 18, 2008 3:12 PM

Maybe something did go wrong but I didnt have any errors - how do I fix it now?

Andrew

AndrewEames  Wednesday, June 18, 2008 3:15 PM

are you sure you had no errors? do you have the old version? if you do, try to reconvert and read everything it says after the conversion is over.

also, see if you can create a new project in visual studio 2008. maybe something went wron when installing

Lucian Baciu  Wednesday, June 18, 2008 3:18 PM

I am quite sure I had no errors thank you. The problem seems to happen when adding a new control or form - adding a class seems to be ok. It works ok in a freshly created project. Maybe the stack trace could tell you what is wrong with the project file?

Andrew

AndrewEames  Wednesday, June 18, 2008 3:29 PM
AndrewEames wrote:

I am quite sure I had no errors thank you. The problem seems to happen when adding a new control or form - adding a class seems to be ok. It works ok in a freshly created project. Maybe the stack trace could tell you what is wrong with the project file?

Andrew

it seems something happens in the EnvDTE Namespace (an assembly-wrapped COM library containing the objects and members for Visual Studio core automation). something happend when converting the code, but i don't really know what.

if not trying to add anything else to the project, does it work? can you compile/run it?

Lucian Baciu  Wednesday, June 18, 2008 3:53 PM

Yes the project works fine otherwise

Andrew

AndrewEames  Wednesday, June 18, 2008 3:56 PM
AndrewEames wrote:

Yes the project works fine otherwise

Andrew

well, i can only suggest a workaround: if you don't need the facilities that visual studio 2008 brings, you can develop it further in 2005. add there the components you want. after that update to 2008 and only modify the code if you need to do that. sorry, i do not have any otherideas...
Lucian Baciu  Wednesday, June 18, 2008 4:03 PM

Hi Andrew,

I’m afraid that I cannot find any documents which related to your error code "HRESULT 0x80042B5E".

Would you please double check whether the error code has been mistakenly written?

Otherwise, I cannot proceed to find a solution.

Please feel free to let me know how your problem is going on, thanks.

Best wishes,

Jun Wang

Jun Wang Tim  Monday, June 23, 2008 7:54 AM
Yes, that is the correct error code

Andrew

AndrewEames  Monday, June 23, 2008 3:24 PM

Hi Andrew,

I cannot come up with the full solution for your problem.

However, you can try these following steps, to see whether it helps:

1. Make a backup copy of your project and try to simplify it (e.g. deleting items from it). You can continue this till the step that appears to be no problem. Then you know what have caused it.

2. Try deleting the user file (.suo file) and a new user. You can find .suo file under your project’s folder. It’s hidden by default, you can make it visible by changing view of the folder options.

Hope it helps.

Thanks.

Best wishes,

Jun Wang

Jun Wang Tim  Tuesday, June 24, 2008 3:01 AM

Hi Andrew,

We are changing the issue type to “Comment�because you have not followed up with the necessary information. If you have more time to look at the issue and provide more information, please feel free to change the issue type back to “Question�by editing your initial post and changing the radio button at the top of the post editor window. If the issue is resolved, we will appreciate it if you can share the solution so that the answer can be found and used by other community members having similar questions.

Thank you!

Best wishes,

Jun Wang

Jun Wang Tim  Thursday, June 26, 2008 5:16 AM
I had the same problem.
Set default namespace of your project.
Andrew Sorokin  Tuesday, June 09, 2009 6:38 PM

You can use google to search for other answers

Custom Search

More Threads

• Adding a dataset to DesignerHost
• Tell VS.NET to ignore certain code???
• White backround in user control
• Forms Designer & My Panel Control
• Creating a Bindable Control
• How to detect tab selection changed event in TabControl
• Cross - Threading in .Net 2005
• Incorrect Serialization of Collection property in IExtenderProvider
• Form Designer Serialization of Custom Collection Property
• how to make form dragable when FormBorderStyle is set to none