From 3347e875f1c2e6268dbe6933f79f5aefa60526d4 Mon Sep 17 00:00:00 2001 From: Matt Nadareski Date: Sun, 15 Nov 2026 12:30:15 -0500 Subject: [PATCH] Add some publishing modifications to csproj --- BinaryObjectScanner/BinaryObjectScanner.csproj | 6 ++++++ ProtectionScan/ProtectionScan.csproj | 10 ++++++++++ publish-nix.sh | 9 ++------- publish-win.ps1 | 9 ++------- 4 files changed, 20 insertions(+), 14 deletions(-) diff --git a/BinaryObjectScanner/BinaryObjectScanner.csproj b/BinaryObjectScanner/BinaryObjectScanner.csproj index 8c84daba..e41a52fc 100644 --- a/BinaryObjectScanner/BinaryObjectScanner.csproj +++ b/BinaryObjectScanner/BinaryObjectScanner.csproj @@ -27,6 +27,12 @@ MIT + + + false + None + + win-x86;win-x64 diff --git a/ProtectionScan/ProtectionScan.csproj b/ProtectionScan/ProtectionScan.csproj index 80f636ac..fb947269 100644 --- a/ProtectionScan/ProtectionScan.csproj +++ b/ProtectionScan/ProtectionScan.csproj @@ -8,11 +8,21 @@ false latest enable + true true true 3.10.0 + + + true + + + false + None + + win-x86;win-x64 diff --git a/publish-nix.sh b/publish-nix.sh index c4b534be..7f1346d0 100755 --- a/publish-nix.sh +++ b/publish-nix.sh @@ -106,19 +106,14 @@ if [ $NO_BUILD = false ]; then fi fi - # Only .NET 5 and above can publish to a single file - if [[ $(echo ${SINGLE_FILE_CAPABLE[@]} | fgrep -w $FRAMEWORK) ]]; then - EXTRA_OPTS="-p:PublishSingleFile=true" - fi - # Only include Debug if set if [ $INCLUDE_DEBUG = true ]; then - dotnet publish ProtectionScan/ProtectionScan.csproj -f $FRAMEWORK -r $RUNTIME -c Debug --self-contained true --version-suffix $COMMIT $EXTRA_OPTS + dotnet publish ProtectionScan/ProtectionScan.csproj -f $FRAMEWORK -r $RUNTIME -c Debug --version-suffix $COMMIT fi # Only include Release if set if [ $INCLUDE_RELEASE = true ]; then - dotnet publish ProtectionScan/ProtectionScan.csproj -f $FRAMEWORK -r $RUNTIME -c Release --self-contained true --version-suffix $COMMIT -p:DebugType=None -p:DebugSymbols=false $EXTRA_OPTS + dotnet publish ProtectionScan/ProtectionScan.csproj -f $FRAMEWORK -r $RUNTIME -c Release --version-suffix $COMMIT fi done done diff --git a/publish-win.ps1 b/publish-win.ps1 index e9b56e85..c2b31e50 100644 --- a/publish-win.ps1 +++ b/publish-win.ps1 @@ -91,19 +91,14 @@ if (!$NO_BUILD.IsPresent) { continue } - # Only .NET 5 and above can publish to a single file - if ($SINGLE_FILE_CAPABLE -contains $FRAMEWORK) { - $EXTRA_OPTS = "-p:PublishSingleFile=true" - } - # Only include Debug if set if ($INCLUDE_DEBUG.IsPresent) { - dotnet publish ProtectionScan\ProtectionScan.csproj -f $FRAMEWORK -r $RUNTIME -c Debug --self-contained true --version-suffix $COMMIT $EXTRA_OPTS + dotnet publish ProtectionScan\ProtectionScan.csproj -f $FRAMEWORK -r $RUNTIME -c Debug --version-suffix $COMMIT } # Only include Release if set if ($INCLUDE_RELEASE.IsPresent) { - dotnet publish ProtectionScan\ProtectionScan.csproj -f $FRAMEWORK -r $RUNTIME -c Release --self-contained true --version-suffix $COMMIT -p:DebugType=None -p:DebugSymbols=false $EXTRA_OPTS + dotnet publish ProtectionScan\ProtectionScan.csproj -f $FRAMEWORK -r $RUNTIME -c Release --version-suffix $COMMIT } } }