Windows Phone Development Tool – Windows Phone Commands


Overview:

Lately as many of you know I have been concentrating on doing Windows Phone related development. Did manage to finish 3 apps for the I Unlock Joy program and must say it was an exciting development for me. The platform itself is very easy to program if you have already aware of concepts of XAML and Silverlight. In my endeavor of learning came across many tools and Tips & Tricks. Will be sharing those through my blog posts. Today I will be sharing this blog post about a tool that I came across on Codeplex. It is known as Windows Phone Commands. So rest of this blog post will be about this new tool and its capabilities. So lets starts.


About Windows Phone Commands:

So what is Windows Phone Commands you ask. According to the creators of Windows Phone Commands, it is:

“An open-source project built on top of. Microsoft Net 4.0, framework, a powerful tool to assist the development phone for windows 7.1 as Isolate Storage Explorer (with copies of folders and files), Deployer, Build integrated, etc.”

Yes it’s a tool which will assist us in Windows Phone development activities. In sections to come we will go through its capabilities.


Getting Windows Phone Commands:

So where can we find Windows Phone Commands. Since it’s a open source project it is hosted at Codeplex. Here is the URL for the Windows Phone Commands project on Codeplex:

http://wphonecommands.codeplex.com/

Go to downloads and download the release. The package you download is a .VSIX file i.e. Visual Studio Extension file. Extensions are nothing but Software Add-On created for Microsoft Visual Studio IDE.


Installing Windows Phone Commands:

Before you install the Windows Phone Commands, make sure you meet the prerequisites. They are:

  • Microsoft Visual Studio 2010
  • Microsoft Silverlight for Windows Phone Toolkit

Once you download the package from Codeplex double click the .VSIX file. You will see the following installation window:

image

Click Install and wait for it to complete. Once installed the Windows Phone Commands can be found by navigating to View > Other Windows > Windows Phone Commands inside VS.NET IDE. Here is a screenshot of the same:

image


Feature Discovery:

Lets take a lap around features of Windows Phone Commands. So in following sections we will look at all the features supported.

Connecting to Emulator or Device:

When we first access the Windows Phone Commands – i.e. we have not opened any Windows Phone Project or Solution and we open Windows Phone Commands, we will be presented with following screen:

image

Click the second icon ( the icon is depicted like a event icon ) available on the icon bar located at the top. This is used to connect to a device or an emulator. Following is the UI we will get. Note that other icons are disabled now.

image

For the sake of this blog post I will be selecting Windows Phone Emulator and click on connect button. This will open the emulator and show the device info as below:

image

As you can see this extension opens the emulator, connects to that and pulls the emulator info. It also can connect to a device and pull the device info too. Also note that 2 Icons are enabled now. One icon – which is like a folder image– is used to Show & Refresh applications on the Emulator/Device. Another icon – which is like a phone & a hammer image– allows you to deploy applications on to the Emulator or on to a device.

Show & Refresh Applications:

This feature can show the installed applications on the emulator or device, run some of the common phone applications on the emulator and allows you to access certain phone settings with one click from the extension. Here is the screenshots of the same:

image

image

image

Clicking each options will load that application or feature on your emulator. Since I don’t have a physical device I cant really tell if the same action is performed when we connect to a device.

Deploy Applications:

This feature allows us to load any XAP files and deploy directly to either Emulator or a Device. You can browse and select a XAP file from your system and load deploy it. Here is the screen shot of the same:

image

Isolated Storage Explorer:

Once you install an application, in the Show & Refresh Applications section, the installed application will be shown as below.

image

As you can see, the installed app is shown with its GUID and we have 3 options provided as buttons below the application name – Launch, Isolated Storage and Uninstall. If you select the isolated storage button (icon in the middle), the isolated storage for the app will be shown as below:

image

If you right click on any file, you get options to Copy, Delete or Rename that file. If you right click on any folder you get options to Create New Folder or Add Files.

Manifest Editor:

Till now the Windows Phone Commands extension was used outside of a Windows Phone Project or Solution i.e. we did not have a project open. So the third icon in the top bar of the extension was not enabled. Once you open any Windows Phone project or solution, this icon will light up.  This icon is used to edit Windows Phone Manifest of a project. I created a default Databound Windows Phone Project and here is the screenshot of the manifest editor capability:

image

One neat feature I liked here is the Capabilities editing. Instead of meddling with the XML – you can just check & uncheck couple of checkboxes and click on Save manifest – the extension will do the XML writing. Here is a screenshot of the same:

image


Conclusion:

A very handy tool to work with during Windows Phone Development. There may be other tools out there which might be doing the same things but this one sits right inside the Visual Studio IDE and you don’t have to be outside of the IDE. Manifest editing is a neat feature if somebody is not comfortable with playing around the XML. Isolated Storage explorer is another neat feature where in sitting right inside the IDE you can check out the isolated storage of your app and watch it change as you are running app in the emulator. All in one from my perspective a nice tool to have while you develop Windows Phone Apps. Give it a try and let me know if this post helped you.

Till next time, as usual, Happy Coding. Code with Passion, Decode with Patience.

  • http://twitter.com/pavanaja Pavanaja U B

    Just curious -why do we need another add-on to VS? Is the WP SDK given by MS not good enough?

    -Pavanaja

    • http://kashyapas.com Lohith

      Pavanaja … ISOlated storage exploration is not easy with the tools provided by MS. they have a command line tool which can be used to take snapshot. But not see the contents at run time. These extension can show you the storage for your app within the IDE as this is an extension. Apart from that the Manifest editor – its a GUI like with this extension, otherwise you need to always go to properties and edit the background information, and open the manifest.xml to provide the capabilities information which is in XML format. Hope that answers your question :)

  • http://twitter.com/garfbradaz Gareth Bradley

    Nice article.