diff --git a/configure.ac b/configure.ac index d87157130..aa1c4700a 100644 --- a/configure.ac +++ b/configure.ac @@ -14,7 +14,7 @@ if test "x$DOTNET" = "xno"; then fi # Check dotnet version -DOTNET_MINIMUM_VERSION=6.0 +DOTNET_MINIMUM_VERSION=7.0 DOTNET_VERSION=$($DOTNET --version) AX_COMPARE_VERSION([$DOTNET_VERSION], [ge], [$DOTNET_MINIMUM_VERSION], AC_MSG_NOTICE([Found dotnet $DOTNET_VERSION]), @@ -22,9 +22,8 @@ AX_COMPARE_VERSION([$DOTNET_VERSION], [ge], [$DOTNET_MINIMUM_VERSION], ) # Select target framework based on the dotnet version. -DOTNET_TARGET_FRAMEWORK=net7.0 -AX_COMPARE_VERSION([$DOTNET_VERSION], [ge], [8.0], - [DOTNET_TARGET_FRAMEWORK=net8.0], []) +DOTNET_MAJOR_VERSION=$(echo $DOTNET_VERSION | cut -d '.' -f 1,2) +DOTNET_TARGET_FRAMEWORK="net$DOTNET_MAJOR_VERSION" AC_MSG_NOTICE([Using target framework $DOTNET_TARGET_FRAMEWORK]) DOTNET_CMD="env TargetFramework=$DOTNET_TARGET_FRAMEWORK $DOTNET"