Failed to parse method 'InitializeComponent'.

Posted by: johnpalmbeach on 8 September 2017, 2:40 pm EST

  • Posted 8 September 2017, 2:40 pm EST

    Environment is Visual Studio 2010 Windows 7 

    This is the 3rd time i had to re-design my form Angry because the component keeps doing some serialization then throws an exception, can someone please shed some light on this issue, Am I doing something wrong? please help. see print screen




    IntializeComponent Error

  • Replied 8 September 2017, 2:40 pm EST

    Hello,

    It sounds like Visual Studio loaded the wrong version of Spread into
    your project. What version of the Spread dll's are being referenced in your
    project?

    Thanks.

  • Replied 8 September 2017, 2:40 pm EST

    I had v5.0.3514 referenced but I'm working with v5.0.3518 so I deleted v5.0.3514 then added v5.0.3518, went back to my form and I was able to see the design.

    While I'm  closing the form (not the project) the serialization progress bar popped up! then I opened back to form and the exception message showed up again Confused

    see enclosed print screen



  • Replied 8 September 2017, 2:40 pm EST



    I found
    several forum posts on this error in the MSDN these are some of the most
    informative of them.



    http://connect.microsoft.com/VisualStudio/feedback/details/362608/designer-fails-to-load-a-valid-form-mess-up-with-dependencies-assemblies-unknown-type-during-onmethodpopulatestatements



    http://social.msdn.microsoft.com/Forums/en/winformsdesigner/thread/b22d22fd-e746-450e-b783-f6e0cdfe7665



     



    http://social.msdn.microsoft.com/Forums/en/winformsdesigner/thread/884cc63e-5ee4-4ab9-9771-ac24d58ea8c5



     



    http://social.msdn.microsoft.com/Forums/en/vbide/thread/dfa4eab0-b2e7-4498-a30c-dc048dd4383e

     

    This appears to be a common "frailty" as microsoft puts it of their designer. The first thread gives several suggestions of what to try but from quickly skimming the thread it looks like common causes are putting code inside of the autogenerated code sections. Setting a value for me.Name, missing the this pointer in pragma sections, and variable names that match Windows.Forms variable names. We could try to help you if you want to send us a sample project displaying this behavior, but the causes seem to be variable and we would need to see the project to begin to eliminate possibilities.



  • Replied 8 September 2017, 2:40 pm EST

    my .Designer.vb file has been moved above the Form .vb file extension !!!

    and my Form .vb is completely blank now

    this happened after I ran the project...

    see enclosed print screen any ideas on how I can bring back my DailyRevenueModel.Designer.vb underneath or I should say associated with DailyRevenueModel.vb ?



  • Replied 8 September 2017, 2:40 pm EST

    I escalated this to the product manager and he had this to reply



    My guess is his .designer.vb file has become to large for the
    compiler. If this is the case, he could set the SerializeModels property of the
    Spread to True to have the code written out using binary serialization. This
    would make the code in the .designer.vb much smaller. Could cause other
    problems in the future with trying to upgrade project.



Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels