This project is read-only.

Can I install themes from Visual Studio?

Topics: Administration, Writing themes
Apr 4, 2012 at 9:51 AM

I just started experimenting with Orchard. I have read about installing and customizing themes and I understand that new themes are installed or created using the dashboard. However, I am a bit conservative and I like to do things as much as possible using my IDE. I then tried to install the Contoso theme from the Gallery using NuGet in VS2010. I then found that it wasn't available from the dashboard after building and running the solution again. The themes folder with the theme seems to be in place under Orchard.Web but it does not show up under installed themes on the dashboard. Do I need to do something additionally?

Apr 4, 2012 at 9:58 AM

Don't use NuGet to install Orchard modules or themes. It won't work because NuGet has no clue where to put them.

One thing you can do is rename them as .zip and extract the module or theme's folder from there. You can then simply copy it into the Modules or Themes directory. Then again, I have no idea why you'd want to do this.

Apr 4, 2012 at 10:44 AM

OK. Thanks for the quick reply.

I am currently just experimenting with different approaches to figure out what would work best for me. The reason I tried this is because I thought that it might make updating the themes easier this way. Generally I just want to keep as much as possible under development control. The type of site I am building is not supposed to do this kind of content changes in a production environment but only from the development environment. I am therefore also trying to figure out how to automate moving my changes from development to production. However, I just got started with Orchard and I am in the early phase where I am still  figuring out how all this stuff is designed to work. I am not even yet sure whether Orchard is the best choice for me but it is appealing in many ways.

Apr 7, 2012 at 7:59 AM

There's a tool for deploying sites from dev to prod. Build a deployment package for Orchard.Web from VS and deploy that.

Jun 20, 2012 at 11:08 PM


following this discussion, i`ve install TorotiseHg on my visualstudio 2010 then i build and run the proyect and configure to connect to the production database. So database is the same but development and production is separated (but this let me to keep site configuration files the same) so i use deploy tool from visual studio to make the changes of source code into production enviroment.


every thing works as needed except themes creation.


I run orchard command line at the visual studio development server:

theme list

codegen theme NewTheme /CreateProject:true IncludeInSolution:true Basedon:themeX (moreless)


create the project under visualstudio folder Themes next to Themes project i also disover that create a folder inside Themes project and also a folder under Folder Themes inside Orchard.Web project.


So now for example if i want to modify where i should copy the style.css that is going to be server? i´ve try to copy the style.css from themeX to styles folder under Newtheme, modify it but always the style.css from themeX is served. It dosen't matter where folder structure of Newtheme i use, doesn't matter how many times i rebuild, how many times i clean the solution and rebuild. always the same.


It's frustrating Thanks for help.

Jun 21, 2012 at 5:25 AM

Static files such as css files need to be correctly referenced. My guess is that your derived theme does not override the layout file that includes the css. So when Orchard looks for what css file to include, it starts from the location of the file that references it, which is the layout in the base theme.

If you want to override a css file you also need to override what references it.