Getting x86 .NET 3.x tests running on the latest Azure Devops hosted agents

Background At Black Marble we have our own private build agents, but they are built using the same Packer process as the Microsoft hosted ones. I recently rebuilt our agents to match the latest version of the hosted agents, and I ran into an issue with some .NET 3.1 based x86 MSTests. The tests were failing with the following error: A total of 34 test files matched the specified pattern. ##[error]Testhost process exited with error: A fatal error occurred....

March 6, 2023 · 2 min · Richard Fennell

Getting "cannot find path" error using Install-Package

Background I was recently trying to use PowerShelGet Install-Package to install a module from an Azure DevOps Artifacts hosted PowerShell Gallery using the following script # For authentication use a PAT as the password, UID can be anything $PATcreds = Get-Credential Register-PSRepository -Name BM -SourceLocation 'https://pkgs.dev.azure.com/<org>/_packaging/PowerShell/nuget/v2' -PublishLocation 'https://pkgs.dev.azure.com/<org>/_packaging/PowerShell/nuget/v2' -InstallationPolicy Trusted Install-Package BlackMarble.Package -Source BM -Credential $PATcreds The script did not work I was getting the error Install-Package : Cannot find the path ‘C:\Users<user>\AppData\Local\Temp\936930114\BlackMarble....

February 27, 2023 · 1 min · Richard Fennell

What happens when you link an Azure DevOps Variable Group to an Azure Key Vault?

Background It is a really useful feature that you can expose Key Vault stored secrets as Azure DevOps pipeline variables via a variable group, but what happens when you do this? And what can you do if you try to expose too many variables? I was recently working on a system where there was an increasing number of Key Vault secrets that were being exposed as variables via a variable group....

February 13, 2023 · 2 min · Richard Fennell

Handling return values from Azure Functions in Hugo static website

Background I am using an Azure Function as backend for processing forms submissions from a Hugo static website, to process a simple contact form. I wanted to add reCAPTCHA support, as the site was generating too many spam emails. I also wanted to show a different confirmation pages depending on whether the reCAPTCHA check passed or failed There a good few posts about using an Azure Function as backend for a static web site form....

January 20, 2023 · 4 min · Richard Fennell

Could not find assembly deploying a dotnet 6 console app

Problem After deploying a dotnet 6 console app to a production server, I got the following error: Exception: [Could not load file or assembly ‘System.Data.Odbc, Version=6.0.0.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51’. The system cannot find the file specified.] The strange thing was the same EXE, built on a Microsoft hosted Azure DevOps build agent, was working on the test server and was deployed using the same Azure DevOps Pipeline to both systems. I tried many things to work out what the problem was....

January 13, 2023 · 2 min · Richard Fennell

Book Review - Code: The Hidden Language of Computer Hardware and Software

Late last year at (DDDNorth](https://twitter.com/dddnorth) my session had the title ‘Why don’t people seem to be able to diagnose problems these days?’. Between anecdotes, a key theme was tha people too often don’t make sensible diagnostic steps. A problem caused, in my opinion, by the fact they have not been exposed to the fundamentals of how a computer works, due to the way computing is taught today, as opposed to how it was taught in my youth in the 80s...

January 11, 2023 · 1 min · Richard Fennell

Duplicate Test DLLs with vstest.console.exe causes failures

The Problem I recently did our regular update of our Azure DevOps Private build agents. It is rare we see problems when we do this, but this time one of our very regularly run builds started to fail when running unit tests. We had not changed the project source code, all the test ran locally in Visual Studio. We had not change the build pipeline YAML - task: VSTest@2 displayName: 'Unit Tests - Services' inputs: testAssemblyVer2: | **\*....

January 9, 2023 · 2 min · Richard Fennell

GitHub agent Node version stops Hugo site build

The Problem I have blogged previously about moving various web sites over to become Hugo Static Sites. Recently one of my site’s, one using the tailwindscss module, GitHub Build and Deployment Workflow started failing with the following error: Start building sites … hugo v0.108.0-a0d64a46e36dd2f503bfd5ba1a5807b900df231d+extended linux/amd64 BuildDate=2022-12-06T13:37:56Z VendorInfo=gohugoio Error: Error building site: POSTCSS: failed to transform "css/style.css" (text/css): node:internal/errors:478 ErrorCaptureStackTrace(err); ^ SystemError [ERR_SYSTEM_ERROR]: A system error occurred: uv_os_homedir returned ENOENT (no such file or directory) at Object....

December 16, 2022 · 1 min · Richard Fennell

Updating my Azure DevOps Pipeline Task to Use the Node16 Runner

Background It is easy to create an Open Source Project and leave it to gather technical debt as the libraries it depends upon are updated. I have tried to keep on top of updating all my Azure DevOps Pipeline Extensions, and I have to say Dependabot has certainly helped, but I have not been as diligent as I might have been. So, as a Christmas project, I took the chance to start to do a major update of all my extensions....

December 13, 2022 · 3 min · Richard Fennell

You need a license to touch that (revised 18 years on)

“You need a license to touch that!”. The case for licensing of individuals within the software engineering profession. Background Back in 2004 I completed my BSc Degree in Computer Science at Bradford University; only 20 years after I started. My year in industry got out of hand! One module I did involved me writing a paper on a legal area concerning computing. I chose to discuss licensing of engineers. Whilst at the DDDNorth community conference last weekend (Dec 2022) I got chatting on aspects of staff development, problem solving and training with a fellow MVP Matteo Emili and I mentioned this paper I had written....

December 5, 2022 · 11 min · Richard Fennell