diff --git a/backend/Directory.Build.props b/backend/Directory.Build.props
index dd2894b..bbd8e84 100644
--- a/backend/Directory.Build.props
+++ b/backend/Directory.Build.props
@@ -5,6 +5,8 @@
enable
enable
true
+ none
+ false
latest-recommended
true
true
diff --git a/ci/release-cross-platform.ps1 b/ci/release-cross-platform.ps1
index 1149511..f45f67c 100644
--- a/ci/release-cross-platform.ps1
+++ b/ci/release-cross-platform.ps1
@@ -61,6 +61,7 @@ try {
-p:PublishAot=true `
-p:StripSymbols=true `
-p:DebugType=none `
+ -p:DebugSymbols=false `
--artifacts-path $buildRoot `
-o $output
if ($LASTEXITCODE -ne 0) {
diff --git a/ci/release-linux.sh b/ci/release-linux.sh
index 1504cae..74c6fe1 100644
--- a/ci/release-linux.sh
+++ b/ci/release-linux.sh
@@ -33,8 +33,10 @@ mkdir -p "$output" "$build_root" "$container_context/app" "$container_context/da
(cd "$root/backend" && dotnet publish src/Monitor.Backend \
-m:3 -c Release --no-self-contained \
+ -p:DebugType=none -p:DebugSymbols=false \
-p:UseAppHost=false -p:OpenApiGenerateDocuments=false \
--artifacts-path "$build_root" -o "$output")
+find "$output" -type f -name '*.pdb' -delete
cp -a "$output/." "$container_context/app/"
: > "$container_context/data/.keep"
diff --git a/scripts/publish.sh b/scripts/publish.sh
index ab745e4..fe1fc70 100644
--- a/scripts/publish.sh
+++ b/scripts/publish.sh
@@ -17,7 +17,7 @@ case "$project" in
esac
out="backend/artifacts/publish/$project/$rid"
-args=(publish "$csproj" -c Release -r "$rid" -p:PublishAot=true -p:DebugType=none -o "/src/$out" --artifacts-path /artifacts -nologo -v q)
+args=(publish "$csproj" -c Release -r "$rid" -p:PublishAot=true -p:DebugType=none -p:DebugSymbols=false -o "/src/$out" --artifacts-path /artifacts -nologo -v q)
case "$rid" in
linux-musl-x64)
@@ -34,7 +34,7 @@ case "$rid" in
;;
*)
cd "$root/backend" # global.json 在 backend/ 下
- dotnet publish "${csproj#backend/}" -c Release -r "$rid" -p:PublishAot=true -o "$root/$out" -nologo -v q
+ dotnet publish "${csproj#backend/}" -c Release -r "$rid" -p:PublishAot=true -p:DebugType=none -p:DebugSymbols=false -o "$root/$out" -nologo -v q
;;
esac