From 0463879b2911451f96f45535d8ded66259ad00ce Mon Sep 17 00:00:00 2001 From: leo Date: Mon, 23 May 2022 20:45:58 +0800 Subject: [PATCH] feature: publish single file for self-contained target --- build.bat | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/build.bat b/build.bat index 82079e8b..a7eddde4 100644 --- a/build.bat +++ b/build.bat @@ -4,6 +4,9 @@ rmdir /s /q publish cd src dotnet publish SourceGit.csproj --nologo -c Release -r win-x64 -f net6.0-windows -p:PublishSingleFile=true --no-self-contained -o ..\publish -dotnet publish SourceGit.csproj --nologo -c Release -r win-x64 -f net6.0-windows --self-contained -o ..\publish\SourceGit +dotnet publish SourceGit.csproj --nologo -c Release -r win-x64 -f net6.0-windows -p:PublishSingleFile=true -p:EnableCompressionInSingleFile=true -p:IncludeNativeLibrariesForSelfExtract=true -p:PublishReadyToRun=true --self-contained -o ..\publish\tmp +move ..\publish\tmp\SourceGit.exe ..\publish\SourceGit.bundle.exe +rmdir /s /q ..\publish\tmp +del /f /s /q ..\publish\SourceGit.pdb cd .. \ No newline at end of file