c# - 命名空间中不存在类型或命名空间名称 'Exchange'

标签 c# asp.net

当我运行我的 ASP.net 应用程序时,我收到此错误:

Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately. 

编译器错误消息:CS0234:命名空间“Microsoft”中不存在类型或命名空间名称“Exchange”(您是否缺少程序集引用?)

源错误:
   Line 06:  using System.Web.UI.WebControls;
   Line 07:  using System.Data.OleDb;
   Line 08:  using Microsoft.Exchange.WebServices.Data; // error
   Line 09:  using System.Net;
   Line 10:  using System.Data.SqlClient;

最佳答案

确保您的目标框架版本在您的解决方案的所有项目中匹配。我个人在 .NET Framework 4 Client Profile 方面遇到过问题。一旦我将它切换到 .NET Framework 4,它就起作用了。

关于c# - 命名空间中不存在类型或命名空间名称 'Exchange',我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5442900/

相关文章:

c# - 当 dataGridView 行匹配文本框时显示错误消息

c# - 在 VB.NET 中创建可从 C# 使用的索引器

asp.net - 从 jQuery AJAX 调用动态填充 ASP.NET Gridview

javascript - AngularJS-如何格式化包含一系列数字的字符串以在 HTML 表格上显示为列表?

asp.net - sql语句条件

c# - 将安全问题推迟到应用程序开发周期的末尾是一种好方法吗?

c# - Dapper QueryMultiple() 方法从 postgreSQL 返回 null

c# - 从其他进程读取和写入

c# - 无法在 WPF 中使用 IMultiValueConverter 以允许公制或英制输入

asp.net - 从 ASP.NET 3.5 应用程序在 IFRAME 内运行 GWT 应用程序(包括小程序)?