Having some trouble with my view in asp.net mvc. My using directive's namespace is clashing with the namespace of the view, causing compile errors in my Razor generated class. I had the same issue with the @model directive, but using the global:: alias fixed it. For some reason, doing the same on my @using causes a "The type or namespace 'global' could not be found..." error. Here is what I have right now:
@using SampleSpace.System.Items
@model global::SampleSpace.System.Items.Thing
I want to use
@using global::SampleSpace.System.Items
@model global::SampleSpace.System.Items.Thing
But the aforementioned error keeps occurring. Is there any trick to using global in a using directive in a view, or is there a reason it isn't allowed?