Face two difficulties with bower package manager in vs2017
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
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"));
}
}
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…