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. ...

January 13, 2023 · 2 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: | **\*.unittests.dll !**\obj\** searchFolder: '$(System.DefaultWorkingDirectory)/src And from the pipeline logs, we could see that the CLI command being generated by the VSTest@2 task was also unchanged, finding 39 DLLs that matched the filter. ...

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.<anonymous> (/opt/nodejs/16.18.0/lib/node_modules/npm/node_modules/clean-stack/index.js:6:61) at Module._compile (node:internal/modules/cjs/loader:1155:14) at Object.Module._extensions..js (node:internal/modules/cjs/loader:1209:10) at Module.load (node:internal/modules/cjs/loader:1033:32) at Function.Module._load (node:internal/modules/cjs/loader:868:12) at Module.require (node:internal/modules/cjs/loader:1057:19) at require (node:internal/modules/cjs/helpers:103:18) at Object.<anonymous> (/opt/nodejs/16.18.0/lib/node_modules/npm/node_modules/aggregate-error/index.js:3:20) at Module._compile (node:internal/modules/cjs/loader:1155:14) at Object.Module._extensions..js (node:internal/modules/cjs/loader:1209:10) { code: 'ERR_SYSTEM_ERROR', info: { errno: -2, code: 'ENOENT', message: 'no such file or directory', syscall: 'uv_os_homedir' }, errno: [Getter/Setter], syscall: [Getter/Setter] } Total in 1653 ms Solution The problem it turned out was that the default version of Node used by the GitHub Actions runner had changed from Node 14 to Node 16. ...

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. To make sure they used the newer Node16 execution runner (as per the document update process) and to update all the NPM packages used. ...

December 13, 2022 · 3 min · Richard Fennell

Fixing my Logitech Spotlight Presentation Remote that would not switch on

The Problem I am getting back out in front of audiences again as opposed to doing Teams/Zoom events. So I dug out my trusty Logitech Spotlight presentation remote from the bag where it had been sitting for well over a year. However, there was a problem, it would not pair with my re-built Windows 11 PC. It could not even switch on. A quick search showed I was not alone in having this problem, the Logitech forums showed a lot of angry people. The summary was, if left alone for a few months a Spotlight goes so flat it cannot be charged, and Logitech don’t have a fix, or seem to care. There were a lot of comments about very expensive paper weights. ...

November 14, 2022 · 4 min · Richard Fennell

Using Azure DevOps Migration Tools Again

I have recently been working with a client who needed to move Azure DevOps Work Items between Team Projects on different Azure DevOps instances. The only realistic choice was to use the free open source Azure DevOps Migration Tools. I have used these tools before, but it was a while ago, and as it is under active development, I had to relearn a few things. It is fair to say that the learning curve for this tool is steep, but as the documentation does not hide this ...

November 11, 2022 · 5 min · Richard Fennell

GitVersion task fails on a cloned Azure DevOps YAML Pipeline

Problem I recently had a strange problem. I had an existing Azure DevOps YAML Pipeline that used the checkout task to do a deep Git fetch of a repo and it’s submodules. The reason for the deep fetch was that later in the pipeline we ran GitVersion and this needs the whole repo to be able to calculate the version. - checkout: self persistCredentials: true submodules: true - task: gitversion/setup@0 displayName: 'Get current version of GitVersion' inputs: versionSpec: '5.x' - task: gitversion/execute@0 displayName: 'Run GitVersion to generate SEMVER' inputs: useConfigFile: true configFilePath: '$(System.DefaultWorkingDirectory)/GitVersion.yml' On this original pipeline this was all working as expected. ...

November 8, 2022 · 2 min · Richard Fennell

Migrating our "Living the Dream" DevOps demo to GitHub Enterprise

At Black Marble, we have had a long standing Azure DevOps Team Project that we used for end-to-end demos of the principles of DevOps called Living the Dream. This used a legacy codebase, the old Microsoft Fabrikam demo, and showed that can be deployed using modern tools. As I had no similar demo for GitHub Enterprise, I thought it would be interesting to see how the migration process taking my Azure DevOps implementation over to GitHub would go. This is a good learning exercise as it is the type of problem that many of our enterprise clients will need to do if changing DevOps platform. My key aim was to do the minimum to get the CI/CD process moved from Azure Pipelines to GitHub Action ...

November 1, 2022 · 5 min · Richard Fennell

Ignite 2022 Azure DevOps & GitHub Announcements - GitHub Advanced Security comes to Azure DevOps

Today at Microsoft’s Ignite Conference there have been some very interesting announcements related to Azure DevOps and GitHub. In the recent past, I have seen confusion from our clients as to what is Microsoft’s recommended DevOps solution, given they have both Azure DevOps and GitHub. It is true that Microsoft have said, and continue to say, that GitHub is the ’north star’ the long term destination for all users. However, that does not help clients today. Many of mine ask ‘but I am using Azure DevOps, but all Microsoft seem to talk about is GitHub, is Azure DevOps dead?’. ...

October 12, 2022 · 2 min · Richard Fennell

SonarCloud PR branch analysis when the main/trunk branch has not been analysed

SonarCloud (and it’s on premise equivalent SonarQube) understand the concept of Git branching and PRs (in various platforms, in my case Azure DevOps was the important one). This means you can block the completion of a PR if the new code in the branch/PR does not meet the SonarCloud Quality Gate. A great way to stop the addition of technical debt. However, I recently found a problem when starting to use SonarCloud in an older codebase. You cannot do SonarCloud analysis of a child branch before the main/trunk has been analysed. ...

October 1, 2022 · 3 min · Richard Fennell