I'd like to write a macro to crawl through the files in my project directory and find files that aren't included in the project.
In playing around with the DTE object, I see that the Project
object has ProjectItems
; if a ProjectItem
represents a directory, then it has its own ProjectItems
collection. This gives me all files that are included in the project.
So I could crawl recursively through each ProjectItems collection, and for each ProjectItem that's a directory, check to see if there are files in the file system that don't have a corresponding ProjectItem. This seems clumsy, though.
Any ideas of a simpler way to approach this?