如何在Visual Studio 2017中使用Bower程序包

编程入门 行业动态 更新时间:2024-10-14 02:25:26
本文介绍了如何在Visual Studio 2017中使用Bower程序包的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

在vs2017中使用Bower Package Manager面临两个困难

Face two difficulties with bower package manager in vs2017

  • 在Visual Studio 2017中,在bower.json下找不到任何.bowerrc文件,那么如何设置目录属性?通过管理Bower软件包UI 安装后,软件包会将文件存储在bower_components文件夹

  • In Visual Studio 2017, can not find any .bowerrc file under bower.json, so how to set the directory property? After Installation via Manage Bower Packages UI, packages store files in bower_components folder

    如何使用这些软件包,如VS 2013之类的早期版本一样,在BundleConfig.cs中编写语法来管理客户端软件包,如下所示.现在在VS 2017中,如何在C#Core 2 ASP.NET MVC项目中使用这些软件包?

    How to use those packages, as in previous versions like VS 2013 write syntax in BundleConfig.cs to manage client packages like below. Now in VS 2017, how to use those packages in a C# Core 2 ASP.NET MVC project?

    BundleConfig.cs:

    public class BundleConfig { public static void RegisterBundles(BundleCollection bundles) { bundles.Add(new ScriptBundle("~/bundles/jquery").Include( "~/bower_components/jquery/dist/jquery.js", "~/bower_components/jquery-file-upload/js/vendor/jquery.ui.widget.js", "~/bower_components/jquery-file-upload/js/jquery.fileupload.js", "~/bower_components/jquery-file-upload/js/jquery.iframe-transport.js")); } }

    推荐答案

    我遇到了同样的问题.

    在与bower.json文件相同的文件夹中,创建名为.bowerrc的文件.在其中粘贴:

    In the same folder as your bower.json file create the file called .bowerrc. Inside it paste:

    { "directory": "wwwroot/lib" }
  • 更多推荐

    如何在Visual Studio 2017中使用Bower程序包

    本文发布于:2023-11-13 22:45:48,感谢您对本站的认可!
    本文链接:https://www.elefans.com/category/jswz/34/1585530.html
    版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
    本文标签:程序包   如何在   Visual   Studio   Bower

    发布评论

    评论列表 (有 0 条评论)
    草根站长

    >www.elefans.com

    编程频道|电子爱好者 - 技术资讯及电子产品介绍!