Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

If libman.json is open but not initialized, adding a new library via the wizard fails to edit the document

Open
#602 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
38/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Stale
Tech stack
csharp
Domain
devtools

Research direction

Start at InstallDialogViewModel.InstallPackageAsync(), then follow InsertIntoTextBuffer() and FormatSelection() using the reported call stack. Reproduce the wizard flow with libman.json open but unfocused in Visual Studio, and verify that completing installation edits the document and installs the selected library.

Written by the indexing model from the issue text.

Description

Functional impact

Completing the wizard does not accomplish the task as expected.

Minimal repro steps
  1. Have a solution with a libman.json file open.
  2. Close the solution with a different file as the active document.
  3. Reopen the solution, without setting focus to the libman.json tab
  4. Add -> New Client Library, fill out the wizard and install
Expected result

The libman.json file should be edited to include the new library, and the library should be installed.

Actual result

No change in the libman.json file, library is not installed.

Further technical details

This is occurring because there is a text buffer open but the TextView (and its TextViewData) is not yet initialized.

Callstack:

Microsoft.Web.LibraryManager.Vsix.dll!Microsoft.Web.LibraryManager.Vsix.UI.Models.InstallDialogViewModel.FormatSelection(Microsoft.VisualStudio.Text.ITextBuffer textBuffer, int insertionIndex, string insertionText) Line 613 C#
Microsoft.Web.LibraryManager.Vsix.dll!Microsoft.Web.LibraryManager.Vsix.UI.Models.InstallDialogViewModel.InsertIntoTextBuffer(Microsoft.VisualStudio.TextManager.Interop.IVsTextBuffer document, Microsoft.Web.LibraryManager.LibraryInstallationState libraryInstallationState, Microsoft.Web.LibraryManager.Manifest manifest) Line 585 C#
Microsoft.Web.LibraryManager.Vsix.dll!Microsoft.Web.LibraryManager.Vsix.UI.Models.InstallDialogViewModel.InstallPackageAsync() Line 539 C#

Dominant language
C#
Stars
486
Forks
91
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from aspnet/LibraryManager

All issues in aspnet/LibraryManager

Similar issues

More C# issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.