Resolution failed for type PackageFileService

Nov 19, 2010 at 11: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:

http://localhost/galleryserver/PackageFiles

Coordinator
Nov 20, 2010 at 12:00 AM
Edited Nov 20, 2010 at 12:03 AM

Do you need to access this page ?

Only the odata feed matters

 

Developer
Nov 20, 2010 at 12:02 AM

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 20, 2010 at 12:06 AM

Using the console app i get:

D:\Source\Console\NuGetUploadConsole\NuGetUploadConsole\bin\Debug>NuGetUploadCon
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)

D:\Source\Console\NuGetUploadConsole\NuGetUploadConsole\bin\Debug>

 

So i thought it was related ?

Developer
Nov 20, 2010 at 12:07 AM

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

Nov 20, 2010 at 12:10 AM

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

Suggestions:
  1) Ensure that the provider handles creation requests properly.

Nov 20, 2010 at 12:18 AM

At some point this line existed:

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

 

Then it got replaced by:

IoC

 

.Resolver.Register(IoC.Resolver.Resolve<PluginService>().FindPluginImplementation<IPackageFactory

>);

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

 

Developer
Nov 20, 2010 at 12:20 AM

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.

Developer
Nov 20, 2010 at 12:27 AM

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

Nov 20, 2010 at 12:38 AM

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 ?

 

Developer
Nov 20, 2010 at 12:40 AM

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 20, 2010 at 12:42 AM

I did run it.

Developer
Nov 20, 2010 at 12:47 AM

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 20, 2010 at 12:49 AM

I found NuPackPackageFactory one level above under

D:\Source\GalleryServer\GalleryServer\src\Gallery.Server

and not

D:\Source\GalleryServer\GalleryServer\src\Gallery.Server\bin

as i would expect.

Nov 20, 2010 at 1: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.

Coordinator
Nov 22, 2010 at 2: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.

Coordinator
Nov 22, 2010 at 2: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.