Basically, Console.ReadKey
is available in the full framework, but isn't available in .NET Core. That's why it's saying it's "Available" for ASP.NET 5.0 (building against the full framework) but "Not available" for ASP.NET Core 5.0 (building against CoreCLR).
Either stop using it, or only build against the full framework - edit your project.json
file to remove the "core" option from your frameworks
property. (Exactly what it will be called will depend on which version of ASP.NET 5 you're using. It may be dnxcore50
for example.)
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…