1

So I am attempting to install the libman CLI tool for .NET 5.0 (locally) with:

dotnet new tool-manifest
dotnet tool install Microsoft.Web.LibraryManager.Cli --version 2.1.113
dotnet tool restore

which appears to work, The dotnet-tools.json gets updated as expected and I can see the locally installed nuget package.

However, running either:

libman

or:

dotnet libman

fails specifying "the command could not be found".

Any ideas why this wouldn't work like any other dotnet CLI tool? I do not want to install libman globally, but I do want to be able to run libman init, libman install, etc. within the context of the local solution.

Xorcist
  • 3,129
  • 3
  • 21
  • 47
  • `dotnet libman` is working for me following these steps. You said you have other tools working but not libman specifically? Do you have an entry in your user folder to resolve it? (mine was at %userprofile%\.dotnet\toolResolverCache\1\microsoft.web.librarymanager.cli) – Jimmy Feb 27 '21 at 17:04
  • That file is present under my user profile, in the same location as you specified. How are you running the command? CAKE is another tool I have installed locally and it works as expected, with "dotnet cake". – Xorcist Mar 01 '21 at 16:35
  • Is LIBMAN not supported for local installs? This page: [Use the LibMan CLI with ASP.NET Core](https://learn.microsoft.com/en-us/aspnet/core/client-side/libman/libman-cli?view=aspnetcore-5.0) from the Microsoft documentation only shows a global tool install. – Xorcist Mar 01 '21 at 17:02
  • Apparently so... as the path specified in **%userprofile%\.dotnet\toolResolverCache\1\microsoft.web.librarymanager.cli** is pointing to the global nuget location **%userprofile%\\.nuget\\packages\\microsoft.web.librarymanager.cli\\2.1.113\\tools/netcoreapp2.1/any/libman.dll** which does not exist, since I never installed it globally. This seems like an issue... – Xorcist Mar 01 '21 at 17:07
  • I don't want a newer version of LIBMAN to break an older solution once this moves out to continuous integration. Hence the local tool installation. – Xorcist Mar 01 '21 at 17:14
  • Pointing to the nuget package should be correct. When the tool is installed globally, it gets copied to the `%userprofile%\.dotnet\tools` folder and added to the %PATH% from there. – Jimmy Mar 02 '21 at 08:43
  • Local install is working fine for me. I even deleted the package from my nuget package cache and purged the toolResolverCache, and then running dotnet tool restore from the project folder restored both of those. – Jimmy Mar 02 '21 at 08:44
  • 1
    At the risk of this comment thread turning into a debugging conversation, feel free to open an issue on https://github.com/aspnet/LibraryManager and we can follow through on there. – Jimmy Mar 02 '21 at 08:47
  • Thanks, I posted an issue over at GitHub on your recommendation. I think this issue may stem from the fact I have a custom nuget.config associated with the solution, which uses to localize all the package file installs to the solution folder structure (tools are being installed there too). – Xorcist Mar 02 '21 at 17:25

0 Answers0