ninject / Ninject.Extensions.Wcf

Ninject WCF extensions
Other
80 stars 54 forks source link

Nuget install fails on .Net 3.5 #35

Closed dingjimmy closed 8 years ago

dingjimmy commented 9 years ago

Attempting to install Ninject.Extensions.Wcf 3.2.2 nuget package on a .Net 3.5 WCF service on windows 8.1 It fails with the following error in the package manager console:

Failed to add reference to 'System.ServiceModel.Activation'. Please make sure that it is in the Global > Assembly Cache.

Tried using version 3.0.0.5 and then come accross this bug: https://github.com/ninject/Ninject.Web.Common/issues/6

The full package manager output is below...

Attempting to gather dependencies information for package 'Ninject.Extensions.Wcf.3.2.2' with respect to project 'InstrumentServer\Optimal.SynTQ.InstrumentServer.Kaiser.Services', targeting '.NETFramework,Version=v3.5'
Attempting to resolve dependencies for package 'Ninject.Extensions.Wcf.3.2.2' with DependencyBehavior 'Lowest'
Resolving actions to install package 'Ninject.Extensions.Wcf.3.2.2'
Resolved actions to install package 'Ninject.Extensions.Wcf.3.2.2'
Adding package 'Ninject.Extensions.Wcf.3.2.2' to folder 'C:\Projects\SynTQ\dev\packages'
Added package 'Ninject.Extensions.Wcf.3.2.2' to folder 'C:\Projects\SynTQ\dev\packages'
Install failed. Rolling back...
Package 'Ninject.Extensions.Wcf 3.2.2' does not exist in project 'Optimal.SynTQ.InstrumentServer.Kaiser.Services'
Removing package 'Ninject.Extensions.Wcf 3.2.2' from folder 'C:\Projects\SynTQ\dev\packages'
Removed package 'Ninject.Extensions.Wcf 3.2.2' from folder 'C:\Projects\SynTQ\dev\packages'
Failed to add reference to 'System.ServiceModel.Activation'. Please make sure that it is in the Global Assembly Cache.
========== Finished ==========
dingjimmy commented 9 years ago

Investigated this a bit. Looks like Microsoft moved the System.ServiceModel.Activation namespace from System.ServiceModel.dll in dotnet35 to System.ServiceModel.Activation.dll in dotnet40.

Therefore the dotnet35 version of this extension doesn't need to take a dependancy on System.ServiceModel.Activation.dll, as it doesn't exist!

dingjimmy commented 8 years ago

This issue is fixed in pull request #37