Could not load file or assembly 'Ninject'


I installed Ninject packages via package manager console:

install-package Ninject.Mvc5
install-package Ninject.Web.WebApi

Beacause I didn't specify version It installed I suppose the latest availabe version (3.3.0) of the packages and their dependencies.
Among other dependecies It installed Ninject 3.3.3.

Then I realized I needed version so I unistalled Ninject.Mvc5 and Ninject.Web.WebApi version 3.3.0 with all their dependencies (github showed 0 changes after uninstalling process) and installed version Ninject wich goes with this is version 3.2.0.

So, when I run the app I got following error: "Could not load file or assembly 'Ninject, Version=, 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)"

I checked assembly's manifest definition via ildasm and there are no any reference to Ninject 3.3.3. All references are to Ninject 3.2.0. Also in .csproj, packages.config and bin folder Ninject version is 3.2.0.

I am able to resolve this problem with Web.config:

    <assemblyIdentity name="Ninject" publicKeyToken="c7192dc5380945e7" culture="neutral" />
    <bindingRedirect oldVersion="" newVersion="" />

but obviously, there is a place where still exist reference to this Ninject 3.3.3 version which has deleted. Where is that place, can someone figure out?

asked on Stack Overflow Jun 7, 2019 by nesta_bg

0 Answers

Nobody has answered this question yet.

User contributions licensed under CC BY-SA 3.0