Symbol Server Transaction Manager

Part of the recent Mastering .NET Debugging course I took covered setting up and using Microsoft’s Symbol Server technology – something that’s been around for a while, but yet many people don’t do it. While it’s incredibly useful to have a symbol server set up to contain operating system symbols (the LAN is faster than the web), it can also be useful to place your own builds on the symbol server, especially for larger or distributed teams. And, it’s trivially easy to set one up, since it’s just a file-based database all you need is an available shared directory with plenty of space. Microsoft includes the “symstore” utility which allows you to add your own symbols – it’s included with the Debugging Tools for Windows download–the same download that includes Windbg.

It’s easy to upload your builds to the symbol server using the command line. You execute a command like:

symstore add /r /f d:\builds\*.* /s \\symbol\ProductSymbols /t "Product Name" /v "Version string" /c "Comment"

(For full usage information run “symstore” with no arguments.)

The not-so-easy part of this process comes when managing previously uploaded versions of your symbols. John Robbins suggested (and who am I to resist a challenge) that it would be great if somebody wrote a tool with some sort of UI that allowed users to select previous “transactions” and delete them. The only way to do that right now is by manually scanning the “history.txt” file located on the server’s share (in an “000admin” subdirectory) and pulling out the transaction id to delete by using in a “symstore del” command.

Way, way too manual.

So, dear reader, I give you my response to John’s challenge: Symbol Server Transaction Manager!

UPDATE 1/4/2008: I’ve done a huge overhaul of the app, and released it as open source on CodePlex as the PSSymbolStore project. Download the latest release there.

It makes the process much easier, I hope. Simply start the app, and press CTRL+O to open a symbol store. Note that in all my examples I’m using a local symbol store, “C:\symbols” — but in most cases you’ll be specifying a network path such as “\\symbols\ProductSymbols”.
CropperCapture[6]

Once you’ve opened a symbol store, you’ll see a list of existing transactions. Any transactions that have previously been deleted will not be shown. You can sort by any of the columns to help find the transactions you are looking for, such as all transactions older than 2 weeks.
Symbol Server Transaction Manager (2)

At this point, it’s as easy as highlighting the transactions you want and pressing “Delete”. Or you can right-click one or more items and use the context menu. If you haven’t refreshed your view (I didn’t code it to auto-refresh because of how long the operation might take), and try to re-delete a transaction, you’ll see an error message in red. In fact, any error will be shown in red. If you come across an error condition that shows up in blue (which indicates success), let me know.

Here’s an example of successfully deleting two transactions:
Symbol Server Transaction Manager (3)

And here’s an example of trying to immediately re-delete those same transactions (bad):
Symbol Server Transaction Manager (4)

You can press the “Refresh” button to update the view to match the server:
Symbol Server Transaction Manager (5)

That’s about it, pretty simple stuff, eh? There is one thing worthy of a special note. Because deleting transactions can be a fairly long-running operation, you can cancel it. The “Delete” button changes to “Cancel” if an operation is running. If you click “Cancel”, it will kill the currently executing instance of SYMSTORE, orphaning any remaining files in the transaction, and it won’t process any more transactions, if you had selected more than one. That’s just something to be aware of. Eventually maybe I’ll be smarter about cleaning up the files, but for now, cancel at your own risk. :)

I welcome any feedback, if you find this tool useful, let me know! I’m happy to add any enhancements you can think of, too.

This entry was posted on Saturday, September 1st, 2007 at 12:43 am and is filed under debugging, tools. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

