Thursday, December 24, 2015

Upgrading to NUnit 3.0 - OneTimeSetUp: SetUpAttribute attribute not allowed in a SetUpFixture

After upgrading to NUnit 3.0, which became recently available, some of my tests started to fail.

When I look at the test results, they all failed with the following error message:

SetUpAttribute attribute not allowed in a SetUpFixture

In NUnit 3.0, there are some breaking changes regarding the usage of the SetUpAttribute and the SetUpFixture.  You can no longer use the SetUpAttribute and TearDownAttribute inside a SetUpFixture. Instead you have to use the OneTimeSetUpAttribute and OneTimeTearDownAttribute.

In NUnit 2.0, I had the following code:

In NUnit 3.0, this has to change to:

More information can be found here:

Wednesday, December 23, 2015

Open Live Writer re-introduces Blogger support

Last week I blogged about the release of Open Live Writer, the open source fork of Windows Live Writer. I also mentioned that Google decided to pull the plug from the old authentication system, making neither Windows Live Writer and Open Live Writer available for usage with Blogger anymore.

One week later, and thanks to the power of open source, I’m happy to say that I can write my blog post in Open Live Write again(the online Blogger editor wasn’t a pleasant experience). In the timespan of a week Martin Woodward made 3 new releases each improving the Blogger integration: https://github.com/OpenLiveWriter/OpenLiveWriter/releases

So thanks Martin for this early Christmas present!

Tuesday, December 22, 2015

RedBook - Readings in Database Systems

Almost every application uses data. Without this data the application is useless. So if you are a DBA, SQL specialist or developer, you should care about data and how it is stored.

This makes 'Readings in Database Systems' a must read:

Readings in Database Systems (commonly known as the "Red Book") has offered readers an opinionated take on both classic and cutting-edge research in the field of data management since 1988.
http://www.redbook.io/

Monday, December 21, 2015

TFS 2015: The 'System.Collections 4.0.10' package requires NuGet client version '3.0' or above, but the current NuGet version is '2.8.60318.667'.

After upgrading an existing solution to the new build system in TFS 2015, the build failed with the following errors:
The 'System.Reflection.Extensions 4.0.0' package requires NuGet client version '3.0' or above, but the current NuGet version is '2.8.60318.667'.
The 'System.Reflection.Primitives 4.0.0' package requires NuGet client version '3.0' or above, but the current NuGet version is '2.8.60318.667'.
The 'System.Resources.ResourceManager 4.0.0' package requires NuGet client version '3.0' or above, but the current NuGet version is '2.8.60318.667'.
The 'System.Collections 4.0.10' package requires NuGet client version '3.0' or above, but the current NuGet version is '2.8.60318.667'.
The 'System.Diagnostics.Debug 4.0.10' package requires NuGet client version '3.0' or above, but the current NuGet version is '2.8.60318.667'.
The 'System.IO 4.0.10' package requires NuGet client version '3.0' or above, but the current NuGet version is '2.8.60318.667'.
The 'System.Reflection 4.0.10' package requires NuGet client version '3.0' or above, but the current NuGet version is '2.8.60318.667'.
The 'System.Runtime 4.0.20' package requires NuGet client version '3.0' or above, but the current NuGet version is '2.8.60318.667'.
The 'System.Runtime.Extensions 4.0.10' package requires NuGet client version '3.0' or above, but the current NuGet version is '2.8.60318.667'.
The 'System.Runtime.InteropServices 4.0.20' package requires NuGet client version '3.0' or above, but the current NuGet version is '2.8.60318.667'.
 It seems that the build server tries to use the 'old' NuGet version instead of the newer 3.x version.



