views:

808

answers:

4

Are there any free tools available to view the contents of the solution user options file (the .suo file that accompanies solution files)?

I know it's basically formatted as a file system within the file, but I'd like to be able to view the contents so that I can figure out which aspects of my solution and customizations are causing it grow very large over time.

A: 

I don't know any tool, but you can try to access user settings via IVsPersistSolutionOpts interface

aku
A: 

Notepad? I think it's just xml.

Joel Coehoorn
in fact it's binary
aku
A: 

I'm not aware of a tool, but you could write a Visual Studio extension to list the contents without too much work.

If you download the Visual Studio SDK, it has some straightforward examples that you can use. Find one that looks appropriate (like maybe the Toolwindow, if you want to give yourself a graphical display) and lift it (for your own personal use, of course).

What makes it easy is that the Package class which you implement in any VS extension, already implements the IVSPersistSolutionOpts, as aku mentioned. So you can just call the ReadUserOptions method on your package and inspect the contents.

Darcy Casselman
+1  A: 

The .SUO file is effectively disposable. If it's getting too large, just delete it. Visual Studio will create a fresh one.

If you do want to go poking around in it, it looks like an OLE Compound Document File. You should be able to use the StgOpenStorage function to get hold of an IStorage pointer.

Roger Lipscombe