using System.Web;
using System.Web.Optimization;
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*",
"~/Scripts/jquery.validate*"));
I am getting the error:
Error 16 The type or namespace name 'ScriptBundle' could not be found (are you missing a using directive or an assembly reference?)
Looks like some reference issue, but i am not able to figure it out. Please help. What could be causing this error?
Install-Package Microsoft.AspNet.Web.Optimization
I got this error when I was upgrading an MVC3 project to MVC4. I was missing the reference to System.Web.Optimization.dll which is in the NuGet package Microsoft ASP.NET Web Optimization Framework (Microsoft.AspNet.Web.Optimization).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With