public async Task IntegrateAsync(VCProject vcProject) { var projectDirectory = vcProject.ProjectDirectory; var conanfileDirectory = await ConanPathHelper.GetNearestConanfilePathAsync(projectDirectory); if (conanfileDirectory == null) { _errorListService.WriteError("unable to locate conanfile directory!"); return; } if (_settingsService.GetConanInstallOnlyActiveConfiguration()) { string relativePropFilePath = GetPropsFilePath(vcProject.ActiveConfiguration); vcProject.ActiveConfiguration.AddPropertySheet(relativePropFilePath); vcProject.ActiveConfiguration.CollectIntelliSenseInfo(); } else { foreach (VCConfiguration configuration in vcProject.Configurations) { string relativePropFilePath = GetPropsFilePath(configuration); configuration.AddPropertySheet(relativePropFilePath); configuration.CollectIntelliSenseInfo(); } } }
async System.Threading.Tasks.Task CallMenuItemBallbackAsync() { try { await MenuItemCallbackAsync(); } catch (Exception exception) { _errorListService.WriteError(exception.ToString()); } }
public async Task IntegrateAsync(VCProject vcProject) { var projectDirectory = vcProject.ProjectDirectory; var conanfileDirectory = await ConanPathHelper.GetNearestConanfilePathAsync(projectDirectory); if (conanfileDirectory == null) { _errorListService.WriteError("unable to locate conanfile directory!"); return; } if (_settingsService.GetConanInstallOnlyActiveConfiguration()) { IntegrateIntoConfiguration(vcProject.ActiveConfiguration); } else { foreach (VCConfiguration configuration in vcProject.Configurations) { IntegrateIntoConfiguration(configuration); } } }
protected internal override async Task MenuItemCallbackAsync() { _errorListService.Clear(); var vcProject = _vcProjectService.GetActiveProject(); if (vcProject == null) { _errorListService.WriteError("A C++ project with a conan file must be selected."); return; } await _conanService.InstallAsync(vcProject); await _conanService.IntegrateAsync(vcProject); }