Bower replacement in Visual Studio 2017 ASP.NET MVC Core Template

前端 未结 6 2312
情深已故
情深已故 2021-02-12 10:59

Lately I created a ASP.NET MVC Core project from scratch using Visual Studio 2017 (15.6.3). I discovered the usual JavaScript frameworks:

  • bootstrap
  • jquery
6条回答
  •  悲哀的现实
    2021-02-12 11:23

    Bower is actually dead.

    Microsoft have a lightweight and currently under the radar solution to this called Library Manager (LibMan).

    It's a stripped down json based solution, with a very simple UI - that gives you control over which files to download (no more downloading hundreds of files when you just need 1).

    Mads Kristensen did a great little intro to the preview at Build 2017. (the video should start at the correct place around 43 mins).

    At the time of writing this it's still in preview - but due to be released with Visual Studio 15.8.

    If you'd like to try it before that you can grab it from the GitHub Repo or Visual Studio Marketplace - instructions in the solution to this question

    You can still use npm etc - though here are Microsoft's reasons for using this instead (or as well as) - from the Visual Studio Marketplace:

    Reasons for using this extension

    • For apps not currently using another package manager
    • For projects where you think Bower and npm are overkill
    • For developers that don't want to use Bower or npm
    • For developers that values simplicity in their tools
    • For using custom or private packages/files
    • For ASP.NET Core apps where NuGet can't install content packages

提交回复
热议问题