optimize<project>: thanks to Jai for providing solution - using one project to manage multi-targetframeworks

This commit is contained in:
leo 2021-08-09 14:21:47 +08:00
parent c5819dec4c
commit 43ce225af1
4 changed files with 12 additions and 31 deletions

View file

@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net5.0-windows</TargetFramework>
<TargetFrameworks>net5.0-windows;net48</TargetFrameworks>
<OutputType>WinExe</OutputType>
<UseWPF>true</UseWPF>
<ApplicationIcon>App.ico</ApplicationIcon>
@ -17,4 +17,7 @@
<PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance>
<SatelliteResourceLanguages>none</SatelliteResourceLanguages>
</PropertyGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'net48'">
<PackageReference Include="System.Text.Json" Version="5.0.2" />
</ItemGroup>
</Project>

View file

@ -1,25 +0,0 @@
<Project Sdk="Microsoft.NET.Sdk.WindowsDesktop">
<PropertyGroup>
<TargetFramework>net48</TargetFramework>
<OutputType>WinExe</OutputType>
<UseWPF>true</UseWPF>
<ApplicationIcon>App.ico</ApplicationIcon>
<Company>sourcegit</Company>
<Description>OpenSource GIT client for Windows</Description>
<Copyright>Copyright © sourcegit 2020. All rights reserved.</Copyright>
<ApplicationManifest>App.manifest</ApplicationManifest>
<Version>4.8</Version>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<StartupObject>SourceGit.App</StartupObject>
<PackageProjectUrl>https://gitee.com/sourcegit/SourceGit.git</PackageProjectUrl>
<RepositoryUrl>https://gitee.com/sourcegit/SourceGit.git</RepositoryUrl>
<RepositoryType>Public</RepositoryType>
<PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance>
<SatelliteResourceLanguages>none</SatelliteResourceLanguages>
<RootNamespace>SourceGit</RootNamespace>
<AssemblyName>SourceGit</AssemblyName>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="System.Text.Json" Version="5.0.2" />
</ItemGroup>
</Project>