I have two .NET unrelated projects. One is a Model (v. 2.2) and another is Web application (v. 3.0.0-preview7). I didn't have the problem with preview5, but now I have trouble running migrations against 2.2 project.
C:\>dotnet ef --help System.MissingMethodException: Method not found: 'System.Text.Json.JsonDocument System.Text.Json.JsonDocument.Parse(System.IO.Stream, System.Text.Json.JsonReaderOptions)'. at Microsoft.EntityFrameworkCore.Tools.RootCommand.Execute() at Microsoft.EntityFrameworkCore.Tools.Commands.CommandBase.<>c__DisplayClass0_0.<Configure>b__0() at Microsoft.DotNet.Cli.CommandLine.CommandLineApplication.Execute(String args) at Microsoft.EntityFrameworkCore.Tools.Program.Main(String args) Method not found: 'System.Text.Json.JsonDocument System.Text.Json.JsonDocument.Parse(System.IO.Stream, System.Text.Json.JsonReaderOptions)'.
As I said, with preview5 I don't have any problem. Is it something that changed between 5 and 7, and I need to make some corresponding changes? I didn't see anything in the release notes. Or it is simply a bug, and I just need to wait until next preview?
I don't get any errors on
dotnet build or
dotnet run; only on
dotnet ef commands
Okey, so I found the solution problem was that
dotnet ef --version was not preview 7 in my case it was preview 6 so i updated
dotnet tool update --global dotnet-ef --version 3.0.0-preview7.19362.6 and now it works.