From aa0289eda408174dc490a729ed77d6542ec2e49d Mon Sep 17 00:00:00 2001 From: David McFarland Date: Sun, 27 Oct 2024 13:41:48 -0300 Subject: [PATCH] buildDotnetModule: respect self-contained setting in restore --- .../build-dotnet-module/hooks/dotnet-configure-hook.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pkgs/build-support/dotnet/build-dotnet-module/hooks/dotnet-configure-hook.sh b/pkgs/build-support/dotnet/build-dotnet-module/hooks/dotnet-configure-hook.sh index 4e08534f992e..aa7823331c42 100644 --- a/pkgs/build-support/dotnet/build-dotnet-module/hooks/dotnet-configure-hook.sh +++ b/pkgs/build-support/dotnet/build-dotnet-module/hooks/dotnet-configure-hook.sh @@ -24,6 +24,12 @@ dotnetConfigureHook() { local -r parallelFlag="--disable-parallel" fi + if [[ -n ${dotnetSelfContainedBuild-} ]]; then + dotnetRestoreFlagsArray+=("-p:SelfContained=true") + else + dotnetRestoreFlagsArray+=("-p:SelfContained=false") + fi + dotnetRestore() { local -r projectFile="${1-}" for runtimeId in "${dotnetRuntimeIdsArray[@]}"; do