简体   繁体   中英

Confuse about Nuget and Libman in VS2022

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:

在此处输入图像描述

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?

Apologies for the late reply, assuming you're still pondering this...

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM