System.MissingMethodException: Method not found:
'System.Collections.Generic.List`1<!!0>
BusinessEntities.Helper.Sort(System.Func`2<!!0,!!0>)'
I get this error on a page in the website.The website build is prepared using visual studio web deployment project. When I deploy the build in IIS and run the page, I get the above error. When the website is run in debug mode in visual studio, it executes fine.
Background : I have a asp.net 4.0 website which references the BusinessEntities project, which is a .NET 3.5 class library project. The project contains a public static Helper class which has the extension method Sort for sorting generic lists of objects. The Helper class is in the BusinessEntities namespace.
If I change the version of the BusinessEntites project to .Net 4.0 and then build the website, this error does not arise. The project cannot be upgraded to 4.0 due to some operational restrictions.
The strange thing in all this is that the generic extension method and the website and project structure has been in the solution since over a year without any issues. I am at a loss to understand why this error pops up all of a sudden.