Closed tompazourek closed 8 years ago
Thanks for the report. Looking into it. The issue is with relative paths, @Html.Partial("~/Views/OtherFolder/_PartialTest.cshtml")
work just fine.
Thanks for quick response!
I've had some problems with the absolute paths as well, but it might be some other issue. I will have to try it once again.
Thanks for a quick fix. I've checked and it seems alright now.
The problem I was having with absolute paths was the missing file extension in my path, so not really related to this.
I would love to see this on NuGet whenever convenient.
I found out that the precompiled view engine cannot resolve partial views in different folders.
How to reproduce the issue:
Test.WebApp
from the source codeRoslynRazorViewEngine
inGlobal.asax.cs
Views/OtherFolder/_PartialTest.cshtml
(you'll need to createOtherFolder
directory insideViews
first)Views/Home/Index.cshtml
call@Html.Partial("../OtherFolder/_PartialTest")