Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[enhancement]: Allow using nuspec via DotNetCoreCLI@2 #20903

Open
alex-ritter opened this issue Mar 5, 2025 · 0 comments
Open

[enhancement]: Allow using nuspec via DotNetCoreCLI@2 #20903

alex-ritter opened this issue Mar 5, 2025 · 0 comments
Labels
Area: ABTT Akvelon Build Tasks Team area of work enhancement triage

Comments

@alex-ritter
Copy link

Task name

No response

Describe your feature request here

Currently, as it stands we cannot use DotNetCoreCLI@2 to create nuget packages based off of a provided nuspec file with a dll.

When using DotNetCoreCLI@2 as below.

  • task: DotNetCoreCLI@2
    displayName: 'Pack Nuget Files'
    condition: and(
    ne(variables['Build.Reason'], 'IndividualCI'),
    ne(variables['Build.Reason'], 'PullRequest')
    )
    inputs:
    command: pack
    packagesToPack: '**/*.nuspec'
    nobuild: true
    packDestination: '$(Build.ArtifactStagingDirectory)/publish/release-files/packages'
    versioningScheme: 'byEnvVar'
    versionEnvVar: 'PackageVersion'
    workingDirectory: '$(Build.ArtifactStagingDirectory)/publish/release-files'

We are getting an error

'error MSB1003: Specify a project or solution file. The current working directory does not contain a project or solution file.'

There are nuget files specified in the '$(Build.ArtifactStagingDirectory)/publish/release-files' and manually specifying the nuspec file by name does not work.

If we try to directly use the nuget command, we require mono to be installed and in other issues, it is advised to be using DotNetCoreCLI, but due to our processes we need to be directly making nuget packages from a nuspec file, and that is currently not possible with DotNetCoreCLI.

@v-schhabra v-schhabra added Area: ABTT Akvelon Build Tasks Team area of work and removed Area: Artifacts labels Mar 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: ABTT Akvelon Build Tasks Team area of work enhancement triage
Projects
None yet
Development

No branches or pull requests

2 participants