Exemple #1
0
        /// <summary>
        /// Check if the project has an unsupported project capability, such as, "SharedAssetsProject"
        /// </summary>
        public static bool HasUnsupportedProjectCapability(EnvDTE.Project envDTEProject)
        {
            Debug.Assert(ThreadHelper.CheckAccess());

            var hier = VsHierarchyUtility.ToVsHierarchy(envDTEProject);

            return(VsHierarchyUtility.HasUnsupportedProjectCapability(hier));
        }
        /// <summary>
        /// Check if the project has an unsupported project capability, such as, "SharedAssetsProject"
        /// </summary>
        public static async Task <bool> HasUnsupportedProjectCapabilityAsync(EnvDTE.Project envDTEProject)
        {
            var hier = await envDTEProject.ToVsHierarchyAsync();

            return(VsHierarchyUtility.HasUnsupportedProjectCapability(hier));
        }
        public static async Task <bool> IsSupportedAsync(EnvDTE.Project envDTEProject)
        {
            Assumes.Present(envDTEProject);
            await NuGetUIThreadHelper.JoinableTaskFactory.SwitchToMainThreadAsync();

            var hierarchy = await envDTEProject.ToVsHierarchyAsync();

            if (VsHierarchyUtility.IsProjectCapabilityCompliant(hierarchy))
            {
                return(true);
            }

            return(envDTEProject.Kind != null && ProjectType.IsSupported(envDTEProject.Kind) && !VsHierarchyUtility.HasUnsupportedProjectCapability(hierarchy));
        }
Exemple #4
0
        /// <summary>
        /// Check if the project has an unsupported project capability, such as, "SharedAssetsProject"
        /// </summary>
        public static bool HasUnsupportedProjectCapability(EnvDTE.Project envDTEProject)
        {
            var hier = VsHierarchyUtility.ToVsHierarchy(envDTEProject);

            return(VsHierarchyUtility.HasUnsupportedProjectCapability(hier));
        }