ResourceManifest In theme

Topics: Writing themes
Jun 18, 2015 at 4:26 PM
Hi
I got an Issue with Resource manifest .cs
After reading this thread https://orchard.codeplex.com/discussions/448200
I do All the things right but I couldn't finally add anything and the error still remains :
A 'stylesheet' named 'Custom.ElastiSlide' could not be found.
I can't add any stylesheet or script
( config files are all set in sub-folders if you think about 404)
(I create my Test theme with /includeinsolution:true and createproject :true from command line)
Thanks for any guidance
[InvalidOperationException: A 'stylesheet' named 'Custom.ElastiSlide' could not be found.]
   Orchard.UI.Resources.ResourceManager.BuildRequiredResources(String resourceType) +519
   Orchard.Core.Shapes.CoreShapes.WriteResources(Object Display, TextWriter Output, String resourceType, Nullable`1 includeLocation, Nullable`1 excludeLocation) in DIR\src\Orchard.Web\Core\Shapes\CoreShapes.cs:407
   CallSite.Target(Closure , CallSite , CoreShapes , Object , TextWriter , String , Object , Object ) +284
   Orchard.Core.Shapes.CoreShapes.StylesheetLinks(Object Display, TextWriter Output) in DIR\src\Orchard.Web\Core\Shapes\CoreShapes.cs:358
using Orchard.UI.Resources;

namespace Themes.Test
 {
    public class ResourceManifest : IResourceManifestProvider {
        public void BuildManifests(ResourceManifestBuilder builder) {
            var manifest = builder.Add();
            manifest.DefineStyle("ElastiSlide").SetUrl("elastislide.css");
            manifest.DefineStyle("Custom.ElastiSlide").SetUrl("custom.css").SetDependencies("ElastiSlide");
         
                      
            //Scripts.....
            
            manifest.DefineScript("Unveil").SetUrl("jquery.unveil.js");
            manifest.DefineScript("JppCustom").SetUrl("jquerypp.custom.js");
            manifest.DefineScript("ElastiSlide").SetUrl("jquery.elastislide.js").SetDependencies("jQuery", "Unveil", "JppCustom");

        }
    }
}
Jun 19, 2015 at 1:40 PM
I found the problem and that's the location of resource manifest file
It should added directly to Project root of your custom Theme I have been added it to my Theme folder root and that was my mistake
Marked as answer by apolun on 6/19/2015 at 5:41 AM