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
Angius
Angius3w ago
What's your project's .NET version?
Arto Kilponen
Arto Kilponen3w ago
8.0
Angius
Angius3w ago
You shouldn't need to install Microsoft.AspNetCore.Mvc.ViewFeatures separately, then
Arto Kilponen
Arto Kilponen3w ago
Yes, agreed. Now that I remove it, I get:
Arto Kilponen
Arto Kilponen3w ago
No description
Arto Kilponen
Arto Kilponen3w ago
With errors "AspNetCore does not exist" and "SelectListItem could not be found".
Want results from more Discord servers?
Add your server