Din*_*ino 6 c# entity-framework-core entity-framework-core-migrations
我试图创建一个新的迁移,但我得到一个System.ArgumentNullException说:
System.ArgumentNullException: Value cannot be null.
Parameter name: language
at Microsoft.EntityFrameworkCore.Utilities.Check.NotNull[T](T value,
String parameterName)
at Microsoft.EntityFrameworkCore.Design.Internal.MigrationsOperations..ctor
(IOperationReporter reporter, Assembly assembly, Assembly
startupAssembly, String projectDir, String rootNamespace, String
language)
at Microsoft.EntityFrameworkCore.Design.OperationExecutor.<>c__DisplayClass4_0.<.ct
or>b__4()
at Microsoft.EntityFrameworkCore.Internal.LazyRef`1.get_Value()
at Microsoft.EntityFrameworkCore.Design.OperationExecutor.AddMigrationImpl(String name, String outputDir, String contextType)
at Microsoft.EntityFrameworkCore.Design.OperationExecutor.OperationBase.<>c__DisplayClass3_0`1.<Execute>b__0()
at Microsoft.EntityFrameworkCore.Design.OperationExecutor.OperationBase.Execute(Action action)
Value cannot be null.
Parameter name: language
Run Code Online (Sandbox Code Playgroud)
小智 5
它与 EF Core 而非 EF6 有关,看起来 2.1.0.preview1-final 版本中存在错误。
- 使用 dotnet ef --version 检查您正在运行的版本
- 降级到 Microsoft.EntityFrameworkCore.Design 2.0.1 版本。
| 归档时间: |
|
| 查看次数: |
4100 次 |
| 最近记录: |