Add/Remove operation is impossible, the code element 'Cxxx' is read only

Contents

     

    When attempting to add a Control Event Handler to a control on a dialog, we are encountering the message: Add/Remove operation is impossible, the code element 'Cxxx' is read only.

    After an hour of trying to solve it my self, a quick Google search turned up the following solutions.

    This seemed to work for me with

    Microsoft Visual studios 2009
    Version 9.0.21022.8 RTM

    Source: http://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=99076