Repository navigation
Parameterize directories used by dotnet-ef - #5680
Conversation
3fbe69e to
c7af746
Compare
|
(PS, before I request ask-mode approval, let's consider first that this is the behavior we want.) |
|
Wonderful! It's exactly how I always wanted it to work. |
| "The folder to use as the project directory. If not specified, the current working is used."), | ||
| "The folder used as the project directory. If not specified, the current working directory is used."), | ||
| StartupTargetDirectory = app.Option(StartupTargetDirectoryOptionTemplate + " <DIR>", | ||
| "The folder used as the base directory for ASP.NET hosting environment. If not specified, the current working directory is used."), |
There was a problem hiding this comment.
This isn't ASP.NET-specific. Maybe something like "...base directory for the application."
There was a problem hiding this comment.
Can we drop the data directory and merge them into one parameter? I can't think of a scenario in which data directory is different from the app base path.
There was a problem hiding this comment.
Classic ASP.NET uses <base>/App_Data
There was a problem hiding this comment.
But yes, it's probably OK to do that for now on CLI.
There was a problem hiding this comment.
I think I'm going to leave it, as long as there is the possible scenario that data directory may not be the app base path.
|
|
666ae09 to
dfeb298
Compare
dfeb298 to
b9e2f61
Compare
Fix #5311 by adding back
--startup-project.NB: using
--startup-projectrequires that "Microsoft.EntityFrameworkCore.Design" be installed startup project, not the current project. This partially enables class libraries. cref #5320TODO: parameter order on command line still matters, so this option must be added between "ef" and the next sub command. E.g.
dotnet ef --startup-project ../WebApp1 database update. This is already tracked in #5188This is built under the assumption that on .NET Core CLI, the current working directory is your target project, and is not necessarily the startup project. The reverse assumption (that dotnet-ef should always be executed on startup) is not consistent with other .NET Core CLI commands that alter files.
Worth noting: we are still using relative project directories as the value of
--startup-project. This is to stay consistent with how .NET Core CLI handles preferences to projects. (Example seedotnet run --help)cc @bricelam @divega @rowanmiller