public void VerifyAssembly(string filePath) { bool isMono = Type.GetType("Mono.Runtime") != null; var shellOutput = isMono ? ShellService.PEDump(filePath) : ShellService.PEVerify(filePath); if (shellOutput.ExitCode != 0) { throw new Exception(shellOutput.ToString()); } }