This article will briefly explain the different NuGet package versioning schemes – both automatic and manual – available. Then we’ll take a look at how to implement a nifty, and quite frankly, downright elegant automatic versioning scheme for your NuGet packages. Okay – returning from quite a trip down another rabbit hole, I think it’s a good time to document some of my findings in regards to Azure DevOps NuGet package versioning! This seems to be another area, where the documentation certainly does exist, but…Continue reading Fun with Azure DevOps NuGet package versioning!
Uh, okay, well. So this is where you should just RTFM (that’s along the lines of “check the documentation” for those uninitiated in the world of unnecessary abbreviations). But as we’ve found out before, Microsoft’s documentation on the agent’s installed software isn’t always up-to-date. That’s why I added this simple snippet on my pipeline to figure out which version of the browser AND the webdriver are installed on the machine. The snippets below can be combined with logic to install different versions of Chrome and…Continue reading How to find out which WebDriver version is installed on an Azure DevOps build machine using YAML?
We were working on getting our Robot Framework tests running during our builds on Azure DevOps. However, using hosted agents, it was quite a struggle to get all of the dependencies on the agent and make sure the tests can access the browser on the build machine. In our case, we were running the tests in Chrome. For this, we needed Robot Framework and some of its dependencies to be installed on the machine. Luckily, that wasn’t too complicated – however, getting the WebDriver that…Continue reading How to use the right version of the WebDriver on hosted agents in Azure DevOps?
Ran into another interesting one when working with a .NET Core 3.0 project and Entity Framework Core – this time, RuntimeIdentifier configuration causing trouble. In short, running Update-Database (to apply code-first migrations to your local database) locally would return this, annoying error: Failed to load the dll from [runtimepath]\win-x86\hostpolicy.dll], HRESULT: 0x800700C1 An error occurred while loading required library hostpolicy.dll from [runtimepath]\win-x86\] I suspect this can happen with any x86 runtimeIdentifier, but the one I had specified in my .csproj-file was this: win-x86 This value (or…Continue reading EF Core fails to load hostpolicy.dll when RuntimeIdentifier is win-x86
Okay – a quick piece of documentation that was a bit lackluster, so it’s again a good idea to log somewhere. How to package a simple DLL that’s a result of your Azure DevOps Pipeline? In my particular case, I have configured a post-build step to obfuscate the DLL, that’s first built by MSBuild. That works nicely. However, the default way to create a NuGet package, where you select a project (usually you pass the same variable to NuGet pack command that you used earlier…Continue reading Azure DevOps – how to package a single DLL?
This was another peculiar one – something, that didn’t bring up too many results on Google. Always fun trying to figure out those! So, when configuring an Azure DevOps pipeline (build) for a .NET project, you might run into this annoying error: ##[error]The nuget command failed with exit code(1) and error(Cannot determine the packages folder to restore NuGet packages. Please specify either -PackagesDirectory or -SolutionDirectory. Job: “The nuget command failed with exit code(1) and error(Cannot determine the packages folder to restore NuGet packages. Please specify…Continue reading Azure DevOps build fails with “The nuget command failed with exit code(1) and error(Cannot determine the packages folder to restore NuGet packages.”