Skip to content

Commit 9f94ab3

Browse files
CLI: build a single trimmed exe for net9,
1 parent bdaa3fc commit 9f94ab3

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

src/Certify.CLI/Certify.CLI.csproj

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
3-
<TargetFrameworks>net9.0;</TargetFrameworks>
3+
<TargetFrameworks>net462;net9.0;</TargetFrameworks>
44
<Configurations>Debug;Release;</Configurations>
55
<AssemblyName>Certify</AssemblyName>
66
<OutputType>Exe</OutputType>
77
<Platforms>AnyCPU</Platforms>
88
<LangVersion>latest</LangVersion>
9+
10+
</PropertyGroup>
11+
<PropertyGroup Condition="'$(TargetFramework)' != 'net462'">
912
<PublishSingleFile>true</PublishSingleFile>
1013
<PublishTrimmed>true</PublishTrimmed>
1114
<SelfContained>true</SelfContained>
@@ -32,8 +35,7 @@
3235

3336
</PropertyGroup>
3437
<PropertyGroup>
35-
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
36-
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
38+
3739
<ProjectGuid>{DA0CCD9F-8CBD-4471-93E0-53BCFB6CA25E}</ProjectGuid>
3840
<OutputType>Exe</OutputType>
3941
<RootNamespace>Certify.CLI</RootNamespace>
@@ -42,10 +44,7 @@
4244
<ApplicationManifest>app.manifest</ApplicationManifest>
4345
<StartupObject>Certify.CLI.Program</StartupObject>
4446
</PropertyGroup>
45-
<PropertyGroup>
46-
<LangVersion>default</LangVersion>
47-
<ApplicationIcon>icon_cli.ico</ApplicationIcon>
48-
</PropertyGroup>
47+
4948
<ItemGroup>
5049
<Content Include="icon_cli.ico" />
5150
</ItemGroup>

0 commit comments

Comments
 (0)