Skip to content

Instantly share code, notes, and snippets.

@takekazuomi
Last active May 31, 2019 05:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save takekazuomi/7fb61d3a43c8d5765273d2ee18d7118e to your computer and use it in GitHub Desktop.
Save takekazuomi/7fb61d3a43c8d5765273d2ee18d7118e to your computer and use it in GitHub Desktop.
# invoke-psake -task Init,Publish
Task default -Depends Publish
Task Init {
dotnet new console -o .\singleexe -n singleexe
}
Task Publish {
cd singleexe
dotnet publish --nologo -c Release -r win10-x64 --self-contained=false /p:PublishSingleFile=true -o work1
dotnet publish --nologo -c Release -r win10-x64 /p:PublishSingleFile=true -o work2
ls work*/*.exe
}
$ psake -task Init,Publish
psake version 4.8.0
Copyright (c) 2010-2018 James Kovacs & Contributors
Executing Init
The template "Console Application" was created successfully.
Processing post-creation actions...
Running 'dotnet restore' on .\singleexe\singleexe.csproj...
C:\ws\netcore\singleexe\singleexe\singleexe.csproj の復元が 74.38 ms で完了しました。
Restore succeeded.
Executing Publish
C:\ws\netcore\singleexe\singleexe\singleexe.csproj の復元が 73.46 ms で完了しました。
C:\Program Files\dotnet\sdk\3.0.100-preview5-011568\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.RuntimeIdentifierInference.targets(157,5): message NETSDK1057: プレビュー版の .NET Core を使用しています。https://aka.ms/dotnet-core-preview をご覧ください [C:\ws\netcore\sin
gleexe\singleexe\singleexe.csproj]
singleexe -> C:\ws\netcore\singleexe\singleexe\bin\Release\netcoreapp3.0\win10-x64\singleexe.dll
singleexe -> C:\ws\netcore\singleexe\singleexe\work1\
C:\ws\netcore\singleexe\singleexe\singleexe.csproj の復元が 85.92 ms で完了しました。
C:\Program Files\dotnet\sdk\3.0.100-preview5-011568\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.RuntimeIdentifierInference.targets(157,5): message NETSDK1057: プレビュー版の .NET Core を使用しています。https://aka.ms/dotnet-core-preview をご覧ください [C:\ws\netcore\sin
gleexe\singleexe\singleexe.csproj]
singleexe -> C:\ws\netcore\singleexe\singleexe\bin\Release\netcoreapp3.0\win10-x64\singleexe.dll
singleexe -> C:\ws\netcore\singleexe\singleexe\work2\
Directory: C:\ws\netcore\singleexe\singleexe\work1
Mode LastWriteTime Length Name
---- ------------- ------ ----
-a---- 05/31/2019 14:21 342314 singleexe.exe
Directory: C:\ws\netcore\singleexe\singleexe\work2
Mode LastWriteTime Length Name
---- ------------- ------ ----
-a---- 05/31/2019 14:21 70272292 singleexe.exe
psake succeeded executing psakefile.ps1
----------------------------------------------------------------------
Build Time Report
----------------------------------------------------------------------
Name Duration
---- --------
Init 00:00:01.840
Publish 00:00:04.020
Total: 00:00:05.864
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment