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
1,871 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

In this article I will describe the Copy Database Wizard method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
This article shows gives you an overview on SQL Server 2016 row level security. You will also get to know the usages of row-level-security and how it works
Using examples as well as descriptions, and references to Books Online, show the documentation available for date manipulation functions and by using a select few of these functions, show how date based data can be manipulated with these functions.
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function

756 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