Packaging Theme does not include styles and script files

Topics: Customizing Orchard, Writing themes
Jun 11, 2013 at 6:50 PM
Hi guys,

I cant find anyone on the internet with the same problem I am facing, maybe it is because I am just missing something dumb.

I have a custom theme, that I am packaging via the Orchard command line in order to import on another site.
Package creation completes fine, but when I import it, no css nor js files are inside the Styles and Scripts folder respectively.
If I rename the nupkg to zip, and unzip it, I actually see no files either, so I am assuming I am missing something while packaging the theme (or before), not while importing it.

Did anyone see this before?
Your help is appreciated!
Jun 12, 2013 at 3:42 PM
Have you made sure in Visual Studio that those files are included in the Project? The Orchard packaging process will not add them to the package unless they are included in the Visual Studio project.
Jun 12, 2013 at 4:22 PM
Hi psenechal,

Thanks a lot for your feedback.
Based on your comment, I have created a project file for the theme, and added a reference to all css and js. After that, packaging the theme via command line is including the files, so, you hit the spot :).

What is not quite clear for me know, is if the package command looks after the project file always. While troubleshooting, I added a dummy css file into the TheThemeMachine. Then, I package this theme, and my dummy css was there, even the TheThemeMachine does not have a project file...

I don't know, it is a little bit confusing.
I appreciate your input once again, thats the path I am gonna go down, at least for now.
Have a good day.
Jun 12, 2013 at 4:54 PM
Glad that worked for you.

I'm assuming that the Theme Machine doesn't need its own project file because it's packaged under Orchard.Web and distributed with the core release. I'm thinking it's most likely contained within the project file for Orchard.Web. The gurus can probably best answer that question, however, they're all drinking beer in Amsterdam right now for Orchard Harvest! No...I'm not jealous at all or anything =) LOL
Jun 12, 2013 at 4:56 PM
Make sense.. and don't blame you for being jealous!!!