Skip to main content


Showing posts from December, 2012

NUnit Test Adapter for Visual Studio 2012 updated

Starting from Visual Studio 2012 the testing infrastructure became extensible making it possible to add support for other test frameworks without the need of 3th party plugins like Resharper or Gallio . Just before the year ended, the NUnit team released a new version(beta 4) of their NUnit Test Adapter for Visual Studio, with support for VS 2012 Update 1. The new release, version 0.94, works with the VS 2012 RTM as well but shows off some extra features when used with the update. The biggest addition to the Adapter in this release is that it now supports Traits . NUnit Properties and Categories are translated in to Visual Studio traits and you can sort the display of tests by trait or filter on them. This goes a long way toward making the Visual Studio Test Explorer useful in running large sets of tests. Release notes for this version can be found here: More information about Traits here:

Team Foundation Server 2012 Monitoring Management Pack

Last week Microsoft released the Visual Studio 2012 Team Foundation Server Monitoring Management Pack for monitoring TFS with System Center Operations Manager 2007 SP1 or 2012. You can download it here . The Team Foundation Server 2012 Monitoring Management Pack provides both proactive and reactive monitoring of Microsoft Team Foundation Server 2012. It monitors TFS components such as application tier server instances, team project collections, build servers, and proxy servers. Feature Summary The monitoring provided by this management pack includes availability and configuration monitoring, performance data collection, and default thresholds. You can integrate the monitoring of Team Foundation Server components into your service-oriented monitoring scenarios. Auto discovery of TFS components Implements containment hierarchy, reflecting logical architecture of the Product Implements a proper health model using Monitors Contains tasks,

Native JSON parsing

Starting from Internet Explorer 8+, Firefox 3.1+, Safari 4+, Chrome 3+, and Opera 10.5+ browsers support native JSON parsing. But what if your users are still using IE7 (or even worse IE6)? Here are some of the options I prefer to use: To convert a JSON response to a JavaScript object: If you are using jQuery, use parseJSON . Internally it checks if browser supports JSON.parse, so the fallback is built in. Use the JSON.parse method from the json2.js library from Douglas Crockford. It adds a JSON object to the browser if it doesn’t exists yet. To convert a JavaScript object to serialized JSON string: For jQuery I couldn’t find an out-of-the-box solution, but the following jQuery plugin could do the trick: jQuery.toJSON Use the JSON.stringify method from the json2.js library. What I also like about the json2.js library from Douglas Crockford is that it allows you to manipulate the serialization process by adding a toJSON method to your

Updating a Linq to SQL dbml file

As you probably know Microsoft started its journey in ORM land with 2 frameworks: Linq to SQL, a lightweight ORM with some nice features and good performance but tightly coupled to SQL Server and Entity Framework which started as an ugly beast but is now transformed into a good, performant Enterprise ready ORM solution. So Microsoft decided to stop investing in Linq to SQL and put al its effort in Entity Framework. This means that although Linq to SQL is a nice ORM framework, it’s missing some useful features. Last week I got a question from a colleague about Linq to SQL. He couldn’t find a way to update the Linq to SQL DBML file so it reflects the changes he made to the underlying database model. This is just one of the missing features. Luckily there are some workarounds to fix this: Option 1: Remove the changed tables from the DBML designer and drag them again from the SQL explorer window. Option 2: Use the SqlMetalPlus addin. The add-in adds some extra context menu

Bundling conventions in ASP.NET Bundling and Minification

