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

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

Open
jimmylewis opened this issue Sep 14, 2020 · 0 comments

Comments

@jimmylewis
Copy link
Contributor

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#

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