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

前端 未结 10 698
悲哀的现实
悲哀的现实 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:41

    Just adding this answer to help Google save some punter the hours I have spent to get here. I used ILMerge on my .Net 4.0 project, without the /targetplatform option set, assuming it would be detected correctly from my main assembly. I then had complaints from users only on Windows XP aka WinXP. This now makes sense as XP will never have > .Net 4.0 installed whereas most newer OSes will. So if your XP users are having issues, see the fixes above.

提交回复
热议问题