public async static Task <NuGetProject> GetNuGetProjectAsync(EnvDTE.Project project, ISolutionManager solutionManager) { ThreadHelper.ThrowIfNotOnUIThread(); Debug.Assert(project != null); Debug.Assert(solutionManager != null); var nuGetProject = await solutionManager.GetNuGetProjectAsync(project.Name); if (nuGetProject == null) { nuGetProject = await solutionManager.GetNuGetProjectAsync(project.UniqueName); } return(nuGetProject); }
public async static Task <NuGetProject> GetNuGetProjectAsync(EnvDTE.Project project, ISolutionManager solutionManager) { Debug.Assert(project != null); Debug.Assert(solutionManager != null); await NuGetUIThreadHelper.JoinableTaskFactory.SwitchToMainThreadAsync(); var nuGetProject = await solutionManager.GetNuGetProjectAsync(project.Name); if (nuGetProject == null) { nuGetProject = await solutionManager.GetNuGetProjectAsync(project.UniqueName); } return(nuGetProject); }
private async static Task <IMSBuildProjectSystem> GetMSBuildNuGetProjectSystemAsync(ISolutionManager solutionManager, IVsProjectAdapter vsProjectAdapter) { var nuGetProject = await solutionManager.GetNuGetProjectAsync(vsProjectAdapter.ProjectName); if (nuGetProject != null) { var msBuildNuGetProject = nuGetProject as MSBuildNuGetProject; if (msBuildNuGetProject != null) { return(msBuildNuGetProject.ProjectSystem); } } return(null); }