Skip to content

NuGetPackOutput has incorrect version when project is being build using Rebuild with GitVersionTask 4.0 #1604

@Mephistofeles

Description

@Mephistofeles

GetVersion task runs some time later after _GetOutputItemsFromPack (because it is run by _CleanPackageFiles after Clean target), and it causes NuGetPackOutput to have incorrect file paths (e.g. something.1.0.0.nupkg instead of .0.1.0.nupkg). However because the actual output path is calculated again in the PackTask after build, the real package is named with correct version.
Because of that the package is not being properly deleted during Clean, and I can't use the output package path in other targets.
Here are screenshots from MSBuild Structured Log Viewer:
image

image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions