You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Dec 14, 2018. It is now read-only.
Repository navigation
This repository was archived by the owner on Dec 14, 2018. It is now read-only.
Razor Pages do not pick up changes to _ViewImports.cshml outside of the Pages directory #6428
To reproduce this issue, take the following steps:
Ensure all the files listed above are in your MVC 2.0.0-preview2 project.
Launch the web project from VS. I was debugging the app while doing the following steps, but I don't think debugging is necessary to repro the issue.
Verify that the initial response for http://example/ is TestNamespace.Views.Home.Index_View and the initial output for http://example/TestPage is TestNamespace.Pages.TestPage_Page.
Without stopping the app, edit the namespace to /_ViewImports.cshtml to something other than TestNamespace like NewNamespace.
Verify that the initial response for http://example/ has now changed to NewNamespace.Views.Home.Index_View as expected.
Note that the response for http://example/TestPage has not changed to NewNamespace.Pages.TestPage_Page. Instead it's still TestNamespace.Pages.TestPage_Page
If you restart the app or modify TestPage.cshtml, the namespace changes will be picked up.
Activity
pranavkm commentedon Jun 21, 2017
Dupe of #6308
pranavkm commentedon Jun 21, 2017
Actually no, this is different 👍
Invalidate PageActionInvokerProvider cache when compilation cache exp…
Watch _ViewImports outside the pages root for changes
Watch _ViewImports outside the pages root for changes