Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
RazorViewEngine cannot find partial view when running in production #191
Ever since upgrading from ASP.NET Core 1.1 to 2.0 I have been running into a bunch of weird issues that I can only reproduce in production and not on my local dev environment. This latest issue is related to
This problem only occurs when running in production. When I am running the exact same code locally on IIS Express (with Visual Studio 2017 v15.3), it works as intended.
Please see the application logs and the stack trace, which I pulled from my Azure App Service log stream.
The exception is being thrown in a class I made inspired by this blog post. When I was running ASP.NET Core 1.1, this worked well in production. So I am really confused about why this is happening, especially when considering I can't reproduce it locally.
I checked up on the docs on Razor view compilation and tried setting
referenced this issue
Aug 23, 2017
@sebastianbk this is a variant of aspnet/Mvc#6672. Essentially the
For the time being, here's my recommended workaround:
If you'd like to keep your implementation of