0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

Azure DevOps Pipeline で Azure Functions v2 をビルドする

Posted at

Azure DevOps Pipeline で利用されるイメージから .NET 2.1 が削除された。

古い Azure Functions v2 プロジェクトなどでは、.NET Core 2.1が必要となるので、今まで DotNetCoreCLI@2 の タスクの build コマンドでビルドできていたものがビルドできなくなる可能性がある。

テンプレートから選択できる Azure Functions for .NET のパイプラインを利用している場合などに影響がでる。
image.png

特定の .NET SDK を利用するには UseDotNet@2 タスクを利用して必要な .NET SDK を事前にインストールしておく必要がある。

pool:
  name: Azure Pipelines
steps:
- task: UseDotNet@2
  displayName: 'Use .NET Core sdk 2.1.x'
  inputs:
    version: 2.1.x

- task: DotNetCoreCLI@2
  displayName: 'Build project'
  inputs:
    projects: '**/*.csproj'
    arguments: '--output publish_output --configuration Release'

- task: ArchiveFiles@2
  displayName: 'Archive files'
  inputs:
    rootFolderOrFile: 'publish_output/'
    includeRootFolder: false

- task: PublishBuildArtifacts@1
  displayName: 'Publish Artifact: drop'
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?