脚手架-DbContext "The method or operation is not implemented"

Scaffold-DbContext "The method or operation is not implemented"

玩得不开心。

PM> 命令 运行

Scaffold-DbContext "Server=myserver;Database=mysqlserverdb;Trusted_Connection=True;" Microsoft.EntityFrameworkCore.SqlServer -Tables Settings -verbose

错误:

The method or operation is not implemented.

System.NotImplementedException: The method or operation is not implemented. at Microsoft.EntityFrameworkCore.Scaffolding.ProviderCodeGenerator.GenerateUseProvider(String connectionString) at Microsoft.EntityFrameworkCore.Scaffolding.Internal.CSharpDbContextGenerator.GenerateOnConfiguring(String connectionString, Boolean suppressConnectionStringWarning) at Microsoft.EntityFrameworkCore.Scaffolding.Internal.CSharpDbContextGenerator.GenerateClass(IModel model, String contextName, String connectionString, Boolean useDataAnnotations, Boolean suppressConnectionStringWarning) at Microsoft.EntityFrameworkCore.Scaffolding.Internal.CSharpDbContextGenerator.WriteCode(IModel model, String namespace, String contextName, String connectionString, Boolean useDataAnnotations, Boolean suppressConnectionStringWarning) at Microsoft.EntityFrameworkCore.Scaffolding.Internal.CSharpModelGenerator.GenerateModel(IModel model, String namespace, String contextDir, String contextName, String connectionString, ModelCodeGenerationOptions options) at Microsoft.EntityFrameworkCore.Design.Internal.DatabaseOperations.ScaffoldContext(String provider, String connectionString, String outputDir, String outputContextDir, String dbContextClassName, IEnumerable1 模式,IEnumerable1 tables, Boolean useDataAnnotations, Boolean overwriteFiles, Boolean useDatabaseNames) at Microsoft.EntityFrameworkCore.Design.OperationExecutor.ScaffoldContextImpl(String provider, String connectionString, String outputDir, String outputDbContextDir, String dbContextClassName, IEnumerable1 模式过滤器,IEnumerable1 tableFilters, Boolean useDataAnnotations, Boolean overwriteFiles, Boolean useDatabaseNames) at Microsoft.EntityFrameworkCore.Design.OperationExecutor.ScaffoldContext.<>c__DisplayClass0_1.<.ctor>b__0() at Microsoft.EntityFrameworkCore.Design.OperationExecutor.OperationBase.<>c__DisplayClass3_01.b__0() 在 Microsoft.EntityFrameworkCore.Design.OperationExecutor.OperationBase.Execute(动作动作)`

在安装 EF power ToolsLatest Core 2.2.x.x SDK 之间,我现在可以更改我的项目使用下拉更改为 .net 核心 2.2(以前只能做 2.1。

然后通过 Nuget 更新等...,终于成功了!