Ninject raising TypeLoadException

590 Views Asked by At

I am using Ninject 1.5 with my .Net 2.0 web application. My local dev machine had no problem running the application, but once I deploy it onto a testing server, all I get is a big yellow saying that -

"Method 'Ninject.Core.Infrastructure.TypedCollection '2.Add' on 'Ninject.Core.Parameters.ParameterCollection' from assembly 'Ninject.Core, Version=1.5.0.0,...' tried to implicitly implement an interface method with weaker type parameter constraints."

My code is throwing this exception when it is creating the Ninject kernel and loads my StandardModules.

Any ideas?

1

There are 1 best solutions below

2
On

Looks like you have some DLL version mismatch issue. Where did you get the DLL(s) ? (rhetorical)

Why not use any of the builds from more recently this decade and take andvantage of massive amounts of real world battering the framework has recieved since the v2 days - use v2 - it supports .NET 2 perfectly.

If you have a specific reason for using that version, it doesnt hurt, but using .NET 2 isnt it.