When i scaffolding my Efcore 2.1 project using net cli, occured Argument Exception.
Is this about .net cli version? i cannot found any parameter about language
Exception message:

Stack trace:
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.DatabaseOperations..ctor(IOperationReporter reporter, Assembly startupAssembly, String projectDir, String rootNamespace, String language)
at Microsoft.EntityFrameworkCore.Design.OperationExecutor.<>c__DisplayClass4_0.<.ctor>b__3()
at Microsoft.EntityFrameworkCore.Internal.LazyRef`1.get_Value()
at Microsoft.EntityFrameworkCore.Design.OperationExecutor.ScaffoldContextImpl(String provider, String connectionString, String outputDir, String outputDbContextDir, String dbContextClassName, IEnumerable`1 schemaFilters, IEnumerable`1 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_0`1.<Execute>b__0()
at Microsoft.EntityFrameworkCore.Design.OperationExecutor.OperationBase.Execute(Action action)
Include a complete code listing (or project/solution) that we can run to reproduce the issue.
Partial code listings, or multiple fragments of code, will slow down our response or cause us to push the issue back to you to provide code to reproduce the issue.
dotnet ef dbcontext scaffold "Server=localhost;User Id=root;Password=123456;Database=eftests" "Microsoft.EntityFrameworkCore.SqlServer"
EF Core version: 2.1 preview 1 final
Database Provider: No matter
Operating system: Windows 10 Enterprise lastest release.
IDE: Rider 2017.3
.NET SDK: 2.1.3
@jeffrey-igaw - It should automatically get the language from project file. For some reason it looks like it is not happening. As a work-around you can use --language to pass in language with C# as value.
Can you copy paste initial lines from your screen shot? Especially the line start with dotnet msbuild /target:GetEFProjectMetadata
Did you update your <DotNetCliToolReference> to 2.1.0-preview1-final?
Uhmm, you're right, i dont change that.
I will check out next working day! Thanks to your comments
I'd upgrade Microsoft.EntityFrameworkCore.Tools.DotNet to 2.1.0-preview1-final, that's worked!
馃帀 Hooray! We should probably still fix the issue. There's no real reason it shouldn't work. We should also consider warning if your tool version doesn't match the runtime.
I am seeing the same error when running Add-Migration from the Package Manager Console:

DotNetCliToolReference was updated. Here is what the csproj looks like:

Adding and removing migrations _does_ work with the CLI from Command Prompt.
@robichaud Try to DotNet CLI dotnet ef migrations add xxx.
@brianrob Thank you, your solution fixed it. This issue has been resolved and will be closed. :D
I think there is a bug when a model includes a new field to a class, in my case a nullable field (public DateTimeOffset? DateOfInterest { get; set; }) and perform a migration. If I downgrade to 2.0.1 the migration works no error all worked fine. I then added another nullable DateTimeOffset?, upgraded back to the "2.1.0 final preview" and i get the error again...
Vitals:
VS 2017 (15.5.7)
Win 7 x64
Microsoft SQL Server Express Edition (64-bit)
Repro:
1.) Have a working application
2.) Update Microsoft.EntityFrameworkCore.Design with "2.1.0-preview1-final"
3.) Update a DB Entity with a nulable DateTimeOffest field
4.) Open package manager
5.) Add Migration
Error:
6.) Uninstall Microsoft.EntityFrameworkCore.Design
7.) Install EF Core Design "2.0.1"
8.) Add Migration
No Error...
Any additional info needed, let me know.
Hope this helps.
@ZooDoo4U This looks like a different problem than is being tracked here. Can you please open a new issue for it?
Most helpful comment
Did you update your
<DotNetCliToolReference>to 2.1.0-preview1-final?