build-dotnet-module: add useAppHost parameter so it can be disabled

+12 -1
+4
pkgs/build-support/dotnet/build-dotnet-module/default.nix
··· 71 , buildType ? "Release" 72 # If set to true, builds the application as a self-contained - removing the runtime dependency on dotnet 73 , selfContainedBuild ? false 74 # The dotnet SDK to use. 75 , dotnet-sdk ? dotnetCorePackages.sdk_6_0 76 # The dotnet runtime to use. ··· 146 147 # gappsWrapperArgs gets included when wrapping for dotnet, as to avoid double wrapping 148 dontWrapGApps = args.dontWrapGApps or true; 149 150 passthru = { 151 inherit nuget-source;
··· 71 , buildType ? "Release" 72 # If set to true, builds the application as a self-contained - removing the runtime dependency on dotnet 73 , selfContainedBuild ? false 74 + # Whether to explicitly enable UseAppHost when building 75 + , useAppHost ? true 76 # The dotnet SDK to use. 77 , dotnet-sdk ? dotnetCorePackages.sdk_6_0 78 # The dotnet runtime to use. ··· 148 149 # gappsWrapperArgs gets included when wrapping for dotnet, as to avoid double wrapping 150 dontWrapGApps = args.dontWrapGApps or true; 151 + 152 + inherit selfContainedBuild useAppHost; 153 154 passthru = { 155 inherit nuget-source;
+4 -1
pkgs/build-support/dotnet/build-dotnet-module/hooks/dotnet-build-hook.sh
··· 20 dotnetBuildFlags+=("-p:SelfContained=false") 21 fi 22 23 if [ "${version-}" ]; then 24 local -r versionFlag="-p:Version=${version-}" 25 fi ··· 31 -p:BuildInParallel=$parallelBuildFlag \ 32 -p:ContinuousIntegrationBuild=true \ 33 -p:Deterministic=true \ 34 - -p:UseAppHost=true \ 35 --configuration "@buildType@" \ 36 --no-restore \ 37 ${versionFlag-} \
··· 20 dotnetBuildFlags+=("-p:SelfContained=false") 21 fi 22 23 + if [ "${useAppHost-}" ]; then 24 + dotnetBuildFlags+=("-p:UseAppHost=true") 25 + fi 26 + 27 if [ "${version-}" ]; then 28 local -r versionFlag="-p:Version=${version-}" 29 fi ··· 35 -p:BuildInParallel=$parallelBuildFlag \ 36 -p:ContinuousIntegrationBuild=true \ 37 -p:Deterministic=true \ 38 --configuration "@buildType@" \ 39 --no-restore \ 40 ${versionFlag-} \
+4
pkgs/build-support/dotnet/build-dotnet-module/hooks/dotnet-install-hook.sh
··· 12 dotnetInstallFlags+=("--no-self-contained") 13 fi 14 15 dotnetPublish() { 16 local -r project="${1-}" 17 env dotnet publish ${project-} \
··· 12 dotnetInstallFlags+=("--no-self-contained") 13 fi 14 15 + if [ "${useAppHost-}" ]; then 16 + dotnetInstallFlags+=("-p:UseAppHost=true") 17 + fi 18 + 19 dotnetPublish() { 20 local -r project="${1-}" 21 env dotnet publish ${project-} \