Resolution failed for type PackageFileService

Nov 19, 2010 at 10:58 PM

I'm getting:

at Gallery.DependencyResolution.NinjectDependencyResolver.Resolve(Type typeToResolve) in D:\Source\GalleryServer\GalleryServer\src\Gallery.DependencyResolution\NinjectDependencyResolver.cs:line 45 at Gallery.Server.IoCServiceClasses.IoCInstanceProvider.GetInstance(InstanceContext instanceContext, Message message) in D:\Source\GalleryServer\GalleryServer\src\Gallery.Server\IoCServiceClasses\IoCInstanceProvider.cs:line 25 at System.ServiceModel.InstanceContext.GetServiceInstance(Message message) at System.ServiceModel.Dispatcher.InstanceBehavior.EnsureServiceInstance(MessageRpc& rpc) at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage41(MessageRpc& rpc) at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage31(MessageRpc& rpc) at System.ServiceModel.Dispatcher.MessageRpc.Process(Boolean isOperationContextSet)


when opening:


Nov 19, 2010 at 11:00 PM
Edited Nov 19, 2010 at 11:03 PM

Do you need to access this page ?

Only the odata feed matters


Nov 19, 2010 at 11:02 PM

It's not a page, it's a WCF service that's used for uploads (and other operations), and it definitely should work (and did for me when I last tried).

Nov 19, 2010 at 11:06 PM

Using the console app i get:

sole.exe "D:\Source\Console\Orchard.Module.Orchard.ArchiveLater.0.8.0.nupkg"
Failed to upload D:\Source\Console\Orchard.Module.Orchard.ArchiveLater.0.8.0.nup
kg: BadRequest (400) is not one of the following: OK (200), Created (201), Accep
ted (202), NonAuthoritativeInformation (203), NoContent (204), ResetContent (205
), PartialContent (206)



So i thought it was related ?

Nov 19, 2010 at 11:07 PM

You need to debug the server and break on all exceptions to see what's going on.

Nov 19, 2010 at 11:10 PM

Error activating IPackageFactory using binding from IPackageFactory to method
Provider returned null.
Activation path:
  2) Injection of dependency IPackageFactory into parameter packageFactory of constructor of type PackageFileService
  1) Request for PackageFileService

  1) Ensure that the provider handles creation requests properly.

Nov 19, 2010 at 11:18 PM

At some point this line existed:

             IoC.Resolver.Register<IPackageFactory, NuPackFactory>();


Then it got replaced by:





which i have no clue what it does at this point :)


Nov 19, 2010 at 11:20 PM

It's the whole plugin thing.  Make sure you have the right binaries in bin.  Did you run ClickToBuild.bat at the root?  If not, that's most likely your problem.

Nov 19, 2010 at 11:27 PM

BTW, please make sure you read the ReadMe.txt at the root of the enlistment, as it has some important information.

Nov 19, 2010 at 11:38 PM

I did read Readme.txt and press clicktobuild.bat.


18-11-2010  19:38    <DIR>          amd64
18-11-2010  19:23           355.328 AutoMapper.dll
19-11-2010  16:34            25.600 Gallery.Core.dll
19-11-2010  16:34            67.072 Gallery.Core.pdb
19-11-2010  16:34            12.800 Gallery.DependencyResolution.dll
19-11-2010  16:34            28.160 Gallery.DependencyResolution.pdb
19-11-2010  16:34            35.840 Gallery.Infrastructure.dll
19-11-2010  16:34            83.456 Gallery.Infrastructure.pdb
19-11-2010  16:34            20.992 Gallery.Server.dll
19-11-2010  16:34            42.496 Gallery.Server.pdb
18-11-2010  19:23           457.008 Microsoft.Data.Entity.CTP.dll
18-11-2010  19:23           119.648 Microsoft.Http.dll
18-11-2010  19:23           104.960 Ninject.dll
18-11-2010  19:23            21.504 Ninject.Extensions.Conventions.dll
18-11-2010  19:23            28.428 Ninject.Extensions.Conventions.xml
18-11-2010  19:23           229.778 Ninject.xml
18-11-2010  19:23           448.352 System.Data.SqlServerCe.dll
18-11-2010  19:23           242.016 System.Data.SqlServerCe.Entity.dll
18-11-2010  19:38    <DIR>          x86


These are my binaries. Am i missing something here ?


Nov 19, 2010 at 11:40 PM

Not sure I'm following you.  Are you saying that you still get this issue after running the batch file?  If you have not run it, please try running it.

Nov 19, 2010 at 11:42 PM

I did run it.

Nov 19, 2010 at 11:47 PM

You should end up with NuGet.Core.dll and NuPackPackageFactory.dll in bin.  That's what's causing your error.

We need to understand why running ClickToBuild.bat does not get those DLLs in your bin, as it should.

Nov 19, 2010 at 11:49 PM

I found NuPackPackageFactory one level above under


and not


as i would expect.

Nov 20, 2010 at 12:32 AM

BTW, seems to work perfectly now. The missing DLLs was the issue. Not sure why they were not being copied as they were indeed on the BAT file.

Nov 22, 2010 at 1:18 PM

We went ahead and renamed a couple of the ClickToBuild.bat files that were in the sub-folders (the ones that were specific to the GalleryServer and Plugins solutions), and updated the ReadMe file a little bit. So now there is only one file called "ClickToBuild.bat" in the whole repo. Hopefully that will help avoid confusion on what needs done to get everything up and running.

Nov 22, 2010 at 1:53 PM

We also just added a more specific exception that will be thrown if the plug-in implementation can't be found. This will hopefully make it more obvious what the problem is if somebody runs into this issue in the future.