microsoft / azure-pipelines-tasks

Tasks for Azure Pipelines
https://aka.ms/tfbuild
MIT License
3.47k stars 2.6k forks source link

DotNetCoreCLI - Pack missing doc & wierd usage #10831

Open Herve-M opened 5 years ago

Herve-M commented 5 years ago

Note

This could be related to issue #9789

Required Information

Question, Feature?
Type: Feature / Cleaning Enter Task Name: DotNetCoreCLIV2

Environment

Issue Description

DotNetCoreCLI@2 provide a documented way for packing, who is I think mispelling / hard to get into / easier to get lost.

Like:

- task: DotNetCoreCLI@2
  displayName: 'Pack - Manager'
  inputs:
    command: 'pack'
    projects: '$(Build.SourcesDirectory)/src/CM/CM.csproj'
    includesymbols: true
    includesource: true
    nobuild: true
    verbosityPack: 'normal'
    outputDir: '$(Build.StagingDirectory)'

projects won't be used during pack cmd and will be override by searchPatternPack who is required but has a default. And it seem to have one alias packagesToPack who is not set or documented.

Trolldemorted commented 5 years ago

I just lost several hours because of this bug. Could you emit a warning if projects is used in combination with pack and link to this issue @sachinma ?

github-actions[bot] commented 3 years ago

This issue is stale because it has been open for 180 days with no activity. Remove the stale label or comment on the issue otherwise this will be closed in 5 days

Trolldemorted commented 3 years ago

Was this fixed in the meanwhile?

github-actions[bot] commented 3 years ago

This issue is stale because it has been open for 180 days with no activity. Remove the stale label or comment on the issue otherwise this will be closed in 5 days

Trolldemorted commented 3 years ago

Was this fixed in the meanwhile?

github-actions[bot] commented 2 years ago

This issue is stale because it has been open for 180 days with no activity. Remove the stale label or comment on the issue otherwise this will be closed in 5 days

Trolldemorted commented 2 years ago

Was this fixed in the meanwhile?

dferretti commented 2 years ago

Also I think there are differences between projects and searchPatternPack - I am able to pass a multiline string to projects for a restore or build command, but not pack. For example I am trying to build a reusable template to restore/build/pack like this:

parameters:
- name: projects
  type: string
steps:
- task: DotNetCoreCLI@2
  inputs:
    command: restore
    projects: ${{ parameters.projects }} # other options omitted
- task: DotNetCoreCLI@2
  inputs:
    command: build
    projects: ${{ parameters.projects }}
- task: DotNetCoreCLI@2
  inputs:
    command: pack
    searchPatternPack: ${{ parameters.projects }}

however, if I try to use this template with a multiline string, only restore and build succeed:

variables:
  projects: |
    some/project/A.csproj
    other/project/B.csproj
- template: my-template
  parameters:
    projects: $(projects)

Those 2 projects will be found by the restore and build tasks and work fine, but the pack task seems to use different logic for discovering projects and requires a ; separated string instead of newline. So it will fail saying No files matched the search pattern

github-actions[bot] commented 1 year ago

This issue is stale because it has been open for 180 days with no activity. Remove the stale label or comment on the issue otherwise this will be closed in 5 days

Trolldemorted commented 1 year ago

Was this fixed in the meanwhile?

github-actions[bot] commented 1 year ago

This issue is stale because it has been open for 180 days with no activity. Remove the stale label or comment on the issue otherwise this will be closed in 5 days

Trolldemorted commented 1 year ago

Was this fixed in the meanwhile?

github-actions[bot] commented 10 months ago

This issue is stale because it has been open for 180 days with no activity. Remove the stale label or comment on the issue otherwise this will be closed in 5 days

Trolldemorted commented 10 months ago

Was this fixed in the meanwhile?

github-actions[bot] commented 1 month ago

This issue is stale because it has been open for 180 days with no activity. Remove the stale label or comment on the issue otherwise this will be closed in 5 days

Trolldemorted commented 1 month ago

Was this fixed in the meanwhile?