Category Archives: Visual Studio

How to fix 403 errors when managing Azure SQL Database from Visual Studio

I had some interesting challenges last week in managing Azure SQL Database from inside of Visual Studio 2013.  Check out how I fixed this problem on Kloud’s official blog here:

Tagged , ,

Retrieve Work Item Discussion History using Visual Studio Online’s REST API

At TechEd North America Microsoft announced the availability of a preview REST API for Visual Studio Online.  Anyone who has spent time around Team Foundation Server will know that it’s always had a strongly-typed C# SDK which can be used to extract and manipulate work items held in TFS.  This REST API is new and will eventually be available for the on-premise hosted version of TFS.

In a lucky coincidence I’m doing some work that requires me to extract work item information for other purposes so I decided to give the API a whirl.  As you can see it went pretty well!

*Strictly* speaking, it isn’t a complete Work Item as by default Attachments and History are both excluded.  Interestingly both of these tend to be pain points for other traditional tools to deal with too :).

Luckily the new REST API offers support for retrieval of “Updates” which represent the set of fields changed on each update to the Work Item.  This can be any combination of fields or comments directly added to the history by users.

The demo code below shows how you can build out the history so it displays “Discussion Only” items and excludes all others.  As it’s early days for the API maybe we’ll see the sort of logic covered here wrapped in an API call so you don’t need to parse these objects locally.

Once the entire solution is ready I’ll post the source up on Github.  Note you’ll need to enable the “Alternate Credentials” on your user profile to get this code working.

Tagged , , , , ,

What Happens When You Delete a User from Visual Studio Online

As of May 7 2014, Visual Studio Online has shifted to a paid model where all user accounts over the basic 5 user limit must hold a paid license in order to access and use the service.

So, what happens when you remove a user’s account from Visual Studio Online? Let’s take a look.

No, really, it’s OK

Firstly, just a word of reassurance here – your data consistency will remain even after you’ve removed the user’s account.  It might seem obvious but it is comforting to know that you’ll still have the history associated with the account.

Work Items

Your Product Backlog Items (PBIs) and other Work Items will continue to work as expected – even if the user created or updated the Work Item or has it assigned to them at the time their account is removed.

Audit trail entries that were created by this user through their activities on individual Work Items will retain full fidelity so you can trace actions by the user at any future point.

Source Control

Both Git and TFS source control repositories will behave as expected and the user’s change history of files will remain intact.

Are they really locked out?

Yes. Visual Studio Online via the web, Visual Studio and source control will not allow a deleted account to have access.  Even Git with it’s alternative credentials returns an authentication failure when trying to perform any action.

Any edge cases?

Not that we’ve seen.  Here’s some advice on things to do before you remove an account (granted some of these might not make any sense depending on how stale the account is and what it’s purpose is).

  1. Be aware there is an initial soft limit of 50 user accounts per subscription.  You can raise a support ticket to get this increased.
  2. Make sure you have alternate project administrators if the account you are deleting has previously been the only project administrator.
  3. Make sure any outstanding check-ins are either shelved or checked-in.

It’s early days for Visual Studio Online as a paid SaaS solution – it will be interesting to see how it continues to evolve now that it’s generating a revenue stream for Microsoft.

Tagged , , , ,

Debug iOS App from Visual Studio with Xamarin extension using the iPhone Simulator.

This is a really quick and easy tip for those starting out doing iOS development with Xamarin (and specifically with the Visual Studio extensions). If you don’t have access to an iOS device and want to debug on the Simulator that ships with Xcode make sure you do the following:

Set the “Platform” to “iPhoneSimulator” for the project.

1. Select the Solutions Configuration menu (allows you typically to choose Debug or Release) and is next to the “Start” debug button.
2. In the Configuration Manager for your iOS App select “Platform” and change to “iPhoneSimulator” (highlighted below).
3. Save the changes and you should now be able to debug.

Selecting iPhoneSimulator

I scratched my head on this for a while ;).

BTW, did I say how cool it is that you can develop Android and iOS apps from right inside Visual Studio? You still need a Mac and Xcode for iOS but Android is there for the taking (you can even edit the axml layout files directly inside Visual Studio!)

Tagged , , , ,