Module Nuget Package with CSS and JS not deploying CSS and JS

Topics: Administration, Customizing Orchard, Troubleshooting
Feb 21, 2013 at 6:50 PM
I built a Nuget Package with the package create command line, when I look inside the nupkg the files are there, however, when I install the package either through the UI (Install a module from your computer) or through the command line (package install) the CSS and JS files are not deployed.
If I create a Theme nupkg with CSS, the CSS is deployed successfully. So why if I include a CSS or JS file in a Module nupkg the files are not deployed?
Feb 21, 2013 at 7:23 PM
Are those files' build action set to Content?
Feb 21, 2013 at 7:35 PM
Feb 26, 2013 at 1:25 PM
So no one knows why Module nuget packages cannot install CSS or Script files?
Feb 26, 2013 at 3:07 PM
Are you creating the packages with nuget or with Orchard.exe?
Feb 26, 2013 at 3:47 PM
With Orchard.exe, with the "package create <extensionName> <path>".
Feb 26, 2013 at 3:54 PM
They can. There must be something wrong with the way they are included in the project. Compare it with one that works.
Mar 2, 2013 at 7:09 PM
I guess it must have been a permissions thing, not sure what else it could have been. The module in question worked correctly in a local environment, but was not deploying the CSS and JS to our dev server. I created a completely new module, with the same name, with nothing else in it except the CSS and JS, to eliminate something wrong with the project file or any other variables, but upon deploying it to the server still had the same outcome with the CSS and JS files not being deployed.
When I was deploying it, it was always backing up the old copy and deploying the nuget but not deploying the CSS and JS files. Lastly I completely deleted the module folder from the Modules folder so it would not have to perform a backup and so the folder would not previously exist, then deploying the package worked correctly. Then deploying the original package also worked correctly. No idea how this fixed the issue, I assume when the backup happens the folder is moved to the _Backup folder (or copied and deleted), so would assume the folder did not actually exist in the Modules folder prior to the actual deployment, so not sure how my manually removing the folder made any difference.