Bash script and patches for building dotNET for FreeBSD under Linux
As of the June 2024 release of dotNET the SDK and Installer have been merged into a single repo making building much harder.
The exception to this is the Y.0.1xx branch. I will be using this going forward
Currently working for: 9.0.100, v8.0.300 8.0.111 (there was no 8.0.109?), 6.0.423 6.0.136 (there was no 6.0.134?), and older (check commits and/or tags if you want to build old versions).
Built outside of repo but published here: v9.0.100-preview.3.24204.13
Scripts might require some tweaks. As an example some dotNET6 backports are officially backported.
If you want a more comprehensive, repo-by-repo script setup: @sec also has a (better) native crossgen build that can be found here: https://github.com/sec/dotnet-core-freebsd-source-build
Currently published here:
FreeBSD 12.4 (EOL)
- net8 SDK <= 8.0.100
- net7 SDK <= 7.0.403
- net6 SDK <= 6.0.416
FreeBSD 13
- net8 SDK >= 8.0.101
- net7 SDK >= 7.0.405 (EOL June 2024)
- net6 SDK >= 6.0.418
You don't need / want SDK builds in Azure DevOPS
or
You are allergic to YAML
run as root/sudo:
- setup.sh
- build.sh
- (optional) gather_nuget.sh
For just running it please look here:
For building code, you will need:
NEW!: This public feed should provide (most) of my (recently) built items:
- https://pkgs.dev.azure.com/IFailAt/freebsd-dotnet-runtime-nightly/_packaging/freebsd-dotnet/nuget/v3/index.json
- Cons: As this is Azure-based it will be limited to only the RTM and the newest few releases
- Cons: Due to limited storage this only contains FreeBSD 12.4 supported NuGets
- Pros: Easy to add to NuGet.config or donet source list, no auth needed
- https://nuget.pkg.github.com/TheFrank/index.json
- Cons: requires API auth but any GH account should be able to access it
- Pros: has all packages from this repo
OLD:
- either the tarball or zip from
./installer/artifacts/packages/Release/Shipping/
- from runtime (also found in
./nuget/
):- Microsoft.NETCore.App.Host.freebsd-x64.VERSION.nupkg
- Microsoft.NETCore.App.Runtime.freebsd-x64.VERSION.nupkg
- from ASPNetCore (also found in
./nuget/
):- Microsoft.AspNetCore.App.Runtime.freebsd-x64.VERSION.nupkg
For building dotNET under FreeBSD natively:
- either the tarball or zip from
./installer/artifacts/packages/Release/Shipping/
- the contents of
./nuget/
- numerous other patches not covered here if building dotNET6 or lower.
MAYBE!
Microsoft does not have RID support for FreeBSD in its SDK. You must manually patch this in! Adjust path as needed.
BSD sed
: sed -i.ORI 's/osx-x64/osx-x64;freebsd-x64/' ../sdk/SDKVERSIONNUMBER/Microsoft.NETCoreSdk.BundledVersions.props
GNU sed
: sed -i 's/osx-x64/osx-x64;freebsd-x64/' ../sdk/SDKVERSIONNUMBER/Microsoft.NETCoreSdk.BundledVersions.props
You will also need these NuGet packages produced by this repo or the Azure version repo:
- Microsoft.NETCore.App.Host.freebsd-x64.VERSION.nupkg
- Microsoft.NETCore.App.Runtime.freebsd-x64.VERSION.nupkg
- Microsoft.AspNetCore.App.Runtime.freebsd-x64.VERSION.nupkg
Yes! The Servarr teams maintains: https://github.com/Servarr/dotnet-bsd
Open a ticket if I am more than a few days behind an official release and I will try and get an update published as quick as I can