「インストール - .NET SDK」の版間の差分

ナビゲーションに移動 検索に移動
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
   
   
  # PinePhone向け (Linux Arch64)
  # 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": [
  {
    "publish",
    "label": "Release",
    "-c:Release",
    "command": "dotnet",
    "-r:<ターゲットプラットフォーム>",
    "type": "process",
    "-p:PublishReadyToRun=true",
    "args": [
    "-p:PublishSingleFile=true",
      "publish",
    "--self-contained:false",
      "-c:Release",
  ],
      "-r:<ターゲットプラットフォーム 例. linux-x64等>",
      "-p:PublishReadyToRun=false",
      "-p:PublishSingleFile=true",
      "--self-contained:false",
      "${workspaceFolder}/<C#プロジェクトのファイル名(.csprojファイル)>",
      "/property:GenerateFullPaths=true",
      "/consoleloggerparameters:NoSummary",
    ],
    "problemMatcher": "$msCompile"
  },
   
   
  // デバッグビルド
  // デバッグビルド
  //"args": [
  {
//  "publish",
    "label": "Debug",
//  "-c:Debug",
    "command": "dotnet",
//  "-r:<ターゲットプラットフォーム>",
    "type": "process",
//  "-p:PublishReadyToRun=true",
    "args": [
//  "-p:PublishSingleFile=true",
      "publish",
//  "--self-contained:false",
      "-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#プロジェクトのcsproj拡張子のファイルに以下の設定を追記する。(推奨)<br>
リリースする実行ファイルにデバッグ情報を付加しない場合は、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>

案内メニュー