2011-03-26 135 views
3

当我跑我的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:类型或命名空间名称“交流

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; 
+0

在这个问题中包含一个实际的问题会很好,所以我们不必使用[psychic debugging powers](http://blogs.msdn.com/b/oldnewthing/archive/2006/06/) 21/641456.aspx)找出你想知道的东西(我试了一下)。 – earlNameless 2011-03-26 14:46:08

回答

2

你可能缺少参考microsoft.exchange.webservices.dll assemb:微软(?是否缺少程序集引用)

源错误“没有命名空间中存在' LY。至少ASP.NET在尝试编译代码时找不到该程序集。

1

这是一个页面编译错误。要解决此问题,您需要查看compilation.assemblies配置和pages.namespaces,它们允许您配置生成的页面代码中使用的程序集和命名空间。另一种确保页面编译时引用程序集的方法是在你的解决方案中将它们标记为“Copy Local”

就你而言,你可能在你的项目中引用了一个Exchange dll。将其标记为“复制本地”并且错误应该解决。

7

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

+0

+1,有完全相同的问题。 – Crono 2014-10-15 16:30:02

相关问题