asp.net mvc 4 - WebAPI RC 'System.Runtime.CompilerServices.ExtensionAttribute' from assembly 'mscorlib, -
i have webapi application running .net4 trying working on server. api works fine locally.
could not load type 'system.runtime.compilerservices.extensionattribute' assembly 'mscorlib, version=4.0.0.0, culture=neutral, publickeytoken=b77a5c561934e089'.
what need change work on server?
are sure compiling against .net 4 , not .net 4.5? moved extensionattribute mscorlib in .net 4.5 (so put extension methods in mscorlib). i'd expect see error if compiled against .net 4.5 , tried run on .net 4.
edit: actually, if using ilmerge, need use path .net 4.0 reference assemblies in targetplatform switch, instead of path implementation, described in blog post: http://www.mattwrock.com/post/2012/02/29/what-you-should-know-about-running-ilmerge-on-net-45-beta-assemblies-targeting-net-40.aspx
Comments
Post a Comment