buildDotnetModule: fix build for dotnet-sdk versions below 6

The --self-contained and --no-self-contained switches were
added to the dotnet build command starting with .NET 6.
The switch is equivalent to the setting the SelfContained
property, so we use the property for backwards compatibility.
This commit is contained in:
mdarocha 2022-08-03 16:15:59 +02:00
parent 163e81aac0
commit 134da4ce36

View file

@ -15,9 +15,9 @@ dotnetBuildHook() {
fi
if [ "${selfContainedBuild-}" ]; then
dotnetBuildFlags+=("--self-contained")
dotnetBuildFlags+=("-p:SelfContained=true")
else
dotnetBuildFlags+=("--no-self-contained")
dotnetBuildFlags+=("-p:SelfContained=false")
fi
if [ "${version-}" ]; then