I talked about the Bundling and Minification NuGet package before. Last week when configuring a new ASP.NET MVC 4 web application, I discovered another nice feature inside this library. Before I had to update the script references each time I upgraded to a new version of jQuery. So somewhere in my code I had a script reference like this: <script type="text/javascript" language="javascript" src="~/scripts/jquery-1.7.1.js"/> With the Bundling and Minification library you can create a version independent bundle and set the reference once. So you no longer have to upgrade your script references. You can see this already in action if you created a new ASP.NET MVC application in Visual Studio 2012.  If you open up  the App_Start\BundleConfig.cs file and examine the RegisterBundles method, you’ll find the following code: public static void RegisterBundles(BundleCollection bundles) { bundles.Add(new ScriptBundle("~/bundles/jquery")

Team Foundation Server Sidekicks 2012

Last week Attrice released their Team Foundation Server 2012 version of the Team Foundation Sidekicks . It offers the same functionality as previous versions but adds support of TFS both on premise and in-the-cloud (Team Foundation Service). Download version 4.5 of Team Foundation Sidekicks (only for Visual Studio © 2012, Team Foundation Server 2012 and Team Foundation Service).

SignalR Performance Counters

One of the hidden gems in the SignalR framework is a utility called signalr.exe (in the Microsoft.AspNet.SignalR.Hosting.Utils package) that you can use to do a few things. Install/Uninstall SignalR performance counters Generate a static js file for the magic ~/signalr/hubs url. After installing the Microsoft.AspNet.SignalR.Hosting.Utils NuGet package, you’ll find a SignalR executable in the package folder(under \packages\Microsoft.AspNet.SignalR.Hosting.Utils.1.0.0-alpha2\tools) Open a command prompt(run as Administrator). Browse to the tools folder containing the SignalR.exe file. Run signalr ipc to install the Performance Counters. These performance counters give you more detailed information about your SignalR applications. Remark: To use these on full IIS you need to add the app pool user for your application to the Performance Monitor Users group. Run signalr ghp /path:<path to binaries> to generate a static JavaScript file c

Generating QR codes quick and easy in Windows 8

You all probably seen QR codes before, these strange looking images containing any kind of data. Most of the times there are used to embed an URL but you can put any kind of data in it For a Windows 8 application I’m building I wanted to embed the option to generate QR codes and share these codes using the Windows 8 Share Contracts. The easiest way I found to generate QR codes is by using the Google Chart API . The only thing you need to do is specify the size in pixels of your barcode and the url you wish to encode. If you invoke a GET request to the Google Chart API using the following query string, you’ll get a generated QR image back: Nice and simple!

TFS API Blog Series

Since 2009 Shai Raiten is writing about TFS API making his blog one of the best resources for any information about customizing and extending Team Foundation Server. This resulted in a long list of blog posts: Basic TFS API Part 1: Domain Picker TFS API Part 2: Domain Picker Using Registered Servers (Cache) TFS API Part 3: Get Project List Using ICommonStructureService TFS API Part 4: Get TFS User List (Mail, Sid, Account, Domain) TFS API Part 7: Use IEventService To Get User Event Subscriptions TFS API Part 8: Subscribe/Unsubscribe Events Using IEventService TFS API Part 12: Set Security For Area/Iteration TFS API Part 13: More About Connecting TFS (Custom Credentials, Prompt) TFS API Part 20: Bye TeamFoundationServer and Welcome TfsTeamProjectCollection TFS API Part 25: Get TFS User List (Mail Sid, Account, Domain) – TFS 2010 TFS API Part 29 – TFS Impersonation TFS API Part 32 – Add and Remove Users From Application Groups Sou

TFS Publishing to Windows Azure Websites: What to do if you have multiple projects/solutions?

Last week I enabled TFS publishing for a Windows Azure Website .  However the deployment failed because I had multiple projects inside the solution and the build tried to deploy the wrong project. To fix this I used the following workaround: Create a separate solution for the project you want to deploy and check this solution into source control. Open Team Explorer and connect to your TFS project Right click on the Build definition that was created for you when enabled TFS publishing and choose Edit Build Definition...    Go to the Process tab and change the Solution To Build to the solution you just created. Next time you check in the new solution is used to build and deploy the project.

Windows Phone 8 Jump Start training

Last week the Windows Phone team hosted the Windows Phone 8 Jump Start training, a fast-paced and demo-packed learning ‘experience’ tailored to show developers how to build responsive, appealing, and effective applications quickly. All 20 modules are now available online for your on-demand viewing, (or download) on Channel 9. Mod 01a: Introducing Windows Phone 8 Development Part 1 Mod 01b: Introducing Windows Phone 8 Development Part 2 Mod 02: Designing Windows Phone 8 Apps Mod 03: Building Windows Phone 8 Apps Mod 04: Files and Storage on Windows Phone 8 Mod 05: Windows Phone 8 Application Lifecycle Mod 06: Background Agents Mod 07: Tiles and Lock Screen Notifications Mod 08: Push Notifications Mod 09: Using Phone Resources in Windows Phone 8 Mod 10: App to App Communication in Windows Phone 8 Mod 11: Network Communication in Windows Phone 8 Mod 12: Proximity Sensors and Bluetooth in Windows Phone 8 Mod 13: Speech Input in Wind

Toad for Cloud Databases

Looking for a free(!) tool to connect to your Cloud databases? One of the tools I’ve been trying is Toad for Cloud Databases, a free SQL-based tool with the familiar look and feel of Toad, which enables users to use SQL(yes indeed SQL) with a set of  non-relational databases, including Hadoop (Hbase & Hive), Cassandra, MongoDB, SimpleDB, and Azure Table Services. How does it work? There are two key components to Toad for Cloud Databases: Toad client: Use it to access Cloud/NoSQL databases via SQL statements. Data Hub: It translates SQL statements submitted through the Toad client into a language understood by the Cloud database, and returns results in the familiar tabular row and column format. Installation You can download it from the following location(you’ll have to register first): Run the installer after downloading has completed. Get started Start the Toad for Clo

Team Foundation Server: Choosing a Process Template

One of the hardest parts of Team Foundation Server is choosing the right Process Template. The process template defines the set of work item types, queries, and reports that you will use to plan and track your project. Once you’ve created your Team Project, switching to a different Process Template is not an option. So you better choose right… To help you through the process Microsoft provided a great MSDN article providing lot’s of information about the default templates. It provides you some considerations to help you choose: Choose Scrum Process Template for Visual Studio ALM if your team uses Scrum, manages bugs along with product backlog items during sprint planning, and wants work items and processes designed to support Scrum. Choose Microsoft Solutions Framework (MSF) for Agile Software Development v6.0 if your team uses Agile methods, and you resolve work items before closing them. Choose MSF for Capability Maturity Model Integration (CMMI) Proce

TFS Administration Tool 2.2 Released

The TFS Administration Tool has been updated to use the Team Explorer 2012 DLL’s. So you no longer need to install Team Explorer 2010 to use this tool. Download TFS Administration Tool 2.2 (1.55 MB, MSI) The TFS Administration Tool allows Team Foundation Server administrators to manage user permissions on all three platforms utilized by Team Foundation Server: Team Foundation Server, SharePoint, and SQL Server Reporting Services. The tool also allows administrators to easily copy user permissions among team projects and to easily identify any missing permissions on any of the three platforms.

Team Foundation Server Source Control Explorer Extension

Last week when searching for an easy solution to delete some files from the TFS database, I found the following Visual Studio Extension: TFSSCExplorerExtension . “TFSSCExplorerExtension (Team Foundation Server Source Control Explorer VS 2010 Extension) is  aVisual Studio 2010 Extension Package that adds new features to the TFS Source Control Explorer window for TFS 2010 . ” A separate release is available for Visual Studio 2012 here . It offers the following features: Move to Folder: Move support for multiple files. Branch to Folder: Branch support for multiple files. Merge from Sources: Select items to Merge. File Icon Change: Branched files are shown with a different icon. Drag & Drop: Adds drag & drop support between file list in the left side and folder tree in the right side. Show/Hide deleted items: Quicker alternative then going to Tools – Options. Destroy: Permanently removes files or folders from Source Control.

ASP.NET MVC: Compile your views up front

For a project I’m doing we had to start a large refactoring round. Therefore it would be useful to get compiler errors on our ASP.NET MVC Views too. Otherwise we had to go through all the screens our self to detect problems. Luckily ASP.NET MVC offers this feature out-of-the-box: Unload your ASP.NET MVC project by right right clicking the project on the solution explorer in VS and choosing unload project Right click on the csproj file name and choose Edit. Somewhere in the csproj file you’ll find the following line: <MvcBuildViews>false</MvcBuildViews> Change the MvcBuildViews value from false to true. Save the file and reload your project. From this moment on the views are compiled too each time you build your project.