"缺少编译器要求会员"被抛出的错误多次,几乎没有改变code [英] "Missing compiler required member" error being thrown multiple times with almost no changes to code

查看:160
本文介绍了"缺少编译器要求会员"被抛出的错误多次,几乎没有改变code的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

今天部署了一些变化到C#MVC的网站,我跑后,我回去做一些修改,并在此错误来了:

Today after deploying some changes to a C# MVC site that I run, I went back to make some more modifications and came across this error:

缺少编译器要求会员System.Runtime.CompilerServices.ExtensionAttribute..ctor

Missing compiler required member System.Runtime.CompilerServices.ExtensionAttribute..ctor

该错误是有点模糊(而不是它的描述,很明显),因为它不给我一个文件,行或列引用,仅该项目。此外,它引发错误共20次。我只进行了三次修改我部署之间的时间code(这在当时是完全功能),现在。我恢复了我的变化,它仍然抛出这是没有意义的我同样的错误。

The error is a bit vague (other than it's description, obviously) as it doesn't give me a file, line, or column to reference, only the project. Also, it throws the error a total of 20 times. I only made three changes to the code between the time I deployed (it was completely functional at that time) and now. I reverted my changes and it is still throwing the same error which makes no sense to me.

我还没有SO或谷歌发现了很多的信息,此错误,比这个家伙解决方案等并在一定Mono项目的错误一对夫妇引用(我没有使用单声道)。该解决方案上面的人给需要添加一个类定义,使编译器解析引用。我并不特别希望这样做,因为我这样做,直到这一点没有必要,这只是我的浑code。

I haven't found a lot of information on this error on SO or Google, other than this guys solution and a couple references to some Mono project errors (I'm not using Mono). The solution the guy above gives requires adding a class definition that will allow the compiler to resolve the reference. I don't particularly want to do this because I haven't needed to do it up until this point and it will just muddy my code.

只是好奇,如果任何人有过这个之前运行。在此先感谢!

Just curious if anyone has run across this before. Thanks in advance!

推荐答案

这个错误通常意味着要么你的项目编制针对.NET 2.0,否则你就引用System.Core.dll正确版本的

This error usually means either your project is compiling against .NET 2.0 or you aren't referencing the correct version of System.Core.dll

有关近重复的问题,请参见错误使用C#中的扩展方法时

For a near duplicate question, see Error when using extension methods in C#

这篇关于"缺少编译器要求会员"被抛出的错误多次,几乎没有改变code的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