无法识别的选项“--useSqlite”

kyvafyod  于 2023-01-26  发布在  SQLite
关注(0)|答案(2)|浏览(165)

我正在尝试创建一个脚手架(MVC控制器与视图和EF),当bulding,它显示这个错误:

Building project...
Running /Users/gvpomac/Projects/CSharp/SalesWebMvc/SalesWebMvc/obj/dotnet-aspnet-codegenerator --project "/Users/gvpomac/Projects/CSharp/SalesWebMvc/SalesWebMvc/SalesWebMvc.csproj" controller --model Department --dataContext IdentityDbContext  --referenceScriptLibraries   -name DepartmentsController --no-build -outDir "/Users/gvpomac/Projects/CSharp/SalesWebMvc/SalesWebMvc/Controllers" --controllerNamespace SalesWebMvc.Controllers --useSqlite 
Finding the generator 'controller'...
Running the generator 'controller'...
Specify --help for a list of available options and commands.
Unrecognized option '--useSqlite'
   at Microsoft.Extensions.CommandLineUtils.CommandLineApplication.HandleUnexpectedArg(CommandLineApplication command, String[] args, Int32 index, String argTypeName)
   at Microsoft.Extensions.CommandLineUtils.CommandLineApplication.Execute(String[] args)
   at Microsoft.VisualStudio.Web.CodeGeneration.ActionInvoker.Execute(String[] args)
   at Microsoft.VisualStudio.Web.CodeGeneration.CodeGenCommand.Execute(String[] args)
RunTime 00:00:05.81
guykilcj

guykilcj1#

我遇到了同样的问题,我将**--useSqlite更改为-sqlite**。
对我来说没有问题。

kpbpu008

kpbpu0082#

使用终端来传递这个问题.它似乎与包的错误.
还有**-useSqlite和-sqlite**标志之间的一些东西。
窗口:dotnet aspnet-codegenerator razorpage -m Movie -dc RazorPagesMovie.Data.RazorPagesMovieContext -udl -outDir Pages\Movies --referenceScriptLibraries -sqlite
非窗口:dotnet aspnet-codegenerator razorpage -m Movie -dc RazorPagesMovie.Data.RazorPagesMovieContext -udl -outDir Pages/Movies --referenceScriptLibraries -sqlite

相关问题