.Net Core – Drop Down (Select) Won’t Populate

I had a recent bug that took me much too long to solve and the root of the cause was me. I got a bit too delete happy and deleted a crucial file that allows me to use Razor Tag Helpers to bring a List into a View as a Drop Down (Select).

The Error

Here’s how the error presented itself:

  • SelectList won’t populate
  • Select or DropDown is empty
  • value = Microsoft.AspNetCore.Mvc.Rendering.SelectList or
  • System.Linq.OrderedEnumerable2 [Microsoft.AspNetCore.Mvc.Rendering.SelectListItem, System.String]
Continue Reading