Here is how I solved it:
  • Open your in Team Project in the TFS portal and click on the Build tab
  • Edit the build definition by right clicking on the build and choose Edit... from the context menu
  • Uncheck the 'Restore NuGet packages' checkbox in the Visual Studio Build step

  • Add a new step by clicking on the  'Add build step...' button. Choose the NuGet Installer step in the Package category and click Add. Place this step before the other steps.

  • Open the newly created step, go to the Advanced section and set the path to NuGet.exe(e.g. d:\tools\nuget.exe).

  • Now login on the build server and download the NuGet distribution from https://dist.nuget.org/index.html. Place it on the location as specified in the step.
  • That's it!

Friday, December 18, 2015

Azure DocumentDB playground

If you want to learn about Azure DocumentDB, Microsoft's NOSQL solution in the Cloud, go take a look at the DocumentDB Query Playground. It gives you an interactive environment to try the rich querying functionality that Azure DocumentDB offers over schema-free JSON data.

Thursday, December 17, 2015

SQL Server Performance issues after upgrading from Team Foundation Server 2010 to 2015

After upgrading a Team Foundation Server 2010 environment from a customer to Team Foundation Server 2015, we noticed an enormous spike in CPU and memory usage on the database server.



When we drilled further into the issue, we saw the same SQL Server statement being executed over and over again:



On the MSDN forums, we found some more information. This is a bug in the TFS 2015 upgrade process that only seems to exist when you upgrade from TFS 2010.

A SQL script is available that solves the problem, but the issue is also fixed in TFS 2015 Update 1. So I would recommend that if you have this issue, upgrade to Update 1.

Wednesday, December 16, 2015

TechNet Virtual Labs

If you want to test a Microsoft product in a risk free environment, try TechNet Virtual Labs. It offers a wide range of virtual environments for testing Microsoft's newest products and technologies.
 
https://technet.microsoft.com/en-us/virtuallabs


 
I forgot that this existed, until a colleague sent an email about it(Thanks Joeri).

So if you want to play with for example the Team Foundation Server 2015 bits but don't want to put it on Azure or download and run a VM locally, just search for 'Team Foundation' and a large set of VMs and labs are available.

Great stuff!

Tuesday, December 15, 2015

Cloud Scalability Patterns

Great conversation with Matt Johnson from the Patterns and Practices group, about things we should consider when moving our applications to the cloud. If you want to build your application for cloud scale, this video offers some great insights.


Don't forget to take a look at the links he referred to:

Monday, December 14, 2015

Google did it again - Not found error in Windows Live Writer and Open Live Writer

In the summer of 2015, Google turned off there old authentication system and made the switch to OAuth 2.0. Although better security can only be encouraged in this case it had the unfortunate side effect to break Windows Live Writer, the blog writer I used for years. Luckily, thanks to the effort of Scott Hanselman, Google was kind enough to re-enable the old security mechanism for a little bit longer. In the meanwhile Scott started the effort to make Windows Live Writer Open Source.
Last week this story came to an end with the announcement of Open Live Writer, an open source fork of Windows Live Writer. Although some features are still missing, this is great news as it will give Windows Open Live Writer a new future...



Inside the announcement, the support for OAuth 2.0 was mentioned as to be added 'VERY SOON':

ADDING VERY SOON: Google runs the excellent Blogger blog service. We've worked with the Blogger Team within Google on this project, and they've been kind enough to keep an older authentication endpoint running for many months while we work on Open Live Writer. Soon, Google and Blogger will finally shut down this older authentication system. Blogger will use the more modern OAuth 2 and Open Live Writer will be updated to support OAuth 2. Windows Live Writer will never support this new OAuth 2 authentication system, so if you use Blogger, you'll need to use Open Live Writer.
Unfortunately the Blogger guys didn't read the announcement very well I think, as they disabled the old authentication endpoint immediatelly :-( So if you try to connect to Blogger using either Windows Live Writer or Open Live Writer, you'll get a 'Not Found' exception.
I hope a fix will be available soon as typing in the online editor ain't fun!

Friday, December 11, 2015

Architecture Blueprints for Microsoft Azure

