Orchard: I enable the code generation but its not working

720 Views Asked by At

I use latest version of Orchard
I enable codegen with two mode: Command-line or UI
however I got the succeed message : codegen was enabled
but when I want to create module such as: codegen module MyModule
I encountering with this message:error executing command "codegen module MyModule"
No command found matching arguments "codegen module MyModule"

?

1

There are 1 best solutions below

0
On

I had this same issue. I am running version 1.10.1 from a fork of the git repo.

You might have to blow away your database if you attempted to install it already and it is in an inconsistent state. If this is not an option you will need to manually remove it from the db and potentially a manifest file, I can't guide you on that.

  1. Ensure you have run the application and completed initial setup (cooked a recipe).

  2. Close visual studio and any other applications that might have a file lock in your Orchard.Web directory.

  3. Run the orchard command line tool ...\Orchard\src\Orchard.Web\bin\orchard.exe then call feature enable Orchard.CodeGeneration

  4. Ensure the codegen commands appear when you type help commands to confirm successful install.