How to run orchard command-line in VS

Topics: Writing modules
Apr 15, 2011 at 8:28 PM

From within Visual Studio with a full source code enlistment, what is the proper way to setup the startup project to be the Orchard command-line?

Coordinator
Apr 15, 2011 at 8:37 PM

You don't want the site to start? How about a post-build step of launching the command-line instead?

Apr 15, 2011 at 8:45 PM

What I want to do is debug the command-line.

So I would assume I would want to set the Satartup project to Orchard (rather than Orchard.Web) and when I do this the command-line program does in fact start, but for some reason it exits without reading anything from the console.

That is why I am assuming I am doing something wrong.

Apr 15, 2011 at 9:11 PM

You should be able to use "Attach to process" once the CL is running, if you have full VS. Unfortunately I'm using VWD so I can't confirm this.

Coordinator
Apr 15, 2011 at 9:43 PM
Yes, attach to the process. That's what we do when we have to debug it.

Sent from my TI-99/4A

From: randompete
Sent: Friday, April 15, 2011 1:11 PM
To: Bertrand Le Roy
Subject: Re: How to run orchard command-line in VS [orchard:254110]

From: randompete

You should be able to use "Attach to process" once the CL is running, if you have full VS. Unfortunately I'm using VWD so I can't confirm this.

Coordinator
Apr 15, 2011 at 10:02 PM

Another option:

  1. Set the "Tools\Orchard" project as the startup project
  2. Double click "Properties" of the project
  3. Go to "Debug"
  4. Set "Command Line Arguments" to "/wd:..\..\..\..\Orchard.web"
  5. (Optionally add "/v" to enable verbose output)
  6. Debug/Run the "Tools\Orchard" project from Visual Studio.

 

Step 4 is needed because Visual Studio will start "orchard.exe" from the "src\tools\orchard\bin\debug" folder, and "orchard.exe" need to be told where Orchard.Web can be found.

HTH,

Renaud

 

 

 

 

 

 

 

Apr 15, 2011 at 10:05 PM
rpaquay wrote:

Another option:

  1. Set the "Tools\Orchard" project as the startup project
  2. Double click "Properties" of the project
  3. Go to "Debug"
  4. Set "Command Line Arguments" to "/wd:..\..\..\..\Orchard.web"
  5. (Optionally add "/v" to enable verbose output)
  6. Debug/Run the "Tools\Orchard" project from Visual Studio.

 

Step 4 is needed because Visual Studio will start "orchard.exe" from the "src\tools\orchard\bin\debug" folder, and "orchard.exe" need to be told where Orchard.Web can be found.

HTH,

Renaud

Thanks, exactly what I was looking for :-)