Commands Included
All commands can be hidden/shown by using the Power Commands options page. You can find the options page by going to the View menu -> Options, then choose Power Commands from the list. This is also where you can change the path used for the Visual Studio installation (used by the VS20xx Command Prompt commands).
Assembly List Import/Export This command allows you to import and export Reflector assembly lists. This helps when you customize the assembly lists the way you want them ... then need them on another machine. This command is available on the Tools menu.
Bit Flag ConverterThis is a utility that allows you to calculate bit flags (enumerations with the flags attribute). You can either check the enumeration items to get the integer representation of the value or you can type an interger into the Bit Mask text boxt and tab out to find out what enumeration items are included in that integer. This command is only available on the context menu for enumerations with the flags attribute. For example, the System.Data.CommandBehavior is an enumeration with the flags attribute. If you right click on the "CommandBehavior" in the assembly list, you will see the "Bit Flag Converter" item towards the bottom of that context menu.
Collapse AllThe Collapse All command exposes the underlying tree view's CollapseAll method functionality - which means it will collapse all expanded nodes that are currently open. This command is available on the Tools menu and on the context menu at the Assembly level (highest level parents).
Save as RESXThe Save as RESX command is only available for embedded resources which are .resources files. This command will read all the resources out of the compiled file and create a .resx file containing all of those resources. This command is available on the context menu of the individual resources.
Copy PathThis command provides a submenu containing the path to the assembly file or the directory of the assembly. Once you click on one of the submenu items, the chosen path will be copied to the clipboard. This command is available on the context menu at the module level (the level where the file name is listed - an example would be the node containing "System.Data.dll").
Create Assembly Binding RedirectEver have to create a config file entry containing an assembly binding for a binding redirect? This command helps speed the generation of that xml for you. All you need to do is provide the old version numbers and the new version numbers and the xml will be created and copied to the clipboard. This command is available at the assembly level context menu (the highest level parents in the assembly tree). The context menu item is towards the bottom with the name of "Create Binding Redirect"
Create ShortcutThe Create Shortcut command will create a shortcut on your desktop which will have the code protocol path to the item you created the shortcut for ... in short that means if you create a shortcut with this command, you will be able to double click on the shortcut (on your desktop) to then have Reflector open and go directly to that item. This command is available on most context menus of the nodes in the assembly tree, just right click and choose the "Create Shortcut" context menu item.
Email CodeInspired by the VS PowerCommands' "Email Code Snippet", this command will open your default email program's new message (it uses the mailto protocol to do this) and put the disassembled text of the chosen item into the body of the email. This command is only avaiable for individual properties, methods, fields and events and due to length restrictions doesn't work on long code bodies.
Enum ViewerThis is a utility that allows you to configure via the option pages (View menu-> Options -> Enums) how an enumeration is written out. The setting options allow you to force the value to be shown, change the ordering of the items (alpha by or value) and change the number format between decimal and hex. This command is only available on the context menu for enumerations. For example, the System.Data.CommandBehavior is an enumeration. If you right click on the "CommandBehavior" in the assembly list, you will see the "Enum Viewer" item towards the bottom of that context menu.
Open VS2005/VS2008/VS2010 Command PromptThese commands open a command prompt with the environment set for the respective Visual Studio version and the path set to the directory of the currently chosen assembly. These commands are available on the module level of the assembly tree (the level with the file names: ie. System.Data.dll). By default the VS2008 is enabled, you can turn the VS2005 and VS2010 by checking them in the options page (View menu -> Options -> Power Commands).
Open Windows ExplorerThis command opens Windows Explorer pointing to the directory of the currently chosen assembly. This command is available on the module level of the assembly tree (the level with the file name: ie. System.Data.dll).
Open ZipEver download an assembly that was zipped ... then have to unzip it and move that unzipped file and then add it to Reflector? The Open Zip command helps with this situation by provideing the ability to open a zip file containing assemblies and then easily extracting them to then add to the assembly list. This command is availabe on the File menu -> Open Zip.
Reorder Assemblies (Requires .Net framework 3.0 due to using LINQ)
This command is useful when you have added several assemblies to your assembly list ... then have problems locating a specific assembly due to the names not being alphabetical. This command will alphabetize the assembly list for you and is available on the Tools menu and the assembly level context menu (the highest level parents in the assembly tree)
Bookmarks Menu (new in version 1.1)
This command adds a Bookmarks menu to the menu bar. The functionality of the menu items are the same as the Bookmarks window. When bookmarks are added or removed, the Bookmarks menu will also update.
Open With (new in version 1.1)
This command is useful when you would like to open either and assembly, resource, type or member in an external tool. If you choose the Open With... context menu item, you will be able to choose any application that you have preconfigured to open the active item. For example: if you want to open a class's code up in Notepad, you would do the following: 1. right click on the class in the assembly browser you want to see, 2. Click Open With ..., 3. Click Add.. to set up Notepad (otherwise you could just double click on the item in the list). 4. in the Add dialog, type Notepad.exe in the Application Path and Notepad for the friendly name. 5. Click OK, 6. Choose Notepad in the list 7. either double click the Notepad list item or click OK. Now the class code should open in notepad.
Open with Paint (new in version 1.1)
Ever want to open a resource up in Paint? That is what this command does, but creating saving the file to disk and opening it up in mspaint. This command can be accessed by the context menu of image resources (extensions are narrowed down to what mspaint supports).
Open with ILDasm (new in version 1.1)
Sometimes you just need to open an assembly in ILDasm to see some things that Reflector doesn't show you ... now you can do this by just right clicking on the module name and choosing the Open with ILDasm context menu item. This command passes the module's location off to ILDasm to open it.
Run (new in version 1.1)
This command allows you to Run an assembly that is an exe (or at least has the .exe file extension). The command is available on the context menu at the module level and will only show for exe modules.
Copy As (new in version 1.2)
This command will disassemble a type, method, property, event, or field into Html, RichText or Text and copy it to the clipboard. The command is available on the context menu at the type and member levels.
NOTE: The current implementation is not configurable, future versions will have an options page to configure the Html.Disassembler Text Size (new in version 1.2)
This command provides options to make the text larger in the disassembler window from the View menu (View->Disassembler Text Size->(Largest|Larger|Normal|Smaller|Smallest). The idea behind this command is for ease of use when presenting and needing to bump the font size up quickly.
Toggle Assembly Browser (new in version 1.2)
This command is designed for using Reflector during presentation and wanting to get as much screen real estate as possible. The command is available from a button on the Tool Bar (shows up next to the language drop down) and on the View menu. The command will make the tree view width = 0 and then try to reset it (if it can't figure out the width to best set after being hidden it will use the width of 200).
Referenced By (new in version 1.2 - Requires .Net framework 3.0 due to using LINQ)
This command comes in handy when you want to find out what assemblies reference a given assembly/module. The command it available on the Assembly, Module, Assembly Reference and Module Reference levels of the assembly browser. The context menu text for this command is "Referenced By" and shows up towards the bottom of the context menu.
Open with Reflector (new in version 1.3)
Ever run across an assembly that has an assembly (dll or exe) embeded as a resource? How about an assembly that has a zip file of assemblies embedded in it? If so, this new command will help. It shows up on the resource context menu as 'Open' when the resource ends with exe,dll or zip. What it does is extract the resource and adds it to the assembly manager's tree (if it is a dll or exe). If it is a zip, then the same logic for the OpenZip command is used to show you the contents of the zip (shows assemblies only), then when you choose one, the file will be extracted and added to the assembly manager tree.
Query Editor (new in version 1.3 - Requires .Net framework 3.0 due to using LINQ)
Ever want the ability to 'query' the assemblies loaded like you can in a C# application with reflection? I have, in fact that is all the Referenced By command is - a LINQ query against the loaded assemblies. With the Query Editor you can write your own queries and run them when you want. Since this is a somewhat specialized and advanced scenario, I've disabled the Query Editor command by default. I'll be writing more about how to use the Query Editor soon. Some information about the Query Editor can be found at:
PowerCommands for Reflector 1.3 and Introducing Query Editor,
Getting Started with Query Editor,
Query Editor: Making Queries Available on Menus and
Query Editor Writing Queries Part 1Export Analyzer Tree (new in version 1.3.1)
This command shows up in the context menu of the Analyzer window and will allow you to output the current tree view to a text file. The text file has minimal formatting - it just lists the TreeNode's full path in the order they are shown.
Close All Windows (new in version 1.3.2)
This command will hide all the open windows (not the assembly tree) and is available on the Tools menu. It works by setting the visibility to false of all current loaded windows in the window manager.