You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Azure DevOps中任务的name与displayName属性差异解析

Difference between name and displayName in Azure DevOps Pipeline Tasks

Great question! Let's break down these two properties using your provided DotNetCoreCLI@2 task as an example:

  • name (Internal Identifier)
    This is the machine-friendly, unique identifier for your task. It’s used behind the scenes by the Azure DevOps pipeline system and for cross-task references:

    • You’ll use this value to reference the task’s outputs or set dependencies (e.g., dependsOn: CleanProjectsBeforeBuild in another task)
    • It can’t contain spaces or special characters—needs to follow valid variable naming rules
    • In your example, name: 'CleanProjectsBeforeBuild' is how the pipeline tracks this task internally, even if you change the display name later
  • displayName (Human-Friendly Label)
    This is the readable, descriptive name that appears in the Azure DevOps UI (like the pipeline run logs, task list, and dashboard). It’s purely for human clarity:

    • You can use spaces, capitalization, and natural language to make it obvious what the task does (your Clean Projects Before Build is perfect for this)
    • It doesn’t affect the task’s functionality or how other tasks interact with it—changing it only updates what you see in the interface

To put it simply: name is for the pipeline to understand, displayName is for you to understand at a glance.

内容的提问来源于stack exchange,提问作者Alejandro Herrera

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.06 18:57:54