/////////////////
Step. 1- Install the fallowing Using Nuget
Microsoft.AspNet.Web.Optimization
Step. 2- Install the fallowing Using App_Start/BundleConfig.cs
Step. 3- Add the following line to your Global.asax.cs
BundleConfig.RegisterBundles(BundleTable.Bundles);
Step. 4- Add the following line to your View/web.config file
Step. 1- Install the fallowing Using Nuget
Microsoft.AspNet.Web.Optimization
Step. 2- Install the fallowing Using App_Start/BundleConfig.cs
public static void RegisterBundles(BundleCollection bundles)
{
bundles.Add(new ScriptBundle("~/bundles/jquery").Include(
"~/Scripts/jquery-{version}.js"));
bundles.Add(new ScriptBundle("~/bundles/jqueryui").Include(
"~/Scripts/jquery-ui-{version}.js"));
bundles.Add(new ScriptBundle("~/bundles/jqueryval").Include(
"~/Scripts/jquery.unobtrusive-ajax.js",
"~/Scripts/jquery.validate.js",
"~/Scripts/jquery.validate.unobtrusive.js",
"~/Commons_JS/Common.js"
));
bundles.Add(new ScriptBundle("~/bundles/modernizr").Include(
"~/Scripts/modernizr-*"));
bundles.Add(new ScriptBundle("~/bundles/JS").Include(
"~/js/jquery-3.2.1.min.js",
"~/js/popper.min.js",
"~/js/bootstrap.min.js",
"~/js/main.js",
"~/js/plugins/pace.min.js"
));
bundles.Add(new StyleBundle("~/bootstrap/css").Include(
"~/css/bootstrap.min.css",
));
}
Step. 3- Add the following line to your Global.asax.cs
BundleConfig.RegisterBundles(BundleTable.Bundles);
Step. 4- Add the following line to your View/web.config file
<system.web.webPages.razor>
<host factoryType="System.Web.Mvc.MvcWebRazorHostFactory,
System.Web.Mvc, Version=5.2.3.0, Culture=neutral,
PublicKeyToken=31BF3856AD364E35" />
<pages pageBaseType="System.Web.Mvc.WebViewPage">
<namespaces>
<add namespace="System.Web.Optimization"/>
</namespaces>
</pages>
</system.web.webPages.razor>
Step. 5- Add the following line to your web.config file
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<assemblyIdentity name="System.Web.Optimization" publicKeyToken="31bf3856ad364e35" />
<bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="1.1.0.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
No comments:
Post a Comment