Skip to content

InvalidOperationException: Cannot access part because parent package was closed. #229

Open
@JPluess

Description

Describe the bug

System.InvalidOperationException: Cannot access part because parent package was closed.
   at System.IO.Packaging.PackagePart.ThrowIfParentContainerClosed()
   at System.IO.Packaging.PackagePart.GetRelationshipHelper(String id)
   at System.IO.Packaging.PackagePart.RelationshipExists(String id)
   at OfficeRibbonXEditor.Documents.OfficePart.RemoveImage(String imageId) in C:\Users\FernA\agent\_work\1\s\src\OfficeRibbonXEditor\Documents\OfficePart.cs:line 149
   at OfficeRibbonXEditor.ViewModels.Documents.OfficePartViewModel.RemoveIcon(String id) in C:\Users\FernA\agent\_work\1\s\src\OfficeRibbonXEditor\ViewModels\Documents\OfficePartViewModel.cs:line 79
   at OfficeRibbonXEditor.ViewModels.Windows.MainWindowViewModel.ExecuteRemoveCommand() in C:\Users\FernA\agent\_work\1\s\src\OfficeRibbonXEditor\ViewModels\Windows\MainWindowViewModel.cs:line 562

To Reproduce
Please describe the steps that lead to the unhandled exception here, including example files if relevant.

Screenshots
If applicable, add screenshots to help explain how the unhandled exception occurred.

Additional context

  • Version: 1.9.0.1056
  • Runtime: .NET 6.0.25
  • Operating System: Microsoft Windows 10.0.22631

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions