From cc57f952db24eeba08bc5f50c3e50e0acc3f7fd9 Mon Sep 17 00:00:00 2001 From: DHR60 Date: Mon, 11 May 2026 08:35:26 +0000 Subject: [PATCH] Update dotnet to 10 (#9179) --- .github/workflows/build.yml | 2 +- package-debian.sh | 10 +++++----- package-rhel-riscv.sh | 2 +- package-rhel.sh | 8 ++++---- v2rayN/Directory.Build.props | 2 +- v2rayN/v2rayN/v2rayN.csproj | 2 +- 6 files changed, 13 insertions(+), 13 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 838a99ec..1e8a7f06 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -54,7 +54,7 @@ jobs: - name: Setup .NET uses: actions/setup-dotnet@v5.2.0 with: - dotnet-version: '8.0.x' + dotnet-version: '10.0.x' - name: Build v2rayN working-directory: ./v2rayN diff --git a/package-debian.sh b/package-debian.sh index 32e9e620..4515fe6f 100644 --- a/package-debian.sh +++ b/package-debian.sh @@ -88,10 +88,10 @@ if command -v apt-get >/dev/null 2>&1; then libc6:arm64 libgcc-s1:arm64 libstdc++6:arm64 zlib1g:arm64 libfontconfig1:arm64 fi - # Install .NET SDK 8 via official script + # Install .NET SDK 10 via official script wget -q https://dot.net/v1/dotnet-install.sh chmod +x dotnet-install.sh - ./dotnet-install.sh --channel 8.0 --install-dir "$HOME/.dotnet" + ./dotnet-install.sh --channel 10.0 --install-dir "$HOME/.dotnet" export PATH="$HOME/.dotnet:$PATH" export DOTNET_ROOT="$HOME/.dotnet" @@ -101,7 +101,7 @@ fi if [[ "$install_ok" -ne 1 ]]; then echo "Could not auto-install dependencies for '$ID'. Make sure these are available:" - echo "dotnet-sdk 8.x, curl, unzip, tar, rsync, git, dpkg-deb, desktop-file-utils, xdg-utils" + echo "dotnet-sdk 10.x, curl, unzip, tar, rsync, git, dpkg-deb, desktop-file-utils, xdg-utils" exit 1 fi @@ -389,7 +389,7 @@ build_for_arch() { echo "[*] Building for target: $short (RID=$rid, DEB arch=$deb_arch)" dotnet clean "$PROJECT" -c Release - rm -rf "$(dirname "$PROJECT")/bin/Release/net8.0" || true + rm -rf "$(dirname "$PROJECT")/bin/Release/net10.0" || true dotnet restore "$PROJECT" dotnet publish "$PROJECT" \ @@ -399,7 +399,7 @@ build_for_arch() { local RID_DIR="$rid" local PUBDIR - PUBDIR="$(dirname "$PROJECT")/bin/Release/net8.0/${RID_DIR}/publish" + PUBDIR="$(dirname "$PROJECT")/bin/Release/net10.0/${RID_DIR}/publish" [[ -d "$PUBDIR" ]] || { echo "Publish directory not found: $PUBDIR"; return 1; } local WORKDIR PKGROOT STAGE DEBIAN_DIR diff --git a/package-rhel-riscv.sh b/package-rhel-riscv.sh index ef22934c..9136238f 100644 --- a/package-rhel-riscv.sh +++ b/package-rhel-riscv.sh @@ -69,7 +69,7 @@ if [[ -n "${VERSION_ARG:-}" && -n "${BUILD_FROM:-}" ]]; then fi apply_riscv_patch() { - # Upgrade net8.0 -> net10.0 + # Ensure all project files target net10.0 find . -type f \( -name "*.csproj" -o -name "*.props" -o -name "*.targets" \) \ -exec sed -i 's/net8\.0/net10.0/g' {} + diff --git a/package-rhel.sh b/package-rhel.sh index 310a7ab9..753e889f 100644 --- a/package-rhel.sh +++ b/package-rhel.sh @@ -71,13 +71,13 @@ host_arch="$(uname -m)" install_ok=0 if command -v dnf >/dev/null 2>&1; then - sudo dnf -y install rpm-build rpmdevtools curl unzip tar jq rsync dotnet-sdk-8.0 \ + sudo dnf -y install rpm-build rpmdevtools curl unzip tar jq rsync dotnet-sdk-10.0 \ && install_ok=1 fi if [[ "$install_ok" -ne 1 ]]; then echo "Could not auto-install dependencies for '$ID'. Make sure these are available:" - echo "dotnet-sdk 8.x, curl, unzip, tar, rsync, rpm, rpmdevtools, rpm-build (on Red Hat branch)" + echo "dotnet-sdk 10.x, curl, unzip, tar, rsync, rpm, rpmdevtools, rpm-build (on Red Hat branch)" fi # Root directory @@ -372,7 +372,7 @@ build_for_arch() { # .NET publish (self-contained) for this RID dotnet clean "$PROJECT" -c Release - rm -rf "$(dirname "$PROJECT")/bin/Release/net8.0" || true + rm -rf "$(dirname "$PROJECT")/bin/Release/net10.0" || true dotnet restore "$PROJECT" dotnet publish "$PROJECT" \ @@ -383,7 +383,7 @@ build_for_arch() { # Per-arch variables (scoped) local RID_DIR="$rid" local PUBDIR - PUBDIR="$(dirname "$PROJECT")/bin/Release/net8.0/${RID_DIR}/publish" + PUBDIR="$(dirname "$PROJECT")/bin/Release/net10.0/${RID_DIR}/publish" [[ -d "$PUBDIR" ]] || { echo "Publish directory not found: $PUBDIR"; return 1; } # Per-arch working area diff --git a/v2rayN/Directory.Build.props b/v2rayN/Directory.Build.props index 31465d57..9711db81 100644 --- a/v2rayN/Directory.Build.props +++ b/v2rayN/Directory.Build.props @@ -5,7 +5,7 @@ - net8.0 + net10.0 true true CA1031;CS1591;NU1507;CA1416;IDE0058;IDE0053;IDE0200 diff --git a/v2rayN/v2rayN/v2rayN.csproj b/v2rayN/v2rayN/v2rayN.csproj index 4b3be3eb..871d2940 100644 --- a/v2rayN/v2rayN/v2rayN.csproj +++ b/v2rayN/v2rayN/v2rayN.csproj @@ -2,7 +2,7 @@ WinExe - net8.0-windows10.0.19041.0 + net10.0-windows10.0.19041.0 true true Resources\v2rayN.ico