This project is read-only.

Package Create Failed

Topics: Writing modules
Nov 18, 2012 at 3:00 AM
Edited Nov 18, 2012 at 3:20 AM

I went through the HelloWorld module creation tutorial and it worked fine on my machine. However, I tried to follow the Package Create and Deploy tutorial to get it onto my server, but unfortunately I've run into a problem I can't seem to find any information on. 

I'm very new to Orchard and still learning MVC. I saw this post, but it doesn't help me at all. 

Here is the error:

orchard> package create HelloWorld C:\Temp

Error executing command "package create HelloWorld C:\Temp"

Cannot add part for the specified URI because it is already in the package.

Exception Details: System.InvalidOperationException: Cannot add part for the spe
cified URI because it is already in the package.

Stack Trace:

[InvalidOperationException: Cannot add part for the specified URI because it is
already in the package.]
   at System.IO.Packaging.Package.CreatePart(Uri partUri, String contentType, Co
mpressionOption compressionOption)
   at NuGet.PackageBuilder.CreatePart(Package package, String path, Stream sourc
   at NuGet.PackageBuilder.WriteFiles(Package package)
   at NuGet.PackageBuilder.Save(Stream stream)
   at Orchard.Packaging.Services.PackageBuilder.EndPackage(CreateContext context
   at Orchard.Packaging.Services.PackageBuilder.BuildPackage(ExtensionDescriptor
   at Orchard.Packaging.Services.PackageManager.Harvest(String extensionName)
   at Orchard.Packaging.Commands.PackagingCommands.CreatePackage(String extensio
nName, String path)
Nov 18, 2012 at 8:26 AM

Maybe you ran the command more than once ad the package already exists at that location?

Nov 18, 2012 at 2:34 PM

No, it's never succeeded and the folder is empty.

Nov 18, 2012 at 2:51 PM
CoderSeven wrote:

No, it's never succeeded and the folder is empty.

Check your module name properly...may your module is Orchard.HelloWorld

If so then the command will be " package create Orchard.HelloWorld C:/Temp "


Nov 18, 2012 at 7:19 PM

Thanks for the replies. I knew it was something stupid. Turned out I had compiled it and there was a Debug folder that I had to delete. I got rid of that and it worked fine. 

Jan 2, 2013 at 12:07 PM


I am trying to create a package of my customize orchard module.I am using this command for creating the package

package create <extensionName> <path>
 Create a package for the extension <extensionName> Exception Details: Autofac.Core.DependencyResolutionExcexption:
 None of the constructors found with 'Orchard.Environment.AutofacUtil.DynamicProxy2.ConstructorFinderWrapper' on type
'Orchard.Packaging.Commands.PackagingCommands' can be invoked with the available services and parameters:                                   Cannot resolve parameter 'Orchard.Packaging.Services.IPackageManager packageManager' of constructor 'Void .ctor(Orchard.Packaging.Services.IPackageManager, Orchard.UI.Notify.INotifier)'.                                                                                                                                      Stack Trace:                                                                                                                                                    [DependencyResolutionException: None of the constructors found with 'Orchard.Environment.AutofacUtil.DynamicProxy2.ConstructorFinderWrapper' on type 'Orchard.Packaging.Commands.PackagingCommands' can be invoked with the available services and parameters:                                                                  Cannot resolve parameter 'Orchard.Packaging.Services.IPackageManager packageManager' of constructor 'Void .ctor(Orchard.Packaging.Services.IPackageManager, Orchard.UI.Notify.INotifier)'.]                                                        at Autofac.Core.Activators.Reflection.ReflectionActivator.ActivateInstance(IComponentContext context, IEnumerable`1 parameters)                                 at Autofac.Core.Resolving.InstanceLookup.Activate(IEnumerable`1 parameters)     at Autofac.Core.Resolving.InstanceLookup.<Execute>b__6()                        at Autofac.Core.Lifetime.LifetimeScope.GetOrCreateAndShare(Guid id, Func`1 creator)                                                                             at Autofac.Core.Resolving.InstanceLookup.Execute()                              at Autofac.Core.Resolving.ResolveOperation.GetOrCreateInstance(ISharingLifetimeScope currentOperationScope, IComponentRegistration registration, IEnumerable`1 parameters)                                                                      at Autofac.Core.Resolving.ResolveOperation.Execute(IComponentRegistration registration, IEnumerable`1 parameters)                                               at Autofac.Core.Lifetime.LifetimeScope.ResolveComponent(IComponentRegistration registration, IEnumerable`1 parameters)                                          at lambda_method(Closure )                                                      at Orchard.Commands.DefaultCommandManager.Execute(CommandParameters parameters) in F:\Umesh Vats projects\Registration Module\SubscriptionModule Latest 18 Nov 2012\src\Orchard\Commands\DefaultCommandManager.cs:line 27                       at Orchard.Commands.CommandHostAgent.RunCommand(TextReader input, TextWriter output, String tenant, String[] args, Dictionary`2 switches) in F:\Umesh Vats projects\Registration Module\SubscriptionModule Latest 18 Nov 2012\src\Orchard\Commands\CommandHostAgent.cs:line 86                                                                                                                             

Can anyone help me !!!