Document desktop single-file publish

This commit is contained in:
Misaka
2026-05-17 15:16:31 +08:00
parent cbbadd547d
commit 4f6c1e2060
2 changed files with 23 additions and 0 deletions

1
.gitignore vendored
View File

@@ -1,5 +1,6 @@
bin/ bin/
obj/ obj/
publish/
.vs/ .vs/
.vscode/ .vscode/
*.user *.user

View File

@@ -18,3 +18,25 @@ dotnet run --project .\WirelessTextSyncer.Windows\WirelessTextSyncer.Windows.csp
The initial server listens on `ws://0.0.0.0:8181`. The initial server listens on `ws://0.0.0.0:8181`.
## Release Build
Build a Windows x64 single-file executable:
```powershell
dotnet publish .\WirelessTextSyncer.Windows\WirelessTextSyncer.Windows.csproj `
-c Release `
-r win-x64 `
--self-contained true `
-p:PublishSingleFile=true `
-p:EnableCompressionInSingleFile=true `
-p:IncludeNativeLibrariesForSelfExtract=true `
-o .\publish\win-x64-single
```
The runnable app is written to:
```text
publish\win-x64-single\WirelessTextSyncer.Windows.exe
```
This build includes the .NET runtime, so the target Windows machine does not need .NET installed. The generated `.pdb` file is only for debugging and is not required to run the app.