Skip to content

Commit

Permalink
Merge pull request #28 from anatawa12/dotnet-8-support
Browse files Browse the repository at this point in the history
.NET 8 support with keeping compatibility with .NET 6 only environment
  • Loading branch information
orels1 authored Oct 15, 2024
2 parents a9b5185 + 4810aa1 commit 68d8c9d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion PackageBuilder/PackageBuilder.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net6.0</TargetFramework>
<TargetFrameworks>net6.0;net8.0</TargetFrameworks>
<RootNamespace></RootNamespace>
<NoWarn>CS0649;CS0169</NoWarn>
<NukeRootDirectory>..</NukeRootDirectory>
Expand Down
8 changes: 7 additions & 1 deletion build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,13 @@ else
export DOTNET_EXE="$DOTNET_DIRECTORY/dotnet"
fi

FRAMEWORK="net6.0"
if dotnet --list-sdks | grep ^8 > /dev/null; then
FRAMEWORK="net8.0"
fi

echo "Microsoft (R) .NET Core SDK version $("$DOTNET_EXE" --version)"
echo "Using Framework $FRAMEWORK"

"$DOTNET_EXE" build "$BUILD_PROJECT_FILE" /nodeReuse:false /p:UseSharedCompilation=false -nologo -clp:NoSummary --verbosity quiet
"$DOTNET_EXE" run --project "$BUILD_PROJECT_FILE" --no-build -- "$@"
"$DOTNET_EXE" run --project "$BUILD_PROJECT_FILE" --no-build --framework "$FRAMEWORK" -- "$@"

0 comments on commit 68d8c9d

Please sign in to comment.