The libman package manager freezes in initialization

266 views Asked by At

I used the libman package manager on Visual Studio 2022 very well, however, the libman freezes in package console manager for a long time today when I use the libman init command.

The libman --version works well.

PM> libman --version

2.1.161+abc97ecc7d.RR

I found the similar problem in the Visual Studio community but it didn't have any solutions or workarounds.

I clean the cache of libman by below command, however, the issue doesn't resolve.

PM> libman cache clean
Cache cleaned.

PM> libman clean
libman : libman.json was not  `found:C:\Users\user\source\repos\BlazorServerTestDynamicAccess\libman.json`

What can I do to resolve this issue?

enter image description here

1

There are 1 answers

1
Jimmy On BEST ANSWER

There are two ways to work around this:

  1. Use a different console. As mentioned in the VS Developer Community issue:

But the Package Manager Console isn't a real command line, and doesn't provide the ability for a program to read input.

  1. Avoid any prompts for user input. For libman init, add the -y or --useDefault parameter. For libman install, make sure you have provided the provider name and destination path libman.json file (using the defaultProvider and defaultDestination properties), or as parameters (see libman install --help).