Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Microsoft.SqlServer.Dts.Runtime vs. Microsoft.SQLServer.DTSRuntimeWrap... or, "How in the heck do I call an SSIS package from C#?"

Posted on 2010-09-01
4
Medium Priority
?
1,950 Views
Last Modified: 2013-11-30
I found the web page Running a Package Programmatically on the Local Computer that explains how to call an SSIS package from C#.  So far so good.

I need to reference Microsoft.SqlServer.Dts.Runtime in order to use the SSIS classes.  However, when I try to add a reference, under the .Net tab, I only see Microsoft.SQLServer.DTSRuntimeWrap, which is a little odd (case differences and no period, and what does WRAP mean???).

The "using" statement now is okay but the compiler still cannot find the SSIS classes (shown below):

Any idea what I'm supposed to reference to get these SSIS classes?

(Is there a specific SSIS library or for SQL Server 2005 was the library still called Dts?)
Error    21    The type or namespace name 'Package' could not be found (are you missing a using directive or an assembly reference?)
Error    22    The type or namespace name 'Application' could not be found (are you missing a using directive or an assembly reference?)
Error    23    The type or namespace name 'DTSExecResult' could not be found (are you missing a using directive or an assembly reference?)
Error    24    The type or namespace name 'Application' could not be found (are you missing a using directive or an assembly reference?)

Open in new window

0
Comment
Question by:ZuZuPetals
  • 2
  • 2
4 Comments
 
LVL 16

Expert Comment

by:carsRST
ID: 33582402
I believe you will need to install SQL Server components on your development machine.  After installed you should see the reference you need.
0
 
LVL 2

Author Comment

by:ZuZuPetals
ID: 33586976
I'm trying to update my server with additional software: In the advanced feature selection the Microsoft SQL Server 2005 Setup wizard says I already have the Client Components 1) Connectivity Components, Software Development Kit, and Legacy Components installed.

Plus, I already see lots of .Net components related to database in the "Add Reference" dialog box.

Are you saying I need to install the database engine itself on my development computer?
0
 
LVL 16

Expert Comment

by:carsRST
ID: 33587153
Sorry - just install SSIS then on your dev machine.  DLL should accompany.

0
 
LVL 2

Accepted Solution

by:
ZuZuPetals earned 0 total points
ID: 33587289
I figured it out by chance.  Without installing any additional stuff I tried referencing:

    Microsoft.SqlServer.ManagedDTS

because it looked like it might help.  :)   It apparently includes

    Microsoft.SqlServer.Dts.Runtime;

so my program compiles now.

Thanks for your help.
0

Featured Post

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I have a large data set and a SSIS package. How can I load this file in multi threading?
One of the most important things in an application is the query performance. This article intends to give you good tips to improve the performance of your queries.
Using examples as well as descriptions, and references to Books Online, show the different Recovery Models available in SQL Server and explain, as well as show how full, differential and transaction log backups are performed
Using examples as well as descriptions, and references to Books Online, show the documentation available for datatypes, explain the available data types and show how data can be passed into and out of variables.

972 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question