13,230
回編集
| 320行目: | 320行目: | ||
dotnet publish -c:Release -r:linux-x64 -p:PublishReadyToRun=true -p:PublishSingleFile=true --self-contained:false | dotnet publish -c:Release -r:linux-x64 -p:PublishReadyToRun=true -p:PublishSingleFile=true --self-contained:false | ||
# | # Linux Arch64向け (PinePhone、Raspberry Pi等) | ||
dotnet publish -c:Release -r:linux-arm64 -p:PublishReadyToRun=true -p:PublishSingleFile=true --self-contained:false | dotnet publish -c:Release -r:linux-arm64 -p:PublishReadyToRun=true -p:PublishSingleFile=true --self-contained:false | ||
<br> | <br> | ||
| 344行目: | 344行目: | ||
<syntaxhighlight lang="js"> | <syntaxhighlight lang="js"> | ||
// tasks.json | // tasks.json | ||
"version": "〜", | |||
"tasks": [ | |||
// ...略 | // ...略 | ||
// リリースビルド | // リリースビルド | ||
"args": [ | { | ||
"label": "Release", | |||
"command": "dotnet", | |||
"type": "process", | |||
"args": [ | |||
"publish", | |||
"-c:Release", | |||
"-r:<ターゲットプラットフォーム 例. linux-x64等>", | |||
"-p:PublishReadyToRun=false", | |||
"-p:PublishSingleFile=true", | |||
"--self-contained:false", | |||
"${workspaceFolder}/<C#プロジェクトのファイル名(.csprojファイル)>", | |||
"/property:GenerateFullPaths=true", | |||
"/consoleloggerparameters:NoSummary", | |||
], | |||
"problemMatcher": "$msCompile" | |||
}, | |||
// デバッグビルド | // デバッグビルド | ||
{ | |||
"label": "Debug", | |||
"command": "dotnet", | |||
"type": "process", | |||
"args": [ | |||
"publish", | |||
"-c:Debug", | |||
"-r:<ターゲットプラットフォーム>", | |||
"-p:PublishReadyToRun=false", | |||
"-p:PublishSingleFile=true", | |||
"--self-contained:false", | |||
"${workspaceFolder}/<C#プロジェクトのファイル名(.csprojファイル)>", | |||
"/property:GenerateFullPaths=true", | |||
"/consoleloggerparameters:NoSummary", | |||
], | |||
"problemMatcher": "$msCompile" | |||
}, | |||
// ...略 | // ...略 | ||
] | |||
</syntaxhighlight> | </syntaxhighlight> | ||
<br> | <br> | ||
リリースする実行ファイルにデバッグ情報を付加しない場合は、C# | リリースする実行ファイルにデバッグ情報を付加しない場合は、C#プロジェクトの.csprojファイルに以下の設定を追記する。(推奨)<br> | ||
<syntaxhighlight lang="xml"> | <syntaxhighlight lang="xml"> | ||
<PropertyGroup> | <PropertyGroup> | ||
<!-- ...略 --> | |||
<DebugType Condition="'$(Configuration)' == 'Release'">none</DebugType> | <DebugType Condition="'$(Configuration)' == 'Release'">none</DebugType> | ||
<!-- ...略 --> | |||
</PropertyGroup> | </PropertyGroup> | ||