예제 #1
0
        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);
        }
예제 #2
0
        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);
        }
예제 #3
0
        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);
        }