Quantcast
Channel: SQL Server Integration Services forum
Viewing all articles
Browse latest Browse all 24688

Microsoft.SqlServer.ScriptTask assembly not in my library

$
0
0

Hi,

Apologies as this is a repost but inmy experience one wrong answer and I don't get any more responses. I have SQL 2012 SP1 installed but have the problem below 

I'm trying to add the following script to a sript task item on my data flow (SQL 2012):

#region NamespacesusingSystem;usingSystem.Data;usingMicrosoft.SqlServer.Dts.Pipeline.Wrapper;usingMicrosoft.SqlServer.Dts.Runtime.Wrapper;usingMicrosoft.SqlServer.Dts.Runtime;usingSystem.Windows.Forms;usingMicrosoft.SqlServer.Dts.Pipeline;usingSystem.IO;#endregionpublicclassScriptMain{    publicvoidMain()    {                using(StreamReader
r =newStreamReader(Microsoft.SqlServer.Dts.Variables["User::CurrentFile"].Value.ToString()))        {           Microsoft.SqlServer.Dts.Variables["User::strCurrentFileColumnNames"].Value= r.ReadLine();           MessageBox.Show(Microsoft.SqlServer.Dts.Variables["Uer::strCurrentFileColumnNames"].Value.ToString());                       }    }}

I get a red squiggly under Variables saying the type or namespace does not exist in Microsoft.Sqlserver.Dts (are you missing an assembly or reference?)

I can see from here:

http://technet.microsoft.com/en-us/library/ms135941.aspx

"To successfully compile the sample, you need to add a reference to the Microsoft.SqlServer.ScriptTask assembly"

I've done this but I get another red squiggly here saying the type or namespace does not exist in the namespace Microsoft.SqlServer (are you missing an assembly or reference?)

I guess I am missing one - which one and  how do I add it to my machine?

Thanks,

Dan


Viewing all articles
Browse latest Browse all 24688

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>