|
12 | 12 | <!-- Self-contained deployment optimization --> |
13 | 13 | <PublishSingleFile>true</PublishSingleFile> |
14 | 14 | <SelfContained>true</SelfContained> |
15 | | - <RuntimeIdentifier>win-x64</RuntimeIdentifier> |
16 | 15 |
|
17 | 16 | <!-- Trimming configuration for smaller size --> |
18 | 17 | <PublishTrimmed>true</PublishTrimmed> |
19 | 18 | <TrimMode>link</TrimMode> |
20 | 19 | <EnableTrimAnalyzer>true</EnableTrimAnalyzer> |
21 | 20 |
|
| 21 | + <!-- Suppress trim warnings from System.CommandLine beta package --> |
| 22 | + <!-- IL2104: Assembly produces trim warnings --> |
| 23 | + <NoWarn>$(NoWarn);IL2104</NoWarn> |
| 24 | + |
| 25 | + <!-- Preserve XML serialization members --> |
| 26 | + <TrimmerRemoveSymbols>false</TrimmerRemoveSymbols> |
| 27 | + |
22 | 28 | <!-- Optimize for size over speed --> |
23 | 29 | <PublishReadyToRun>false</PublishReadyToRun> |
24 | 30 | <IncludeNativeLibrariesForSelfExtract>true</IncludeNativeLibrariesForSelfExtract> |
|
38 | 44 | <PackageId>TE.FileWatcher</PackageId> |
39 | 45 | </PropertyGroup> |
40 | 46 |
|
| 47 | + <!-- Apply RuntimeIdentifier only during publish to avoid test project architecture mismatch --> |
| 48 | + <PropertyGroup Condition="'$(IsPublishing)' == 'true'"> |
| 49 | + <RuntimeIdentifier>win-x64</RuntimeIdentifier> |
| 50 | + </PropertyGroup> |
| 51 | + |
41 | 52 | <ItemGroup> |
42 | 53 | <None Include="..\README.md"> |
43 | 54 | <Pack>True</Pack> |
|
62 | 73 | </None> |
63 | 74 | </ItemGroup> |
64 | 75 |
|
| 76 | + <ItemGroup> |
| 77 | + <!-- Preserve XML Serialization types from trimming --> |
| 78 | + <TrimmerRootAssembly Include="fw" /> |
| 79 | + <!-- Preserve System.CommandLine types from trimming --> |
| 80 | + <TrimmerRootAssembly Include="System.CommandLine" /> |
| 81 | + </ItemGroup> |
| 82 | + |
65 | 83 | </Project> |
0 commit comments