README: add dotnet publish command with ClickOnce warning

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Ricardo Carneiro 2026-03-22 15:50:20 -03:00
parent b3feb1fe92
commit 4232ec3e10

View File

@ -142,15 +142,18 @@ O HC-06 já vem configurado para 9600 baud de fábrica. Se você alterou, edite
## Gerar executável portable
```bash
# Self-contained (~70MB) — roda sem .NET instalado
> ⚠️ **Não use o "Publicar" do Visual Studio** — ele gera um setup ClickOnce com vários arquivos.
> Use o terminal (`cmd` ou PowerShell) na pasta do projeto:
```powershell
# Self-contained (~70MB) — roda sem .NET instalado, ideal para PCs externos
dotnet publish -c Release -r win-x64 --self-contained true -p:PublishSingleFile=true -p:IncludeNativeLibrariesForSelfExtract=true
# Dependente do runtime (~2MB) — requer .NET 8 Desktop Runtime
# Dependente do runtime (~2MB) — requer .NET 8 Desktop Runtime instalado no PC
dotnet publish -c Release -r win-x64 --self-contained false -p:PublishSingleFile=true
```
O `.exe` gerado fica em `bin\Release\net8.0-windows\win-x64\publish\`.
O `KVMote.exe` gerado fica em `publish\` — é só copiar e executar, sem instalação.
---