"Microsoft SharePoint is not supported with version 4.0.30319.239 of the Microsoft .Net Runtime".
Refer the following items:
Cause Of Error:
All server-side customizations directly for SharePoint 2010 need to be either the .NET Framework 3.5 or the .NET Framework 3.5 SP1. SharePoint 2010 doesn't support access from .NET Framework 4 or being run in a .NET Framework 4 app domain. When you try to run any update made in .NET Framework 4.0 or higher, you will face this error.
Microsoft recommends that you develop a web service that uses the .NET Framework 4 and then connect to it from SharePoint.
http://blogs.msdn.com/b/sharepointdev/archive/2011/07/14/net-framework-support-in-sharepoint-2010.aspx // Alpesh Shah