Files
WebToWindowsApp-CSharp/WebToApp.csproj
2025-12-14 16:17:15 +08:00

46 lines
1.6 KiB
XML
Raw 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">
<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>net8.0-windows</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<UseWPF>true</UseWPF>
</PropertyGroup>
<!-- 发布Release配置下的体积优化设置 -->
<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
<!-- 仅发布到 Windows x64避免跨平台运行时被包含 -->
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
<!-- 避免 ReadyToRun 导致体积增大(换取更小体积) -->
<PublishReadyToRun>false</PublishReadyToRun>
<!-- WPF 不支持/不推荐修剪,避免 NETSDK1168 错误 -->
<PublishTrimmed>false</PublishTrimmed>
<!-- 使用不变全球化,去掉 ICU 数据(如不依赖复杂本地化可开启) -->
<InvariantGlobalization>true</InvariantGlobalization>
<!-- 去掉调试符号和文档以减少发布体积 -->
<DebugType>none</DebugType>
<DebugSymbols>false</DebugSymbols>
<GenerateDocumentationFile>false</GenerateDocumentationFile>
<!-- 单文件中尽量不自解压本机库(进一步缩减发布内容) -->
<IncludeNativeLibrariesForSelfExtract>false</IncludeNativeLibrariesForSelfExtract>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Web.WebView2" Version="1.0.3595.46" />
</ItemGroup>
<ItemGroup>
<Content Include="config\**\*.*">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
</ItemGroup>
</Project>