private async Task OnMSVCBuildSucceededAsync() { var runClang = SettingsProvider.CompilerSettingsModel.ClangAfterMSVC; if (runClang == false || SolutionInfo.ContainsCppProject() == false) { return; } var exitCode = int.MaxValue; if (VsServiceProvider.TryGetService(typeof(DTE), out object dte)) { exitCode = (dte as DTE2).Solution.SolutionBuild.LastBuildInfo; } // VS compile detected errors and there is not necessary to run clang compile if (exitCode != 0) { return; } // Run clang compile after the VS compile succeeded OnBeforeClangCommand(CommandIds.kCompileId); await CompileCommand.Instance.RunClangCompileAsync(CommandIds.kCompileId, CommandUILocation.ContextMenu); OnAfterClangCommand(); }