Can't create module whit codegen

Topics: Troubleshooting, Writing modules
Aug 29, 2012 at 4:35 PM

Hello. Im testing orchard lastest version, i try to make a example but i have a problem with CodeGeneration module. I download and install the nuget packaged, but when i use the console sendme a error.

console tex:

orchard> feature enable Orchard.CodeGenerationEnabling features Orchard.CodeGenerationCode Generation was enabled

orchard> Codegen Module weboo.CineDB
Error executing command "Codegen Module weboo.CineDB"--------------------------------------------------------------------------------

No command found matching arguments "Codegen Module weboo.CineDB". Commands available: site setting set baseurl,autoroute create,theme list,theme activate,layer create,widget create,menuitem create,menu create,blog create,blog import,feature list,feature enable,feature disable,package create,package install,package uninstall,page create,recipes harvest,recipes execute,user create,warmup generate,cultures list,cultures get site culture,cultures set site culture,cultures add,help commands,help. 

NOTE: If somebody can helpme in spanish is better my english is bad bad bad :P thx

Developer
Aug 29, 2012 at 6:17 PM

Did you enable the code generation feature first?

Aug 29, 2012 at 6:20 PM

 

Yes.

 1° line : "orchard> feature enable Orchard.CodeGenerationEnabling features Orchard.CodeGenerationCode Generation was enabled"

Aug 29, 2012 at 8:23 PM

I think it's case sensitive.  Try just codegen

Aug 29, 2012 at 9:51 PM
thx for the idea but send the same error
orchard> feature enable Orchard.CodeGeneration
Enabling features Orchard.CodeGeneration
Code Generation was enabled
orchard> codegen module weboo.CineDB
Error executing command "codegen module weboo.CineDB"
--------------------------------------------------------------------------------
No command found matching arguments "codegen module weboo.CineDB". Commands available: site setting set baseurl,autoroute create,theme list,theme activate,layer create,widget create,menuitem create,menu create,blog create,blog import,feature list,feature enable,feature disable,package create,package install,package uninstall,page create,recipes harvest,recipes execute,user create,warmup generate,cultures list,cultures get site culture,cultures set site culture,cultures add,help commands,help.

 

Aug 30, 2012 at 5:10 PM

Anything in the error log?

Aug 30, 2012 at 5:17 PM

NOPE.

I just make a new site, and now work fine, i understand.... just work

code:

C:\Users\Informática\Documents\My Web Sites\PRUEBA2\bin>orchard.exe

Initializing Orchard session. (This might take a few seconds...)

Type "?" for help, "exit" to exit, "cls" to clear screen

orchard> codegen module Weboo.CineDB

Creating Module Weboo.CineDB

Module Weboo.CineDB created successfully

 

Thx for you help -> GRACIAS POR SU AYUDA. 

NOTE: is necesary a forum in spanish!! es necesario un foro en español!! 

Aug 31, 2012 at 8:00 PM

Lo siento!

Nov 4, 2012 at 8:34 AM

Ok, I am having the same issue. I am running it on a Windows server 2008 Web 32-bit edition. Orchard 1.6 on IIS 7. I did re-create the site, delete the database, delete all files, started from scratch, but still no go. Am I missing any features or dependencies?

Coordinator
Nov 5, 2012 at 8:11 AM

@alam77: did you do feature enable Orchard.CodeGeneration?

Nov 5, 2012 at 11:01 PM
Edited Nov 5, 2012 at 11:02 PM

I am having a similar issue. I noticed elsewhere that deleting the site and creating a new one seems to work, but I'd like to help perhaps figure out why it's not working to begin with. Here is the output I have:

 

orchard> feature enable Orchard.CodeGeneration
Enabling features Orchard.CodeGeneration
Code Generation was enabled

orchard> codegen theme TestTheme
Error executing command "codegen theme TestTheme"
--------------------------------------------------------------------------------

No command found matching arguments "codegen theme TestTheme". Commands available: site setting set baseurl,autoroute create,theme list,theme activate,layer create,widget create,menuitem create,menu create,blog create,blog import,feature list,feature enable,feature disable,package create,package install,package uninstall,page create,recipes harvest,recipes execute,user create,warmup generate,cultures list,cultures get site culture,cultures set site culture,cultures add,help commands,help.
--------------------------------------------------------------------------------

I closed/exited the console app and opened it again, in case something was cached, still the same issue.

Coordinator
Nov 5, 2012 at 11:49 PM

Please file a bug.

Nov 6, 2012 at 5:46 PM
Edited Nov 6, 2012 at 5:46 PM

I created an issue, hopefully there's enough info in there.

Nov 7, 2012 at 3:30 AM
Sorry for the late reply. I have tried on windows 7x64, server 2008r2 and server 2008 web. It works for a while after recreating the site, but then basically it's says cannot find codegen. I have enabled the codegen feature from the dashboard also from the command line, in command line it says that it has enabled the code generation feature, but then when I try to use codegen it cannot find it.

Sent from my iPhone

On Nov 6, 2012, at 11:46 AM, "ridespirals" <notifications@codeplex.com> wrote:

From: ridespirals

I create an issue, hopefully there's enough info in there.

Nov 7, 2012 at 4:43 AM

Is there anyway we can see the issue and it's status? I'm having the same problem with codegen.

Nov 7, 2012 at 11:22 PM

Here is the issue I created:

http://orchard.codeplex.com/workitem/19228

Jan 31, 2013 at 8:58 PM
I had the same problem, I will say what I did and what solved it in my case.
First, I installed the Code Generation 1.6, after I executed the command "feature enable Orchard.CodeGeneration" (like is explained here http://docs.orchardproject.net/Documentation/Command-line-scaffolding ) and when I executed the command "codegen module ..." (like is explained here http://docs.orchardproject.net/Documentation/Writing-a-content-part ) I got the error "No command found".
Then, I tried to install the version 1.5 of Code Generation and the same problem continued.
After I was tired about it, I resolved to rebuild the solution at Visual Studio 2010 and then it showed an message like this image http://docs.orchardproject.net/Upload/screenshots_85/vs_soln_reload.png after Visual Studio did the reload, I opened the command line (orchard.exe) again, I executed the command codegen and finally it worked.

I hope that helps someone and I think the staff of Orchard must explain better the steps in the documentation.

Sorry about my english, it isn't my language.
Mar 9, 2013 at 2:31 PM
I had this same issue with version 1.6. Installing .Net 4.5 solved the problem.
Mar 9, 2013 at 6:20 PM
The problem occurs because the module (Orchard.CodeGeneration) does not have compiled dlls in the bin directory.

Open the project and compile Orchard.CodeGeneration.
May 8, 2013 at 4:16 PM
I had the same problem, and it was resolved by install .NET 4.5.
Thanks krulos :)