.NET Reflector is a one of the 10 Must-Have utilities for .NET developers. If you need to work with more than one version of the .NET Framework, especially with Silverlight and the Core Framework (3.5 or 4.0) you will find you reconfiguring your Reflector every time you changing the platform. For me this is very annoying tasks for which I was looking for a solution.
Different config files
.NET Reflector stores it settings into a config structure which includes all assemblies from the left tree in the application.
Recently I noticed the ability to start .NET Reflector with command line arguments. One command line argument allows to specify a config file path:
"C:\Program Files\Reflector\Reflector.exe" /configuration:”Reflector.cfg”
Unfortunately there seems to be a bug in version 220.127.116.11. When closing Reflector it reports the following error:
When changing the config-path to an absolute syntax then it works fine:
"C:\Program Files\Reflector\Reflector.exe" /configuration:”C:\Program Files\Reflector\Reflector.cfg”
Creating different profiles
First create different .NET Reflector shortcuts for each profile you want to have. In my case these are Silverlight, .NET 3.5 and .NET 4.0.
Edit every shortcut and add the /configuration argument to every shortcut with a different name as config file. The config file must not exists at this time.
My shortcuts are as following:
- "C:\Program Files\Reflector\Reflector.exe" /configuration:"C:\Program Files\Reflector\DOTNET40.cfg"
- "C:\Program Files\Reflector\Reflector.exe" /configuration:"C:\Program Files\Reflector\DOTNET35.cfg"
- "C:\Program Files\Reflector\Reflector.exe" /configuration:"C:\Program Files\Reflector\Silverlight.cfg"
Now start each profile with its shortcut. .NET Reflector will not find a config and asks you which default assembly list you want to use. Select the version matching to your shortcut and repeat this for every shortcut you have created.
.NET Reflector has a clear and simple config file structure. Therefore you can easily copy and paste your favorite Add-Ins from one config file to another config file.
Working with Vista/Windows 7 makes it very easy to find programs via the start menu. To use the program search, just put a copy of your shortcuts into your start menu folder (or a subfolder in it).
Now you can type in “Reflector” into your start menu search box and you get a selection of different .NET Reflector profiles.
For me these profiles are very helpful during my daily coding life.