10

Closed

codegen / theme creation error (codegen command unavailable)

description

After installing Code Generation and enabling the feature with feature enable Orchard.CodeGeneration, the codegen command is not available.

Even after exiting the console session and starting a new one, the codegen command is not available.

Attached is the output from a session.

file attachments

Closed May 16, 2013 at 7:13 PM by sebastienros
This must be related to the dynamic compilation bug which is not working on 1.6.

comments

jonbprime wrote Nov 7, 2012 at 12:33 PM

I have the same problem and noticed that the CodeGeneration module has no bin directory where all the other modules do?

jonbprime wrote Nov 7, 2012 at 8:45 PM

PS. I tried installing code generation with orchard 1.5.1 and code gen 1.5 and it worked fine. So, it seems the problem is specific to Orchard 1.6

volody wrote Nov 10, 2012 at 10:48 PM

as a remark, after installing code generation module in orchard 1.6
help commands does not list codegen

hunterex wrote Nov 14, 2012 at 9:05 PM

Also have the same problem.

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

orchard> codegen module Orchard.TestTestModule

Error executing command "codegen module Orchard.TestTestModule"

No command found matching arguments "codegen module ....

oaicstef wrote Nov 15, 2012 at 7:11 PM

Someone has resolved the issue. I have the same problem. I tried to create a new site, but the error continue.

l1lj0hn wrote Nov 21, 2012 at 3:53 PM

I too am having the same problem, can anyone shed some light on this?

l1lj0hn wrote Nov 21, 2012 at 4:14 PM

Ok, I found a work around for this based on what jonbprime had discovered. Since CodeGeneration does not have a bin directory as all the other modules do, I used visual studio 2010 to open up Orchard.CodeGeneration.csproj. After it was loaded into the solution, i built the project and that generated a /bin directory with all the files. I went back to the console and saw codegen as part of the command list.

nightwolf226 wrote Dec 3, 2012 at 1:04 PM

I just tested it with 1.6 in VS2012 and CodeGeneration compiles correctly, including bin folder and all the commands work. Any specific detail that could be common in your case? Eg. VS2010?

Kirix wrote Dec 5, 2012 at 10:20 PM

Experiencing the same problem, I solved it by installing .Net framework 4.5

paulking wrote Dec 6, 2012 at 12:57 AM

yes, installation of .Net 4.5 fixed this problem for me too. Thanks Kirik

leticiagoes wrote Jan 31, 2013 at 7:57 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.

naasking wrote Feb 15, 2013 at 7:08 PM

I solved this by installing asp.net MVC 4. Orchard.Framework.dll is built against the System.Web.Mvc 4.0, but the codegen module is built against System.Web.Mvc 3.0.

krulos wrote Mar 9, 2013 at 1:32 PM

I had this same issue with version 1.6. Installing .Net 4.5 solved the problem.

krulos wrote Mar 9, 2013 at 1:32 PM

I had this same issue with version 1.6. Installing .Net 4.5 solved the problem.