ViewFeatures, but something that isn't deprecated?
Trying to use this kind of code line:
public IEnumerable<SelectListItem> AuthorList { get; set; }
Works fine, if I have:
using Microsoft.AspNetCore.Mvc.Rendering;
and have installed:
Microsoft.AspNetCore.Mvc.ViewFeatures
This Microsoft.AspNetCore.Mvc.ViewFeatures is deprecated (All versions).
What should I use to replace it? Obviously the key being that I need that SelectListItem (or a replacement) from somewhere.
6 Replies
What's your project's .NET version?
8.0
You shouldn't need to install
Microsoft.AspNetCore.Mvc.ViewFeatures
separately, thenYes, agreed. Now that I remove it, I get:
With errors "AspNetCore does not exist" and "SelectListItem could not be found".