using orchard command line

Tags: orchard

Recently, I have worked with Orchard and create many modules which used in

Orchard has some built in command line tool which is really nice.

Therefore, I think it is good to share them with you.

Before using a command line tool, you need to finish installation of new orchard web site and then to go src\Orchard.Web\bin, open command line prompt inside that directory and then execution Orchard.exe

It will show you Orchard shell. You are now ready to use orchard command.

These are some of useful orchard commands.

orchard> feature enable Orchard.Codegeneration

enable CodeGeneration which is helpful for creating new orchard module. After enable this module you will have "codegen" command.

orchard> codegen module <module-name> [/IncludeInSolution:true|false]

Create a new Orchard module

codegen datamigration <feature-name>

Create a new Data Migration class

codegen controller <module-name> <controller-name>

Create a new Orchard controller in a module