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

@ -5,15 +5,17 @@ rmdir /s /q publish
cd src
rmdir /s /q bin
rmdir /s /q obj
dotnet publish SourceGit_48.csproj --nologo -c Release -r win-x86 -o ..\publish\net48
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 ..\publish
ren SourceGit.exe SourceGit_48.exe
ren SourceGit.exe SourceGit.net48.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 -p:PublishSingleFile=true --no-self-contained -o ..\publish
dotnet publish SourceGit.csproj --nologo -c Release -r win-x86 -f net5.0-windows -p:PublishSingleFile=true --no-self-contained -o ..\publish
cd ..\publish
ren SourceGit.exe SourceGit.net50.exe
cd ../