This may be a similar question, but since the other is not answered I thought I'd ask here. I have a mvc 4 application works fine on my local but when I deployed to my web host I got the following error
ambiguous reference between 'System.Web.WebPages.Scripts' and 'System.Web.Optimization.Scripts'
on every @Scripts.Render("")
Though @Styles.Render("")
is fine.
What's the easiest fix for this, I should not need to append "System.Web.Optimization" in front of every @Scripts.
Thanks!
Edit: I tried commenting out System.Web.WebPages in my web.config, still not working, here is my web.config
<pages>
<namespaces>
<add namespace="System.Web.Helpers" />
<add namespace="System.Web.Mvc" />
<add namespace="System.Web.Mvc.Ajax" />
<add namespace="System.Web.Mvc.Html" />
<add namespace="System.Web.Optimization" />
<add namespace="System.Web.Routing" />
<!--<add namespace="System.Web.WebPages" />-->
</namespaces>
</pages>