In our shop, we try to get people to check their files into VSS often. I'm sure you would agree that there are some times when it is really important to have all files checked-in: like before a big release, before someone goes on vacation, before they leave for a new job, etc.
This is just a quick utility that uses .NET COM interop to scan VSS to see who has files checked-out so we can remind them to check their files-in, or give them the thumping they deserve. Although VSS has a reporting feature to find users with files checked out, it's a little hard to find, and it doesn't have a lot of options. This utility not only finds the files, but it has an option to export the results to MS Excel.
This project requires Visual Studio 2005 (and up) and VSS 6.
Using the code
Open the project and go to the Properties screen (from the main menu, choose: Project, VssScanner Properties). Go to the Settings section. Make sure the VssPath points to your VSS directory (i.e., the location of the srcsafe.ini file for your VSS). Save the settings, and you are ready to run the project.
The VSS scanning part is really pretty light: 70 lines (not including auto-generated files).
The DataSet-to-Excel class is something that I have used in several other projects. It is a little hackish (since it uses
StringBuilder instead of XML objects) but it is much lighter and faster than using XMLDOM.
I didn't make it for the *wow* factor. I did it strictly for utility and time-savings.
Ideas for enhancements
To make this project much cooler (in the next rev), I intend to design it for easy automation. It will test for command line with switches (/file) so it generates a report to some file or (/email) to email the spreadsheet to the boss. Sweet!
- v 1.0 - Initial version. Minimal config help. Minimal error handling. Lite on the features.
- v 1.1 - Improvements: Stores the search results in a
DataSet. Results displayed in a grid. Additional error handlers. Form remembers its height/width. Option to export to MS Excel (Office XML) file.