diff --git a/pkgs/build-support/dotnet/build-dotnet-module/hook/dotnet-hook.sh b/pkgs/build-support/dotnet/build-dotnet-module/hook/dotnet-hook.sh index 7da8ca6d33f3..da277091feb3 100644 --- a/pkgs/build-support/dotnet/build-dotnet-module/hook/dotnet-hook.sh +++ b/pkgs/build-support/dotnet/build-dotnet-module/hook/dotnet-hook.sh @@ -384,6 +384,9 @@ dotnetInstallPhase() { local runtimeIdFlags=() if [[ $projectFile == *.csproj || -n ${dotnetSelfContainedBuild-} ]]; then runtimeIdFlags+=("--runtime" "$runtimeId") + # set RuntimeIdentifier because --runtime is broken: + # https://github.com/dotnet/sdk/issues/13983 + runtimeIdFlags+=(-p:RuntimeIdentifier="$runtimeId") fi dotnet pack ${1+"$projectFile"} \