预定义类型microsoft.csharp.runtimebinder没有定义或导入 [英] Predefined type microsoft.csharp.runtimebinder is not defined or imported

查看:386
本文介绍了预定义类型microsoft.csharp.runtimebinder没有定义或导入的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我用我的C#项目动态关键字。我得到下面的错误




一个或多个类型编译一个动态表情无法找到必需的。


< /块引用>

下面是我的代码,我们使用的是VS 2013的.NET Framework 4.5.1。

 动态cstmDocProp =(Microsoft.Office.Core.DocumentProperties)mScribeShell.ScribeShell.ActiveWordDoc.CustomDocumentProperties; 
字符串s =的String.Empty;
S = Convert.ToString(cstmDocProp [mConstants.g_sPROPERTY_DOCUMENT_INDEX] .value的);



我已经提到Microsoft.Chasharp DLL和System.Core程序的DLL在其他环节提出。



指Microsoft.Csharp DLL后,我收到另一个错误为




预定义类型microsoft.csharp.runtimebinder没有定义或导入。



解决方案

  • 右键点击您的项目,并选择添加引用中的参考文献管理器窗口


  • 选择组件 - >框架。


  • 添加选择Microsoft.CSharp.dll,然后单击添加。




希望这将解决您的问题。


I'm using the dynamic keyword in my C# project. I get the below error

One or more types required to compile a dynamic expression cannot be found.

Below is my code and we are using VS 2013 with .NET Framework 4.5.1.

dynamic cstmDocProp = (Microsoft.Office.Core.DocumentProperties)mScribeShell.ScribeShell.ActiveWordDoc.CustomDocumentProperties;  
string s = String.Empty;
s = Convert.ToString(cstmDocProp[mConstants.g_sPROPERTY_DOCUMENT_INDEX].Value);

I have already referred Microsoft.Chasharp DLL and System.Core DLL as suggested in other links.

After referring Microsoft.Csharp DLL I'm getting another error as

predefined type microsoft.csharp.runtimebinder is not defined or imported.

解决方案

  • Right Click on your project and select 'Add reference'

  • Select 'Assemblies->Framework' in 'Reference Manager' window.

  • Add select ‘Microsoft.CSharp.dll’ and click on add.

Hope this will solve your problem.

这篇关于预定义类型microsoft.csharp.runtimebinder没有定义或导入的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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