Add self-contained Linux desktop publish profile

This commit is contained in:
tongtong committed 2026-11-28 05:31:46 +08:00
1 parent 5e6afd32d4
commit f32ecf35d5
2 files changed
+16

No files matched your search

@@ -0,0 +1,7 @@
<Project>
<PropertyGroup>
<Configuration>Release</Configuration>
<RuntimeIdentifier>linux-x64</RuntimeIdentifier>
<SelfContained>true</SelfContained>
</PropertyGroup>
</Project>
+9
View File
@@ -18,6 +18,15 @@ dotnet run --project EmulatorManager.csproj
## 构建、运行并同步 ## 构建、运行并同步
在 Linux x64 上可发布自带 .NET 运行时的版本:
```sh
dotnet publish EmulatorManager.csproj -c Release -p:PublishProfile=Linux-x64
./bin/Release/net10.0/linux-x64/publish/EmulatorManager
```
请整目录分发 `publish/`。普通构建的 `bin/Release/net10.0/EmulatorManager` 依赖系统可发现的 .NET。若 SDK 装在 `~/.dotnet`,也可以执行 `~/.dotnet/dotnet bin/Release/net10.0/EmulatorManager.dll`。
在已配置指定 Gitea 仓库为 `origin` 的工作区运行: 在已配置指定 Gitea 仓库为 `origin` 的工作区运行:
```sh ```sh