I have a very large project that I have moved from Visual Studio 2012 to 2015 about a month ago.
The code is sound. It compiles 99.9999% of the time, except for the last two days I have had this random occurrence.
I am using an obfuscator (Eazfuscator paid version) to build the solution.
For the last two days, I am able to work, everything compiles over and over again and works just fine, but when I go to compile the project in obfuscated mode, SOMETIMES, the compiler fails, and fills the Error List with the following:
Severity Code Description Project File Line Error
BC30506 Handles clause requires a WithEvents variable defined in the containing type or one of its base types. wRMS D:_Private\wRMS\wRMS_Miscellaneous Forms\Main Application\frmHome.vb 719 Error
BC30506 Handles clause requires a WithEvents variable defined in the containing type or one of its base types. wRMS D:_Private\wRMS\wRMS_Miscellaneous Forms\Main Application\frmUpdate.vb 5 Error
BC30506 Handles clause requires a WithEvents variable defined in the containing type or one of its base types. wRMS D:_Private\wRMS\wRMS_Miscellaneous Forms\Main Application\frmUpdate.vb 9 Error
BC30506 Handles clause requires a WithEvents variable defined in the containing type or one of its base types. wRMS D:_Private\wRMS\wRMS_Miscellaneous Forms\Main Application\frmUpdate.vb 13 Error
BC30506 Handles clause requires a WithEvents variable defined in the containing type or one of its base types. wRMS D:_Private\wRMS\wRMS_Miscellaneous Forms\Main Application\frmUpdate.vb 17 Error
BC30506 Handles clause requires a WithEvents variable defined in the containing type or one of its base types. wRMS D:_Private\wRMS\wRMS_Miscellaneous Forms\Main Application\frmUpdate.vb 38 Error
BC30506 Handles clause requires a WithEvents variable defined in the containing type or one of its base types. wRMS D:_Private\wRMS\wRMS_Miscellaneous Forms\Main Application\frmUpdate.vb 42 Blockquote
Clicking Clean from the Build menu does not change anything.
I have numerous custom controls (buttons, checkboxes, lists, etc.) that I have created and use on the forms. Eazfuscator obfuscates the names of those controls during compilation, which makes the forms no longer viewable in the designer (this has always been a symptom); but now the IDE wont let me rebuild the solution once it has been obfuscated if I see the above errors, and I cannot even rebuild it NON-obfuscated. I'm just stuck.
Unfortunately when this happens, the project wont compile ever again, I have to basically restore the project from back ups and lose my work.
What is causing this? What can I do? Can I somehow clear the solution so the IDE just rebuilds directly from source and doesn't look at the obfuscated output at all?