Skip to content

Browsing through the source code - possible bug in PackageUtilities? #9724

Closed
NuGet/NuGet.Client
#7813

Description

@jhribal

Hello,
shouldn't be the FatalProtocolException thrown when nuspecStream == null instead of nupkgStream == null?

PackageUtilities.cs

image

Activity

  1. added
    Type:Engineering
    Category:Quality Week
    on Jun 30, 2020
  2. added
    Functionality:SDK
    Area:ErrorHandling
    good first issue
    Priority:2
    help wanted
    and removed
    Type:Engineering
    on Sep 28, 2022
  3. Murillou4 commented on May 10, 2026

    @Murillou4

    Hi, I’d like to work on this issue.

    I checked the current dev branch in NuGet.Client and it looks like PackageUtilities.OpenNuspecFromNupkg still checks nupkgStream for null after calling reader.GetNuspec(), but the intended check seems to be against nuspecStream.

    I’ll try to update the validation and add/adjust a test to cover the missing nuspec stream scenario.

  4. AsadIqbal-Dev commented on Oct 22, 2026

    @AsadIqbal-Dev

    @Murillou4 I didn't see a PR for this since May, so I opened NuGet/NuGet.Client#7813 with the one-line fix and a couple of tests. If you're still working on yours, let me know and I'll close mine.

  5. Murillou4 commented on Oct 22, 2026

    @Murillou4

    @Murillou4 I didn't see a PR for this since May, so I opened NuGet/NuGet.Client#7813 with the one-line fix and a couple of tests. If you're still working on yours, let me know and I'll close mine.

    You can keep It, thanks for asking

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area:ErrorHandlingCategory:Quality WeekFunctionality:SDKPriority:2Type:Buggood first issuehacktoberfesthelp wanted

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions