2013-04-18 44 views
-1
The type or namespace name 'Server' could not be found (are you missing a 
using directive or an assembly reference?) 

什么是要添加的命名空间或组件对付这个error.Similar引发错误时我正在使用ServerConnection类。类型或命名空间名称“服务器”找不到(是否缺少using指令或程序集引用?)

+0

那么你有没有在您的项目'Microsoft.SqlServer.ConnectionInfo.dll'(这些类居住的组装)的参考? – Arran

+0

'通过右键单击项目中的'Reference'来添加Reference。 – RajeshKdev

回答

3

您应该参考以下装配

命名空间:在Microsoft.SqlServer.ConnectionInfo.dll Microsoft.SqlServer.ConnectionInfo(:Microsoft.SqlServer.Management.Common

大会

Find more here

0

找到发生此错误的源文件。它可能会包含using语句命名空间,像

//make sure this dll is copied to the deployment machine 
using Foo.Server; // <===== 

namespace MyProject 
{ 
    public class Bar { } 
} 
  • 检查到特定库的引用添加到项目
  • 确保它/箱引用,而是使用一个/lib目录文件夹或GAC
  • 检查库的属性,并将其设置复制本地真正
相关问题