vNext Build editor filePath control always returns a path even if you did not set a value

You can use the filePath type in a vNext VSTS/TFS task as shown below { "name": "settingsFile", "type": "filePath", "label": "Settings File", "defaultValue": "", "required": false, "helpMarkDown": "Path to single settings files to use (as opposed to files in project folders)", "groupName":"advanced" } to present a file picker dialog in the build editor that allows the build editor to pick a file or folder in the build’s source repository While doing some task development recently I found that this control did not behave as I had expected ...

February 8, 2016 · 2 min · Richard Fennell

A VSTS vNext build task to run StyleCop

Updated 22 Mar 2016 This tasks is available in the VSTS Marketplace I have previously posted on how a PowerShell script can be used to run StyleCop as part of vNext VSTS/TFS build. Now I have more experience with vNext tasks it seemed a good time to convert this PowerShell script into a true task that can deploy StyleCop and making it far easier to expose the various parameters StyleCop allows. To this end I have written a new StyleCop task that can be found in my vNext Build Repo, this has been built to use the 4.7.49.0 release of StyleCop (so you don’t need to install StyleCop in the build machine, so it works well on VSTS). To use this task: ...

February 6, 2016 · 2 min · Richard Fennell

A new vNext task to run StyleCop

Update 6 Feb 2016 - I have made some major changes to this task to expose more parameters, have a look at this post that details the newer version Today a good way to pull together all your measures of code quality is to run SonarQube within your automated build; in a .NET world this can show changes in quality over time for tools such as FxCop (Code Analysis) and StyleCop. However sometime you might just want to run one of these tools alone as part of your automated build. For Code Analysis this is easy, it is built into Visual Studio just set it as a property on the project. For StyleCop it is a bit more awkward as StyleCop was not designed to be run from the command line. ...

February 4, 2016 · 2 min · Richard Fennell

Follow up from my session at the Black Marble Tech Update 2016

There have been some requests for more information about the areas I convered in my presentation at the Black Marble Tech Update 2016 that we held last week. I could send out slides, but I think it is far more useful to point you at the ‘live’ resource on the Internet. The key reason for this is that the whole of the Visual Studio family is now being released at a ‘cloud cadence’ i.e. new features are appearing rapidly, so anything I write will soon be out of date. Better to look at the live sources where possible. ...

February 2, 2016 · 2 min · Richard Fennell

Fixing cannot load dashboard issues on BlogEngine.NET using sub blog aggregation

As I discovered during my BlogEngine upgrade, there is an effort within the project team to focus the codebase on three possible usage models on any given BlogEngine server instance: Single blog with a user – a personal blog (default) Single blog with many users – a team/company blog Many blogs each with a single user – a set of related blogs that can be agregated togther I needed the third option, problem was in its history our blog has been both of the other two types, so I have multiple user accounts for each blogs, and login usernames are repeated between individual blogs on the server. ...

January 4, 2016 · 3 min · Richard Fennell

Upgraded to BlogEngine.NET 3.2

I have just completed the upgrade of this blog server to the new release 3.2 of BlogEngine.NET. I did a manual upgrade (as opposed to the automated built in upgrade) as I needed to make a few changes from the default settings. The process I used followed the upgrade process document Downloaded the latest release and unzip the folder Run the SQL upgrade script (in /setup/sqlserver folder), this adds some new DB constraints Created a IIS web site using the new release Copied in the sample web.config from the /setup/sqlserver folder. Edited the SQL connection string to point to my DB IMPORTANT I MISSED THIS AT FIRST - Added the setting to change from the default single blog mode, to multi blog mode (note this is a WIKI on Github not the old CodePlex site) Copied in my App_DATA folder Accessed my site As I had not copied anything from the old custom folder, I had theme issues at this point. However, I decided to moved all the blogs to the newest generation of theme templates, so did a quick fix up by hand on each one, picking the required theme and making sure any settings, like Twitter accounts, were set (note these are set on a per blog/per theme basis, so changing a theme means you need to reenter any custom values). I also needed to copy in a few missing logos and any extra widgets from my old custom folder the blogs were using. ...

December 31, 2015 · 2 min · Richard Fennell

Running CodeUI tests on a VM with on remote desktop session open as part of a vNext build

If you want to run CodeUI tests as part of a build you need to make sure the device running the test has access to the UI, for remote VMs this means having a logged in session open and the build/test agent running interactivally. Problem is what happens when you disconnect the session. UNless you manage it you will get the error Automation engine is unable to playback the test because it is not able to interact with the desktop. This could happen if the computer running the test is locked or it’s remote session window is minimized ...

December 23, 2015 · 2 min · Richard Fennell

Live Writer becomes Open Live Writer

My primary blog editor has been Microsoft Live Writer for years, but it has always been a pain to install via Windows Essentials (as I don’t want the rest of the product), also I was never able to find the right version when I rebuilt a PC. This was not helped by the fact there has been no development of the product for years, so I struggled to remember what year version I really needed (last one was 2012 by the way). ...

December 14, 2015 · 1 min · Richard Fennell

Nuget restore fails to restore all the files on VSTS build if using project.json files

We are currently working on updating a Windows 8 application to be a Windows 10 Universal application. This has caused a few problem on a TFS vNext automated build box. The revised solution builds fine of the developers box and fine on the build VM if opened in Visual Studio, but fails if built via the VSTS vNext build CI MSBuild process showing loads of references missing. Turns out the issue was due to Nuget versions. ...

December 9, 2015 · 2 min · Richard Fennell

An out-the-box way to let local Hyper-V VMs see the Internet without using a DD-WRT router

Updated 10 Aug 2016 - Revised for Win10 anniversary build 1607 I have posted in the past about using a DD-WRT virtual router to bridge between local VMs on my development PC and the outside world With the recent changes in HyperV on Windows 10 and Server 2016 we have an alternative as discussed by Thomas Maurer in his post (pre Win10 anniversary build 1607) or this post (post Win10 anniversary build 1607). You can use a NATSwitch, thus removing the need for router VM. This does however raise different issues, that of address assignment, the router was also a DHCP server. However, it does mean I don’t have to mess around with manually setting external IP addresses for the router each time I join a different WIFI network. So on the whole I think iti is a better solution. ...

December 1, 2015 · 2 min · Richard Fennell