The current .NET SDK does not support targeting .NET Core 2.1. Either target .NET Core 2.0 or lower, or use a .NET SDK that supports .NET Core 2.1

后端 未结 15 2473
攒了一身酷
攒了一身酷 2020-12-13 23:13

have tried upgrading to the professional version of visual studio 2017 v 15.6.0 (Preview 7.0)

and installed aspnetcore-runtime-2.1.0-preview1-final-win-x64 and .net

15条回答
  •  执笔经年
    2020-12-13 23:28

    It looks like Microsoft are encouraging better coding practice for those early adopters of latest development software in Net Core 2.1 by removing the capability to use older software where bad habits prevail. Net Core 2.0 and the older versions are almost end of life so should not be being used at all. (https://blogs.msdn.microsoft.com/dotnet/2018/06/20/net-core-2-0-will-reach-end-of-life-on-september-1-2018/)

    1) Microsoft have removed ServiceLocator since widely considered an anti-pattern resulting in difficult to understand code.

    2) To improve MVC applications, the AccountController was removed from Authentication/Authorization to encourage use of Razor pages which implement the Single Responsibiity Principle.

    It would not be considered best practice to circumvent these changes in order to increase perpetuation of software built to lower software engineering standards in the past.

提交回复
热议问题