When starting up my web site for the first time, I\'m getting this error
Could not load type \'System.Runtime.CompilerServices.ExtensionAttribute\' from assemb
In my case after downgrading from .NET 4.5 to .NET 4.0 project was working fine on a local machine, but was failing on server after publishing.
Turns out that destination had some old assemblies, which were still referencing .NET 4.5.
Fixed it by enabling publishing option "Delete all existing files prior to publish"