Aspnetcore.docs: SelectList class is unrecognized

Created on 29 May 2018  Â·  4Comments  Â·  Source: dotnet/AspNetCore.Docs

I had to add "using System.Web.Mvc;"
AND I had to run "Install-Package Microsoft.AspNet.Mvc" in the Package Manager Console.


Document Details

⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

P3 Source - Docs.ms

Most helpful comment

Further: this bit
// Requires using Microsoft.AspNetCore.Mvc.Rendering;
Should be higher up in the tutorial.

All 4 comments

Further: this bit
// Requires using Microsoft.AspNetCore.Mvc.Rendering;
Should be higher up in the tutorial.

Just realized mine isn't very clear. The first comment was because I fixed that before moving on in the tutorial. After I moved on, I added the "using" statement that's commented out and it fixed the first problem. If you moved the comment about the using statement to above the first instance of "SelectList" it would be fixed.

Thanks to Brittany, I was able to find that
using Microsoft.AspNetCore.Mvc.Rendering;
was missing. Now SelectList is recognized.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Mattacks picture Mattacks  Â·  3Comments

AnthonyMastrean picture AnthonyMastrean  Â·  3Comments

Rick-Anderson picture Rick-Anderson  Â·  3Comments

fabich picture fabich  Â·  3Comments

wgutierrezr picture wgutierrezr  Â·  3Comments