简体   繁体   English

Asp.Net核心程序包管理器控制台。 安装NuGet库而不创建库/脚本文件夹

[英]Asp.Net Core Package Manager Console. Installing NuGet library not creating a library/script folder

I've seen other solutions when installing a NuGet package, in a web project, a folder is created to simply drag a script tag into a HTML document. 我在Web项目中安装NuGet软件包时看到了其他解决方案,创建了一个文件夹,只需将脚本标签拖动到HTML文档中即可。 This is done in Visual Studio of course. 当然,这是在Visual Studio中完成的。 I've installed jQuery and jQuery-Validation to my NETCoreApp and am quite confused on how to enable the folder creation to drag these references into my page. 我已经在我的NETCoreApp中安装了jQuery和jQuery-Validation,并且对如何启用文件夹创建以将这些引用拖到我的页面中感到非常困惑。 在此处输入图片说明

In Asp.Net Core, Nuget is used for server side packages & Bower for client side packages. 在Asp.Net Core中,Nuget用于服务器端程序包,而Bower用于客户端程序包。

To get the folder for scripts, do the following: 要获取脚本文件夹,请执行以下操作:

  1. Add 'Bower Configuration File' to the project. 将“ Bower配置文件”添加到项目。 在此处输入图片说明

  2. Under 'dependencies', add all the dependencies needed. 在“依赖项”下,添加所有需要的依赖项。 For example: 例如: 在此处输入图片说明

  3. Save the file. 保存文件。 You should see all the scripts being restored. 您应该看到所有正在还原的脚本。

  4. There should be a lib folder created under wwwroot. 应该在wwwroot下创建一个lib文件夹。 You should see all the dependent scripts under lib from which you can drag the references to your pages. 您应该在lib下看到所有依赖脚本,您可以从中将引用拖到页面上。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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