I started empty project so there was no @Styles.Render
, I had to download Web.Optimization from nuget packages and create BundleConfig.cs class in App_Start folder. Then do avoid writing @using System.Web.Optimization
in my _Layout.cshtml I added namespace in the Web.config in the Views folder.
<pages pageBaseType="System.Web.Mvc.WebViewPage">
<namespaces>
...
<add namespace="System.Web.Optimization" />
...
</namespaces>
</pages>
But this not solved my problem, I still need to write @using System.Web.Optimization
. What I doing wrong?