OrchardCMS / Orchard

Orchard is a free, open source, community-focused Content Management System built on the ASP.NET MVC platform.
https://orchardproject.net
BSD 3-Clause "New" or "Revised" License
2.37k stars 1.12k forks source link

PackageBuilder fails with Custom Folders #7580

Open benschi11 opened 7 years ago

benschi11 commented 7 years ago

When I want to package my Module or Theme in a custom folder the packaging process fails with following error:

Cannot create a package that has no dependencies nor content.

Exception Details: System.InvalidOperationException: Cannot create a package that has no dependencies nor content.

Stack Trace:

[InvalidOperationException: Cannot create a package that has no dependencies nor content.]
   bei NuGet.PackageBuilder.Save(Stream stream)
   bei Orchard.Packaging.Services.PackageBuilder.EndPackage(CreateContext context)
   bei Orchard.Packaging.Services.PackageBuilder.BuildPackage(ExtensionDescriptor extensionDescriptor)
   bei Orchard.Packaging.Services.PackageManager.Harvest(String extensionName)
   bei Orchard.Packaging.Commands.PackagingCommands.CreatePackage(String extensionName, String path)

I think it is because in the PackageBuilder the paths are mapped in favour of the typ (theme or module) - see here. I tried to debug and changed the paths manually and it worked.

sebastienros commented 7 years ago

Right now the solution is to move your module in the Modules folder before packing.