core
core copied to clipboard
Question: A view component must return a non-null value?
fail: Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware[0]
An unhandled exception has occurred while executing the request
System.InvalidOperationException: A view component must return a non-null value.
I get this error even when my ViewComponent is not present on the layout. I have two layouts _FELayout.cshtml and _Layout.cshtml. I have my ViewComponent invoked from _Layout.cshtml. But I get this error while running on debugger mode when I am in _FELayout.cshtml layout. Though, it doesn't affect the view of the application. Still curious why I am getting this error.
.NET Core version: 2.0
This should be opened at http://github.com/aspnet/home