views:

17

answers:

2

I'm not sure what's changed, but for some reason I'm getting a problem with Visual Studio 2008 Windows Forms Designer:

C++ CodeDOM parser error: Line: 1978, Column: 80 --- Float overflow

The call stack doesn't seem to point to any of my code either:

at Microsoft.VisualC.CppCodeParser.OnMethodPopulateStatements(Object sender, EventArgs e) at System.CodeDom.CodeMemberMethod.get_Statements() 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)

If I compile and run the code it works fine. Does anyone have any idea why I might be seeing this issue?

A: 

Got it. I'd replaced the following:

this->m_cmbStepSelect->Items->AddRange(gcnew cli::array< System::Object^  >(5) {L"String1", L"String2", L"String3", L"String4", L"String5"});

With:

#define NUM_OF_STRINGS (5)
this->m_cmbStepSelect->Items->AddRange(gcnew cli::array< System::Object^  >(NUM_OF_STRINGS) {L"String1", L"String2", L"String3", L"String4", L"String5"});

...which threw the designer.

Jon Cage
+1  A: 
    /// Required method for Designer support - do not modify
    /// the contents of this method with the code editor.
Hans Passant
+1/accepted: Point taken!
Jon Cage