From ef833e87cb5d40bd387e959ef25b7d0ed8347041 Mon Sep 17 00:00:00 2001 From: Happyrobot33 Date: Mon, 14 Oct 2024 08:15:56 -0400 Subject: [PATCH] implement PR to fix .net issue in newer runners manually merge in this PR to fix my runners https://github.com/vrchat-community/package-list-action/pull/28 --- PackageBuilder/PackageBuilder.csproj | 2 +- build.sh | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/PackageBuilder/PackageBuilder.csproj b/PackageBuilder/PackageBuilder.csproj index 653d38a..7e90ca1 100644 --- a/PackageBuilder/PackageBuilder.csproj +++ b/PackageBuilder/PackageBuilder.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net6.0;net8.0 CS0649;CS0169 .. diff --git a/build.sh b/build.sh index 0837e11..588b4c8 100755 --- a/build.sh +++ b/build.sh @@ -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" -- "$@"