private void addReferenceButton_Click(object sender, EventArgs e) { var dlg = new AddReferenceDialog(); if (dlg.ShowDialog() == DialogResult.OK) { _project.References.AddRange(dlg.GetSelectedAssemblies(_project)); } }