I\'m trying to migration our website from .Net 3.5 to 4 and I\'m encountering a very weird issue.
Code that works just fine in 3.5 does not anymore once I target .Net4,
Similar to others here, if the referenced assembly is targeted to 'Any CPU', while the current assembly is targeted to 'Any CPU' will cause the problem (at least on a 64 bit machine).