예제 #1
0
        public static ProjectItem GetOrCreateFolder(this DTE2 dte, string folderName)
        {
            ProjectItems projectItems = dte.GetSelectedProjectItems();

            if (projectItems.ContainingProject.TryFindProjectItemByName(folderName, out ProjectItem foundItem))
            {
                return(foundItem);
            }

            return(projectItems.AddFolder(folderName));
        }