In my "root" Views folder, I have a _ViewStart with the following code:

@Code
    Layout = "~/Views/Shared/_Layout.vbhtml"
End COde

In my Area/Public/Views folder, I have a copy of my _ViewStart from the root Views folder.

But when I run the code, I get this error:

Unable to cast object of type 'ASP._ViewStart_vbhtml' to type 'System.Web.WebPages.StartPage'.

What I'm doing wrong?

Can I use one _ViewStart.vbhtml for my areas too?

How can I use _ViewStart.vbhtml in Areas?

Edit
Report