@
netnr 我特意试了一下,你看看是不是漏引用了 nuget 包
```xml
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net7.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<IlcDisableReflection>true</IlcDisableReflection>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.DotNet.ILCompiler" Version="7.0.0-*" />
</ItemGroup>
</Project>
```
然后 `dotnet publish -c Release -r win-x64`
发布出来的大小:
IlcDisableReflection.exe 1.5MB