refactor<build>: no longer provides .NET48 and .NET6 x86 targets.

This commit is contained in:
leo 2022-05-20 15:49:58 +08:00
parent 171f1d1d0c
commit 1a1d0d9004
2 changed files with 10 additions and 32 deletions

View file

@ -1,28 +1,9 @@
@echo off @echo off
rmdir /s /q publish rmdir /s /q publish
cd src cd src
rmdir /s /q bin dotnet publish SourceGit.csproj --nologo -c Release -r win-x64 -f net6.0-windows -p:PublishSingleFile=true --no-self-contained -o ..\publish
rmdir /s /q obj dotnet publish SourceGit.csproj --nologo -c Release -r win-x64 -f net6.0-windows --self-contained -o ..\publish\SourceGit
dotnet publish SourceGit.csproj --nologo -c Release -r win-x86 -f net48 -o ..\publish\net48
ilrepack /ndebug /wildcards /out:..\publish\SourceGit.exe ..\publish\net48\SourceGit.exe ..\publish\net48\*.dll cd ..
cd ..\publish
ren SourceGit.exe SourceGit.net4.8.exe
rmdir /s /q net48
cd ..\src
rmdir /s /q bin
rmdir /s /q obj
dotnet publish SourceGit.csproj --nologo -c Release -r win-x86 -f net6.0-windows -p:PublishSingleFile=true --no-self-contained -o ..\publish
cd ..\publish
ren SourceGit.exe SourceGit.net6.0.x86.exe
cd ..\src
rmdir /s /q bin
rmdir /s /q obj
dotnet publish SourceGit.csproj --nologo -c Release -r win-x64 -f net6.0-windows -p:PublishSingleFile=true --no-self-contained -o ..\publish
cd ..\publish
ren SourceGit.exe SourceGit.net6.0.x64.exe
cd ../

View file

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