Avatar image home | reference architectures | about about me |
message send message

Installing .NET 9 on a build agent is FAAAAST!

• Blog posts are my own thoughts and opinions

I did not realise just how easy and quick it is to install .NET 9 support on a build server, Cloudflare's build servers to be specific. It's so fast, and easy, that I thought it worth dropping this little nugget as a blog post.

If your build server doesnt support .NET, or .NET 9, take a look at how easy it is to install!

So this is an extract from my build.sh script, that's in one of my Cloudflare worker projects;

#!/bin/sh
curl -sSL https://dot.net/v1/dotnet-install.sh > dotnet-install.sh
chmod +x dotnet-install.sh
./dotnet-install.sh -c 9.0 -InstallDir ./dotnet
./dotnet/dotnet --version

Here's a copy of one of my actual logs of it being installed from this build.sh

1:46:19.787	dotnet-install: Attempting to download using aka.ms link https://builds.dotnet.microsoft.com/dotnet/Sdk/9.0.200/dotnet-sdk-9.0.200-linux-x64.tar.gz
11:46:21.107	dotnet-install: Remote file https://builds.dotnet.microsoft.com/dotnet/Sdk/9.0.200/dotnet-sdk-9.0.200-linux-x64.tar.gz size is 216232002 bytes.
11:46:21.108	dotnet-install: Extracting archive from https://builds.dotnet.microsoft.com/dotnet/Sdk/9.0.200/dotnet-sdk-9.0.200-linux-x64.tar.gz
11:46:26.031	dotnet-install: Downloaded file size is 216232002 bytes.
11:46:26.031	dotnet-install: The remote and local file sizes are equal.
11:46:26.101	dotnet-install: Installed version is 9.0.200
11:46:26.120	dotnet-install: Adding to current process PATH: `/opt/buildhome/repo/dotnet`. Note: This change will be visible only when sourcing script.
11:46:26.120	dotnet-install: Note that the script does not resolve dependencies during installation.
11:46:26.120	dotnet-install: To check the list of dependencies, go to https://learn.microsoft.com/dotnet/core/install, select your operating system and check the "Dependencies" section.
11:46:26.120	dotnet-install: Installation finished successfully.
11:46:26.290	9.0.200
11:46:26.307	Updated version: e3ef8e7
11:46:26.438	
11:46:26.440	Welcome to .NET 9.0!

.NET 9 installs in 7 seconds!

That's just WOW! : Also, this wasn't some Project DIGITS nVidia super server, this was a bog standard 100% free Cloudflare free worker build agent. I'm not gonna lie ..that's cheap and cheery ... 7 seconds.

Ok, letting that sink in for a bit. 😵‍💫 ❤️ 🕺🏼


Disclaimer: These views and opinions are those of the author and do not constitute professional advice. Neither Alan Hemmings nor Goblinfactory Ltd (if mentioned) shall be liable for any reliance on this content.