From 3c11e76e9ec75b60127cde2bb390d8e8b7bca533 Mon Sep 17 00:00:00 2001 From: Sidney Andrews Date: Wed, 29 Nov 2023 19:00:19 -0500 Subject: [PATCH 1/2] Update install.sh --- src/oryx/install.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/oryx/install.sh b/src/oryx/install.sh index cb2e1b6b7..c196ce6f4 100755 --- a/src/oryx/install.sh +++ b/src/oryx/install.sh @@ -158,10 +158,10 @@ SOLUTION_FILE_NAME="Oryx.sln" echo "Building solution '$SOLUTION_FILE_NAME'..." cd $GIT_ORYX -${DOTNET_BINARY} build "$SOLUTION_FILE_NAME" -c Debug +${DOTNET_BINARY} build --configuration Debug --framework net7.0 "$SOLUTION_FILE_NAME" -${DOTNET_BINARY} publish -property:ValidateExecutableReferencesMatchSelfContained=false -r linux-x64 -o ${BUILD_SCRIPT_GENERATOR} -c Release $GIT_ORYX/src/BuildScriptGeneratorCli/BuildScriptGeneratorCli.csproj -${DOTNET_BINARY} publish -r linux-x64 -o ${BUILD_SCRIPT_GENERATOR} -c Release $GIT_ORYX/src/BuildServer/BuildServer.csproj +${DOTNET_BINARY} publish --configuration Release --runtime linux-x64 --output ${BUILD_SCRIPT_GENERATOR} --framework net7.0 --self-contained -property:ValidateExecutableReferencesMatchSelfContained=false $GIT_ORYX/src/BuildScriptGeneratorCli/BuildScriptGeneratorCli.csproj +${DOTNET_BINARY} publish --configuration Release --runtime linux-x64 --output ${BUILD_SCRIPT_GENERATOR} --framework net7.0 --self-contained $GIT_ORYX/src/BuildServer/BuildServer.csproj chmod a+x ${BUILD_SCRIPT_GENERATOR}/GenerateBuildScript From 9096b9537cbe4195d9c5b9895cf15615575bdba9 Mon Sep 17 00:00:00 2001 From: Sidney Andrews Date: Wed, 29 Nov 2023 20:02:52 -0500 Subject: [PATCH 2/2] Fixed .NET 7 detection logic --- src/oryx/install.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/oryx/install.sh b/src/oryx/install.sh index c196ce6f4..21c3a52d2 100755 --- a/src/oryx/install.sh +++ b/src/oryx/install.sh @@ -133,12 +133,12 @@ if dotnet --version > /dev/null ; then fi # Oryx needs to be built with .NET 7 -if [[ "${DOTNET_BINARY}" = "" ]] || [[ "$(dotnet --version)" != *"7"* ]] ; then - echo "'dotnet 7' was not detected. Attempting to install .NET 7 to build oryx." +if [[ "${DOTNET_BINARY}" = "" ]] || [[ "$(dotnet --list-sdks)" != *"7.0."* ]] ; then + echo "'.NET 7.0.x' was not detected. Attempting to install .NET 7 to build oryx." install_dotnet_using_apt if ! dotnet --version > /dev/null ; then - echo "(!) Please install Dotnet before installing Oryx" + echo "(!) Please install .NET before installing Oryx" exit 1 fi