cake-contrib / Cake.DotNetCoreEf

https://cakebuild.net/extensions/cake-dotnetcoreef/
MIT License
5 stars 12 forks source link

Add support for --project and --startup-project #17

Closed mikebridge closed 7 years ago

mikebridge commented 7 years ago

It would be useful to have support for some of the other command line arguments like --project and --startup-project. Currently only --context and --force are supported currently.

> dotnet ef database drop --help

Usage: dotnet ef database drop [options]

Options:
  -f|--force                             Don't confirm.
  --dry-run                              Show which database would be dropped, but don't drop it.
  -c|--context <DBCONTEXT>               The DbContext to use.
  -p|--project <PROJECT>                 The project to use.
  -s|--startup-project <PROJECT>         The startup project to use.
  --framework <FRAMEWORK>                The target framework.
  --configuration <CONFIGURATION>        The configuration to use.
  --msbuildprojectextensionspath <PATH>  The MSBuild project extensions path. Defaults to "obj".
  -e|--environment <NAME>                The environment to use. Defaults to "Development".
  -h|--help                              Show help information
  -v|--verbose                           Show verbose output.
  --no-color                             Don't colorize output.
  --prefix-output                        Prefix output with level.

Specifically, I would like to wrap these three commands in cake:

> dotnet ef --project ..\MyProject --startup-project . database drop -c MyDbContext
> dotnet ef --project ..\MyProject --startup-project . migrations add Initialization -c MyDbContext
> dotnet ef --project ..\MyProject --startup-project . database update -c MyDbContext
mvput commented 7 years ago

Adding support for new parameters in the next release. Also i shall take a look at changes made in the RTM tooling (msbuild) for stuff msbuildprojectextensionspath.

mvput commented 7 years ago

@mikebridge additional parameters are added in the 0.4.0 release.