'Console' does not contain a definition for 'ReadKey' in asp.net 5 console App

余生长醉 提交于 2019-11-29 13:21:29

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.)

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!