Files
GC/GC-SAVEDOG/GC-SAVEDOG.csproj
T

48 lines
2.2 KiB
XML
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<Project Sdk="Microsoft.NET.Sdk">
<!--
GC-SAVEDOG —— 启动器更新守护进程。
为什么不把替换逻辑留在启动器里:
· 启动器正在运行,Windows 上无法覆盖自己的 exe;
· 覆盖失败(断电 / 占用 / 权限)时启动器已经退出,没人能回滚;
· 更新逻辑需要访问私钥验签,放在独立的最小进程里更容易审计。
本进程只做四件事:验签 → 校验 → 替换 → 看护(不健康就回滚)。
它不引用 Avalonia,也不引用启动器程序集,源码里只链接 GC/src/Security/ 下的
安全原语,保证「校验逻辑与启动器完全同一份实现」。
-->
<PropertyGroup>
<OutputType>Exe</OutputType>
<Nullable>enable</Nullable>
<RootNamespace>GC.Savedog</RootNamespace>
<AssemblyName>GC-SAVEDOG</AssemblyName>
<InvariantGlobalization>true</InvariantGlobalization>
<!--
裁剪发布:自包含单文件不裁剪约 70MB,裁剪后 14MB 左右。
守护进程要跟着更新包一起下发,体积直接影响下载与校验时间。
裁剪的前提是**不用运行时反射**:JSON 全部走 SavedogJsonContext 的源生成类型信息
(见 SavedogJson.cs)。若给这里新加类型却忘了注册,未裁剪的调试构建看不出来,
只有发布产物会在运行时报 NotSupportedException —— 测试用例里有一次真实 apply,
会覆盖到。
-->
<PublishTrimmed>true</PublishTrimmed>
<TrimMode>full</TrimMode>
<JsonSerializerIsReflectionEnabledByDefault>false</JsonSerializerIsReflectionEnabledByDefault>
<!-- 只保留必要的卫星资源,裁剪后再压一层体积 -->
<SatelliteResourceLanguages>en</SatelliteResourceLanguages>
<DebugType>none</DebugType>
</PropertyGroup>
<ItemGroup>
<!-- 与启动器共用同一份安全实现,避免两套逻辑各说各话。
ManifestLoader 依赖启动器的 RepoVersion 模型,守护进程不需要,排除。 -->
<Compile Include="..\GC\src\Security\**\*.cs" Exclude="..\GC\src\Security\ManifestLoader.cs" LinkBase="Security" />
<Compile Include="..\GC\src\Services\Json.cs" Link="Shared\Json.cs" />
</ItemGroup>
</Project>