>>126
以下のようにして対処できました。ありがとうございます!

if (System.Diagnostics.Process.GetCurrentProcess().ProcessName.Equals("VCSExpress")) {
//デバッグ時
} else {
//実行時
}