If you are an architect that want to use the power of Microsoft Azure, Microsoft created a set of architecture blueprints for different scenario’s that help you build new solutions fast. For every diagram, a 2D and 3D version(in Visio) and a video explaining the blueprint is available.
https://msdn.microsoft.com/dn630664


Certainly useful!​

Thursday, December 10, 2015

Visual Studio 2015 Update 1–Parallel Test Execution

If you are still looking for an excuse to start installing Visual Studio 2015 Update 1, here I got you one: a new feature that existed before but is now finally back in the box is Parallel Test Execution.

What is it?

From the release notes:

The Visual Studio Test Platform introduces support parallel execution of test cases.

Parallel test execution leverages the available cores on the machine, and is realized by launching the test execution engine on each available core as a distinct process, and handing it a container (assembly, DLL, or relevant artifact containing the tests to execute), worth of tests to execute. The unit of scheduling is the test container. Within each container, the tests will be executed as per the semantics of the test framework. If there are many such containers, then as processes finish executing the tests within a container, they are handed the next available container.

Parallel execution is supported through all launch points - CI, command line (CLI) and the IDE (Test Explorer, CodeLens, various “Run” commands, etc.), and the Test Explorer indicators track the progress of tests executing in parallel.

Getting started
  • Open Visual Studio 2015(don’t forget to install Update 1 first Glimlach)
  • Open the solution containing the tests.
    • Note that in order to leverage the Parallel Test Execution features, tests should be split out over multiple ‘containers’(assemblies)
  • Go to Test –> Test Settings –> Select Test Settings File
  • Select the .testsettings file you want to use.
    • If you don’t have a .testsettings file yet, just create an empty xml file and change the extension to .testsettings

clip_image001

  • Open the file in Visual Studio via File –> Open—> File… –> Open With(click on the small arrow next to the Open button) –> XML Editor
  • Paste the following code:
  • Change the MaxCPUCount value according to the following rules:
    • ‘n’ (where 1 <= n <= number of cores) : up to ‘n’ processes will be launched.
    • ‘n’ of any other value : The number of processes launched will be as many as the available cores on the machine.
  • Now run your tests…

Remark: I noticed that it only worked for MSTest. When using NUnit or XUnit no tests were executed.

Wednesday, December 9, 2015

Goats and Leadership

What do goats and leadership have in common? The answer is … EVERYTHING as explained in the following YouTube video:

I found this video on the Nordstrom technology people lab website. Certainly worth to have a look…

Tuesday, December 8, 2015

Generate your test data

Over the years I used multiple tools to generate test data. Most the time I ended up creating some useful test data by hand or automatically generating random “gibberish”. Last week I discovered GenFu with has the following promising tagline “Awesome Test Data”.

image

GenFu is a library you can use to generate realistic test data. It is composed of several property fillers that can populate commonly named properties through reflection using an internal database of values or randomly created data. You can override any of the fillers, give GenFu hints on how to fill them.

For the following Person class…

image

…combined with one line of code…

image

…it generates the following test data…

image

Looks like magic to me! I’m going to try it out for my next set of unit tests…

Monday, December 7, 2015

Windows 10 Development Workshop

Interested in learning Windows 10 development? But you don’t know where to start? Check out the training material for the Hands on Workshop for Windows 10 Developer Training (pfew, what a title!)

From the GitHub repo:

The purpose of the Workshop is to provide a more interactive developer training experience that minimizes lecture in favor of more instructor led lab experiences.

Each module contains a minimal PPT deck and one or more 'hands on labs' for direct delivery in a classroom setting.

The lab manuals and solution files for this module have been moved. All hands on labs are now in their own repo at https://github.com/Windows-Readiness/WinDevHOLs so that they can be easily downloaded independently of the slide decks.

