Extending Visual Studio Online

Since I adopted Visual Studio Online a few weeks ago, I am more and more happy with it. I have also recently adopted a help desk online software called SmarterTrack (from SmarterTools, the same company that provides SmarterMail) to support questions from users of my MZ-Tools family of add-ins. I am now at the point of automating the creation of TFS work items from some help desk tickets (bugs or feature requests). SmarterTrack allows you to include custom menus in the window of a ticket than can make an http get call (although not a http post call with JSON). But I can make an http get call to some page of my server and then make whatever I want once I extract the parameters.

Fortunately Microsoft made Visual Studio Online fully extensible, as recently announced at TechEd North America 2014. There is a new Visual Studio Online Integrate portal with the scenarios that you can use:

  • Calling Visual Studio Online from any other tool through REST APIs with OAuth.
  • Make Visual Studio Online to call any tool when an event happens (without the need of polling).

There is also a lot of 3rd party tools that provide integration with Visual Studio Online, as explained in this TechEd session:

Using Third-Party ALM Solutions along with Visual Studio Online
http://channel9.msdn.com/Events/TechEd/NorthAmerica/2014/DEV-B368

Investigating how to use the REST APIs of Visual Studio Online I found yesterday this upcoming ebook of MVP fellows Jeff Bramwell and Mike Douglas:

TFSVSOExtensibility

Extending Team Foundation Server And Visual Studio Online
http://www.codesmartnothard.com/2014/05/19/ExtendingTFSAndVisualStudioOnlineEBook.aspx

And to buy it:

https://leanpub.com/tfsapibook

Only some chapters are already written but the table of contents is promising and I am sure it will be great:

Part I – The Basics

Chapter 1: Overview of Team Foundation Server
Chapter 2: A History of Team Foundation Server APIs
Chapter 3: A REST Primer

Part II – Using the Team Foundation APIs

Chapter 4: Our First REST API Call
Chapter 5: Work Items
Chapter 6: Team Foundation Version Control
Chapter 7: Git
Chapter 8: Build Definitions
Chapter 9: Builds
Chapter 10: Workspaces
Chapter 11: Team Room Management
Chapter 12: Team Room Activities
Chapter 13: Reporting and Charts
Chapter 14: Projects and Teams
Chapter 15: Service Hooks

Part III – Other Resources

Chapter 16: Using Fiddler
Chapter 17: Using OAuth

Resources

Given the lack of books about Visual Studio Extensibility (add-ins, packages, DSL, etc.) after all these years it is great that a book about Visual Studio Online Extensibility is appearing so early (and so cheap!).

Visual Studio Express edition doesn’t support extensions (despite its Extension Manager)

A question that appears from time to time in forums is whether the Visual Studio Express editions support extensions (packages, add-ins,…) that you create, that is, if they can be installed and can be run.

The short answer: no.

The medium answer: only Microsoft extensions are supported since VS 2012, not your own extensions.

The long answer:

Visual Studio Express editions started with Visual Studio 2005 (Visual Studio .NET 2002 and Visual Studio .NET 2003 didn’t offer them) and each version (2005, 2008, 2010, 2012 and 2013) has offered a different feature set. For example, with VS 2005, 2008 and 2010 you had language-oriented Express editions (Visual Basic Express, Visual C# Express, etc.) while Visual Studio 2012 introduced Visual Studio Express 2012 for Web, Visual Studio Express 2012 for Windows (Store), Visual Studio Express 2012 for Windows Desktop and Visual Studio Express 2012 for Windows Phone.

While their capabilities have been enhanced over time, a common theme remains: Microsoft has made the (business) decision to limit them artificially (meaning that the internal code knows the SKU edition and limits the functionality). In particular, Microsoft decided that they were not extensible. You won’t find an Add-In Manager in any of them and you will find the “Extensions and Updates…” menu only in the 2012/2013 versions that while allows you to install 3rd party extensions, they cannot run, only Microsoft’s extensions can run. Why?

In my opinion, because Microsoft has a conflict of interests:

  • On the one hand, it wants to charge for the developer tools, that is, the Visual Studio IDE. So it offers several tiers and prices: Standard edition, Professional edition, Team edition, Premium edition, Ultimate edition and whatever new name. However, the competing tools, that is, Eclipse/Java are free, which means that hobbyists, college students (future developers…),  and even worse, companies (of any size) prefer “open source” tools. Of course they don’t want those tools because they are open source, but because they are free -gratis- (my freeware MZ-Tools 3.0 add-in has zillions of users and less than three (3) users have requested me to open the source…)
  • On the other hand, to make developers to use the Microsoft developer tools (and to make companies to buy Microsoft Windows servers, Microsoft SQL Server, etc.) they have to offer some IDE version for free: the Express editions. But not powerful enough to eliminate the need of the paid versions, at least yet. And specially not enhanced by 3rd party extensions that would actually convert an Express edition into a “professional” edition. But these artificial limitations are relaxed over time. For example, now the Express editions allow unit testing, which initial versions didn’t offer. I guess that the excuse was that students need to learn automated testing, but guess what, Microsoft offers an ALM solution (Team Foundation Server) so it’s good that they can learn automated testing, continuous integration, etc..

I guess that eventually the Microsoft developer tools will be free, powerful enough and fully extensible, at least for the individual developer or small teams, in the same way that most ALM providers offer you free users in small quantities (Visual Studio Online 5 Basic users, Perforce 20 users, etc.). The software world is evolving to paying for the hardware (Apple and Microsoft give you new versions of their desktop operating systems and free apps that formerly were paid-apps) and towards software services where you pay an affordable subscription like you pay the electricity, or more recently the music, TV, online libraries, etc. However, these transitions can take time (depend on the markets, etc.), in the same way that Microsoft embracing “open source” has taken years, and now you have the code for the .NET Framework, the .NET compiler platform, etc.