Thursday, September 18, 2014

Visual Studio Online (cloud hosted TFS): Setup a Preferred (alternative) email on which to Receive Alert Notifications

Like a significant number of developers, I use a single Microsoft ID (single email address) for multiple Visual Studio Online repositories. Enter into this Visual Studio Online alerts which get sent by default to the email address associated with the Microsoft ID. When working a company it makes sense to send alerts to the corporate email even if you're Microsoft ID is your personal email address.

This posting demonstrates how to associate a "preferred email" address so alerts are sent to the preferred email address instead of the email associated with the logged in Microsoft ID. This sounds like a great feature but beware the following: the preferred email address is associated with the Microsoft ID. This means that every Visual Studio Online instance will send alerts to the specified preferred email. The preferred email address is not Visual Studio Online instance-specific.

To set the alternate email for all instances of Visual Studio accessed by the Microsoft ID, log in to the Visual Studio instance:


Click on the logged in username which shows a menu including menu items My profile and Sign out:



Notice below in the User Profile dialog, the preferred email address can be specified:


Once the preferred email address has been modified, click on the Save changes button in order to commit the changes.

After the preferred email address has been changed, an email will be sent to the preferred email address. A user must click on the email's conformation link thus verifying the preferred email and giving Visual Studio the green light to send alert related emails to the preferred email address.





Wednesday, September 3, 2014

Windows Store Applications: Simulating Application Suspending, Restoring and Terminating in Visual Studio

During debugging it is desirable to access the code that handles state management: suspending, terminating, and restoring an application. Visual Studio allows these states to be simulated. The suspend, restore and terminate states obviously apply to Windows Store applications. The states and state transitions of a Windows Store applications are as follows:


The Debug Location toolbar facilitates Visual Studio's ability to simulate run states for Windows Store applications. To verify that the Debug Location toolbar is enabled, right click on Visual Studio menus. The Debug Location menu item should appear as checked in the context menu displayed. Shown below is a screenshot from Visual Studio 2013 where the Debug Location toolbar is not checked and hence currently visible:



The Debug Location toolbar can also be displayed using menus: View | Toolbars | Debug Location.

When visible the Debug Location toolbar is as follows (the Debug Location toolbar below is split for readablity):




The steps to simulate events in Visual Studio (suspending, terminating and restoring) are as follows:

  • Run the Windows Store application in the debugger: Debug | Start Debugging or shortcut, F5
  • Return to Visual Studio by pressing Alt-Tab
  • Click on the Lifecycle Events drop down on the Debug Location task bar



The items under the Lifecycle Events drop down ("Suspend", "Resume" and "Suspend and shutdown") correspond to the Windows Store application run state to be simulated by Visual Studio.