Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/307.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 我如何确定哪个参考I';此Outlook互操作代码(OlItemType.olMailItem)中是否缺少m?_C#_Outlook_Office Interop_Com Interop - Fatal编程技术网

C# 我如何确定哪个参考I';此Outlook互操作代码(OlItemType.olMailItem)中是否缺少m?

C# 我如何确定哪个参考I';此Outlook互操作代码(OlItemType.olMailItem)中是否缺少m?,c#,outlook,office-interop,com-interop,C#,Outlook,Office Interop,Com Interop,我正在使用Interop Outlook代码,这要求我添加对Microsoft.Office.Interop.Outlook的引用(“Microsoft Outlook 12.0对象库”;版本=9.3.0.0) 添加该引用导致所有redd-up Outlook类解析为更柔和的色调,但尝试构建项目仍会导致编译器错误,即“找不到编译动态表达式所需的一个或多个类型。是否缺少引用?” 代码如下: Microsoft.Office.Interop.Outlook.Application app = new

我正在使用Interop Outlook代码,这要求我添加对Microsoft.Office.Interop.Outlook的引用(“Microsoft Outlook 12.0对象库”;版本=9.3.0.0)

添加该引用导致所有redd-up Outlook类解析为更柔和的色调,但尝试构建项目仍会导致编译器错误,即“找不到编译动态表达式所需的一个或多个类型。是否缺少引用?”

代码如下:

Microsoft.Office.Interop.Outlook.Application app = new Microsoft.Office.Interop.Outlook.Application();
MailItem mailItem = app.CreateItem(OlItemType.olMailItem);
mailItem.Subject = String.Format("Platypus file generated {0}", GetYYYYMMDDHHMM());
mailItem.To = emailAddr;
当我2次单击该错误消息时,会突出显示:

app.CreateItem(OlItemType.olMailItem);
更奇怪的是:

"*Predefined type 'Microsoft.CSharp.RuntimeBinder.Binder' is not defined or imported*"
2-点击它没有任何结果;也许等我安抚了第一只野兽,它就会消失


要编译此文件,我还需要添加哪些引用?

Microsoft.CSharp
必须被引用。它应该是可用的框架程序集之一