17 Responses to “Symbol Server Transaction Manager”

  1. John Robbins' Blog : Symbol Server Transaction Manager Says:

    [...] the challenge for someone to do that for a while. Aaron Lerch rose to the challenge and wrote Symbol Server Transaction Manager. If you’ve wrestled with deleting files from a Symbol Server manually, you can now do it [...]

  2. Tim De Jong Says:

    Hi Aaron,

    Great utility! It will make my job a lot easier.

    My suggestions are as follows:

    1. I’ll second John Robbin’s suggestion of marking specific builds as not deletable.
    2. Save the application window size and location and restore it on the next invocation.
    3. Save the last Symbol Server Location used and restore it on the next invocation and make a most recently used list.
    4. Open source your project.

  3. kiwidude Says:

    Good stuff mate. Just to add to Tim’s suggestions which were all good…

    5. Ability to specify a path to symstore.exe for when not in your path

    (Confused me for a while why I was getting file not found errors when trying to delete transactions)

  4. aaron Says:

    Thanks Tim & kiwidude!

    I’ve made most of these changes, but need to fix up a few things before I post the update.

  5. Romout Says:

    Hi,

    First of all, nice tool!

    I would like to have a feature to get all symbols out for Version w.x.y.z as our project involves about 120 libraries, it would be neat to get them out at once so that one can use them, for example, to copy them on a remote machine for debugging.

    Thanks in advance!

  6. aaron Says:

    @Romout – thanks!
    I’m actually in the middle of v1.0 of the Transaction Manager, after which I’ll open source it on codeplex or something. I’m basically re-writing “symstore.exe” in PowerShell cmdlets – which will enable scenarios just like what you’re hoping for. You should be able to do what you want with a relatively simple powershell script. I’ll post about it when it’s ready.

  7. Micro ISV Advice | Aaron Lerch Says:

    [...] a free version of ShuffleText’s Highlight (”fuzzy search” component) into my Symbol Server Transaction Manager, I would totally spend the time to do it. And after I’ve gained some free experience with it, [...]

  8. Symbol Store Manager - open source and a beta release - Aaron Lerch Says:

    [...] Store Manager – open source and a beta release A while ago I "released" the Symbol Server Transaction Manager. It was a binaries-only, quick-and-dirty GUI wrapper utility I wrote on top of the symstore.exe [...]

  9. Symbol Store Manager - open source and a beta release | Aaron Lerch Says:

    [...] December 30th @ 6:18 pm by aaron A while ago I "released" the Symbol Server Transaction Manager. It was a binaries-only, quick-and-dirty GUI wrapper utility I wrote on top of the symstore.exe [...]

  10. John Robbins' Blog : PowerShell Symbol Store Says:

    [...] while ago I wrote about Aaron Leerch’s Symbol Server Transaction Manager, which put a nice front end on managing your Symbol Server. As I have been harping for years, if [...]

  11. H. I. Says:

    Thanks for the wonderful tool. I have a question. I am trying to delete symbol, but I am getting an error that
    Error deleting transaction 0000000251: SYMSTORE ERROR: Class: Server. Desc: Couldn’t get transaction id from Z:\SymbolS\
    How to get around this error? Please help.

  12. aaron Says:

    @H.I.

    I wouldn’t use the version of the tool you have anymore – go get the newest version from CodePlex: http://www.codeplex.com/PSSymbolStore
    If it still gives you problems, put something on the discussion boards there to track the problem (or enter a new Issue)

  13. H. I. Says:

    Thanks for the answer, I got 0.1 Beta from http://www.codeplex.com/PSSymbolStore/Release/ProjectReleases.aspx?ReleaseId=9441

    But when I try to install it, I get the error, with the install log as follows:

    Installing assembly ‘C:\PSSymbolStore-0.1-beta\PSSymbolStore.dll’.
    Affected parameters are:
    assemblypath = C:\PSSymbolStore-0.1-beta\PSSymbolStore.dll
    logfile = C:\PSSymbolStore-0.1-beta\PSSymbolStore.InstallLog
    logtoconsole =
    An exception occurred while trying to find the installers in the C:\PSSymbolStore-0.1-beta\PSSymbolStore.dll assembly.
    System.Reflection.ReflectionTypeLoadException: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.
    Aborting installation for C:\PSSymbolStore-0.1-beta\PSSymbolStore.dll.
    Rolling back assembly ‘C:\PSSymbolStore-0.1-beta\PSSymbolStore.dll’.
    Affected parameters are:
    assemblypath = C:\PSSymbolStore-0.1-beta\PSSymbolStore.dll
    logfile = C:\PSSymbolStore-0.1-beta\PSSymbolStore.InstallLog
    logtoconsole =
    An exception occurred while trying to find the installers in the C:\PSSymbolStore-0.1-beta\PSSymbolStore.dll assembly.
    System.Reflection.ReflectionTypeLoadException: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.
    Aborting installation for C:\PSSymbolStore-0.1-beta\PSSymbolStore.dll.
    Installing assembly ‘C:\PSSymbolStore-0.1-beta\PSSymbolStore.dll’.
    Affected parameters are:
    logtoconsole =
    assemblypath = C:\PSSymbolStore-0.1-beta\PSSymbolStore.dll
    logfile = C:\PSSymbolStore-0.1-beta\PSSymbolStore.InstallLog
    An exception occurred while trying to find the installers in the C:\PSSymbolStore-0.1-beta\PSSymbolStore.dll assembly.
    System.Reflection.ReflectionTypeLoadException: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.
    Aborting installation for C:\PSSymbolStore-0.1-beta\PSSymbolStore.dll.
    Rolling back assembly ‘C:\PSSymbolStore-0.1-beta\PSSymbolStore.dll’.
    Affected parameters are:
    logtoconsole =
    assemblypath = C:\PSSymbolStore-0.1-beta\PSSymbolStore.dll
    logfile = C:\PSSymbolStore-0.1-beta\PSSymbolStore.InstallLog
    An exception occurred while trying to find the installers in the C:\PSSymbolStore-0.1-beta\PSSymbolStore.dll assembly.
    System.Reflection.ReflectionTypeLoadException: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.
    Aborting installation for C:\PSSymbolStore-0.1-beta\PSSymbolStore.dll.
    Installing assembly ‘C:\PSSymbolStore-0.1-beta\PSSymbolStore.dll’.
    Affected parameters are:
    logtoconsole =
    assemblypath = C:\PSSymbolStore-0.1-beta\PSSymbolStore.dll
    logfile = C:\PSSymbolStore-0.1-beta\PSSymbolStore.InstallLog
    An exception occurred while trying to find the installers in the C:\PSSymbolStore-0.1-beta\PSSymbolStore.dll assembly.
    System.Reflection.ReflectionTypeLoadException: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.
    Aborting installation for C:\PSSymbolStore-0.1-beta\PSSymbolStore.dll.
    Rolling back assembly ‘C:\PSSymbolStore-0.1-beta\PSSymbolStore.dll’.
    Affected parameters are:
    logtoconsole =
    assemblypath = C:\PSSymbolStore-0.1-beta\PSSymbolStore.dll
    logfile = C:\PSSymbolStore-0.1-beta\PSSymbolStore.InstallLog
    An exception occurred while trying to find the installers in the C:\PSSymbolStore-0.1-beta\PSSymbolStore.dll assembly.
    System.Reflection.ReflectionTypeLoadException: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.
    Aborting installation for C:\PSSymbolStore-0.1-beta\PSSymbolStore.dll.
    Installing assembly ‘C:\PSSymbolStore-0.1-beta\PSSymbolStore.dll’.
    Affected parameters are:
    logtoconsole =
    assemblypath = C:\PSSymbolStore-0.1-beta\PSSymbolStore.dll
    logfile = C:\PSSymbolStore-0.1-beta\PSSymbolStore.InstallLog
    An exception occurred while trying to find the installers in the C:\PSSymbolStore-0.1-beta\PSSymbolStore.dll assembly.
    System.Reflection.ReflectionTypeLoadException: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.
    Aborting installation for C:\PSSymbolStore-0.1-beta\PSSymbolStore.dll.
    Rolling back assembly ‘C:\PSSymbolStore-0.1-beta\PSSymbolStore.dll’.
    Affected parameters are:
    logtoconsole =
    assemblypath = C:\PSSymbolStore-0.1-beta\PSSymbolStore.dll
    logfile = C:\PSSymbolStore-0.1-beta\PSSymbolStore.InstallLog
    An exception occurred while trying to find the installers in the C:\PSSymbolStore-0.1-beta\PSSymbolStore.dll assembly.
    System.Reflection.ReflectionTypeLoadException: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.
    Aborting installation for C:\PSSymbolStore-0.1-beta\PSSymbolStore.dll.
    Installing assembly ‘C:\PSSymbolStore-0.1-beta\PSSymbolStore.dll’.
    Affected parameters are:
    logtoconsole =
    assemblypath = C:\PSSymbolStore-0.1-beta\PSSymbolStore.dll
    logfile = C:\PSSymbolStore-0.1-beta\PSSymbolStore.InstallLog
    An exception occurred while trying to find the installers in the C:\PSSymbolStore-0.1-beta\PSSymbolStore.dll assembly.
    System.Reflection.ReflectionTypeLoadException: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.
    Aborting installation for C:\PSSymbolStore-0.1-beta\PSSymbolStore.dll.
    Rolling back assembly ‘C:\PSSymbolStore-0.1-beta\PSSymbolStore.dll’.
    Affected parameters are:
    logtoconsole =
    assemblypath = C:\PSSymbolStore-0.1-beta\PSSymbolStore.dll
    logfile = C:\PSSymbolStore-0.1-beta\PSSymbolStore.InstallLog
    An exception occurred while trying to find the installers in the C:\PSSymbolStore-0.1-beta\PSSymbolStore.dll assembly.
    System.Reflection.ReflectionTypeLoadException: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.
    Aborting installation for C:\PSSymbolStore-0.1-beta\PSSymbolStore.dll.

  14. aaron Says:

    Please create a discussion list entry for this on the codeplex site, thanks.

  15. H. I. Says:

    I created a discussion entry for this. How should I get around this error, An exception occurred while trying to find the installers in the C:\PSSymbolStore-0.1-beta\PSSymbolStore.dll assembly.

    Thank you.

  16. H. I. Says:

    Can you please help me install the Symbol Store?

    Thank you.

  17. H. I. Says:

    After installing Symbol Store, should SymbolServerTransactionManager.exe app be in any particular folder? Mine is located in C:\PSSymbolStore-0.1-beta, but while launching it crashes with following info,

    EventType : clr20r3 P1 : symbolstoremanager.exe P2 : 1.0.0.0
    P3 : 4778470b P4 : system.management.automation P5 : 1.0.0.0
    P6 : 451ac035 P7 : 14c4 P8 : 3f
    P9 : 52yudc0xdbsyqki2yohgixw3lh3d3pkm

Leave a Reply