I tried to remove @usingstatement from top of a mvc razor page

 @using Envy.Presentation.Resource.Reports

This was working fine for my class in that Folder

@ReportRoles.ReportRolesAssignment;

However, for "best practices" I figured that I would switch to the inner web.config :

<namespaces>
    <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="Envy" />
    <add namespace="Envy.Presentation.Resource.Reports"/>
</namespaces>

Error:

The name ReportRoles does not exist in the current context

Why can't I move it to the views web.config and get it to recognize, resolve on the razor page?

Related posts

Recent Viewed