Installing Ninject with WebAPI 2 OWIN

961 views
Skip to first unread message

Ken VeArd

unread,
Sep 4, 2014, 5:01:43 PM9/4/14
to nin...@googlegroups.com
This is a brand new project I am starting up.   I am getting the latest "Stable" Nuget Packages.  Although I had to install 1 Pre-Release Ninject package.

I am getting this error:

Could not load file or assembly 'Ninject.Web.Common.OwinHost, Version=3.2.0.0, Culture=neutral, PublicKeyToken=c7192dc5380945e7' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)


When I try and install:
Ninject.Web.Common.OwinHost version: 3.2.2.0  (I currently have 3.0.2-unstable-9021) I get the following error:
Install failed. Rolling back...
Updating 'Microsoft.Owin 3.0.0' to 'Microsoft.Owin 2.0.0' failed. Unable to find versions of 'Microsoft.Owin.Security, Microsoft.Owin.Security.Cookies, Microsoft.Owin.Security.OAuth, Microsoft.AspNet.WebApi.Owin, Microsoft.Owin.Cors, Microsoft.Owin.Host.SystemWeb' that are compatible with 'Microsoft.Owin 2.0.0'.

The entire NuGet Message is:
Attempting to resolve dependency 'Ninject.Web.Common (≥ 3.2.0.0 && < 3.3.0.0)'.
Attempting to resolve dependency 'Ninject (≥ 3.2.0.0 && < 3.3.0.0)'.
Attempting to resolve dependency 'Microsoft.Owin (≥ 2.0 && < 3.0)'.
Attempting to resolve dependency 'Owin (≥ 1.0)'.
Installing 'Microsoft.Owin 2.0.0'.
Successfully installed 'Microsoft.Owin 2.0.0'.
Installing 'Ninject.Web.Common.OwinHost 3.2.2.0'.
Successfully installed 'Ninject.Web.Common.OwinHost 3.2.2.0'.
Updating 'Ninject.Web.Common.OwinHost' to version '3.2.2.0' in project 'CharlieAPI'.
Install failed. Rolling back...
Updating 'Microsoft.Owin 3.0.0' to 'Microsoft.Owin 2.0.0' failed. Unable to find versions of 'Microsoft.Owin.Security, Microsoft.Owin.Security.Cookies, Microsoft.Owin.Security.OAuth, Microsoft.AspNet.WebApi.Owin, Microsoft.Owin.Cors, Microsoft.Owin.Host.SystemWeb' that are compatible with 'Microsoft.Owin 2.0.0'.


How do I get this app running?

Thank you for any assistance you can provide!

Ken

Craig Selbert

unread,
Oct 13, 2014, 2:24:07 PM10/13/14
to nin...@googlegroups.com
Ken,

I too recieved this issue, I was able to overcome this using the following command 

Install-Package Ninject.Web.WebApi.OwinHost -Version 3.2.1 -DependencyVersion Highest

Basically force Ninject OwinHost to use the latest version of OWIN.

Craig Selbert

Reply all
Reply to author
Forward
0 new messages