core icon indicating copy to clipboard operation
core copied to clipboard

Question: A view component must return a non-null value?

Open nj-sketch opened this issue 9 years ago • 1 comments

 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

nj-sketch avatar Nov 01 '17 11:11 nj-sketch

This should be opened at http://github.com/aspnet/home

Petermarcu avatar Nov 01 '17 15:11 Petermarcu