I cannot use RazorGenerator.MVC after upgrade to MVC 5.1.2


If I won't edit any view I don't have any issue.

But after edit, I cannot compile my project any more:

error CS0103: The name 'Styles' does not exist in the current context
error CS0103: The name 'Scripts' does not exist in the current context


msmolka wrote Apr 11 at 8:50 AM

Adding namespace to main web config is not helping, but after remove razor generator web site is working without issue.

msmolka wrote Apr 11 at 9:35 AM

After reverting back solution to version MVC 5.1.1 all is working again.
For some reason System.Web.Optimization; is not added to namespaces after upgrade.

titobf wrote Apr 13 at 3:47 AM

This issue is happening to me to. Please, look at the following discussion: https://razorgenerator.codeplex.com/discussions/459467. This in an old issue that has come back again

msmolka wrote Jun 2 at 1:58 PM

Looks working in newest version 2.2.3

titobf wrote Jun 2 at 6:40 PM

Still not working for me. Namespaces from ~/Views/Web.config are not imported.

titobf wrote Jun 9 at 4:20 AM

In a new web project it worked. I didn't figure out yet why in my older project it doesn't :/. Both projects have mvc 5.1.2

Ian1971 wrote Oct 9 at 9:14 AM

I have the same problem