views:

82

answers:

2

Can anyone think of a way (perhaps using a PowerShell script or similar) where I can look for *.cs files that are on disk in the folder structure, but aren't included in a project file?

This has come about gradually over time with merging in Subversion etc. I'm looking for a way to clean up after myself, basically. :)

+1  A: 

All your .cs files will be mentioned in the project file, right? Scrape the XML, list the files and then do a search on the whole system. Works, but is inefficient.

dirkgently
Yeah, efficient isn't an issue here for a once-every-now-and-again script. I was wondering what that script should look like though (my scripting-fu isn't much up to date than VBScript, so I might end up with a C# app...)
Neil Barnwell
Will try to whip something if I can, don't count on it though. As for an optimization that crossed my mind -- you can probably use two different threads, one to identify the files, another to delete identified files.
dirkgently
A: 

"Show all files" button at the top of Solution Explorer, then manually inspect?

Richard Ev
Yeah, the whole point though really is that I want something that will do it automatically.
Neil Barnwell