初始化提交
This commit is contained in:
45
WebToApp.csproj
Normal file
45
WebToApp.csproj
Normal file
@@ -0,0 +1,45 @@
|
||||
<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>
|
||||
Reference in New Issue
Block a user