After getting it up and running, I sent a quick toot about having .NET 7 running on my FreeBSD VM. It got a lot of boosts and favorites.
To make the process easier for others and to make sure credit is given where due, I decided to make this little gist.
I did nothing here but find the right bits of instructions and follow them. It looks like Thefrank and sec are the driving forces behind getting .NET working on FreeBSD. More information is on the FreeBSD wiki's .NET page.
- Install dependencies:
# pkg install --yes libunwind icu libinotify krb5 openssl terminfo-db
- Create the necessary directories:
# mkdir -p /usr/share/dotnet /var/cache/nuget
Set the permissions on those directories as you see fit.
- Download the sdk
.tar.gz
and all of the.nupkg
files from the latest release. At time of writing, that is 7.0.403-x64-native - Extract the SDK:
# tar xf dotnet-sdk-7.0.403-freebsd-x64.tar.gz -C /usr/share/dotnet/
- Move the NuGet packages to the cache:
# mv *.nupkg /var/cache/nuget
- Create a symlink for ease of use:
# ln -s /usr/share/dotnet/dotnet /usr/local/bin/dotnet
Congrats, you now have a working .NET install!
rnelson@reject:/home/rnelson $ dotnet --list-sdks
7.0.403 [/usr/share/dotnet/sdk]
rnelson@reject:/home/rnelson $ dotnet --list-runtimes
Microsoft.AspNetCore.App 7.0.13 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.NETCore.App 7.0.13 [/usr/share/dotnet/shared/Microsoft.NETCore.App]
rnelson@reject:/home/rnelson $