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

Dependency wrongly parsed #4221

Open
mdepa opened this issue Jul 28, 2023 · 0 comments
Open

Dependency wrongly parsed #4221

mdepa opened this issue Jul 28, 2023 · 0 comments

Comments

@mdepa
Copy link

mdepa commented Jul 28, 2023

Description

Building a NET Core project, the build fails on .nuspec creation because wrong dependency version.

Repro steps

Please provide the steps required to reproduce the problem

  1. I specify dependencies with range AND prerelease

    storage: none
    source https://TFSFeed/nuget/v3/index.json
    source https://ArtifactoryFeed/artifactory/api/nuget/nuget
    source https://api.nuget.org/v3/index.json

    nuget Microsoft.Extensions.Diagnostics.HealthChecks.Abstractions 7.0.5
    nuget Microsoft.Extensions.Hosting.Abstractions 6.0.0
    nuget MYProject.Observability.Aspects.Fody 3.0.1
    nuget MyProject.Platform.Observability <= 3.2.0 prerelease

  2. I perform:
    dotnet paket update
    dotnet pack

Command fails:

C:\Users\mauro.de_pascale\MyRepo\MyProject.paket\Paket.Restore.targets(371,5): error : An error occured while trying to parse the value '' of property 'dependencies' in the manifest file. [C:\Users\mauro.de_pascale\MyRepo\MyProject\MySubProject\MySubProject.csproj]
C:\Users\mauro.de_pascale\MyRepo\MyProject\MySubProject.paket\Paket.Restore.targets(371,5): error : '[3.2.0-stable.beta.115706,3.2.0-prerelease]' is not a valid version string. [C:\Users\mauro.de_pascale\MyRepo\MyProject\MySubProject\MySubProject.csproj]

Looking at the generated nuspec,effectively I see wrong dependencies as the prerelease parameters was took as part of the version:

MySubProject 3.2.0 Copyright 2023

If possible then please create a git repository with a repro sample or attach a zip to the issue.

I can't share company's sources, I made an attempt to recreate it but I was unable to.

Expected behavior

Generated Nuspec shall be correct so the build can succeed producing the required final nuget package.

Actual behavior

dotnet pack command fails

Known workarounds

I Can't figure out any

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant