缺少程序集参考 [英] Missing an assembly reference

查看:59
本文介绍了缺少程序集参考的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想使用

报价:

使用Microsoft.SqlServer.Management.Common;

using Microsoft.SqlServer.Management.Common;


这些上面的命名空间可运行如下所示的sql脚本:


these above namespace to run sql script like below:

FileInfo file = new FileInfo("C:\\myscript.sql");
                string script = file.OpenText().ReadToEnd();
                Server server = new Server(new ServerConnection(conn));
                server.ConnectionContext.ExecuteNonQuery(script);



但无法添加上述名称空间.
谁能建议我应该添加哪个dll.



but can''t add the above namespace.
can anyone suggest which dll should i add.

推荐答案

您是否尝试过阅读文档?
http://msdn.microsoft.com/en-us/library/microsoft.sqlserver.management.common.serverconnection.aspx [ ^ ]
Have you tried reading the documentation?
http://msdn.microsoft.com/en-us/library/microsoft.sqlserver.management.common.serverconnection.aspx[^]


references
using Microsoft.SqlServer.Management.Smo;
using Microsoft.SqlServer.Management.Common;
-------------------------------------------------
dll files are
Microsoft.SqlServer.ConnectionInfo.dll
Microsoft.SqlServer.Smo.dll


这篇关于缺少程序集参考的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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