Stray white space in a ‘path to custom test adaptors’ will cause tests to fail on VSO vNext build

If you are providing a path to a custom test adaptor such as nUnit or Chutzpah for a TFS/VSO vNext build e.g. $(Build.SourcesDirectory)packages, make sure you have no leading whitespace in the data entry form. If you do have a space you will see an error log like this as the adaptor cannot be found as the command line generated is malformed 2015-07-13T16:11:32.8986514Z Executing the powershell script: C:LRMMSServicesMmsTaskAgentProvisionerToolstasksVSTest1.0.16VSTest.ps1 2015-07-13T16:11:33.0727047Z ##\[debug\]Calling Invoke-VSTest for all test assemblies 2015-07-13T16:11:33....

July 13, 2015 · 1 min · Richard Fennell

Cannot run Pester unit tests in Visual Studio but they work Ok from the command prompt

I have been using Pester for some PowerShell tests. From the command prompt all is good, but I kept getting the error ‘module cannot be loaded because scripts is disabled on this system’ when I tried to run them via the Visual Studio Test Explorer I found the solution on StackOverflow, I had forgotten that Visual Studio is 32bit, so you need to set the 32bit execution policy. Opening the default PowerShell command prompt and and setting the policy only effect the 64Bit instance....

July 7, 2015 · 1 min · Richard Fennell

Overwriting your own parameters in Release Management can cause Powershell remoting problems

I have been doing some work on vNext Release Management; I managed to waste a good hour today with a stupid error. In vNext process templates you provide a username and password to be used as the Powershell remoting credentials (in the red box below) My Powershell script also took a parameter username, so this was provided as a custom configuration too (the green box). This was the issue. Not unsurprisingly having two parameters with the same name is a problem....

June 30, 2015 · 1 min · Richard Fennell

Speaking at Leeds DevOps on the 21st of July

I will be speaking at Leeds DevOps on the 21st of July on the subject of Desired State Configuration (DSC). ‘In the Windows world, due to its API based architecture, deployment is too often not as simple as copying an EXE and updating a text configuration file. Desired State Configuration is an attempt to ease the pain we suffer in this space. Providing a set of tools that can be leveraged by any set of deployment tools whether in a Windows or heterogeneous environment....

June 30, 2015 · 1 min · Richard Fennell

Using Release Management vNext templates when you don’t want to use DSC scripts

Update 21 Aug 2015 - This post contains all the basic information, but there is an improved PowerShell script discussed in Using Release Management vNext templates when you don’t want to use DSC scripts – A better script Many web sites are basically forms over data, so you need to deploy some DB schema and something like a MVC website. Even for this ’bread and butter’ work it is important to have an automated process to avoid human error....

June 18, 2015 · 4 min · Richard Fennell