The day long agenda consists of the following modules, each 60 minutes split between PPT and Lab

    Friday, December 4, 2015

    TypeScript 1.6–Interface errors

    This week, a colleague asked me to have a look at his code. He was working on a web project with some TypeScript code but the moment he opened the project hundreds of errors appeared. We discovered that he recently upgraded to TypeScript 1.6 and in this version the object checking rules became more strict:

    Before TypeScript 1.6 you could do something like this:

    Note that although the interface only defines 3 properties, the compiler doesn’t complain when I add an extra property to my object literal.

    In TypeScript 1.6 this is no longer the case, and an error is thrown when you add a property that is not part of the interface:

    image

    image

    You can suppress this error by passing the --suppressExcessPropertyErrors compiler option.

    Although I understand the reasoning behind this change, I’m not a fan of this behavior, as it breaks the dynamic nature of JavaScript.

    More information in the following GitHub issue: https://github.com/Microsoft/TypeScript/issues/3755

    Thursday, December 3, 2015

    Visual Studio Team Services–Code Search extension

    With the introduction of the Visual Studio Marketplace, a growing list of great extensions for the Visual Studio ecosystem is coming to us.

     image

    The first extension I installed was Code Search, it promises to “provide a fast, flexible and accurate search across your code” inside Visual Studio Team Services. Sounds great!

    image

    After installing it, when you browse to your Visual Studio Online project(now renamed to Visual Studio Team Services), go to the Code tab and you should see a search box on the top right corner:

    image

    The search offers a large set of functionality like:

    • Filters: filter by project, by location within a project, by scope, by code type

    image

    • Code collaboration: share search results with other team members
    • Version control integration: lookup history

    Behind the scenes it is using the power of Roslyn to give you advanced search capabilities.

    Remark: The code search feature is free at the moment, but this can change after Preview.

    Wednesday, December 2, 2015

    TypeScript 1.5 Error–The ‘arguments’ object cannot be referenced in an arrow function

    After upgrading a TypeScript project to TypeScript 1.5, the build started to fail with the following error message:

    “Build: The ‘arguments’ object cannot be referenced in an arrow function in ES3 and ES5. Consider using a standard function expression.”

    clip_image002

    This is the code snippet where the error occured:

    Starting from TypeScript 1.5 it is no longer allowed to reference the arguments object inside an arrow function. According to the specs, no argument variable is created for an arrow function.

    To fix this, we can follow the suggestion as mentioned in the error and switch to a normal function expression:

    More information in the following GitHub issue: https://github.com/Microsoft/TypeScript/issues/1609

    Tuesday, December 1, 2015

    Visual Studio Team Foundation Server and Team Services Feature Index

    With the incredible pace that Microsoft is releasing new features, and the 3 week release cycle of VS Team Services(aka Visual Studio Online), it’s a challenge to know what features are available in the TFS ecosystem.

    To help us, Microsoft created a feature index with all the features available to help you plan and track your projects and code, build, test, and release your software applications.

    Great help!

    image

    So bookmark this link: https://msdn.microsoft.com/library/vs/alm/overview/alm-devops-feature-index

    Monday, November 30, 2015

    Failure is not an option, it’s a necessity

    Once your architecture has grown to a certain scale, things will start to fail. If you don’t design for failure inside your system, one small error can bring your whole system down. Organizations like Netflix and Uber, but also Cloud Vendors like Amazon and Microsoft have shown us a new style of engineering; Chaos Engineering, that embraces failure.

    With things like the Netflix Chaos Monkey and more recently the Netflix Simian Army different type of failures are induced to evaluate how the architecture handles these kind of issues. This has completely changed the way I think and design my systems. Luckily new patterns appear and some old patterns get a revival(like Circuit Breaker) that help us implement these principles.

    ChaosMonkey

    More information:

    Tuesday, November 24, 2015

    What Every JavaScript Developer Should Know About ECMAScript 2015

    imageK.Scott Allen wrote a book about the new features in JavaScript. To celebrate the release, it is available for free on Amazon for the rest of this week.

    Chapters include:

    • Working with variables and parameters
    • Classes
    • Functional features
    • Asynchronous JavaScript
    • Modules
    • APIs

    Monday, November 9, 2015

    The Web Application Project is configured to use IIS. Could not find the server 'https://localhost/SampleApp' on the local machine. Make sure the local IIS server has been configured to support secure communications.

    After configuring a new Windows 10 machine, I loaded my first solution to start fixing some bugs. However the web project in my solution failed to load with the following error message:

    C:\projects\SampleApp/WebUI.csproj : error  : The Web Application Project SampleApp.WebUI is configured to use IIS.  Could not find the server 'https://localhost/SampleApp' on the local machine. Make sure the local IIS server has been configured to support secure communications.

    Whoops! Seems that I forgot to configure something in IIS. I didn’t enable the SSL binding on my local IIS instance.

    Let’s fix this!

    • Open up the Internet Information Services(IIS) Manager
    • Click on the Default Website

    image

    • Click on Bindings… in the Action pane on the right

    image

    • Click on the Add… button to open up the Add Site Binding dialog

    image

    • Specify https in the Type dropdown and choose an appropriate SSL certificate from the list

    image

    • Click OK to close the dialog. The SSL binding is added to the list

    image

    • Click on Close

    Now I can reload the web project in Visual Studio without any error…

    Friday, November 6, 2015

    Caliburn.Micro & Windows 10 UWP apps - AmbiguousMatchException

    I continued my journey on using Caliburn.Micro in Windows 10 UWP apps. The next thing I tried was to add a device specific view. In UWP apps this can easily be done by adding a second XAML file with the same name and a device family added to it.

    For example: a device specific version of ShellView.xaml can be ShellView.DeviceFamily-Mobile.xaml.

    Remark: This is not the only way to specify a device specific version. More information here: http://igrali.com/2015/08/02/three-ways-to-set-specific-devicefamily-xaml-views-in-uwp/ 

    However after doing that, my Caliburn application started to fail with the following exception:

    AmbiguousMatchException: Ambiguous match found

    It seems that I’m not the first one with this problem as an issue(and a fix) had already been created on Github: https://github.com/Caliburn-Micro/Caliburn.Micro/pull/227

    Unfortunately the fix is , at the moment of writing, not yet released so you have to download the source code and compile the code yourself.

    Thursday, November 5, 2015

    Using Powershell to extract users from Sharepoint

    Before decommissioning a Sharepoint server, I needed a list of all users on the different team sites. Time for some Powershell magic!

    On the Technet site I found a script that promised to do exactly what I needed:

    This script enumerates SharePoint 2010 or 2013 permissions across the entire farm down to the site (SPWeb) level. It also recursively expands the membership of any AD group and lists the assignment role binding on the permission. The output is an XML format.

    So I copied the script over, logged in on the Sharepoint server and opened up a Powershell command prompt. However when I tried to execute the script it failed with the following error message:

    Exception has been thrown by the target of an invocation

    + CategoryInfo : NotSpecified: (:) [], TargetInvocationExcept

    + FullyQualifiedErrorId : System.Reflection.TargetInvocationException

    So I opened up the script to find the root cause of the error and saw that it failed on the call to AllWebs:

    image

    On StackExchange I found some information telling me that the issue was probably related to security. The following solution was mentioned:

    All permissions required:

    • Site Collection administrator on the SPSite (whether given through Central Admin or Site Settings)
    • PowerShell scripting admin: add-spshelladmin domain\username
    • PowerShell scripting admin on the content databases: get-spcontentdatabase | add-spshelladmin domain\username

    And indeed, after adding the user, I was able to run the script successfully!

    Wednesday, November 4, 2015

    Caliburn.Micro & Windows 10 UWP apps

    As a big fan of Caliburn.Micro, I’m happy to see that the team is working on extending their platform support to Windows 10, Xamarin, Xamarin.Forms and so on… An official release is not available yet, but I couldn’t wait to try the UWP support.

    So I created a Blank Universal Windows app:

    image 

    I added the Caliburn.Micro package through NuGet(don’t forget to check the Include prerelease checkbox):

    image

    And then replaced the default App.xaml file with the following code:

    The only thing missing is a View and a corresponding ViewModel. As Caliburn prefers convention over configuration, we can create a Views folder and put a ShellView.xaml there, the corresponding viewmodel is placed in the ViewModels folder:

    image

    That’s all we need to get started!

    Tuesday, November 3, 2015

    Visual Studio 2013–Git integration–Branches are not visible

    Last week I was giving training at a customer. To speed up the exercises, I created each exercise on a different branch in Git and used every commit as a step in the exercise. This made it very easy to walk through the exercise step by step and see how the solution is created. The problem was that inside Visual Studio 2013, people only saw the master branch, but couldn’t see any of the other branches I created(note: in other tools, the branches showed up fine):

    image

    So what’s the reason?

      I discovered that the branch dropdown in Visual Studio 2013 only shows local branches, remote branches are not shown. To see the remote branch, you first have to create a new local branch to start tracking a remote branch. Click on New Branch and select the remote branch from the list. Once you’ve done that, the remote branch will appear in the branch list and you should be able to pull it.

    image

    Once you've done that, this will appear as a "published branch" allowing you to push and pull to it.

    image

    Monday, November 2, 2015

    Akka.NET–Cheat sheet

    As a newbie in Akka.NET, all help is welcome. So I’m glad that Jason Roberts took the time to create a 3 page cheat sheet PDF as a quick reference guide.

    akkacheatsheet

    Thanks Jason!

    Friday, October 30, 2015

    Combining Kendo UI–Grid with Angular.js–Pass selected item to controller

    A colleague couldn’t find a clean solution to pass the selected row in a Kendo Grid to an Angular controller method. So here is a short code snippet that shows how this can be done:

    • Here is the UI(admire my great design skills):

    image

    • Here is the corresponding HTML and Angular controller:

    Thursday, October 29, 2015

    Angular–Strange ng-click issue

    A colleague asked me to have a look at the following issue he had:

    “I have the following problem inside my Angular application: I’m using the ngclick to capture the click event on a link and call a method on my controller that uses the UI routing to navigate to a different page inside my SPA. However when I click on the link, the navigation occurs as expected but I also see that the URL in my address bar is set to the root domain. To give an example, instead of showing my.spa.com#product/1/edit, the url is reset to my.spa.com.” 

    And here is the code he was using:

    When I started to debug the problem, I noticed that 2 click events were triggered when you click on the link. The first click event handles the ng-click as you would expect but the second click executes the normal action when clicking on a url(in this case, as the href attribute was empty, it triggers a navigation to the root url, explaining the strange behavior in the address bar).

    I was able to fix the issue, by adding a # to the href attribute:

    Wednesday, October 28, 2015

    What’s a secure password?

    As a consultant I visit a lot of companies. At most of these companies I have an account and associated password. Every company has it’s own set of password rules most of the time expecting a combination of letters, numbers, uppercase, lowercase and special characters. But how useful are these password policies and in what ways does it help to make my password hard to crack?

    There are a lot of misconceptions regarding passwords and what a lot of people think is a secure password in the end is not. For example, do you think that “P@ssw0rd1!” is a more secure password than “This is my password”? (At least what I know, is that the second one is a lot easier to remember.)

    Let’s use Haystack to get the answer:

    “Haystack is an interactive brute force search space calculator that allows you to experiment with password length and composition to develop an accurate and quantified sense for the safety of using passwords that can only be found through exhaustive search.”

    First check “P@ssw0rd1!” :

    image

    Let’s now check “This is my password”:

    image

    Is this what you expected? Glimlach

    Tuesday, October 27, 2015

    TFS 2015–Visual Studio Test Runner

    After upgrading a XAML build template to TFS 2015, some of our unit tests started to fail. I had no idea what was causing the issue, so I tried to enable any kind of logging I could.

    I knew that behind the scenes the Build agent was calling the vstest.console.exe, but no matter what I tried I noticed that I couldn’t find the exact parameters that were used to call this test runner Bedroefde emoticon.

    I’m not the only one who had this problem, as an issue had already been raised on Uservoice, http://visualstudio.uservoice.com/forums/121579-visual-studio/suggestions/6073220-diagnostics-logs-should-show-the-vstest-console-co.

    Remark: Maybe another good reason to upgrade to the new Build system in TFS 2015, as the Visual Studio Test step nicely logs the exact parameters.

    testrunner

    Monday, October 26, 2015

    F#–Day by Day

    In my journey to master the ancient art of functional programming, I found the F# Day by Day repo in Github;

    This repository is dedicated to teaching the F# language in tiny increments. The idea is you come back to the repo every day for a small dose of Functional Programming (FP). 

    Every day you get some small F# exercises. As each exercise only takes a few minutes, not enough time is not an excuse!

    Friday, October 23, 2015

    Team Foundation Server 2015–Enable NUnit tests for new Build system

    I’m working on replacing the existing build system we use based on XAML Workflow by the new build system introduced in TFS 2015. So far, I really like the experience. Customizing became a lot easier than it was before…

    However one of the things I noticed that no Test Results were collected.

     

    I opened up the Test Assemblies Step in the build process(click on the step in the Build Results).

    image

    There I could see that the vstest.console.exe was invoked but that no tests were discovered.image

    The reason is that I’m using NUnit and therefore a test adapter should be installed and loaded on the build server.

    Enable NUnit Test Adapter for TFS Build

    To enable the NUnit Test Adapter, you have multiple options:

    Option 1- Use the NUnit Test Adapter DLL’s

    • Log in to your build server
    • Download the NUnit Test Adapter for Visual Studio from the Visual Studio gallery: https://visualstudiogallery.msdn.microsoft.com/6ab922d0-21c0-4f06-ab5f-4ecd1fe7175d
    • Extract the VSIX file(don’t install it!) and copy the DLL’s to the following folder
      • C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\CommonExtensions\Microsoft\TestWindow\Extensions
    • After installation,  go back to the TFS web portal and open the Team Project where you want to configure the build for
    • Go to the Build tab
    • Queue a new build

    Option 2 – Use the NUnit Test Adapter Visual Studio Extension

    • Log in to your build server.
      • Remark: When you use this option, it’s important the account you use to log in is the same account that is used to run the tests
    • Download the NUnit Test Adapter for Visual Studio from the Visual Studio gallery: https://visualstudiogallery.msdn.microsoft.com/6ab922d0-21c0-4f06-ab5f-4ecd1fe7175d
    • Install the VSIX file
    • After installation,  go back to the TFS web portal and open the Team Project where you want to configure the build for
    • Go to the Build tab
    • Right-click on the build definition and choose Edit…
    • Select the Visual Studio Test step
    • On the right, expand the Advanced section
    • Add the ‘/UseVsixExtensions:true’ in the Other console options field

    image

    • Save the edited build definition
    • Queue a new build

    Option 3  - Include the NUnit Test Adapter using NuGet

    • Open the solution you want to build in Visual Studio
    • Add the NUnit Test Adapter NuGet package(https://www.nuget.org/packages/NUnitTestAdapter/) to your solution
    • Browse to the TFS web portal and open the Team Project where you want to configure the build for
    • Go to the Build tab
    • Right-click on the build definition and choose Edit…
    • Select the Visual Studio Test step
    • On the right, expand the Advanced section
    • Add the ‘$(Build.SourcesDirectory)\packages’ in the Path to Custom Test Adapters field

    image

    • Save the edited build definition
    • Queue a new build