MVC 3.0 缺少编译器所需错误
我有一个 MVC 3.0 .Net 4.0 Razor 应用程序,定期出现此运行时错误:
CS0656:缺少编译器所需的成员“Microsoft.CSharp.RuntimeBinder.Binder.InvokeMember”
我可以通过从 bin 目录中删除此 dll 来临时修复该错误 -Microsoft.Scripting.Core.dll -Microsoft.Scripting.ExtensionAttribute.dll
当我重新编译时会重新添加这些文件,并且每隔一段时间我就会收到此错误。这些脚本 dll 似乎存在,因为我引用了 Facebook dll 以及另一个引用 .Net 3.5 项目的项目。这些dll是否应该存在于4.0项目的bin目录中?
顺便说一句,我没有从以前版本的 .Net 升级该项目,也没有像其他人报告的那样使用 Mono。
我正在考虑开始一个空白的新项目并将我的内容复制到其中,但如果我需要重新添加相同的引用,这仍然可能存在问题。还有其他人有更好的主意吗?
谢谢!
I have a MVC 3.0 .Net 4.0 Razor application that is periodically giving me this runtime error:
CS0656: Missing compiler required member 'Microsoft.CSharp.RuntimeBinder.Binder.InvokeMember'
I can temporarily fix the error by deleting this dlls from the bin directory
-Microsoft.Scripting.Core.dll
-Microsoft.Scripting.ExtensionAttribute.dll
These are re-added when I re-compile and at random intervals I get this error. These Scripting dlls seem to exist because I reference the Facebook dll and also another project which references a .Net 3.5 project. Should these dlls exist in the bin directory of 4.0 project at all?
By the way, I've not upgraded the project from a previous version of .Net and I'm not using Mono as other people have reported.
Im thinking of just starting a blank new project and copying my stuff into it, but that still could have the issue if I need to re-add the same references. Does anyone else have a better idea?
Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这是由于在我的例子中使用了较旧版本的 Facebook.dll,因此如果您在引用 facebook 时收到此错误,请查看此错误。
This was due to using an older version of the Facebook.dll in my case so maybe look into this if you receive this error when referencing facebook.