Latest version: 8.0
Notes & articles
Using the .NET Reflector Power Commands
If you've tried the .NET Reflector 7.7 release, you'll notice some new commands have appeared across the program. These are the remains of the Power Commands we integrated into the tool in an earlier release. These commands could previously be enabled from the options menu, but they hadn't been worked on in a long time and had run into disrepair. Some were confusing and others were broken.
Here's a rundown of the updated commands and how to access them from within Reflector.
Collapse All Assemblies
There is now a command to Collapse All Assemblies in the File menu. Since we don't have a root node in the assembly browser (like a solution in Visual Studio has) this doesn't make sense in a context menu, so it's in the File menu for now. As Jason Haley put it when he originally wrote the Power Commands add-in: "This exposes the underlying tree view's CollapseAll method functionality which means it will collapse all expanded nodes that are currently open." It's great for when you have a ton of assemblies and you need to go back to the default state before you expanded them all.
When viewing code for a class, type, property or field, you can now use the right-click context menu in the code window to copy all the code to the clipboard in a format of your choice. Note that for a class this will expand all the methods automatically, so in the picture above selecting "Text" will copy the entire ConcurrentBag <T> class to the clipboard.
Hopefully this will fix some of the issues where you need to quickly reproduce the code generated by Reflector, but were having problems with those pesky code hyperlinks. The original copy function is still there if you still want to copy a selection as well, and becomes available when you highlight a section of code.
Import/Export Assembly List
We're still looking at ways to improve our assembly list management functionality, but for now there's a way to save your assembly list setup by using the Export Assembly List command, and then load it back using Import. Perhaps you might want to do this as part of backing up your Reflector configuration, or to move between different computers with the same setup. Exporting opens another dialog where you can choose which assemblies from the lists to export, and save this as an XML file for later importing.
It's not immediately clear that importing won't make changes to the assemblies which are currently loaded into Reflector, only the assembly lists. So once you've imported your assembly lists you will still need to Open Assembly List and select the list you want to load into Reflector.
Open File Location
This opens an explorer window at the location on disk where the assembly can be found. Useful for when you quickly need to get to the DLL or EXE so you can manipulate the file outside of Reflector.
At several levels in the assembly browser there's an option to open the selected item with an application of your choice. Separate commands for common applications formed a large proportion of the original Power Commands add-in, so we've distilled these into default applications for one larger Open With command.
This means slightly different functionality for different levels in the tree. Notably, code snippets are written to a temporary file (using the Copy As function described earlier, but writing to a file instead of the clipboard) so they can be opened, and resources are extracted before they open normally. Resource tables are opened in Visual Studio as .RESX files so they can be viewed more easily. And assemblies open as expected.
Selecting Choose Application will bring up a dialog where you can add your own applications. Adding an application to the list will save it so that next time you select Choose Application you will be able to select the desired application faster.
Did you know you can drag a .ZIP archive into Reflector and it will decompile the compressed assemblies without you having to extract them yourself? This was originally a Power Command, but while looking for ways to merge the code I discovered native functionality in Reflector for opening Silverlight applications (XAP files) which could be easily extended to handle .ZIP archives as well. You can also select .ZIP archives now from the drop down menu in the Open Assembly dialog, and open them through the menu.
The analyzer now contains the functionality to show which of the assemblies loaded into Reflector depend on the selected assembly or module. This means you can now check dependencies both ways: from the assembly browser for references of the current assembly, and from the analyzer for assemblies referencing the current assembly.
At the moment the analyzer will only show the list of assemblies. But if it's useful, it might be an exciting possible improvement for the future to attempt to show the code which calls into the current assembly by making the analyzer tree expandable to show the classes and methods which do this! That way you will be able to see not only where your assembly is being used, but also how it is being used by other assemblies.
Other Power Commands
If you were previously familiar with the Power Commands in the options menu and there was one you frequently used which I haven't detailed here (for example the Query Editor) then don't panic. We've packaged up a few of the other useful commands and plan on releasing a new Power Commands add-in with the final release of 7.7. This will put the option to enable the extra commands back into the options menu so you can select them from there.
The reason we opted for this approach was to streamline the application to remove those commands which would only be used in niche cases. We really wanted to get rid of the option to enable/disable the Power Commands, as discoverability was really low while they were turned off by default. These commands didn't seem valuable enough to be always enabled in Reflector, but still worked to the point where people might use them, so a separate add-in seemed best.
As always, we're constantly looking for feedback and feature requests! If there are any new commands you'd really like to see in the next version of Reflector then there are the usual channels: the forums or email@example.com
Was this article helpful?
Thanks for your feedback!
- Log files
- Methods showing no source code in the disassembly window
- Permissions error on starting Visual Studio
- Some Red Gate products identified as containing a trojan by Anti-Virus software
- Activation may fail with Unknown Error -1
- Product uses web help although a CHM file is available locally
- Argument exception resulting from missing environment variable
- Check for updates may fail when used through proxies
- 'Unidentified Publisher' error when repairing or uninstalling
- Licensing activates product as standard edition
- Moving Red Gate software products to another machine
- Red Gate tools log locations
- The application UI opening slowly when there is no internet access
- Debugging a SharePoint customization
- Debugging into SharePoint and seeing the locals
- Downloading .NET Reflector as a zip file
- Introduction to building .NET Reflector add-ins
- .NET Reflector Tips: keyboard shortcuts
- Using the .NET Reflector Power Commands
- Release notes - .NET Reflector 7.x
- Release notes - .NET Reflector 8.x
- Using the .NET Reflector installer
- Using .NET Reflector with Visual Studio 2005 or 2008
- .NET Reflector and .NET Reflector Pro release notes - version 6.xx
- .NET Reflector, .NET Reflector VS and .NET Reflector VS Pro release notes - version 7.xx
- The XP Bug Workaround
- Log file for .NET Reflector Pro
- Red Gate product acknowledgements
- Activating your products
- Activating your products
- Red Gate bundle history
- Check for updates
- Troubleshooting Check for Updates errors
- Current versions
- Deactivating your products
- Installing Red Gate products from the .msi file
- Requesting additional activations
- Serial numbers for bundles
- Reactivating using a different serial number
- Extending your trial
- Finding your serial numbers
- Moving a serial number from one computer to another
- No response received for manual activation
- Licensing and activation resources
- Licensing and activation resources
- Troubleshooting licensing and activation errors
- Licensing and activation FAQs
- Red Gate tools log file locations
- Download old versions of products
- Download product prerequisites & utilities
- Support & upgrades
- Upgrading your software
- Upgrading FAQs