I am using Visual Studio community edition 2022 and trying to update my Models from database in EntityFrameworkCore 6 (I added new tables and modified some). When I run the Scaffold-DbContext command, it runs successfully but does not produce any updates (or new classes) for the models. It created the models the first time, for that I had to add the following in the .csproj file.
<GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles>
In the <PropertyGroup> element. When I run it now (for update) it builds and runs successfully but doesn't produce any updates to the models.
I am running the following command in the package manager console:
Scaffold-DbContext "Data Source=myserver;Initial Catalog=ccWebDb;Persist Security Info=True;User ID=*****;Password=*****" Microsoft.EntityFrameworkCore.SqlServer -OutputDir Models -Context DataContext -f
When I run this command, I get the following output
Build started...
Build succeeded.
Specify --help for a list of available options and commands.
Unrecognized command or argument 'C#'
Is there something I am missing here?