This project is read-only.

extremly confused by orchard console and paths

Topics: Writing themes
May 21, 2011 at 2:19 AM
Edited May 21, 2011 at 2:22 AM

I must be doing something wrong because I've been stuck on this for a long time and I'm only getting more confused.

First, is there some unwritten rule that the solution must be named Orchard.sln and the project folder must be named Orchard.Web?

I ask because I've been trying to get the orchard console to create a theme without generating an error, but it kept telling me that it couldn't find the solution named Orchard.sln and it couldn't find the Themes.csproj.

I don't have a Themes project and my solution is named something useful, not Orchard.sln.

So just to test, I changed the name of my solution to Orchard.sln even though I would rather it be named something useful so that I can find it in my project list in visual studio. When I do this, I don't get the error about the solution and I specified /CreateProject:true /IncludeInSolution:true. this didn't generate an error, but when I opened my solution I got an error that the path to one of the projects was wrong. I opend the sln file i a text editor and found that the console had added a new project named "TestTheme3" with a path of "Orchard.Web\Themes\TestTheme3\TestTheme3.csproj"

I kindof sortof understand that Orchard keeps the files for supporting projects in sub folders under the web project, but that is definitly not my Orchard project path. In fact I didn't change my project path at all. It is still exactly what it was in the Zip file, "Orchard". Nowhere have I read anything saying I should change the name of this folder or name my solution a specific name and if so, then why didn't the zip just come with the correct name and solution file?

Maybe I'm doing something completly wrong, but this is driving me crazy. I can't even get to the point of actually trying to figure out how to create a customized theme because I'm stuck trying to get the project paths right and fighting with the console.

May 24, 2011 at 9:20 PM

If you are going to use Visual Studio, you should use the full source, either through an enlistment (see or by downloading the source code zip from the releases page. The solution file comes with the full source code.

May 26, 2011 at 5:11 PM

I'll give that a shot. How does that change adding a Theme?

What is the correct procedure for adding a Theme using the full source? Do you still use the console?

May 26, 2011 at 6:38 PM

The command-line option /IncludeInSolution only makes sense if you have the full source code: the solution doesn't exist in the binary version. You *can* do theme development with just the binary version but if you have VS you should use it, and to use it best, you should have the full source code. What's going to change for themes is that your new theme will appear in Visual Studio as an additional project under Themes. Otherwise it's going to be buried as a bunch of hidden files under Orchard.Web/Themes.

The procedure for creating a theme is still to use the command-line (well, you could do what the command-line does manually but why would you).