File view does not take precedence over embedded view #1167

Imported from the CodePlex archive for reference purposes. Support for MvcCodeRouting has ended.

Reported on

Hi Max, Thanks again for the great project! I’ve been using it with my ELEFLEX project and the modularity aspect is fantastic! However, I am running into an issue with trying to override embedded views for customization/localization/etc. According to your documentation, it looks like a view in the host web application should take precedence over the embedded view if found. I’ve tried a few different ways but can’t seem to get this working. Can you provide any insight?

I have a web application with an embedded route setup to a DLL (with an embedded controller and View). Let’s say it is for /Account/Login.cshtml. Where would I put a Login.cshtml in my web application to override the embedded view?

Thanks again! Dan

From Documentation: —snip— You can override embedded views using file views in your application. The VirtualPathProvider implementation presents a merged view (no pun intended) of file and embedded views. When a view exists in both file system and the assembly, the file view takes precedence. –snip–

Commented on link

Max, Sorry about this, my fault, It is working. I wasn’t using the full namespace of the controller for the view. Please close the ticket.

Thanks! Dan