Update dotnet to 10 (#9179)

This commit is contained in:
DHR60
2026-05-11 08:35:26 +00:00
committed by GitHub
parent 8090799ccc
commit cc57f952db
6 changed files with 13 additions and 13 deletions
+1 -1
View File
@@ -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
+5 -5
View File
@@ -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
+1 -1
View File
@@ -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' {} +
+4 -4
View File
@@ -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
+1 -1
View File
@@ -5,7 +5,7 @@
</PropertyGroup>
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net10.0</TargetFramework>
<TargetLatestRuntimePatch>true</TargetLatestRuntimePatch>
<CheckForOverflowUnderflow>true</CheckForOverflowUnderflow>
<NoWarn>CA1031;CS1591;NU1507;CA1416;IDE0058;IDE0053;IDE0200</NoWarn>
+1 -1
View File
@@ -2,7 +2,7 @@
<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>net8.0-windows10.0.19041.0</TargetFramework>
<TargetFramework>net10.0-windows10.0.19041.0</TargetFramework>
<GenerateSatelliteAssembliesForCore>true</GenerateSatelliteAssembliesForCore>
<UseWPF>true</UseWPF>
<ApplicationIcon>Resources\v2rayN.ico</ApplicationIcon>