1

I cannot get access to The helper @Styles nor @Scripts. I have added <add namespace="System.Web.Optimization" /> as proposed HERE and HERE. I use to have this problem, but i solved it by adding @using System.Web.Optimisation

Here are my configs (the relevant part):

 <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.Mvc" />
    <add namespace="System.Web.Mvc.Ajax" />
    <add namespace="System.Web.Mvc.Html" />
    <add namespace="System.Web.Optimisation" />
    <add namespace="System.Web.Routing" />
    <add namespace="CariSSC" />
  </namespaces>
</pages>

I read a couple of blogs online and they all point to the same solution. Any clues on how to fix this?

Community
  • 1
  • 1
Chax
  • 1,041
  • 2
  • 14
  • 36

1 Answers1

1

You misspelled Optimization namespace in your config file. You have Optimisation when it should be Optimization.

mariocatch
  • 8,305
  • 8
  • 50
  • 71
  • I'm a quebecer and i speak french. Probably why it didn't jumped out! Thanks a lot! – Chax Aug 08 '16 at 00:56