Skip to content

<icon> node cause "This operation is not supported." exception #869

Closed

Description

@GF-Huang

Type (choose one):

  • Bug

NPE version: NuGet Package Explorer - Store - X64 - (5.4.1+e95bd234fd)

OS version: Windows 10 1903

Installed from: Microsoft Store

In case of a BUG:

  • What is the current result?

If my package contains a <icon> node, when I click Publish it will casue an exception.

image

image

  • What is the expected result?

Works well even if contains node.

  • Please post full exception details in case of an Exception (message, stacktrace, inner exceptions).

This operation is not supported.

  • Are there any workarounds? yes/no

No.

  • Is there a version in which it did work?

Never try.

  • Is there a package on Nuget.org which shows the bug?

Activity

  1. clairernovotny commented on Nov 16, 2019

    @clairernovotny
    Member

    Please try the latest version, 5.5.28. That should have working icon support.

  2. GF-Huang commented on Nov 16, 2019

    @GF-Huang
    Author

    I have try 5.5.28 just now, but has same issue.

  3. campersau commented on Nov 16, 2019

    @campersau
    Collaborator

    This line throws the exception: https://github.com/NuGet/NuGet.Client/blob/c5c6ba438f4929e7ebe75e45ad69a8b113f7c388/src/NuGet.Core/NuGet.Packaging/PackageCreation/Authoring/PackageBuilder.cs#L630

    In the PackageHelper the files from the ZipArchive package are added to the PackageBuilder. But zip streams don't support accessing its Length property.

    Steps to reproduce:

    1. Open a package from a NuGet feed which uses an<icon> (like Newtonsoft.Json) or open a local package which uses an <icon>.
    2. Remove package signature if there is one.
    3. File -> Publish... or File -> Save as... or File -> Save

    A possible fix would be to check for an icon file, extract it from the zip and supply that instead.

  4. clairernovotny commented on Nov 16, 2019

    @clairernovotny
    Member

    Was really hoping to avoid extracting icons as temporary files :/

  5. GF-Huang commented on Jan 15, 2020

    @GF-Huang
    Author

    Thank you very much for fix this issue. 🌹

  6. i-e-b commented on May 24, 2021

    @i-e-b

    This issue also affects "Readme" files in the release: NuGet Package Explorer - Zip - X64 - (5.10.4+4ab9498d27)

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions