Reflector: How to Add a WP7 Assembly List

by Jason Haley 1. December 2011 08:59

Since Reflector doesn’t offer the option of choosing a set of Windows Phone 7 assemblies to start out with, I put together my own.  This blog entry walks you through the two ways to adding this to your own Reflector setup.

imageFirst a little about Assembly Lists – since some people are not aware of this functionality in Reflector.  If you go to the File menu and select Open Assembly List…, you will get the Assembly List Management dialog showing you the different assembly lists you have configured on your machine.  If you haven’t set any up, the only item you’ll see in this list is “—Default—“.

An assembly list is a listing of assemblies that are loaded in the assembly browser tree.  So if you find that you need multiple configurations of this tree or need different versions of the same thing for different reasons (like a Silverlight 4 and a .Net 4) – you may want to add an assembly list with those assemblies so you can keep the tree the way you need it for future usage and just switch between assembly lists when you need to.

In my case, I keep an assembly list for Silverlight 4, .Net 4 and when I’m deep in development or just spending a lot of time in Reflector, I’ll create an assembly list for whatever I’m working on … which is why I found the need to setup a Windows Phone 7 assembly list.

Here are the two options to get the WP7 assembly list into your Reflector setup:

Option 1 – Edit Your Reflector.cfg file

Under the covers the assembly lists are just lines in the Reflector.cfg file that follow a specific format (“<path to the assembly>|<assembly list name>”) and located in order under the [AssemblyManager] section. 

1.  Close Reflector if it is open

2.  Locate your Refelctor.cfg file.  On Windows 7 it is located in the following directory: 
    C:\Users\<username>\AppData\Local\Red Gate\.NET Reflector 7

3.  Open the Reflector.cfg file in a text editor and locate the [AssemblyManager] section of the file

4.  Scroll to the bottom of it and add these lines:

"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\Silverlight\v4.0\Profile\WindowsPhone71\Microsoft.Phone.dll|WP7"
"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\Silverlight\v4.0\Profile\WindowsPhone71\Microsoft.Phone.Interop.dll|WP7"
"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\Silverlight\v4.0\Profile\WindowsPhone71\Microsoft.Phone.Reactive.dll|WP7"
"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\Silverlight\v4.0\Profile\WindowsPhone71\mscorlib.dll|WP7"
"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\Silverlight\v4.0\Profile\WindowsPhone71\System.dll|WP7"
"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\Silverlight\v4.0\Profile\WindowsPhone71\System.Core.dll|WP7"
"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\Silverlight\v4.0\Profile\WindowsPhone71\system.data.linq.dll|WP7"
"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\Silverlight\v4.0\Profile\WindowsPhone71\System.Device.dll|WP7"
"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\Silverlight\v4.0\Profile\WindowsPhone71\System.Net.dll|WP7"
"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\Silverlight\v4.0\Profile\WindowsPhone71\System.Observable.dll|WP7"
"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\Silverlight\v4.0\Profile\WindowsPhone71\System.Runtime.Serialization.dll|WP7"
"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\Silverlight\v4.0\Profile\WindowsPhone71\System.ServiceModel.dll|WP7"
"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\Silverlight\v4.0\Profile\WindowsPhone71\System.ServiceModel.Web.dll|WP7"
"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\Silverlight\v4.0\Profile\WindowsPhone71\System.Windows.dll|WP7"
"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\Silverlight\v4.0\Profile\WindowsPhone71\System.Xml.dll|WP7"
"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\Silverlight\v4.0\Profile\WindowsPhone71\System.Xml.Linq.dll|WP7"
"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\Silverlight\v4.0\Profile\WindowsPhone71\System.Xml.Serialization.dll|WP7"

5.  Save the Reflector.cfg file

6.  Open Reflector, and go to the File –> Open Assembly List…

You should now see the WP7 option, like shown below:

SNAGHTML2aaff14

Option 2 – Use Assembly List Import*

The Assembly List Import/Export functionality is part of the PowerCommands functionality – which means unless you have it enabled you won’t set the menu item.  If you go to the Tools –> Options you can enable the Import/Export AssemblyList command (shown below).

SNAGHTML2af7423

1. Download the WP7AssemblyList.xml file and save it to a location you can remember

2.  Go to the File menu –> Import/Export AssemblyList –> Import

image

This will launch the Open file dialog.

3.  Choose the WP7AssebmlyList.xml file you downloaded and click Open

This will open the Import/Export Assembly List dialog.

***WARNING – If you don’t follow #4 you will loose any assembly lists you already have saved ***

4.  Uncheck the “Hide existing Assembly List items” checkbox at the bottom and check the WP7 node of the tree to import all the assemblies listed in the xml file.

SNAGHTML2b788cc

5.  Click Import

6. Close Reflector – this saves the changes to the Reflector.cfg file.

7. Open Reflector, and go to the File –> Open Assembly List…

You should now see the WP7 option, like shown below:

SNAGHTML2aaff14

Comments (0) | Post RSSRSS comment feed |

Categories: Reflector
Tags:

Comments are closed