Shared
@using Shared.Extensions
Error: CS0234
The type or namespace name 'Extensions' does not exist in the namespace 'Web.Areas.User.Views.Shared' (are you missing an assembly reference?)
Error location: _Imports.razor
I've just encountered this same problem. It appears when the razor file is compiled and you have an expression somewhere on the page/component, it is generating 'using' statements and declaring a variable to hold the result of the expression, without checking if there are namespace conflicts. This could be solved in the generator by prefixing the namespace with global::
, but I can't see that happening any time soon.
My current setup:
You need to prefix all the projects with a name so it doesn't conflict with Razor's default names:
To be honest, it's probably a good idea to fully qualify the projects anyway.