2
When I publish my Asp.net mvc application the Bundle script generates a ref. scripts problem.
As in the debug environment do not use the Bundles the problem does not happen.
Error:
"~common/scripts": Duplicate data Property in Object literal not allowed in Strict mode.
Global.white wing:
ViewEngines.Engines.Clear();
ViewEngines.Engines.Add(new RazorViewEngine());
ModelBinders.Binders.Add(typeof(decimal), new DecimalModelBinder());
AreaRegistration.RegisterAllAreas();
WebApiConfig.Register(GlobalConfiguration.Configuration);
FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters);
RouteConfig.RegisterRoutes(RouteTable.Routes);
BundleConfig.RegisterBundles(BundleTable.Bundles);
AuthConfig.RegisterAuth();
BundleTable.EnableOptimizations = !HttpContext.Current.IsDebuggingEnabled;
Bundle Register:
bundles.Add(new ScriptBundle("~/base/scripts").Include("~/Scripts/Site.js"));
bundles.Add(new ScriptBundle("~/modernizr").Include("~/Scripts/modernizr-2.7.2.js"));
bundles.Add(new ScriptBundle("~/metro/scripts").Include("~/Scripts/Metro/metro.js"));
bundles.Add(new ScriptBundle("~/jquery/scripts").Include("~/Scripts/jquery-2.1.1.js", "~/Scripts/jquery-migrate-1.2.1.js", "~/Scripts/jquery.unobtrusive-ajax.js", "~/Scripts/jquery-ui-1.10.4.js", "~/Scripts/jquery.validate.js", "~/Scripts/jquery.validate.unobtrusive.js"));
bundles.Add(new ScriptBundle("~/common/scripts").Include("~/Scripts/Common/jquery.ui.dialogr.js", "~/Scripts/Common/jquery.select2.js", "~/Scripts/Common/jquery.maskedinput.js", "~/Scripts/Common/jquery.number.js", "~/Scripts/Common/jquery.float-thead.js", "~/Scripts/Common/jquery.tablesorter.js"));
You can add the rest of your global.asax please?
– Diego Vieira
I changed, it’s all there!
– Trxplz0
Your scripts are extending the same property twice (or more), so the warning. Your browser inspector hints which script is?
– Leonel Sanches da Silva
In the script Select2
– Trxplz0