Complementing @rien333’s post, I noticed that simply specifying the .NET version in makedepends guarantees that .NET 9.0 is installed, but it does not guarantee that .NET 9.0 will actually be used during the build if you have the meta package version installed.
pacman -Qs dotnet
local/dotnet-host 10.0.0.sdk100-1
A generic driver for the .NET Core Command Line Interface
local/dotnet-runtime 10.0.0.sdk100-1
The .NET Core runtime
local/dotnet-runtime-9.0 9.0.11.sdk112-1
The .NET Core runtime
local/dotnet-sdk 10.0.0.sdk100-1
The .NET Core SDK
local/dotnet-sdk-9.0 9.0.11.sdk112-1
The .NET Core SDK
local/dotnet-targeting-pack 10.0.0.sdk100-1
The .NET Core targeting pack
local/dotnet-targeting-pack-9.0 9.0.11.sdk112-1
The .NET Core targeting pack
When building:
Building AVA Interface...
Welcome to .NET 10.0!
---------------------
SDK Version: 10.0.100
...
The solution I found was to explicitly specify the SDK version during the build:
...
export DOTNET_CLI_TELEMETRY_OPTOUT=1
cat >global.json <<EOF
{
"sdk": {
"version": "9.0.100",
"rollForward": "minor"
}
}
EOF
local _runtime="linux-x64"
local _args=(
...
Now it builds without issues and without needing to use chroot.
Pinned Comments
xiota commented on 2024-02-23 04:04 (UTC) (edited on 2026-01-24 16:17 (UTC) by xiota)
Problems building?
aur/dotnet-core-bin._dotnet_type=-9.0)For other issues, avoid flagging and commenting at the same time for the same issue.