{"action":"created","issue":{"url":"https://api.github.com/repos/RazorGenerator/RazorGenerator/issues/21","labels_url":"https://api.github.com/repos/RazorGenerator/RazorGenerator/issues/21/labels{/name}","comments_url":"https://api.github.com/repos/RazorGenerator/RazorGenerator/issues/21/comments","events_url":"https://api.github.com/repos/RazorGenerator/RazorGenerator/issues/21/events","html_url":"https://github.com/RazorGenerator/RazorGenerator/issues/21","id":92371463,"number":21,"title":"IsPhysicalFileNewer() logic incorrect when using baseVirtualPath?","user":{"login":"caroen","id":1478224,"avatar_url":"https://avatars.githubusercontent.com/u/1478224?v=3","gravatar_id":"","url":"https://api.github.com/users/caroen","html_url":"https://github.com/caroen","followers_url":"https://api.github.com/users/caroen/followers","following_url":"https://api.github.com/users/caroen/following{/other_user}","gists_url":"https://api.github.com/users/caroen/gists{/gist_id}","starred_url":"https://api.github.com/users/caroen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/caroen/subscriptions","organizations_url":"https://api.github.com/users/caroen/orgs","repos_url":"https://api.github.com/users/caroen/repos","events_url":"https://api.github.com/users/caroen/events{/privacy}","received_events_url":"https://api.github.com/users/caroen/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-07-01T12:39:11Z","updated_at":"2015-07-02T14:18:23Z","closed_at":null,"body":"Hi,\r\n\r\n**The scenario**\r\nI have an app that runs on non-RazorGenerator views and then i have a nested app aliased as \"/Custom\" that runs RazorGenerator views and my view logic is setup to look in \"~/Custom/Views\" before \"~/Views\". (that way our vendor's can easily create customized views for our application without messing up the baseline views)\r\n\r\nThe way it works is that the parent app picks up the binaries of the nested app and creates a *PrecompiledMvcEngine* for each binary containing classes that inherit from *WebPageRenderingBase* - those instances of  *PrecompiledMvcEngine* are constructed with the *baseVirtualPath* of  \"~/Custom\".\r\n\r\n**The problem**\r\nIt all works as expected, except when it comes to using physical views if newer because the *IsPhysicalFileNewer()* method removes the \"~/Custom\" *baseVirtualPath* prefix and instead does the is-newer-check on the file located in \"~/Views\" rather than the file located in \"~/Custom/Views\".\r\n\r\n**The solution(s)**\r\n* If i am correct about how *baseVirtualPath* should work, the fix would be removing the part of *IsPhysicalFileNewer()* that removes the *baseVirtualPath* prefix from the *virtualPath* parameter\r\n* If i am **not** correct about how *baseVirtualPath* should work, the fix could be to use protected properties and methods rather than private/static to make the project extensible :)\r\n"},"comment":{"url":"https://api.github.com/repos/RazorGenerator/RazorGenerator/issues/comments/118047919","html_url":"https://github.com/RazorGenerator/RazorGenerator/issues/21#issuecomment-118047919","issue_url":"https://api.github.com/repos/RazorGenerator/RazorGenerator/issues/21","id":118047919,"user":{"login":"pranavkm","id":174281,"avatar_url":"https://avatars.githubusercontent.com/u/174281?v=3","gravatar_id":"","url":"https://api.github.com/users/pranavkm","html_url":"https://github.com/pranavkm","followers_url":"https://api.github.com/users/pranavkm/followers","following_url":"https://api.github.com/users/pranavkm/following{/other_user}","gists_url":"https://api.github.com/users/pranavkm/gists{/gist_id}","starred_url":"https://api.github.com/users/pranavkm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pranavkm/subscriptions","organizations_url":"https://api.github.com/users/pranavkm/orgs","repos_url":"https://api.github.com/users/pranavkm/repos","events_url":"https://api.github.com/users/pranavkm/events{/privacy}","received_events_url":"https://api.github.com/users/pranavkm/received_events","type":"User","site_admin":false},"created_at":"2015-07-02T14:18:23Z","updated_at":"2015-07-02T14:18:23Z","body":"Great!"}}