-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Consider solutions for removing the need to specify same cmdline arguments all the time for the tools #35231
Copy link
Copy link
Milestone
Description
When using EF's CLI tool, users sometimes need to repeat the same cmdline arguments each time:
--context=IdentityContext
--project=MyApp.Data
--startup-project=MyApp
This is quite annoying and makes the experience sub-optimal.
Our current recommend workaround is to have an ef.cmd in your project directory, as suggested by @bricelam in #20862 (comment). This is simple and per-project, and can either be checked into source control or ignored via .gitignore.
Other ideas/suggestions:
- Have some config file (.efsettings?) in the project which contains defaults, and which our tools would parse. This is nice because it can be checked in as part of the project.
- Environment variables - this is a standard mechanism for doing this. The problem with these, is that if you work on multiple projecst with different settings, it breaks down, as you can only have one set of defaults.
- Response files - these are Windows-specific and so aren't a general solution.
- A REPL experience (see Add a REPL for dotnet-ef #35125). I don't believe this addresses the actual problem or is useful, since with EF you typically need to do one tool operation at a time (e.g. add a migraiton), and not multiple ones. And each time you fire up the REPL you need to again specify the arguments.
Reactions are currently unavailable