I just switch my build to a custom "Design" configuration which defines DESIGN and created this custom class
#if DESIGN public class MsForm : Form{ private void AttachAsTopLevelForm(TopoDOTApp myAddin, bool b) { //throw new NotImplementedException(); } public MsForm() { } #else internal class MsForm : Bentley.MstnPlatformNET.WinForms.Adapter { public MsForm() { this.FormClosing += this.MsForm_FormClosing; this.Load += this.MsForm_Load; } #endif