Confuse about Nuget and Libman in VS2022
Asked Answered
F

1

6

I am new to .NET Core web development.

In VS2017, when I install jQuery using Nuget, a message will be shown suggesting to use Libman instead.

However, in VS2022 the warning message disappeared, and I can successfully install jQuery as a dependency package, not a library under \wwwroot\lib.

If I install jQuery using Libman in VS2022, jQuery will be installed under \wwwroot\lib as shown below:

enter image description here

I would like to know:

  1. Should I use Nuget for .net package(server-side) only?
  2. Should I use Libman for all client-side package only?
  3. If no for above, what is the recommended usage and trend?
Frolic answered 6/2, 2022 at 6:45 Comment(1)
hanselman.com/blog/… Microsoft of course would like you to migrate to esprit based new approach.Staggers
G
0

The thing is that it's preference and default beahvior, libman was created as a client-side package manager for your projects within the Visual Studio environment. It's intention is to handle client-side vs server side. You could technically use either one, OR, you could use another package manager such as bower, yarn, npm, etc.

The official documentation and use case examples for libman are listed on the github page located here: https://github.com/aspnet/LibraryManager#readme!.

So, by default Visual Studio will point you in the scenario of libman, but you can use any package manager you wish.

Hope this helped. Definitely read the README for the project for additional scenarios.

Geehan answered 28/8, 2022 at 7:22 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.