Skip to content

Commit 1fc1634

Browse files
authored
trimming flags conditioned on net6.0 or better (#242)
1 parent 4e1fecd commit 1fc1634

File tree

3 files changed

+11
-3
lines changed

3 files changed

+11
-3
lines changed

Cpp2IL.Gui/Cpp2IL.Gui.csproj

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,11 @@
1010
<PublishSingleFile>true</PublishSingleFile>
1111
<PublishTrimmed>true</PublishTrimmed>
1212
<TargetFramework>net7.0</TargetFramework>
13-
<TrimMode>link</TrimMode>
1413
<VersionPrefix>2022.1.0</VersionPrefix>
1514
</PropertyGroup>
15+
<PropertyGroup Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net6.0'))">
16+
<TrimMode>link</TrimMode>
17+
</PropertyGroup>
1618
<ItemGroup>
1719
<Folder Include="Models\" />
1820
<AvaloniaResource Include="Assets\**" />

Cpp2IL/Cpp2IL.csproj

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,16 @@
1010
<Nullable>enable</Nullable>
1111
<OutputType>Exe</OutputType>
1212
<PublishSingleFile Condition="'$(TargetFramework)'!='net472' and '$(GITHUB_ACTIONS)' == 'true'">true</PublishSingleFile>
13-
<PublishTrimmed>true</PublishTrimmed>
1413
<TargetFrameworks>net7.0;net472</TargetFrameworks>
15-
<TrimMode>partial</TrimMode>
1614
<VersionPrefix>2022.1.0</VersionPrefix>
1715
<ServerGarbageCollection>true</ServerGarbageCollection>
1816
</PropertyGroup>
1917

18+
<PropertyGroup Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net6.0'))">
19+
<TrimMode>partial</TrimMode>
20+
<PublishTrimmed>true</PublishTrimmed>
21+
</PropertyGroup>
22+
2023
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' ">
2124
<OutputPath>bin\x64\Debug\</OutputPath>
2225
</PropertyGroup>

LibCpp2IL/LibCpp2IL.csproj

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@
1818
<Description>Library for interacting with IL2CPP metadata and binaries</Description>
1919
<Configurations>Debug;Release</Configurations>
2020
<TargetFrameworks>net7.0;net6.0;netstandard2.0</TargetFrameworks>
21+
</PropertyGroup>
22+
23+
<PropertyGroup Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net6.0'))">
2124
<IsTrimmable>true</IsTrimmable>
2225
</PropertyGroup>
2326

0 commit comments

Comments
 (0)