Could not load type 'System.Runtime.CompilerServices.ExtensionAttribute' from assembly 'mscorlib

前端 未结 10 708
悲哀的现实
悲哀的现实 2020-11-22 14:25

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

10条回答
  •  暖寄归人
    2020-11-22 14:35

    We ran into this problem and tracked it down to the Geocoding.net NuGet package that we were using to help with our Google Maps views (Geocoding.net version 3.1.0 published 2/4/2014).

    The Geocoding dll appears to be .Net 4.0 when you examine the package file or view it using Jet Brains’ Dot Peek application; however, a colleague of mine says that it was compiled using ilmerge so it is most likely related to the ilmerge problems listed above.

    It was a long process to track it down. We fetched different changesets from TFS till we narrowed it down to the changeset that added the aforementioned NuGet package. After removing it, we were able to deploy to our .NET 4 server.

提交回复
热议问题